/* ── Drawer ────────────────────────────────────────────────────────────── */
.dpf-drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); z-index: 50;
}
.dpf-drawer-overlay.open { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.dpf-drawer {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(20,18,30,.92); backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 18px 18px 0 0; border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -16px 60px rgba(0,0,0,.5); max-height: 90vh; overflow-y: auto; z-index: 51;
}
.dpf-drawer.open { display: block; animation: drawer-up .35s cubic-bezier(.16,1,.3,1) both; }
@keyframes drawer-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.dpf-drawer-head {
  position: sticky; top: 0; z-index: 2; background: rgba(15,13,22,.92); backdrop-filter: blur(20px);
  padding: 16px 28px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.10); box-shadow: inset 0 -2px 0 var(--euro-amarillo);
}
.dpf-drawer-head-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dpf-drawer-num  { font-size: 17px; font-weight: 800; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.dpf-drawer-name { font-size: 14.5px; font-weight: 700; color: #fff; }
.dpf-drawer-close {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: background .15s; flex-shrink: 0;
}
.dpf-drawer-close:hover { background: rgba(255,255,255,.18); }
.dpf-drawer-body { padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 22px; }

/* Drawer section */
.dpf-d-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #c4b5fd; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.dpf-d-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dpf-d-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dpf-d-field {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: 12px 14px;
}
.dpf-d-lbl { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--glass-fg-3); margin-bottom: 5px; }
.dpf-d-val { font-size: 13px; color: var(--glass-fg-1); font-weight: 600; }
.dpf-d-val.muted { color: var(--glass-fg-4); font-weight: 500; }
.dpf-d-link { color: #c4b5fd; text-decoration: none; border-bottom: 1px dashed rgba(196,181,253,.4); transition: color .15s; }
.dpf-d-link:hover { color: #fff; }
.dpf-d-sub-title { font-size: 12px; font-weight: 700; color: var(--glass-fg-2); margin-bottom: 6px; }
.dpf-d-charts { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }

/* Acta card */
.dpf-d-acta-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); border-radius: 10px; padding: 12px 16px; }
.dpf-d-acta-body { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.dpf-d-acta-letter { width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.dpf-d-acta-semaphore { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dpf-d-acta-lbl { font-size: 12.5px; color: var(--glass-fg-1); font-weight: 600; }

/* Discrepancy warning */
.dpf-d-warn {
  margin-top: 12px; display: flex; gap: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245,158,11,.10) 0%, rgba(251,191,36,.06) 100%);
  border: 1px solid rgba(245,158,11,.32); border-left: 3px solid #f59e0b;
  border-radius: 10px; align-items: flex-start;
}
.dpf-d-warn-icon { font-size: 18px; line-height: 1; color: #fbbf24; flex-shrink: 0; margin-top: 1px; }
.dpf-d-warn-body { flex: 1; }
.dpf-d-warn-title { font-size: 11px; font-weight: 800; color: #fbbf24; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 4px; }
.dpf-d-warn-text  { font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.85); }
.dpf-d-warn-text b { color: #fff; font-weight: 700; }
.dpf-tip { position: relative; cursor: help; }
.dpf-tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: #1e1e2e; color: #fde68a; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; padding: 6px 10px; border-radius: 7px;
  border: 1px solid rgba(251,191,36,.45); box-shadow: 0 4px 14px rgba(0,0,0,.45);
  pointer-events: none; opacity: 0; transition: opacity .15s ease; z-index: 9999;
}
.dpf-tip:hover::after { opacity: 1; }

/* Documental cards */
.dpf-d-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dpf-d-doc  { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.dpf-d-doc-lbl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--glass-fg-2); font-weight: 500; }
.dpf-d-doc-val { font-size: 11px; font-weight: 700; }
.dpf-d-doc-dot { width: 8px; height: 8px; border-radius: 50%; }
.dpf-d-doc.done { border-color: rgba(34,197,94,.30); background: rgba(34,197,94,.06); }
.dpf-d-doc.done .dpf-d-doc-dot { background: #22c55e; }
.dpf-d-doc.done .dpf-d-doc-val { color: #86efac; }
.dpf-d-doc.pend { border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.06); }
.dpf-d-doc.pend .dpf-d-doc-dot { background: #f59e0b; }
.dpf-d-doc.pend .dpf-d-doc-val { color: #fbbf24; }
.dpf-d-doc.miss { border-color: rgba(239,68,68,.30); background: rgba(239,68,68,.06); }
.dpf-d-doc.miss .dpf-d-doc-dot { background: #ef4444; }
.dpf-d-doc.miss .dpf-d-doc-val { color: #fca5a5; }
.dpf-d-doc.none .dpf-d-doc-dot { background: #64748b; }
.dpf-d-doc.none .dpf-d-doc-val { color: var(--glass-fg-4); }
.dpf-d-doc.na   { border-color: rgba(148,163,184,.20); background: rgba(148,163,184,.04); }
.dpf-d-doc.na   .dpf-d-doc-dot { background: transparent; border: 1.5px dashed #64748b; }
.dpf-d-doc.na   .dpf-d-doc-val { color: #94a3b8; font-style: italic; }

/* Mini table */
.dpf-tbl-mini { min-width: 0 !important; }
.dpf-tbl-mini thead th { background: rgba(255,255,255,.04); }
.dpf-tbl-mini tbody tr { cursor: default; }
.dpf-tbl-mini tbody tr:hover { background: transparent !important; }

/* ── Gestores PMO tab ─────────────────────────────────────────────────────── */
.dpf-gestores-list { display: flex; flex-direction: column; gap: 12px; }
.dpf-gestor-card { padding: 0; overflow: hidden; }
.dpf-gestor-card.expanded { border-color: rgba(99,102,241,.35); }
.dpf-gestor-head {
  display: grid;
  grid-template-columns: minmax(220px,1.2fr) minmax(0,3fr) auto;
  align-items: center; gap: 24px; padding: 18px 22px;
  cursor: pointer; transition: background .15s;
}
.dpf-gestor-head:hover { background: rgba(255,255,255,.03); }
.dpf-gestor-card.expanded .dpf-gestor-head { border-bottom: 1px solid rgba(255,255,255,.08); }
.dpf-gestor-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dpf-gestor-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0;
  letter-spacing: .02em;
  box-shadow: 0 0 0 2px rgba(255,255,255,.10), 0 4px 12px rgba(0,0,0,.3);
}
.dpf-gestor-name  { font-size: 14px; font-weight: 700; color: #fff; }
.dpf-gestor-sub   { font-size: 11.5px; color: var(--glass-fg-3); margin-top: 2px; }
.dpf-gestor-metrics { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dpf-gestor-metric { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dpf-gestor-metric-lbl {
  font-size: 9.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--glass-fg-3); white-space: nowrap;
}
.dpf-gestor-metric-val { display: flex; align-items: center; gap: 6px; color: var(--glass-fg-1); font-variant-numeric: tabular-nums; }
.dpf-stack-row { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.dpf-stack-bar { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); display: flex; }
.dpf-stack-seg { height: 100%; }
.dpf-stack-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: var(--glass-fg-2); font-variant-numeric: tabular-nums; }
.dpf-stack-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dpf-stack-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dpf-gestor-chevron {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.dpf-gestor-chevron:hover { background: rgba(255,255,255,.12); color: #fff; }
.dpf-gestor-detail { padding: 0; }
.dpf-gestor-detail .dpf-tbl { font-size: 12px; min-width: 0 !important; }
.dpf-gestor-detail .dpf-tbl thead th { background: rgba(255,255,255,.03); padding: 10px 16px; }
.dpf-gestor-detail .dpf-tbl tbody td { padding: 12px 16px; }
.dpf-gestor-detail .dpf-tbl tbody tr { cursor: pointer; }
.dpf-gestor-detail .dpf-tbl tbody tr:hover { background: rgba(139,92,246,.10) !important; }

/* ════════════════════════════════ LIGHT THEME ════════════════════════════ */
body[data-theme="light"] {
  background: #ECE9E2; color: #1A1A1F;
  --glass-fg-1: rgba(26,26,31,.92);
  --glass-fg-2: rgba(26,26,31,.72);
  --glass-fg-3: rgba(26,26,31,.55);
  --glass-fg-4: rgba(26,26,31,.38);
}
body[data-theme="light"] .silk-canvas { opacity: .04; filter: invert(1) saturate(.6) brightness(1.4); }
body[data-theme="light"] .dpf-app::before { background: radial-gradient(1400px 800px at 50% 30%, rgba(255,255,255,0) 0%, rgba(0,0,0,.04) 70%, rgba(0,0,0,.07) 100%); }
body[data-theme="light"] .dpf-header-band { border-bottom-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-title       { color: #1A1A1F; }
body[data-theme="light"] .dpf-subtitle    { color: #5C5B54; }
body[data-theme="light"] .dpf-sync-lbl    { color: #8C8B82; }
body[data-theme="light"] .dpf-sync-val    { color: #3A3935; }
body[data-theme="light"] .dpf-eyebrow     { color: rgba(0,0,0,.4); }
body[data-theme="light"] .dpf-tabs        { border-bottom-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-tab         { color: #6B6A60; }
body[data-theme="light"] .dpf-tab:hover:not(.active) { color: #3A3935; }
body[data-theme="light"] .dpf-tab.active  { color: #1A1A1F; border-bottom-color: #E8C700; }
body[data-theme="light"] .dpf-panel,
body[data-theme="light"] .dpf-kpi,
body[data-theme="light"] .dpf-filters,
body[data-theme="light"] .dpf-crit-card  { background: #F7F5EF; border-color: rgba(0,0,0,.08); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 2px 10px rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.6); }
body[data-theme="light"] .dpf-panel-title { color: #1A1A1F; }
body[data-theme="light"] .dpf-panel-sub   { color: #6B6A60; }
body[data-theme="light"] .dpf-kpi-num     { color: #1A1A1F; }
body[data-theme="light"] .dpf-kpi.ok   .dpf-kpi-num { color: #15803d; }
body[data-theme="light"] .dpf-kpi.warn .dpf-kpi-num { color: #b91c1c; }
body[data-theme="light"] .dpf-kpi.brand .dpf-kpi-num { color: #7c5800; }
body[data-theme="light"] .dpf-kpi.info .dpf-kpi-num { color: #4338ca; }
body[data-theme="light"] .dpf-kpi-lbl    { color: #6B6A60; }
body[data-theme="light"] .dpf-crit-card:hover { background: rgba(99,102,241,.05); border-color: rgba(99,102,241,.35); }
body[data-theme="light"] .dpf-crit-name  { color: #1A1A1F; }
body[data-theme="light"] .dpf-crit-pct   { color: #1A1A1F; }
body[data-theme="light"] .dpf-crit-retraso { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.35); color: #b91c1c; }
body[data-theme="light"] .dpf-legend      { color: #6B6A60; }
body[data-theme="light"] .dpf-doc-leg     { color: #6B6A60; }
body[data-theme="light"] .dpf-fg label    { color: #6B6A60; }
body[data-theme="light"] .dpf-fg input,
body[data-theme="light"] .dpf-fg select   { background: #fff; border-color: rgba(0,0,0,.12); color: #1A1A1F; }
body[data-theme="light"] .dpf-fg input::placeholder { color: rgba(0,0,0,.35); }
body[data-theme="light"] .dpf-select-wrap::after { border-right-color: rgba(0,0,0,.5); border-bottom-color: rgba(0,0,0,.5); }
body[data-theme="light"] .dpf-tbl thead th   { background: #EFEDE6; border-bottom-color: rgba(0,0,0,.08); color: #6B6A60; }
body[data-theme="light"] .dpf-tbl tbody tr   { border-bottom-color: rgba(0,0,0,.06); }
body[data-theme="light"] .dpf-tbl tbody tr:hover,
body[data-theme="light"] .dpf-tbl tbody tr.selected { background: rgba(99,102,241,.06); }
body[data-theme="light"] .dpf-tbl tbody td   { color: #3A3935; }
body[data-theme="light"] .dpf-tbl tbody td.dpf-nm,
body[data-theme="light"] .dpf-tbl tbody td.dpf-nm strong { color: #1A1A1F; }
body[data-theme="light"] .dpf-row-num  { color: #B0AEA4; }
body[data-theme="light"] .dpf-mute     { color: #B0AEA4; }
body[data-theme="light"] .dpf-vencida  { color: #b91c1c; }
body[data-theme="light"] .dpf-pos      { color: #b91c1c; }
body[data-theme="light"] .dpf-neg      { color: #15803d; }
body[data-theme="light"] .dpf-status,
body[data-theme="light"] .dpf-d-val,
body[data-theme="light"] .dpf-pg-num   { color: #3A3935; }
body[data-theme="light"] .dpf-pg-bar   { background: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-table-head { border-bottom-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-pagination { border-top-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-pagination-info { color: #6B6A60; }
body[data-theme="light"] .dpf-pagination-info b { color: #1A1A1F; }
body[data-theme="light"] .dpf-page-btn { background: #fff; border-color: rgba(0,0,0,.12); color: #3A3935; }
body[data-theme="light"] .dpf-page-btn:hover:not(:disabled) { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.40); color: #4338ca; }
body[data-theme="light"] .dpf-drawer-overlay { background: rgba(0,0,0,.35); }
body[data-theme="light"] .dpf-drawer  { background: #FAF8F2; border-top-color: rgba(0,0,0,.10); box-shadow: 0 -16px 60px rgba(0,0,0,.18); }
body[data-theme="light"] .dpf-drawer-head { background: #EFEDE6; border-bottom-color: rgba(0,0,0,.08); box-shadow: inset 0 -2px 0 #E8C700; }
body[data-theme="light"] .dpf-drawer-num  { color: #8C8B82; }
body[data-theme="light"] .dpf-drawer-name { color: #1A1A1F; }
body[data-theme="light"] .dpf-drawer-close { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.10); color: #3A3935; }
body[data-theme="light"] .dpf-d-field { background: #FBF9F4; border-color: rgba(0,0,0,.07); }
body[data-theme="light"] .dpf-d-lbl  { color: #8C8B82; }
body[data-theme="light"] .dpf-d-section-title { color: #7c3aed; border-bottom-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-d-acta-card { background: #FBF9F4; border-color: rgba(0,0,0,.07); }
body[data-theme="light"] .dpf-d-link  { color: #5b21b6; }
body[data-theme="light"] .dpf-d-doc   { background: #FBF9F4; border-color: rgba(0,0,0,.07); }
body[data-theme="light"] .dpf-d-doc-lbl { color: #3A3935; }
body[data-theme="light"] .dpf-d-warn  { background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(251,191,36,.07)); border-color: rgba(245,158,11,.40); }
body[data-theme="light"] .dpf-d-warn-icon  { color: #b45309; }
body[data-theme="light"] .dpf-d-warn-title { color: #92400e; }
body[data-theme="light"] .dpf-d-warn-text  { color: #5C5B54; }
body[data-theme="light"] .dpf-d-warn-text b { color: #1A1A1F; }
body[data-theme="light"] .dpf-tip::after { background: #fffbeb; color: #92400e; border-color: rgba(180,83,9,.40); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
body[data-theme="light"] .dpf-theme-toggle { background: #fff; border-color: rgba(0,0,0,.12); color: #3A3935; }
body[data-theme="light"] .dpf-pill-tipo { background: rgba(0,0,0,.05); color: #5C5B54; border-color: rgba(0,0,0,.10); }
body[data-theme="light"] .dpf-pg-num.ok     { color: #15803d; }
body[data-theme="light"] .dpf-pg-num.warn   { color: #b45309; }
body[data-theme="light"] .dpf-pg-num.danger { color: #b91c1c; }
/* Gestores light theme */
body[data-theme="light"] .dpf-gestor-card.expanded { border-color: rgba(99,102,241,.30); }
body[data-theme="light"] .dpf-gestor-head:hover { background: rgba(0,0,0,.025); }
body[data-theme="light"] .dpf-gestor-card.expanded .dpf-gestor-head { border-bottom-color: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-gestor-name  { color: #1A1A1F; }
body[data-theme="light"] .dpf-gestor-sub   { color: #6B6A60; }
body[data-theme="light"] .dpf-gestor-metric-lbl { color: #6B6A60; }
body[data-theme="light"] .dpf-gestor-metric-val { color: #1A1A1F; }
body[data-theme="light"] .dpf-stack-bar { background: rgba(0,0,0,.08); }
body[data-theme="light"] .dpf-stack-legend { color: #3A3935; }
body[data-theme="light"] .dpf-gestor-chevron { background: #fff; border-color: rgba(0,0,0,.12); color: #3A3935; }
body[data-theme="light"] .dpf-gestor-chevron:hover { background: #F0EDE6; color: #1A1A1F; }
body[data-theme="light"] .dpf-gestor-detail .dpf-tbl thead th { background: #EFEDE6; }
body[data-theme="light"] .dpf-gestor-detail .dpf-tbl tbody tr:hover { background: rgba(99,102,241,.06) !important; }
