/* =====================================================================
   ARALIA — Sistema de diseño compartido
   Lo usan las tres superficies: sitio comercial (www), portal del
   cliente (<cliente>.aralia.cl) y consola admin (<cliente>-admin).
   Tokens primero; componentes después. No hardcodear colores en páginas.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Marca (derivada del logo) */
  --navy-950: #08131f;
  --navy-900: #0c1c32;
  --navy-800: #122946;
  --navy-700: #17345a;
  --navy-600: #23446f;
  --steel-500: #355b87;
  --steel-400: #5a81ad;
  --steel-300: #7298bd;
  --steel-200: #a8c3de;
  --steel-100: #d6e3f0;
  --mist-50: #f3f7fb;
  --mist-25: #f8fafc;

  /* Acento "aralia" (la planta): verde salvia, solo para éxito/acentos puntuales */
  --leaf-600: #1f8a63;
  --leaf-500: #2aa676;
  --leaf-100: #dcf3e8;

  /* Semánticos */
  --warn-500: #d98a1c;
  --warn-100: #fdf1dc;
  --danger-500: #d14b4b;
  --danger-100: #fbe3e3;
  --info-500: var(--steel-500);
  --info-100: #e3edf7;

  /* Superficies y texto */
  --bg: #ffffff;
  --bg-soft: var(--mist-50);
  --bg-sunken: #eef3f8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f1b2d;
  --text-muted: #51627a;
  --text-subtle: #8494a8;
  --text-on-dark: #eaf1f8;

  /* Tipografía */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Escala */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(12, 28, 50, .06), 0 1px 3px rgba(12, 28, 50, .05);
  --shadow: 0 4px 12px rgba(12, 28, 50, .07), 0 2px 4px rgba(12, 28, 50, .04);
  --shadow-lg: 0 24px 48px -12px rgba(12, 28, 50, .22);
  --ring: 0 0 0 3px rgba(53, 91, 135, .25);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Gradientes de marca */
  --grad-brand: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--steel-500) 100%);
  --grad-soft: linear-gradient(180deg, var(--mist-50) 0%, #ffffff 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--steel-500); text-decoration: none; }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--font-mono); font-size: .9em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--steel-200); color: var(--navy-900); }

/* ---------- Utilidades ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--steel-500); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--navy-800); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font: 600 .95rem/1 var(--font-body); white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { --btn-bg: var(--navy-800); }
.btn--primary:hover { --btn-bg: var(--navy-700); }
.btn--accent { --btn-bg: var(--leaf-600); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy-800); --btn-bd: var(--border-strong); }
.btn--ghost:hover { --btn-bg: var(--mist-50); box-shadow: none; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--navy-900); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
.btn--danger { --btn-bg: var(--danger-500); }
.btn--sm { height: 34px; padding: 0 14px; font-size: .85rem; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--square { border-radius: var(--radius-sm); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--navy-800); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card--hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--steel-200); }
.card--flat { box-shadow: none; }
.card--tight { padding: 20px; }
.card__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--info-100); color: var(--navy-700); margin-bottom: 18px;
}
.card__icon .icon { width: 24px; height: 24px; }
.media-card { overflow: hidden; padding: 0; }
.media-card__img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.media-card__body { padding: 24px; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font: 600 .75rem/1 var(--font-body); background: var(--bg-sunken); color: var(--text-muted); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--plain::before { display: none; }
.badge--ok { background: var(--leaf-100); color: var(--leaf-600); }
.badge--warn { background: var(--warn-100); color: #9a5f0c; }
.badge--danger { background: var(--danger-100); color: #a83232; }
.badge--info { background: var(--info-100); color: var(--navy-700); }
.badge--dark { background: var(--navy-800); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; font-size: .85rem; color: var(--text-muted); cursor: pointer;
}
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.label { font: 600 .85rem/1.2 var(--font-body); color: var(--navy-900); }
.hint { font-size: .8rem; color: var(--text-subtle); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text); font: 400 .95rem var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--steel-400); box-shadow: var(--ring); }
.input--sm, .select--sm { height: 36px; font-size: .88rem; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy-700); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--leaf-500); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- Tablas ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table th {
  position: sticky; top: 0; z-index: 1; text-align: left; font: 600 .75rem/1 var(--font-body);
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
  background: var(--mist-50); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--mist-25); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-selected td { background: var(--info-100); }
.table td[contenteditable="true"] { cursor: text; }
.table td[contenteditable="true"]:focus { outline: 2px solid var(--steel-400); outline-offset: -2px; background: #fff; }
.table td.is-edited { background: var(--warn-100); position: relative; }
.table td.is-edited::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn-500); }

/* ---------- Progreso, consola, estados ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.progress__bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--steel-500), var(--leaf-500)); transition: width .4s var(--ease); }
.progress--striped .progress__bar { background-image: linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 75%, transparent 75%), linear-gradient(90deg, var(--steel-500), var(--leaf-500)); background-size: 24px 24px, 100% 100%; animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 24px 0, 0 0; } }
.console {
  background: var(--navy-950); color: #cfe0f1; border-radius: var(--radius); padding: 16px 18px;
  font: 400 .82rem/1.65 var(--font-mono); height: 340px; overflow: auto; border: 1px solid #1a2b42;
}
.console .t { color: #6f87a3; }
.console .ok { color: #6fd3a5; }
.console .warn { color: #f2c46d; }
.console .err { color: #ff8a8a; }
.console .info { color: #8fb7e0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-subtle); display: inline-block; }
.dot--ok { background: var(--leaf-500); } .dot--warn { background: var(--warn-500); } .dot--danger { background: var(--danger-500); }
.dot--live { background: var(--leaf-500); box-shadow: 0 0 0 0 rgba(42,166,118,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(42,166,118,0); } 100% { box-shadow: 0 0 0 0 rgba(42,166,118,0); } }
.kpi { display: grid; gap: 4px; }
.kpi__label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.kpi__value { font: 700 1.7rem/1.1 var(--font-display); color: var(--navy-900); font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: .8rem; font-weight: 600; color: var(--leaf-600); }
.kpi__delta--down { color: var(--danger-500); }
.empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }

/* ---------- Tabs, avatar, modal, toast ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 12px 14px; font: 600 .9rem var(--font-body); color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--navy-800); }
.tab.is-active { color: var(--navy-900); border-bottom-color: var(--navy-800); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 .75rem var(--font-body); color: #fff; background: var(--steel-500); flex: none; }
.avatar--sm { width: 24px; height: 24px; font-size: .65rem; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 19, 31, .5); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-backdrop.is-open { display: flex; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal__head { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.modal__body { padding: 16px 24px; }
.modal__foot { padding: 16px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; transition: all .25s var(--ease); z-index: 60; display: flex; gap: 10px; align-items: center; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   SITIO COMERCIAL (www.aralia.cl)
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header__inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-logo img { height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a.is-active { color: var(--navy-900); background: var(--mist-50); }
.site-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .site-nav, .site-actions .btn--ghost { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-header.is-open .site-nav { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
}
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); background: var(--grad-soft); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__visual { position: relative; }
.hero__photo { border-radius: var(--radius-xl); aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; box-shadow: var(--shadow-lg); }
.float-card { position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px 16px; border: 1px solid var(--border); }
.page-hero { position: relative; padding: clamp(80px, 11vw, 140px) 0 clamp(56px, 8vw, 96px); color: #fff; background: var(--navy-900); overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,19,31,.92) 20%, rgba(12,28,50,.55) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 18ch; }
.page-hero .lead { color: #c6d6e8; }
.page-hero .eyebrow { color: var(--steel-200); }
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px; align-items: center; }
.logo-strip span { font: 700 1.1rem var(--font-display); color: #9aa9bb; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 8px; }
.stat { font: 800 clamp(2rem, 4vw, 3rem)/1 var(--font-display); color: var(--navy-900); letter-spacing: -.03em; }
.section--dark .stat { color: #fff; }
.step-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 700 1rem var(--font-display); background: var(--navy-800); color: #fff; }
.quote { font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.4 var(--font-display); color: var(--navy-900); letter-spacing: -.01em; }
.cta-band { border-radius: var(--radius-xl); padding: clamp(36px, 6vw, 72px); background: var(--grad-brand); color: #fff; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: #c9d9ea; }
.site-footer { background: var(--navy-950); color: #9fb3c9; padding: 72px 0 32px; font-size: .92rem; }
.site-footer a { color: #c7d6e6; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 14px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } * { animation: none !important; transition: none !important; } }

/* =====================================================================
   APP (portal del cliente y consola admin) — shell con sidebar
   ===================================================================== */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: var(--bg-soft); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--navy-900); color: #b9c9db; padding: 18px 14px; overflow-y: auto; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.sidebar__brand img { height: 24px; width: auto; }
.sidebar__tenant { margin: 0 4px 16px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.sidebar__tenant strong { color: #fff; display: block; font-size: .92rem; }
.sidebar__tenant small { color: #8ea4bc; font-size: .78rem; }
.sidebar__section { font: 600 .68rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #6d84a0; padding: 18px 12px 8px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #b9c9db; font-weight: 500; font-size: .92rem; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.is-active { background: rgba(114,152,189,.22); color: #fff; box-shadow: inset 2px 0 0 var(--steel-200); }
.side-link .badge { margin-left: auto; height: 20px; font-size: .7rem; }
.sidebar__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.sidebar__foot strong { color: #fff; display: block; font-size: .88rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs strong { color: var(--navy-900); }
.content { padding: 28px; display: grid; gap: 24px; align-content: start; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.65rem; margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--text-muted); }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel__head h3 { font-size: 1.02rem; margin: 0; }
.panel__body { padding: 22px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.env-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font: 700 .72rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.env-pill--prod { background: var(--leaf-100); color: var(--leaf-600); }
.env-pill--dev { background: var(--warn-100); color: #9a5f0c; }
.menu-toggle { display: none; }
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 45; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app.is-nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-grid; }
  .content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
}

/* Pantalla de login (portal y admin) */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__side { position: relative; background: var(--navy-900); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth__side img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.auth__side > * { position: relative; }
.auth__form { display: grid; place-items: center; padding: 48px 24px; background: #fff; }
.auth__box { width: min(400px, 100%); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__side { display: none; } }
