/* AtlasSuite v2 — intranet corporativa (demo de Lambda Lab Norte) */
:root {
  --bg: #f4f5f8;
  --panel: #ffffff;
  --panel-2: #f8f9fb;
  --line: #e6e8ee;
  --line-2: #d8dbe3;
  --text: #11131a;
  --text-2: #4a5061;
  --muted: #8a90a0;
  --brand: #4f46e5;
  --brand-2: #4338ca;
  --brand-soft: #eef0ff;
  --violet: #7c3aed;
  --ok: #0f9f6e;
  --ok-soft: #e4f6ef;
  --warn: #d9480f;
  --warn-soft: #fff1e8;
  --bad: #e03131;
  --bad-soft: #fdecec;
  --info: #1c7ed6;
  --info-soft: #e7f2fd;
  --gold: #e8a100;
  --gold-soft: #fff6dc;
  --shadow-sm: 0 1px 2px rgba(17, 19, 26, .05);
  --shadow: 0 1px 2px rgba(17, 19, 26, .04), 0 6px 20px -8px rgba(17, 19, 26, .1);
  --shadow-lg: 0 30px 80px -20px rgba(17, 19, 26, .35);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #0c0e14;
  --panel: #141720;
  --panel-2: #191d28;
  --line: #242936;
  --line-2: #313747;
  --text: #eef0f6;
  --text-2: #b4bacb;
  --muted: #7d8497;
  --brand: #7c7cff;
  --brand-2: #9898ff;
  --brand-soft: rgba(124, 124, 255, .14);
  --ok-soft: rgba(15, 159, 110, .16);
  --warn-soft: rgba(217, 72, 15, .16);
  --bad-soft: rgba(224, 49, 49, .16);
  --info-soft: rgba(28, 126, 214, .18);
  --gold-soft: rgba(232, 161, 0, .16);
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.link { color: var(--brand); font-weight: 600; font-size: 13.5px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn.pri { background: linear-gradient(180deg, #5b52ee, var(--brand)); border-color: var(--brand-2); color: #fff; box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.pri:hover { background: var(--brand-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--panel); border-color: var(--line); color: var(--text); }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }

/* Estructura */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 16px; padding: 18px 14px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 6px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--violet)); color: #fff; box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .8); }
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-text b { display: block; font-size: 15.5px; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: 12.5px; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a[aria-current] { background: var(--brand-soft); color: var(--brand); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; }
.count[hidden] { display: none; }
.side-card { margin-top: 6px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--brand-soft), transparent); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); display: grid; gap: 8px; }
.side-card b { color: var(--text); }
.side-card a { color: var(--brand); font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.theme { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: none; cursor: pointer; color: var(--text-2); font-weight: 600; }
.theme .moon { display: none; }
[data-theme="dark"] .theme .sun { display: none; }
[data-theme="dark"] .theme .moon { display: block; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; }
.me img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.me b { display: block; font-size: 13.5px; }
.me small { color: var(--muted); font-size: 12px; }
.demo-note { font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.demo-note a { text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
.top-title { margin-right: auto; display: grid; line-height: 1.2; }
.top-title small { font-size: 12px; color: var(--muted); }
.top-title b { font-size: 15px; }
.menu-btn { display: none; }
.pop { position: absolute; top: 58px; right: 24px; width: min(380px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
.pop.on { display: block; }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.note { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note.unread { background: var(--brand-soft); }
.note b { display: block; font-weight: 600; font-size: 13.5px; }
.note small { color: var(--muted); }

.view { padding: 8px 28px 48px; display: grid; gap: 22px; align-content: start; max-width: 1360px; width: 100%; animation: fadein .35s var(--ease); }
.view[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.view-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; padding-top: 6px; }
.view-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.view-head p { color: var(--muted); margin-top: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.card-h h2 { font-size: 16px; font-weight: 700; }
.card-h p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Avatares y etiquetas */
.av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 700; flex: none; background: var(--c, #64748b); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.lg { width: 64px; height: 64px; font-size: 21px; }
.av.xl { width: 76px; height: 76px; font-size: 24px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.tag.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.dotted::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.type-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.type-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.t-vac { background: var(--info-soft); color: var(--info); }
.t-com { background: var(--warn-soft); color: var(--warn); }
.t-acc { background: var(--brand-soft); color: var(--brand); }
.t-cap { background: var(--ok-soft); color: var(--ok); }

/* Mi día */
.hello { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 26px 28px; border-radius: 22px; color: #fff; background:
    radial-gradient(90% 140% at 100% 0%, rgba(124, 58, 237, .55), transparent 55%),
    radial-gradient(60% 120% at 0% 100%, rgba(56, 189, 248, .35), transparent 60%),
    linear-gradient(135deg, #1e1b4b, #312e81 55%, #4338ca);
  box-shadow: 0 30px 60px -36px rgba(49, 46, 129, .9); position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.hello > * { position: relative; z-index: 1; }
.date { font-size: 13px; color: rgba(255, 255, 255, .7); }
.date::first-letter { text-transform: uppercase; }
.hello h1 { margin-top: 6px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.04em; }
.hello-sub { margin-top: 8px; color: rgba(255, 255, 255, .82); font-size: 15px; max-width: 46ch; }
.hello-sub b { color: #fff; }
.quick { display: grid; grid-template-columns: repeat(3, 132px); gap: 10px; }
.quick-btn { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .2s var(--ease); }
.quick-btn:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.quick-btn b { margin-top: 10px; font-size: 14.5px; }
.quick-btn small { color: rgba(255, 255, 255, .72); font-size: 12px; }
.qi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.qi-1 { background: #34d399; color: #064e3b; }
.qi-2 { background: #fbbf24; color: #78350f; }
.qi-3 { background: #a5b4fc; color: #312e81; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.col { display: grid; gap: 20px; min-width: 0; }
.inbox { display: grid; }
.inbox-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.inbox-item:hover { background: var(--panel-2); }
.inbox-main { min-width: 0; }
.inbox-main button { all: unset; cursor: pointer; font-weight: 700; display: block; }
.inbox-main button:hover { color: var(--brand); }
.inbox-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.inbox-meta .who { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; }
.inbox-meta .who img, .inbox-meta .who .av { width: 20px; height: 20px; font-size: 9px; }
.wait { color: var(--warn); font-weight: 600; }
.inbox-actions { display: flex; gap: 6px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.feature { display: grid; grid-template-columns: 1fr 1.1fr; }
.feature img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; }
.feature-body { padding: 22px; display: grid; gap: 10px; align-content: center; }
.feature-body h3 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.feature-body p { color: var(--text-2); }
.read { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--violet)); }

.today { padding: 2px 20px 18px; display: grid; gap: 10px; }
.today h3 { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.people-mini { display: grid; gap: 10px; }
.people-mini li { display: flex; align-items: center; gap: 10px; }
.people-mini b { display: block; font-size: 13.5px; font-weight: 600; }
.people-mini small { color: var(--muted); font-size: 12px; }
.people-mini .tag { margin-left: auto; }

.kpis { display: grid; }
.kpis li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.kpis small { color: var(--muted); font-size: 12.5px; }
.kpis b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.kpis em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ok); }
.kpis em.down { color: var(--bad); }
.kpis svg { grid-row: 1 / 3; grid-column: 2; width: 96px; height: 34px; }
.kpis svg path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpis svg .area { fill: url(#spark); stroke: none; }

/* Barra de herramientas */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.toolbar > * { min-width: 0; max-width: 100%; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); }
.tabs button { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--text-2); }
.tabs button span { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--panel-2); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--panel); }
.tabs button[aria-selected="true"] span { background: rgba(255, 255, 255, .18); color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.chips button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 290px; max-width: 380px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; width: 100%; color: var(--text); }

/* Solicitudes */
.req-list { display: grid; }
.req { display: grid; grid-template-columns: auto 1.6fr 1fr auto auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.req:first-child { border-top: 0; }
.req:hover { background: var(--panel-2); }
.req-title b { display: block; font-weight: 700; }
.req-title small { color: var(--muted); font-size: 12.5px; }
.req-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.req-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-amount { font-family: var(--mono); font-size: 13px; color: var(--text-2); text-align: right; min-width: 110px; }

/* Recorrido de aprobación */
.flow { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.step::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line-2); color: var(--muted); }
.step-dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.step.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done::before { background: var(--ok); }
.step.now .step-dot { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 5px var(--brand-soft); }
.step.no .step-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.step b { display: block; font-weight: 700; }
.step small { color: var(--muted); font-size: 12.5px; }

/* Personas */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.person { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 22px 16px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s var(--ease), border-color .2s; position: relative; }
.person:hover { transform: translateY(-3px); border-color: var(--line-2); }
.person .av { margin-bottom: 8px; }
.person b { font-size: 15px; }
.person small { color: var(--muted); }
.person .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.status-dot { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.status-dot.inv { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.status-dot.sus { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }

/* Comunicados */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.post { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s var(--ease); }
.post:hover { transform: translateY(-3px); }
.post figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
.post figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover figure img { transform: scale(1.04); }
.post figure .tag { position: absolute; left: 12px; top: 12px; background: rgba(17, 19, 26, .72); color: #fff; border: 0; backdrop-filter: blur(6px); }
.post-body { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; }
.post-body h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.post-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.post-foot .tag { margin-left: auto; }
.post.lead { grid-column: 1 / -1; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto; }
.post.lead figure { aspect-ratio: auto; min-height: 280px; }
.post.lead .post-body { padding: 28px; align-content: center; }
.post.lead h3 { font-size: 26px; }

/* Seguridad */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.score { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 24px 28px; }
.ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; align-content: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--panel-2); stroke-width: 12; }
.ring .ring-fg { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.2s var(--ease); }
.ring b { font-size: 38px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ring small { color: var(--muted); font-size: 12px; text-align: center; }
.score h2 { font-size: 20px; font-weight: 800; }
.score > div > p { color: var(--text-2); margin-top: 4px; }
.tips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.tips li.done { color: var(--ok); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.setting b { display: block; font-weight: 700; }
.setting small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.session { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.session .dev { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); }
.session div { flex: 1; min-width: 0; }
.session b { display: block; font-weight: 700; }
.session small { color: var(--muted); font-size: 12.5px; }
.audit { padding: 4px 20px 18px; display: grid; }
.audit li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.audit li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 5px; box-shadow: 0 0 0 4px var(--brand-soft); }
.audit li.alert::before { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.audit b { font-weight: 700; }
.audit small { display: block; color: var(--muted); font-size: 12px; }

/* Paneles flotantes */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(12, 14, 20, .45); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; z-index: 60; width: min(480px, calc(100% - 20px)); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateX(calc(100% + 20px)); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; display: flex; flex-direction: column; overflow: hidden; }
.drawer.on { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.drawer-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 18px; font-weight: 800; }
.drawer-b { flex: 1; overflow: auto; padding: 22px; display: grid; gap: 20px; align-content: start; }
.drawer-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.drawer-f:empty { display: none; }
.sub { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.who-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.who-card b { display: block; font-size: 15.5px; }
.who-card small { color: var(--muted); }
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 500; font-size: 14px; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }
.post-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.prose { color: var(--text-2); font-size: 15px; line-height: 1.7; display: grid; gap: 12px; }

.palette { position: fixed; left: 50%; top: 12vh; z-index: 70; width: min(600px, calc(100% - 24px)); transform: translateX(-50%) scale(.98); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette.on { opacity: 1; visibility: visible; transform: translateX(-50%); transition: opacity .18s, transform .18s var(--ease); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-in input { flex: 1; height: 56px; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.palette ul { max-height: 360px; overflow: auto; padding: 8px; }
.palette li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 11px; border: 0; background: none; cursor: pointer; text-align: left; }
.palette li button.sel { background: var(--brand-soft); }
.palette li small { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette .grp { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.toast { position: fixed; bottom: 24px; left: 50%; z-index: 80; transform: translate(-50%, 160%); display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--panel); font-weight: 600; box-shadow: var(--shadow-lg); transition: transform .35s var(--ease); visibility: hidden; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }
.toast svg { color: #34d399; }

.tabbar { display: none; }

/* Ingreso */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--panel); }
.login[hidden], .app[hidden] { display: none; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff; background:
    radial-gradient(80% 60% at 100% 0%, rgba(124, 58, 237, .6), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(56, 189, 248, .35), transparent 60%),
    linear-gradient(140deg, #1e1b4b, #312e81 55%, #4338ca); }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(180deg, transparent, #000); }
.login-art > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 19px; }
.login-quote p { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.25; max-width: 22ch; }
.login-quote span { display: block; margin-top: 16px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.login-points { display: grid; gap: 10px; color: rgba(255, 255, 255, .85); }
.login-points li { display: flex; gap: 10px; align-items: center; }
.login-points li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .15); font-size: 12px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 40px 24px; }
.login-demo { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.login-form { width: min(380px, 100%); }
.login-form > div { display: grid; gap: 16px; }
.login-form > div[hidden] { display: none; }
.login-form h1 { font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
.btn.wide { width: 100%; height: 46px; }
.btn.sso { width: 100%; height: 46px; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code { letter-spacing: .3em; font-family: var(--mono); font-size: 18px !important; text-align: center; }
.login-exit { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.login-exit:hover { color: var(--brand); }

/* Aviso de demo y menú de usuario */
.demo-bar { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: linear-gradient(90deg, #312e81, #4f46e5); color: #fff; font-size: 13px; text-align: center; }
.demo-bar a { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-weight: 700; }
.demo-bar a:hover { background: rgba(255, 255, 255, .28); }
.me { width: 100%; border: 1px solid transparent; border-radius: 12px; background: none; cursor: pointer; text-align: left; }
.me span { flex: 1; }
.me:hover { background: var(--panel-2); border-color: var(--line); }
.avatar-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid var(--line); overflow: hidden; cursor: pointer; background: none; margin-left: 4px; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.user-menu { position: fixed; z-index: 75; width: 270px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: none; }
.user-menu.on { display: grid; }
.um-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-head img { border-radius: 50%; object-fit: cover; }
.um-head b { display: block; font-size: 14px; }
.um-head small { color: var(--muted); font-size: 12px; }
.user-menu button { all: unset; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.user-menu button:hover, .user-menu button:focus-visible { background: var(--panel-2); }
.user-menu .danger { color: var(--bad); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 10px 10px; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 28px 22px; gap: 22px; }
  .login-points { display: none; }
  .demo-bar { font-size: 12px; gap: 8px; }
}

/* Responsive */
@media (max-width: 1180px) {
  .home-grid { grid-template-columns: 1fr; }
  .hello { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 65; left: 0; top: 0; width: 280px; transform: translateX(-105%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; box-shadow: var(--shadow-lg); }
  .side.on { transform: none; visibility: visible; transition: transform .3s var(--ease); }
  .menu-btn { display: grid; }
  .top { padding: 0 14px; }
  .view { padding: 4px 14px 96px; gap: 16px; }
  .hello { padding: 22px 20px; border-radius: 18px; }
  .quick { gap: 8px; }
  .quick-btn { padding: 12px; }
  .quick-btn small { display: none; }
  .feature { grid-template-columns: 1fr; }
  .feature img { min-height: 180px; max-height: 220px; }
  .req { grid-template-columns: auto 1fr auto; }
  .req-who, .req-amount { display: none; }
  .sec-grid { grid-template-columns: 1fr; }
  .score { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tips { justify-content: center; }
  .post.lead { grid-template-columns: 1fr; }
  .post.lead figure { min-height: 200px; }
  .fields { grid-template-columns: 1fr; }
  .inbox-item { grid-template-columns: auto 1fr; }
  .inbox-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; padding: 6px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 0; border-radius: 12px; font-size: 11px; font-weight: 700; color: var(--muted); }
  .tabbar a[aria-current] { color: var(--brand); background: var(--brand-soft); }
  .tabbar .count { position: absolute; top: 2px; right: 18%; min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; }
  .tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips button { flex: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .people-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .person { padding: 18px 10px 14px; }
  .person .av.xl { width: 60px; height: 60px; }
  .person b { font-size: 14px; }
  .toast { bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
