/* ============ Portal BI — rediseño (tokens del handoff de diseño) ============ */
:root {
  --red: #E40138; --red-dark: #C4002F; --red-tint: #FDE8EE;
  --purple: #5B2883; --purple-dark: #4A1F6C; --purple-tint: #F1EBF7;
  --bg: #F7F5FA; --surface: #FFFFFF; --surface-2: #FAF8FC; --input: #F4F1F8; --seg: #EFEAF4;
  --border: #E9E4EF; --border-soft: #F1EDF5;
  --ink: #1F1430; --ink-2: #4A4058; --ink-3: #77708A; --ink-4: #A79FB4;
  --ok: #1FB97A; --warn-c: #F0A23B; --stale: #C9C2D3;
  /* alias que usa Administrar */
  --pink: var(--red); --purple-soft: var(--purple-tint); --text: var(--ink); --text-2: var(--ink-2); --text-3: var(--ink-3);
  --shadow: 0 1px 2px rgba(31,20,48,.04);
  --shadow-hover: 0 14px 28px -16px rgba(91,40,131,.45);
  --radius: 14px;
  --sidebar: 264px; --topbar: 64px;
  --f-title: Sora, Inter, system-ui, sans-serif;
  --f-ui: Inter, "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --purple-tint: #3A2A4A; --bg: #16121C; --surface: #211B29; --surface-2: #29222F; --input: #2B2433; --seg: #2E2737;
  --border: #3A3144; --border-soft: #30283A; --ink: #F3EEF8; --ink-2: #CBC2D6; --ink-3: #9B91A8; --ink-4: #776D85;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--f-ui); background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--purple); text-decoration: none; cursor: pointer; }
a:hover { color: var(--red); }
.spacer { flex: 1; }
.red { color: var(--red) !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #DCD5E4; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* logos según tema */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }

/* ---------- layout ---------- */
.app { display: grid; height: 100vh; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; grid-template-areas: "top top" "side main"; }
.main { grid-area: main; overflow-y: auto; position: relative; }
.view { padding: 36px 40px 64px; max-width: 1440px; margin: 0 auto; }

/* ---------- topbar ---------- */
.topbar { grid-area: top; display: flex; align-items: center; gap: 20px; padding: 0 20px 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 14px; width: 222px; flex: none; cursor: pointer; }
.brand .logo { height: 24px; }
.brand-sep { width: 1px; height: 22px; background: #E0D9E8; }
.brand-name { font-family: var(--f-title); font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; }
.search { flex: 1; min-width: 0; max-width: 620px; height: 42px; display: flex; align-items: center; gap: 10px; background: var(--input); border: 1px solid var(--border); border-radius: 12px; padding: 0 8px 0 14px; color: var(--ink-3); }
.search:focus-within { border-color: var(--purple); background: var(--surface); box-shadow: 0 0 0 3px rgba(91,40,131,.12); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; font-size: 14px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 500 11px var(--f-mono); border: 1px solid #DCD5E4; border-radius: 6px; padding: 3px 7px; color: var(--ink-3); background: var(--surface); }
.search-clear { border: 0; background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--purple); cursor: pointer; }
.tb-btn { margin-left: auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.tb-btn:hover { background: var(--input); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.user-wrap { position: relative; }
.user { height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; }
.user:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--purple); color: #fff; display: grid; place-items: center; font: 600 12px var(--f-title); flex: none; }
.user-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.user-txt small { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.user .chev { width: 16px; height: 16px; color: var(--ink-3); }
.user-menu { position: absolute; right: 0; top: 50px; width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(43,20,70,.25); padding: 8px; z-index: 40; }
.um-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; display: flex; flex-direction: column; gap: 3px; }
.um-head b { font-size: 14px; }
.um-head span { font: 12px var(--f-mono); color: var(--ink-3); word-break: break-all; }
.um-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-weight: 500; text-align: left; }
.um-item:hover { background: var(--input); }
.um-item.danger { color: var(--red-dark); }
.um-item.danger:hover { background: var(--red-tint); }
.topbar .menu-btn { display: none; }

/* ---------- sidebar ---------- */
.sidebar { grid-area: side; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 12px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.nav-item { height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); cursor: pointer; user-select: none; font-weight: 500; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--purple-tint); color: var(--purple); font-weight: 600; }
.nav-item .count { margin-left: auto; font: 500 11.5px var(--f-mono); color: var(--ink-4); }
.nav-item .badge-admin { margin-left: auto; font: 500 10.5px var(--f-mono); color: var(--red); background: var(--red-tint); border-radius: 6px; padding: 2px 6px; }
.nav-sep { height: 1px; background: var(--border); margin: 12px 4px 10px; flex: none; }
.nav-label { display: flex; justify-content: space-between; padding: 4px 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); flex: none; }
.nav-label b { font: 500 11px var(--f-mono); letter-spacing: 0; color: var(--ink-4); }
.area-filter { height: 34px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 0 12px; margin: 0 0 8px; outline: none; flex: none; font-size: 13px; }
.area-filter:focus { border-color: var(--purple); }
.cat-nav { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.nav-item.area { height: auto; min-height: 35px; padding: 7px 12px; font-weight: 400; font-size: 13.5px; line-height: 1.3; }
.nav-item.area.active { font-weight: 600; }
.nav-none { padding: 10px 12px; font-size: 12.5px; color: var(--ink-3); }
.sidebar-foot { padding: 10px 12px 2px; font-size: 11px; color: var(--ink-3); line-height: 1.5; flex: none; }
.sidebar-foot:empty { display: none; }
.badge-demo { display: inline-block; background: #FFF3E0; color: #B35F00; border-radius: 4px; padding: 1px 6px; font-weight: 600; font-size: 10px; letter-spacing: .4px; }

/* ---------- piezas comunes ---------- */
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow.red { color: var(--red); }
.mono-sm { font: 500 11.5px var(--f-mono); color: var(--ink-3); white-space: nowrap; }
.mono { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--tt); color: var(--tc); font: 700 11px var(--f-title); letter-spacing: -.01em; }
.mono.xs { width: 30px; height: 30px; border-radius: 8px; font-size: 10px; }
.mono.sm { width: 34px; height: 34px; }
.mono.lg { width: 44px; height: 44px; border-radius: 11px; font-size: 13px; }
.mono.on-thumb { position: absolute; left: 14px; top: 94px; width: 40px; height: 40px; border-radius: 10px; background: var(--tc); color: #fff; border: 2px solid #fff; box-shadow: 0 4px 10px -2px rgba(31,20,48,.25); font-size: 12px; z-index: 2; }
.fdot { width: 7px; height: 7px; border-radius: 50%; background: var(--stale); display: inline-block; flex: none; }
.fdot.ok { background: var(--ok); } .fdot.warn { background: var(--warn-c); } .fdot.stale { background: var(--stale); }
.fresh { display: flex; flex-direction: column; gap: 3px; }
.fresh-lbl { font-size: 11px; color: var(--ink-3); }
.fresh-val { display: flex; align-items: center; gap: 7px; }
.fresh-val b { font: 500 12px var(--f-mono); color: var(--ink); white-space: nowrap; }
.fresh-mini { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 2px; }
.fresh-mini .fresh-lbl { font-size: 11px; }
.fresh-mini .fresh-val b { font-size: 11px; color: var(--ink-3); }
.sgm { display: inline-flex; background: var(--seg); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.sgm button { border: 0; background: none; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sgm button svg { width: 15px; height: 15px; }
.sgm button.on { background: var(--surface); color: var(--purple); font-weight: 600; box-shadow: 0 1px 2px rgba(31,20,48,.08); }
.dstar { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--ink-4); cursor: pointer; }
.dstar svg { width: 15px; height: 15px; }
.dstar:hover { color: var(--red); }
.dstar.on { color: var(--red); }
.dstar.on svg, #favBtn.on svg { fill: currentColor; }
.dstar.flat { position: static; border: 0; background: none; }
mark { background: var(--red-tint); color: var(--red-dark); border-radius: 3px; padding: 0 1px; }
.dempty { border: 1px dashed #D9D0E3; border-radius: 16px; background: var(--surface); padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--ink-3); }
.dempty b { font: 600 16px var(--f-title); color: var(--ink); }
.btn-red { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-red:hover { background: var(--red-dark); }
.btn-red svg { width: 16px; height: 16px; }

/* ---------- inicio ---------- */
.v-home { display: flex; flex-direction: column; gap: 40px; }
.home-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.today { font: 12px var(--f-mono); color: var(--ink-3); margin-bottom: 8px; }
.greet { font: 600 38px/1.08 var(--f-title); letter-spacing: -.025em; margin: 0; }
.greet span { color: var(--purple); }
.totals { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.totals button { border: 0; background: none; padding: 14px 26px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.totals button + button { border-left: 1px solid var(--border); }
.totals button:hover { background: var(--surface-2); }
.totals b { font: 600 30px/1 var(--f-title); letter-spacing: -.02em; }
.totals span { font-size: 13px; color: var(--ink-3); }
.hpanels { display: flex; flex-wrap: wrap; gap: 20px; }
.hp { flex: 1 1 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hp.hp-cont { flex: 1.35 1 400px; gap: 14px; }
.hp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hp-head a { font-size: 13px; font-weight: 600; }
.hp-empty { color: var(--ink-3); font-size: 13px; padding: 18px 0; }
.cont-thumb { border-radius: 14px; overflow: hidden; cursor: pointer; }
.cont-thumb .thumb { height: 168px; padding: 14px 14px 0; }
.cont-row { display: flex; align-items: center; gap: 14px; }
.cont-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cont-txt b { font: 600 18px/1.25 var(--f-title); letter-spacing: -.01em; }
.cont-txt span { font-size: 13px; color: var(--ink-3); }
.hp-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; }
.hp-item:hover { background: var(--surface-2); }
.hp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-txt b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-txt small { font-size: 12px; color: var(--ink-3); }
.areas-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: -22px; }
.areas-head h2 { font: 600 22px var(--f-title); letter-spacing: -.015em; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.amap { display: flex; flex-wrap: wrap; gap: 10px; }
.ablock { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 16px 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-height: 140px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.ablock.xl { min-height: 188px; }
.ablock:hover { border-color: var(--purple); box-shadow: var(--shadow-hover); }
.ablock-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ablock-top b { font: 600 14.5px/1.3 var(--f-title); }
.ablock-n { font: 600 22px/1 var(--f-title); color: var(--ink-4); letter-spacing: -.02em; }
.ablock.md .ablock-n { font-size: 30px; color: var(--purple); }
.ablock.xl .ablock-n { font-size: 46px; color: var(--red); }
.ablock ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ablock li { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ablock-more { font-size: 12.5px; font-weight: 600; color: var(--purple); margin-top: -4px; }
.abar { display: flex; gap: 2px; height: 5px; margin-top: auto; border-radius: 3px; overflow: hidden; }
.abar i { display: block; }
.az-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 24px; columns: 3 240px; column-gap: 40px; }
.az-letter { font: 600 13px var(--f-title); color: var(--red); margin: 10px 0 4px; break-after: avoid; }
.az-item { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; color: var(--ink); font-size: 13.5px; break-inside: avoid; }
.az-item i { flex: 1; border-bottom: 1px dotted #D3CBDD; transform: translateY(-3px); }
.az-item b { font: 500 12px var(--f-mono); color: var(--ink-3); }

/* ---------- área / listas ---------- */
.v-list { max-width: 1280px; padding-top: 28px; }
.area-wrap, .v-list { display: flex; flex-direction: column; gap: 22px; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--ink-3); }
.area-head, .lhead-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.area-head h1, .lhead h1 { font: 600 34px/1.1 var(--f-title); letter-spacing: -.025em; margin: 0; }
.lhead p { margin: 6px 0 0; color: var(--ink-3); }
.astats { display: flex; gap: 28px; }
.astats div { display: flex; flex-direction: column; gap: 4px; }
.astats b { font: 600 24px/1 var(--f-title); letter-spacing: -.02em; }
.astats span { font-size: 12.5px; color: var(--ink-3); }
.atool { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.afind { display: flex; align-items: center; gap: 8px; height: 38px; width: 260px; max-width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 0 12px; color: var(--ink-3); }
.afind:focus-within { border-color: var(--purple); }
.afind svg { width: 16px; height: 16px; }
.afind input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 13.5px; }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 380px; min-width: 0; }
.tchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.tchip span { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
.tchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tchip.on span { color: #CFC6DA; }
.tgroup { display: flex; flex-direction: column; gap: 14px; margin-bottom: 10px; }
.tgroup-head { display: flex; align-items: center; gap: 10px; }
.tgroup-head i { width: 10px; height: 10px; border-radius: 3px; }
.tgroup-head b { font: 600 14px var(--f-title); }
.tgroup-head span { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
.tgroup-head hr { flex: 1; border: 0; border-top: 1px solid var(--border); margin: 0 0 0 6px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.dcard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; outline: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.dcard:hover, .dcard:focus-visible { transform: translateY(-2px); border-color: #C9B5DC; box-shadow: var(--shadow-hover); }
.thumb { height: 118px; background: var(--tt); padding: 12px 12px 0; }
.thumb .sheet { display: block; width: 100%; height: 100%; background: #fff; border-radius: 8px 8px 0 0; stroke: none; }
.dcard-body { padding: 26px 14px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.dcard-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.dcard-sub { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.dcard-topic { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.dcard-topic i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.dcard-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.dcard-foot:has(.fresh[hidden]) { display: none; }
.dlist { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; container-type: inline-size; }
.drow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 140px 200px 36px; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border-soft); cursor: pointer; outline: none; }
.drow:hover, .drow:focus-visible { background: var(--surface-2); }
.drow.head { cursor: default; background: var(--surface-2); border-top: 0; padding-top: 12px; padding-bottom: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.drow .mono { width: 40px; height: 40px; border-radius: 10px; }
.drow-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drow-name b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow-name small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow-topic { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.drow-topic i { width: 8px; height: 8px; border-radius: 2px; }
.drow.head .drow-topic { font-size: 11px; color: var(--ink-3); }
.drow-group { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; border-top: 1px solid var(--border-soft); font-weight: 600; font-size: 13.5px; }
.drow-group i { width: 10px; height: 10px; border-radius: 3px; }
.drow-group span { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
@container (max-width: 820px) {
  .drow { grid-template-columns: 40px minmax(0, 1fr) 150px 32px; }
  .drow .drow-topic { display: none; }
}

/* ---------- dashboard abierto (v2) ---------- */
.report-view { height: 100%; display: flex; flex-direction: column; container-type: inline-size; }
.rv-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 28px 0; }
.rv-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; padding-bottom: 14px; }
.sq-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.sq-btn:hover { background: var(--input); }
.mono.xl { width: 52px; height: 52px; border-radius: 14px; background: var(--tc); color: #fff; font-size: 15px; box-shadow: 0 10px 22px -12px var(--tc); }
.report-title { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.crumb { display: flex; gap: 8px; font-size: 13px; color: var(--ink-3); }
.crumb a { color: var(--ink-3); }
.crumb a.area { color: var(--purple); font-weight: 600; }
.rv-titleline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.report-title h1 { font: 600 24px/1.2 var(--f-title); letter-spacing: -.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star-inline { border: 0; background: none; color: var(--ink-4); cursor: pointer; padding: 4px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.star-inline:hover { color: var(--red); background: var(--red-tint); }
#favBtn.on { color: var(--red); }
.rv-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tpill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--tt); color: var(--tc); font-size: 12.5px; font-weight: 600; }
.tpill i { width: 8px; height: 8px; border-radius: 2px; background: var(--tc); }
.fresh-cap { height: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.fresh-cap b { font: 500 12px var(--f-mono); color: var(--ink); }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.act-group { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.act-btn { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; color: var(--ink); }
.act-btn svg { width: 16px; height: 16px; }
.act-btn:hover { background: var(--input); }
.act-btn.active { background: var(--purple-tint); color: var(--purple); }
.act-btn.primary { height: 44px; padding: 0 18px; border-radius: 12px; background: var(--purple); color: #fff; box-shadow: 0 10px 22px -10px rgba(91,40,131,.7); }
.act-btn.primary:hover { background: var(--purple-dark); }
.act-btn.spin svg { animation: spin .9s linear infinite; }
.pages { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pill { border: 0; background: none; padding: 11px 14px; font-size: 13.5px; color: var(--ink-3); cursor: pointer; white-space: nowrap; border-radius: 0; display: inline-flex; gap: 8px; align-items: baseline; }
.pill .pn { font: 500 11px var(--f-mono); color: var(--ink-4); }
.pill:hover { color: var(--ink); }
.pill.active { color: var(--purple); font-weight: 600; box-shadow: inset 0 -2px 0 var(--red); }
.pill.active .pn { color: var(--red); }
.rv-body { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 22px 28px 26px; }
.report-frame { flex: 1; min-width: 0; min-height: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 16px 36px -24px rgba(43,20,70,.3); }
.report-frame iframe { border: 0; }
.report-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--ink-2); }
.report-msg b { color: var(--ink); display: block; margin-bottom: 6px; font-size: 15px; }
.rv-side { width: 272px; flex: none; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-soft); }
.side-head b { font: 600 14px var(--f-title); }
.side-head span { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
.side-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid transparent; background: none; border-radius: 10px; text-align: left; cursor: pointer; color: var(--ink); }
.side-item:hover { background: var(--surface-2); }
.side-item.on { background: var(--purple-tint); border-color: #E2D4EE; }
.side-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.side-txt .fresh-val b { font-size: 11px; color: var(--ink-3); }
@container (max-width: 980px) { .rv-side { display: none !important; } }
.fs-cap { display: none; }
/* pantalla completa dentro del portal */
.app.focus { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; grid-template-areas: "main"; }
.app.focus .topbar, .app.focus .sidebar, .app.focus .rv-head, .app.focus .rv-side { display: none !important; }
.app.focus .rv-body { padding: 64px 12px 12px; }
.app.focus .report-frame { border-radius: 10px; }
.app.focus .fs-cap { display: flex; align-items: center; gap: 12px; position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: 0 18px 40px -12px rgba(43,20,70,.25); max-width: calc(100vw - 24px); }
.fs-cap .logo { height: 16px; }
.fs-cap span { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-cap button { border: 0; background: var(--purple-tint); color: var(--purple); font-weight: 600; font-size: 12.5px; border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.app:fullscreen, .app::backdrop { background: var(--bg); }

/* mock de reporte (modo demo) */
.mock { padding: 20px; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 16px; background: #FAF8FC; color: #222; }
.mock-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mock-kpi { background: #fff; border: 1px solid #EEE9F3; border-radius: 10px; padding: 14px 16px; }
.mock-kpi span { font-size: 11px; color: #888; }
.mock-kpi b { display: block; font-size: 22px; margin: 2px 0; font-family: var(--f-title); }
.mock-kpi i { font-style: normal; font-size: 11px; }
.mock-charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; min-height: 0; }
.mock-chart { background: #fff; border: 1px solid #EEE9F3; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; }
.mock-chart h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #333; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.mock-chart svg { width: 100%; height: 100%; flex: 1; stroke: none; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 18px; z-index: 50; transition: opacity .3s; }
.splash .logo { height: 34px; }
.splash p { color: var(--ink-2); margin: 0; max-width: 420px; text-align: center; line-height: 1.5; }
.splash.hide { opacity: 0; pointer-events: none; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--purple-tint); border-top-color: var(--purple); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { background: var(--purple); color: #fff; border: 0; border-radius: 10px; padding: 9px 18px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--purple-dark); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); border-color: var(--border); color: var(--ink); }
.icon-btn.active { color: var(--purple); background: var(--purple-tint); }
/* estilos que reutiliza Administrar */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.hero h1 { font: 600 28px/1.1 var(--f-title); letter-spacing: -.02em; margin: 0 0 6px; }
.hero p { margin: 0; color: var(--ink-2); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; min-width: 110px; }
.stat b { display: block; font: 600 20px var(--f-title); }
.stat span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; }
.empty { border: 1.5px dashed var(--border); border-radius: 14px; padding: 36px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .brand { width: auto; }
  .user-txt, .user .chev { display: none; }
  .user { padding: 0 5px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .sidebar { position: fixed; top: var(--topbar); bottom: 0; left: 0; width: 280px; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 18px 40px -12px rgba(43,20,70,.25); }
  .app.nav-open .sidebar { transform: none; }
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar .menu-btn { display: grid; }
  .brand-sep, .brand-name, .search kbd { display: none; }
  .view { padding: 22px 16px 40px; }
  .greet { font-size: 30px; }
  .area-head h1, .lhead h1 { font-size: 28px; }
  .astats { gap: 18px; }
  .rv-head { padding: 12px 14px 0; }
  .rv-body { padding: 12px; }
  .mock-kpis { grid-template-columns: repeat(2, 1fr); }
  .mock-charts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .totals button { padding: 12px 16px; }
  .fresh-cap span { display: none; }
  .act-btn { padding: 0 10px; }
}

/* ---------- administración ---------- */
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn:disabled { opacity: .5; cursor: default; }
.input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,45,139,.15); }
textarea.input { resize: vertical; }
.muted { color: var(--text-2); margin: 0; }
.nowrap { white-space: nowrap; }
.warn { color: #B35F00; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.admin-hero { align-items: center; }
.admin-save { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: #E07B00; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--purple); border-bottom-color: var(--purple); }
:root[data-theme="dark"] .tab.active { color: #E7C2EF; border-bottom-color: #D9A6E4; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.admin-toolbar .input { min-width: 180px; }
.spacer { flex: 1; }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td small { display: block; color: var(--text-3); margin-top: 2px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; }
.tbl.small td, .tbl.small th { padding: 6px 10px; }
.row-actions { white-space: nowrap; text-align: right; }
.pill-warn { display: inline-block; background: #FFF3E0; color: #B35F00; border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 20px; transition: .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--purple); }
.switch input:checked + span::after { transform: translateX(16px); }

.modal-wrap { position: fixed; inset: 0; background: rgba(20,10,30,.45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 8px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-body p { margin: 0; }
.modal-foot { display: flex; gap: 8px; align-items: center; padding: 14px 18px 16px; }
.modal-err { flex: 1; color: var(--pink); font-size: 13px; }
.fld { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.fld > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.fld-row { display: flex; gap: 10px; }
.fld-row > select.input { flex: 1; }
.fld-or { font-size: 12px; color: var(--text-3); text-align: center; }
.hint { font-size: 12px; color: var(--text-3); }
.hint.good { color: #22A06B; }
.hint.bad { color: #B35F00; }

.area-list { display: flex; flex-direction: column; gap: 8px; }
.area-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.area-row input[type=color] { width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.area-row [data-name] { flex: 1; }
.icon-sel { width: 104px; }
.area-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.area-ico svg { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .3; cursor: default; }

.import-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.import-box h3 { margin: 0 0 6px; font-size: 16px; }
.import-box h4 { margin: 18px 0 8px; font-size: 13px; }
.drop { margin-top: 16px; border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); text-align: center; }
.drop svg { width: 28px; height: 28px; color: var(--purple); }
.drop small { color: var(--text-3); }
.drop.over, .drop:hover { border-color: var(--purple); background: var(--purple-soft); }
.imp-sum { margin-top: 18px; }
.imp-kpis { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.imp-kpis div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; }
.imp-kpis b { display: block; font-size: 18px; }
.imp-kpis span { font-size: 11px; color: var(--text-2); }
.imp-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 14px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg button.active { background: var(--purple); color: #fff; }
.usage-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.usage-kpis .stat b small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.bar-row { display: grid; grid-template-columns: minmax(0, 40%) 1fr 34px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
ul.plain .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 8px; }
ul.recent li { display: flex; justify-content: space-between; gap: 10px; }
ul.recent small { color: var(--text-3); white-space: nowrap; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); background: #222; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 70; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #B3003F; }
.toast.info { background: #555; }

@media (max-width: 860px) {
  .usage-kpis { grid-template-columns: repeat(2, 1fr); }
  .usage-grid { grid-template-columns: 1fr; }
  .area-row { flex-wrap: wrap; }
  .icon-sel { width: 90px; }
  .fld-row { flex-direction: column; }
}
.row-actions .icon-btn { display: inline-grid; }
.admin-body > p.muted { margin-bottom: 12px; }

.ws-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ws-item:hover { background: var(--surface-2); }
.ws-item small { margin-left: auto; color: var(--text-3); }
.ws-item.off { opacity: .55; cursor: default; }

/* ---------- Administrar (v2: misma lógica, nueva piel) ---------- */
.v-admin { max-width: 1280px; padding-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-head h1 { font: 600 34px/1.1 var(--f-title); letter-spacing: -.025em; margin: 0 0 8px; }
.adm-head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.dirty-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid #F6C9D5; border-radius: 14px; padding: 8px 8px 8px 14px; font-size: 13.5px; font-weight: 600; }
.dirty-bar .dirty-dot { background: var(--red); }
.dirty-bar .btn-red { height: 36px; }
.atabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.atabs .pill { padding: 12px 16px; font-size: 14px; }
.atabs .pill .pn { margin-left: 2px; }
.admin-toolbar { margin-bottom: 0; }
.v-admin .admin-body { display: flex; flex-direction: column; gap: 16px; }
.v-admin .input { height: 38px; border-radius: 10px; border-color: var(--border); background: var(--surface); }
.v-admin .btn { height: 38px; border-radius: 10px; padding: 0 16px; }
.v-admin .btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.v-admin .btn.ghost:hover { border-color: var(--purple); color: var(--purple); }
.atable { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.atr { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 170px minmax(0, 1fr) 64px 76px; align-items: center; gap: 14px; padding: 9px 18px; border-top: 1px solid var(--border-soft); }
.atr.ath { border-top: 0; background: var(--surface-2); padding-top: 12px; padding-bottom: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.atr:not(.ath):hover { background: var(--surface-2); }
.atr.off { opacity: .5; }
.atd-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.atd-name > span:not(.mono) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.atd-name b { font-weight: 600; font-size: 14px; line-height: 1.3; }
.atd-name small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atd-area { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.atd-ws { font: 12px var(--f-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsel { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: var(--surface); cursor: pointer; }
.tsel i { width: 8px; height: 8px; border-radius: 2px; background: var(--tc); flex: none; }
.tsel select { appearance: none; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); flex: 1; min-width: 0; cursor: pointer; outline: none; padding-right: 30px; }
.tsel small { position: absolute; right: 10px; font: 11px var(--f-mono); color: var(--ink-4); pointer-events: none; }
.tsel:focus-within { border-color: var(--purple); }
.switch input:checked + span { background: var(--ok); }
.switch span { background: #DCD5E4; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.icon-btn.del:hover { color: var(--red); background: var(--red-tint); border-color: transparent; }
.area-list { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; gap: 0; }
.area-row { border: 0; border-radius: 0; border-top: 1px solid var(--border-soft); padding: 10px 18px; gap: 16px; background: none; }
.area-row:first-child { border-top: 0; }
.area-row .apos { width: 22px; color: var(--ink-4); }
.inline-in { flex: 1; min-width: 0; height: 34px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 0 10px; font-weight: 600; font-size: 14px; outline: none; }
.inline-in:hover { border-color: var(--border); }
.inline-in:focus { border-color: var(--purple); background: var(--surface); }
.area-row .abar { width: 160px; flex: none; margin: 0; }
.area-row .muted { width: 120px; font-size: 13px; }
.import-box { border-radius: 16px; padding: 24px; }
.import-box h3 { font: 600 18px var(--f-title); margin-bottom: 6px; }
.drop { border: 1.5px dashed #C9B5DC; background: var(--surface-2); border-radius: 14px; padding: 36px; }
.drop:hover, .drop.over { border-color: var(--purple); background: var(--purple-tint); }
.drop b { color: var(--ink); }
.ukpis { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-top: 10px; }
.ukpis > div { flex: 1 1 160px; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.ukpis > div + div { border-left: 1px solid var(--border); }
.ukpis b { font: 600 30px/1 var(--f-title); letter-spacing: -.02em; }
.ukpis b small { font-size: 14px; color: var(--ink-4); font-weight: 500; }
.ukpis span { font-size: 13px; color: var(--ink-3); }
.imp-actions { gap: 10px; }
.usage-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; }
.v-admin .panel { border-radius: 16px; padding: 20px; }
.v-admin .panel h4 { font: 600 15px var(--f-title); margin-bottom: 14px; }
.bar-row { grid-template-columns: minmax(0, 42%) 1fr 44px; font-size: 13px; }
.bar-track { height: 8px; background: #F1EDF5; border-radius: 4px; }
.bar-fill { border-radius: 4px; }
.bar-row b { font: 500 12px var(--f-mono); }
ul.plain { gap: 9px; }
ul.unused li { display: flex; align-items: center; gap: 4px; }
ul.unused li > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.unused small { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
ul.recent small { font: 11.5px var(--f-mono); }
@media (max-width: 1000px) {
  .atr { grid-template-columns: minmax(0, 1fr) 150px 64px 76px; }
  .atr > .atd-area, .atr > .atd-ws { display: none; }
  .usage-grid { grid-template-columns: 1fr; }
  .area-row .abar { display: none; }
}

/* Catálogo centrado en reportes: sin navegación ni selección por área. */
.reports-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.reports-head h2 { margin: 0; font: 600 24px var(--f-title); }
.admin-help { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.report-row.atr { grid-template-columns: minmax(0, 1fr) 130px 150px 76px; }
.report-row .switch { justify-self: start; }
.report-status { display: inline-flex; width: fit-content; align-items: center; padding: 5px 9px; border-radius: 6px; color: var(--ink-2); background: var(--surface-2); font-size: 12px; font-weight: 500; }
.report-status.ready { color: var(--ok); }
.dcard-topic { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drow-topic { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-foot { margin-top: auto; }
@media (max-width: 760px) {
  .report-row.atr { grid-template-columns: minmax(0, 1fr) 104px 52px 64px; gap: 8px; padding: 12px; }
  .report-row.ath { text-transform: none; letter-spacing: 0; font-size: 11px; }
  .report-row .atd-name { gap: 8px; }
  .report-row .atd-name .mono { display: none; }
  .report-row .atd-name b { overflow-wrap: anywhere; }
  .report-row .row-actions { gap: 0; }
  .report-row .row-actions .icon-btn { width: 30px; }
  .reports-head { gap: 10px; }
  .reports-head h2 { width: 100%; }
}
@media (max-width: 480px) {
  .report-row.atr { grid-template-columns: minmax(0, 1fr) 44px 64px; }
  .report-row > .report-status { grid-column: 1; grid-row: 2; }
  .report-row > .switch { grid-column: 2; grid-row: 1 / 3; }
  .report-row > .row-actions { grid-column: 3; grid-row: 1 / 3; }
  .report-row.ath > span:nth-child(2) { display: none; }
  .report-row.ath > span:nth-child(3) { grid-column: 2; }
}

.dcollect { position:absolute; top:10px; right:46px; display:grid; place-items:center; width:30px; height:30px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--purple); cursor:pointer; z-index:2; }
.dcollect svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; }
.personal-collections, .collection-choices { display:flex; flex-direction:column; gap:12px; margin:20px 0; }
.personal-collection { display:flex; align-items:center; gap:12px; justify-content:space-between; border-bottom:1px solid var(--border); padding:12px 0; }
.personal-collection > button { display:flex; flex-wrap:wrap; gap:12px; align-items:center; text-align:left; }
.personal-collection svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.collection-choice { display:flex; align-items:center; gap:12px; padding:8px 0; }
.collection-report { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
.collection-order { display:flex; gap:4px; }
.drow-fresh { display:flex; align-items:center; gap:8px; }
@media(max-width:600px) { .collection-report .drow-topic,.collection-report .drow-fresh { display:none; } .collection-report .drow { grid-template-columns:32px minmax(0,1fr) 30px; } .personal-collection { flex-wrap:wrap; } #personalNav .nav-item span { overflow-wrap:anywhere; } }

.personal-sync-status { margin:20px 12px 0; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink-2); font:12px/1.5 var(--f-ui); text-align:left; cursor:pointer; }
.sync-options { display:flex; flex-wrap:wrap; margin:16px 0; gap:8px; }

/* Tarjetas centradas en el reporte y sus acciones. */
.dgrid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dcard { min-height: 216px; border-radius: 18px; box-shadow: 0 2px 4px rgba(31,20,48,.025); }
.dcard-top { display:flex; align-items:center; justify-content:space-between; padding:18px 18px 0; gap:12px; }
.dcard-top > .mono { width:44px; height:44px; border-radius:13px; font-size:12px; }
.dcard-actions { display:flex; gap:5px; }
.dcard .dcollect, .dcard .dstar { position:static; width:34px; height:34px; border-radius:10px; border-color:transparent; background:transparent; color:var(--ink-3); }
.dcard .dcollect:hover { background:var(--purple-tint); color:var(--purple); }
.dcard .dstar:hover, .dcard .dstar.on { background:var(--red-tint); color:var(--red); }
.dcard-body { padding:16px 18px 20px; gap:7px; }
.dcard-title { font-size:15px; line-height:1.5; font-weight:650; overflow-wrap:anywhere; }
.dcard-topic { line-height:1.5; font-size:12px; }
.dcard-foot, .dcard-foot:has(.fresh[hidden]) { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 18px; padding:13px 0 15px; border-top:1px solid var(--border-soft); }
.dcard-foot .fresh { gap:4px; }
.dcard-foot .fresh-val b { font-family:var(--f-ui); font-size:11.5px; font-weight:500; }
.dcard-foot .fresh-lbl { font-size:10px; }
.dcard-open { display:flex; align-items:center; gap:6px; color:var(--purple); font-size:11.5px; font-weight:600; margin-left:auto; white-space:nowrap; }
.dcard-open svg { width:14px; height:14px; }
.report-controls { display:flex; align-items:end; flex-wrap:wrap; gap:14px; margin:-4px 0 22px; }
.report-controls label { display:flex; flex-direction:column; gap:7px; font-size:11px; color:var(--ink-3); }
.report-controls select { height:38px; padding:0 32px 0 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink); font:13px var(--f-ui); max-width:100%; }
.report-controls > span { margin-left:auto; padding-bottom:11px; font-size:12px; color:var(--ink-3); }
.column-sort { display:inline-flex; align-items:center; gap:6px; font:inherit; color:inherit; text-transform:inherit; letter-spacing:inherit; border:0; background:none; padding:3px 0; cursor:pointer; text-align:left; }
.column-sort:hover { color:var(--purple); }
button:focus-visible, select:focus-visible { outline:2px solid var(--purple); outline-offset:3px; }
@media(max-width:600px) { .dgrid { grid-template-columns:1fr; } .dcard { min-height:195px; } .report-controls { gap:12px; } .report-controls label { flex:1 1 145px; min-width:0; } }
@media(prefers-reduced-motion:reduce) { .dcard { transition:none; } .dcard:hover { transform:none; } }

/* Modo oscuro: superficies neutras, acentos legibles y bordes suaves. */
:root[data-theme="dark"] {
  --bg:#11141B; --surface:#1A1E28; --surface-2:#202531; --input:#202531; --seg:#151922;
  --border:#303746; --border-soft:#292F3D; --ink:#F1F3F9; --ink-2:#CFD4E1; --ink-3:#A6AFC2; --ink-4:#8490A6;
  --purple:#8050AD; --purple-dark:#6C3C99; --purple-tint:#30283F; --red-tint:#3B2530; --accent:#C6ACED;
  --shadow:0 2px 8px #0002; --shadow-hover:0 12px 28px -12px #0009; --stale:#778298;
}
:root[data-theme="dark"] a { color:var(--accent); }
:root[data-theme="dark"] :is(.nav-item.active,.sgm button.on,.greet span,.dcard-open,.column-sort:hover,.search-clear,.act-btn.active,.pill.active,.fs-cap button,.crumb a.area) { color:var(--accent); }
:root[data-theme="dark"] .nav-item.active { background:#2C263A; }
:root[data-theme="dark"] .dcard { box-shadow:0 3px 12px #0002; }
:root[data-theme="dark"] .dcard:hover { border-color:#72618B; }
:root[data-theme="dark"] .mono:not(.xl):not(.on-thumb) { background:color-mix(in srgb,var(--tc) 22%,var(--surface)); color:color-mix(in srgb,var(--tc) 35%,#fff); }
:root[data-theme="dark"] .dcard .dcollect:hover { color:var(--accent); }
:root[data-theme="dark"] :is(.dstar.on,.dstar:hover,.red) { color:#FF7897; }
:root[data-theme="dark"] .thumb { background:#272333; }
:root[data-theme="dark"] .thumb .sheet { background:#202531; }
:root[data-theme="dark"] .btn.ghost:hover { color:var(--accent); border-color:#72618B; }
:root[data-theme="dark"] .tchip.on { background:#3C3150; border-color:#72618B; color:var(--ink); }
:root[data-theme="dark"] :is(.modal,.user-menu) { box-shadow:0 24px 70px #0007; }
:root[data-theme="dark"] :is(button,select):focus-visible { outline-color:var(--accent); }

/* Lista: nombre, actualización y acciones con una alineación consistente. */
.drow { grid-template-columns:44px minmax(0,1fr) 175px 80px; padding:17px 20px; gap:16px; min-height:82px; }
.drow.head { grid-template-columns:44px minmax(0,1fr) 175px 80px; min-height:48px; padding:12px 20px; font-size:10px; letter-spacing:.05em; }
.drow-name b { white-space:normal; font-size:14px; line-height:1.45; font-weight:600; }
.drow-name small { margin-top:3px; line-height:1.4; }
.drow .mono { width:40px; height:40px; border-radius:12px; font-size:11px; }
.drow-fresh .fresh-val b { font-family:var(--f-ui); font-size:12px; color:var(--ink-2); font-weight:450; }
.drow-actions { display:flex; justify-content:flex-end; align-items:center; gap:4px; }
.drow-actions .icon-btn, .drow-actions .dstar { width:34px; height:34px; border:0; border-radius:9px; background:transparent; color:var(--ink-3); }
.drow-actions .icon-btn:hover { background:var(--purple-tint); color:var(--purple); }
.drow-actions .dstar.on,.drow-actions .dstar:hover { color:var(--red); background:var(--red-tint); }
.collection-list { overflow:hidden; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.collection-report { gap:0; padding-right:12px; border-top:1px solid var(--border-soft); }
.collection-report:first-child { border-top:0; }
.collection-report .drow { border:0; }
.collection-order .btn { width:32px; height:32px; padding:0; font-size:14px; color:var(--ink-3); }
.collection-tile { min-width:0; display:flex; flex-direction:column; }
.collection-tile .dcard { flex:1; }
.collection-tile .collection-order { justify-content:flex-end; margin-top:7px; }
:root[data-theme="dark"] .drow-actions .icon-btn:hover { color:var(--accent); }
:root[data-theme="dark"] .drow-actions .dstar.on,:root[data-theme="dark"] .drow-actions .dstar:hover { color:#FF7897; }
@container(max-width:820px) { .drow,.drow.head { grid-template-columns:40px minmax(0,1fr) 145px 76px; gap:12px; padding-left:16px; padding-right:16px; } }
@media(max-width:600px) {
  .drow,.collection-report .drow { grid-template-columns:32px minmax(0,1fr) 68px; gap:10px; padding:14px 12px; min-height:76px; }
  .drow.head { display:none; } .drow .mono { width:32px; height:36px; border-radius:10px; }
  .drow-name b { font-size:12.5px; } .drow-fresh { display:none; }
  .drow-actions .icon-btn,.drow-actions .dstar { width:30px; height:32px; }
  .collection-report { padding-right:6px; grid-template-columns:minmax(0,1fr) 30px; }
  .collection-report .collection-order { flex-direction:column; gap:0; }
}

/* Mosaico con miniaturas de dashboards, proporciones reales y acciones separadas. */
.dcard > .thumb { height:126px; flex:none; padding:12px 12px 0; background:var(--tt); border-bottom:1px solid var(--border-soft); }
.dcard > .thumb .sheet { height:114px; border-radius:9px 9px 0 0; }
.dcard-top { padding:12px 16px 0; }
.dcard-top > .mono { width:32px; height:32px; border-radius:9px; font-size:10px; }
.dcard-body { padding:11px 16px 16px; }
.dcard-title { font-size:14px; line-height:1.45; }
.dcard-foot { margin-left:16px; margin-right:16px; }
:root[data-theme="dark"] .thumb {
  background:color-mix(in srgb,var(--preview-base) 13%,var(--surface-2));
  --preview-ink:color-mix(in srgb,var(--preview-base) 55%,#fff);
  --preview-soft:color-mix(in srgb,var(--preview-base) 35%,#6B7285);
  --preview-pale:color-mix(in srgb,var(--preview-base) 15%,#343B4B);
  --preview-chip:#2A303D;
}
:root[data-theme="dark"] .dcard > .thumb { background:color-mix(in srgb,var(--preview-base) 13%,var(--surface-2)); }
:root[data-theme="dark"] .thumb .sheet { background:#1D222D; }

/* Miniaturas con una ventana de dashboard y jerarquía visual más ligera. */
.dcard { border-radius:18px; border-color:var(--border); box-shadow:0 3px 12px -8px #20103522; }
.dcard > .thumb { height:151px; padding:15px 15px 0; background:linear-gradient(140deg,var(--card-tint),var(--surface-2)); border-bottom:0; }
.preview-frame { width:100%; overflow:hidden; border:1px solid #20103509; border-bottom:0; border-radius:10px 10px 0 0; background:var(--surface); box-shadow:0 5px 16px #20103508; }
.preview-toolbar { display:flex; align-items:center; gap:12px; height:21px; border-bottom:1px solid var(--border-soft); padding:0 10px; background:var(--surface-2); }
.preview-toolbar span { width:3px; height:3px; border-radius:50%; background:var(--ink-4); box-shadow:5px 0 var(--ink-4),10px 0 var(--ink-4); opacity:.65; }
.preview-toolbar i { width:45px; height:3px; margin-left:8px; border-radius:2px; background:var(--border); }
.preview-toolbar b { margin-left:auto; width:12px; height:3px; border-radius:2px; background:var(--border); }
.dcard > .thumb .sheet { height:115px; width:100%; border-radius:0; background:var(--surface); }
.dcard-top { padding:13px 17px 0; }
.dcard-top > .mono { box-shadow:inset 0 0 0 1px #20103505; }
.dcard-body { padding:10px 17px 20px; }
.dcard-title { font-size:14px; font-weight:600; line-height:1.5; }
.dcard-foot { margin:0 17px; padding:13px 0 15px; }
.dcard-open { padding:6px 8px; margin-right:-6px; border-radius:7px; background:var(--surface-2); }
.dcard:hover { border-color:color-mix(in srgb,var(--card-accent) 35%,var(--border)); box-shadow:0 12px 28px -14px #33134D38; }
.dcard:hover .dcard-open { background:var(--purple-tint); }
:root[data-theme="dark"] .dcard > .thumb { background:linear-gradient(140deg,color-mix(in srgb,var(--card-accent) 18%,var(--surface)),var(--surface-2)); }
:root[data-theme="dark"] .preview-frame { border-color:#FFFFFF09; box-shadow:0 5px 16px #0002; }
:root[data-theme="dark"] .thumb { --preview-rule:#313748; }
.hpanels { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:18px; align-items:start; }
.hpanels:empty { display:none; }
.hp,.hp.hp-cont { min-width:0; padding:20px; gap:12px; }
.resume-body { display:grid; grid-template-columns:155px minmax(0,1fr); gap:18px; align-items:center; }
.resume-body .cont-thumb { border-radius:10px; }
.resume-body .thumb { height:115px; padding:9px 9px 0; }
.resume-body .preview-toolbar { height:15px; }
.resume-body .sheet { height:90px; }
.resume-content { display:flex; align-items:flex-start; flex-direction:column; gap:10px; }
.resume-content > b { font:600 16px/1.45 var(--f-ui); overflow-wrap:anywhere; }
.resume-content .btn-red { height:34px; padding:0 12px; font-size:12px; }
.home-welcome { display:flex; align-items:center; gap:24px; padding:20px 24px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.home-welcome > div { flex:1; }.home-welcome b { font-size:15px; }.home-welcome p { color:var(--ink-3); font-size:13px; margin:7px 0 0; line-height:1.6; }
@media(max-width:600px) { .resume-body { grid-template-columns:110px minmax(0,1fr); gap:12px; }.hp,.hp.hp-cont { padding:16px; }.resume-content > b { font-size:14px; }.home-welcome { flex-wrap:wrap; padding:18px; gap:15px; }.home-welcome > div { flex-basis:100%; } }

:root[data-theme="dark"] .red { color:#FF7897 !important; }
.dcard-foot .fresh-lbl { font-size:10.5px; }
@media(max-width:600px) {
  .drow:not(.head),.collection-report .drow { grid-template-columns:32px minmax(0,1fr) 68px; row-gap:4px; }
  .drow > .mono { grid-column:1; grid-row:1 / 3; }
  .drow-name { grid-column:2; grid-row:1; }
  .drow .drow-fresh,.collection-report .drow-fresh { display:flex; grid-column:2; grid-row:2; }
  .drow-fresh .fresh-val b { font-size:10.5px; }.drow-fresh .fdot { width:5px; height:5px; }
  .drow-actions { grid-column:3; grid-row:1 / 3; }
}

/* Uso del portal: actividad, adopción y reportes en una sola lectura. */
.usage-dashboard { --usage-accent:#70409B; --usage-bar:#C9B4DE; display:flex; flex-direction:column; gap:22px; padding-top:12px; }
.usage-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap; }
.usage-eyebrow { font-size:10px; font-weight:700; letter-spacing:.15em; color:var(--purple); }
.usage-heading h2 { font:600 30px/1.3 var(--f-title); letter-spacing:-.035em; margin:8px 0 7px; }
.usage-heading p { font-size:13px; line-height:1.6; color:var(--ink-3); margin:0; }
.usage-period { display:flex; align-items:center; gap:10px; }
.usage-period .sq-btn { width:36px; height:36px; border-radius:10px; }
.usage-summary { display:flex; justify-content:space-between; gap:14px; align-items:center; flex-wrap:wrap; padding-top:8px; font-size:12px; color:var(--ink-3); }
.usage-summary > div { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }.usage-summary b { font-weight:500; color:var(--ink-2); }
.usage-live-dot { width:6px; height:6px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 4px color-mix(in srgb,var(--ok) 10%,transparent); }
.usage-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.usage-stat { min-width:0; border:1px solid var(--border); background:var(--surface); border-radius:17px; padding:20px; display:flex; flex-direction:column; gap:15px; box-shadow:0 3px 10px -8px #20103520; }
.usage-stat-label { display:flex; align-items:center; gap:10px; color:var(--ink-2); font-size:12px; font-weight:500; }
.usage-stat-label > span { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--surface-2); color:var(--purple); }
.usage-stat-label svg { width:16px; height:16px; }.usage-stat > strong { font:600 36px/1 var(--f-title); letter-spacing:-.04em; }
.usage-stat em { font:400 16px/1 var(--f-ui); letter-spacing:0; color:var(--ink-3); }
.usage-stat > small { font-size:10.5px; color:var(--ink-3); line-height:1.6; margin-top:auto; }
.usage-stat:first-child { background:linear-gradient(135deg,#64338D,#442361); border-color:transparent; color:#fff; }
.usage-stat:first-child .usage-stat-label { color:#F1E7FB; }.usage-stat:first-child .usage-stat-label > span { color:#fff; background:#FFFFFF18; }
.usage-stat:first-child > small { color:#E0CEE9; }.usage-change { font-weight:650; color:inherit; }
.usage-overview { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr); gap:20px; }
.usage-panel { border:1px solid var(--border); background:var(--surface); border-radius:18px; padding:23px; min-width:0; }
.usage-panel-head { display:flex; justify-content:space-between; align-items:start; gap:14px; margin-bottom:20px; }
.usage-panel h3 { font-size:14px; font-weight:650; line-height:1.5; margin:0; }.usage-panel p { margin:5px 0 0; font-size:11.5px; line-height:1.6; color:var(--ink-3); }
.usage-chart-key { display:flex; align-items:center; gap:6px; font-size:10px; color:var(--ink-3); white-space:nowrap; padding-top:5px; }
.usage-chart-key i { width:7px; height:7px; border-radius:2px; background:var(--usage-accent); }
.usage-trend { margin:14px -7px 0; }.usage-trend svg { width:100%; height:185px; display:block; fill:none; stroke:none; overflow:visible; }
.usage-trend rect { transition:opacity .15s; }.usage-trend rect:hover { opacity:.65; }
.usage-axis { display:flex; justify-content:space-between; gap:10px; margin:0 8px 0 33px; color:var(--ink-3); font-size:10px; }
.usage-chart-note { margin-top:21px; padding-top:14px; border-top:1px solid var(--border-soft); font-size:11px; line-height:1.6; color:var(--ink-3); }.usage-chart-note b { font-weight:550; color:var(--ink-2); }
.usage-ring { height:158px; width:158px; border-radius:50%; margin:4px auto 23px; padding:13px; background:conic-gradient(var(--usage-accent) var(--coverage),var(--border-soft) 0); transform:rotate(0deg); }
.usage-ring > div { height:100%; display:flex; align-items:center; justify-content:center; flex-direction:column; border-radius:50%; background:var(--surface); gap:7px; }
.usage-ring strong { font:600 34px/1 var(--f-title); letter-spacing:-.04em; }.usage-ring strong small { font-size:17px; margin-left:2px; }.usage-ring span { color:var(--ink-3); font-size:10px; }
.usage-ring-legend { display:flex; flex-direction:column; gap:12px; padding:0 7px; font-size:11.5px; }.usage-ring-legend > span { display:flex; align-items:center; gap:8px; color:var(--ink-3); }.usage-ring-legend b { margin-left:auto; color:var(--ink); font-weight:600; }
.usage-ring-legend i { width:7px; height:7px; border-radius:50%; background:var(--usage-accent); }.usage-ring-legend > span+span i { background:var(--border); }
.usage-details { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:20px; }
.usage-tag { display:inline-flex; align-items:center; min-height:23px; border-radius:6px; padding:0 7px; font-size:10px; font-weight:500; background:var(--surface-2); color:var(--ink-3); white-space:nowrap; vertical-align:middle; }
.usage-top,.usage-feed-list { list-style:none; padding:0; margin:0; }
.usage-top li { display:grid; grid-template-columns:24px minmax(0,1fr); gap:12px; padding:13px 0; }.usage-top li+li { border-top:1px solid var(--border-soft); }
.usage-rank { font:500 11px/1.8 var(--f-mono); color:var(--ink-4); }.usage-top li:first-child .usage-rank { color:var(--purple); }
.usage-rank-name { display:flex; align-items:start; justify-content:space-between; gap:18px; font-size:12px; margin-bottom:9px; }.usage-rank-name b { font-weight:550; line-height:1.5; overflow-wrap:anywhere; }.usage-rank-name strong { font-weight:600; font-variant-numeric:tabular-nums; }
.usage-rank-track { height:5px; background:var(--surface-2); border-radius:5px; }.usage-rank-track span { display:block; height:100%; background:var(--usage-bar); border-radius:5px; }.usage-top li:first-child .usage-rank-track span { background:var(--usage-accent); }
.usage-top li small { display:block; margin-top:7px; color:var(--ink-3); font-size:10px; }
.usage-feed-list > li { display:flex; align-items:start; gap:11px; padding:14px 0; }.usage-feed-list > li+li { border-top:1px solid var(--border-soft); }
.usage-feed-icon { display:grid; place-items:center; flex:none; width:30px; height:30px; border-radius:9px; color:var(--purple); background:var(--purple-tint); }.usage-feed-icon svg { width:14px; height:14px; }
.usage-feed-list li > div { min-width:0; flex:1; }.usage-feed-list b { display:block; font-size:11.5px; font-weight:550; line-height:1.5; overflow-wrap:anywhere; }.usage-feed-list small { display:block; margin-top:4px; font-size:10px; color:var(--ink-3); }.usage-feed-list time { font-size:9.5px; color:var(--ink-3); white-space:nowrap; padding-top:3px; }
.usage-unused { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 22px; list-style:none; padding:0; margin:0; }.usage-unused li { display:flex; align-items:center; gap:10px; min-width:0; border-top:1px solid var(--border-soft); padding:12px 0; font-size:11.5px; line-height:1.5; }.usage-unused .mono { width:29px; height:29px; font-size:9px; border-radius:8px; }.usage-unused li > span:last-child { overflow-wrap:anywhere; }
.usage-opportunity details { margin-top:15px; }.usage-opportunity summary { color:var(--purple); cursor:pointer; font-size:12px; font-weight:500; padding:8px 0; }
.usage-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:10.5px; color:var(--ink-3); padding:0 3px; line-height:1.6; }
.usage-loading,.usage-error { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:14px; padding:70px 20px; color:var(--ink-3); font-size:13px; text-align:center; }.usage-loading b,.usage-error b { font-weight:550; color:var(--ink); }.usage-error p { margin:0; }
.usage-blank { padding:32px 0; font-size:12px; line-height:1.7; color:var(--ink-3); }.usage-success { font-size:12px; color:var(--ink-2); padding:5px 0; }.usage-notice { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; color:var(--ink-3); }
:root[data-theme="dark"] .usage-dashboard { --usage-accent:#B89ADA; --usage-bar:#655278; }
:root[data-theme="dark"] :is(.usage-eyebrow,.usage-feed-icon,.usage-stat-label > span,.usage-opportunity summary) { color:var(--accent); }
:root[data-theme="dark"] .usage-stat:first-child { background:linear-gradient(135deg,#50316B,#30253F); }
:root[data-theme="dark"] .usage-stat:first-child .usage-stat-label > span { color:#fff; }
@media(max-width:1050px) { .usage-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }.usage-overview { grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr); }.usage-details { grid-template-columns:1fr; }.usage-unused { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:720px) { .usage-overview { grid-template-columns:1fr; }.usage-heading h2 { font-size:25px; }.usage-heading { gap:18px; }.usage-summary { align-items:start; }.usage-panel { padding:18px; }.usage-stat { padding:15px; gap:13px; }.usage-stat > strong { font-size:29px; }.usage-stat-label { font-size:11px; gap:7px; }.usage-stat-label > span { width:25px; height:25px; }.usage-stat > small { font-size:10px; }.usage-stats { gap:10px; }.usage-unused { grid-template-columns:1fr; }.usage-dashboard { gap:17px; }.usage-chart-key { display:none; }.usage-trend svg { height:160px; }.usage-feed-list time { font-size:9px; } }
