/* CNSL Gestión · sistema visual 0.9
   Sin dependencias externas: la política de seguridad solo admite estilos propios
   (style-src 'self'), por eso no hay atributos style ni fuentes remotas. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --navy: #0b2a47;
  --navy-2: #12385c;
  --primary: #0a5ea8;
  --primary-hover: #084d8a;
  --primary-soft: #e8f1fb;
  --accent: #00935a;
  --accent-soft: #e6f5ee;
  --warning: #8a5a00;
  --warning-soft: #fff4d6;
  --danger: #b0312a;
  --danger-soft: #fdeeee;
  --ink: #142a3f;
  --muted: #5b6e82;
  --line: #e1e7ee;
  --line-strong: #c4d1de;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --sidebar-ink: #d6e3ef;
  --sidebar-muted: #8fa9c1;
  --on-dark-primary: #8fc2e8;
  --on-dark-accent: #5fe3b1;
  --on-dark-accent-soft: #8fe7c2;
  --on-dark-muted: #c4d6e8;
  --on-dark-faint: #a9c2d8;
  --glow-primary: #1d74c9;
  --glow-accent: #13a874;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(16 42 67 / .06);
  --shadow: 0 1px 2px rgb(16 42 67 / .05), 0 8px 24px rgb(16 42 67 / .07);
  --shadow-lg: 0 12px 40px rgb(16 42 67 / .16);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --sidebar-w: 256px;
  --rail-w: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --navy: #07182a;
    --navy-2: #0f2a45;
    --primary: #5aa9f0;
    --primary-hover: #7dbcf5;
    --primary-soft: #12304d;
    --accent: #3fcf8e;
    --accent-soft: #0f3326;
    --warning: #f2c35b;
    --warning-soft: #3a2d0c;
    --danger: #ff8a80;
    --danger-soft: #3d1717;
    --ink: #e6edf4;
    --muted: #9db0c3;
    --line: #22364b;
    --line-strong: #34506b;
    --bg: #0b1622;
    --surface: #102030;
    --surface-2: #142839;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; text-underline-offset: 3px }
a:hover { text-decoration: underline }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 3px; border-radius: 6px }
h1, h2, h3, p { margin-top: 0 }
h1 { font-family: var(--font-display); font-size: clamp(26px, 2.2vw + 14px, 34px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: var(--space-2); font-weight: 650 }
h2 { font-family: var(--font-display); font-size: 20px; line-height: 1.3; letter-spacing: -.01em; font-weight: 620 }
h3 { font-size: 16px; font-weight: 620 }
small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; overflow-wrap: anywhere }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0 }
.muted, .hint { color: var(--muted) }
.hint { font-size: 14px }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2) }
[hidden] { display: none !important }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap }
.skip { position: absolute; top: -100px; left: 10px; background: var(--surface); color: var(--ink); z-index: 100; padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow) }
.skip:focus { top: 10px }

/* ---------- Íconos ---------- */
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px }
.icon-sm { width: 16px; height: 16px; vertical-align: -3px }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden }

/* ---------- Estructura ---------- */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none }
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; padding: 0 10px 28px; font-size: 24px; font-weight: 700; letter-spacing: .08em }
.brand:hover { text-decoration: none }
.brand img { width: 38px; height: 50px; object-fit: contain; flex-shrink: 0 }
.brand-sub { display: block; font-size: 11px; letter-spacing: .04em; font-weight: 400; color: var(--sidebar-muted) }
.nav-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--sidebar-muted); margin: 18px 12px 8px; white-space: nowrap }
.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-ink);
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.sidebar nav a:hover { background: rgb(255 255 255 / .07); color: #fff; text-decoration: none }
.sidebar nav a[aria-current=page] { background: rgb(255 255 255 / .12); color: #fff }
.sidebar nav a[aria-current=page]::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--on-dark-accent) }
.sidebar nav .icon { color: var(--on-dark-primary) }
.sidebar nav a[aria-current=page] .icon { color: var(--on-dark-accent) }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 0; font-size: 13px; color: var(--sidebar-ink); white-space: nowrap }
.local-dot { display: inline-block; width: 8px; height: 8px; background: #2fd895; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 0 rgb(47 216 149 / .6); animation: pulse 2.6s infinite }
.muted-light { color: var(--sidebar-muted); font-size: 12px; margin-top: 6px }
.nav-backdrop { display: none }

.workspace { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.topbar-title { display: flex; align-items: center; min-width: 0 }
.separator { color: var(--line-strong); margin: 0 12px }
.menu-button { display: none }
.account { display: flex; align-items: center; gap: var(--space-3) }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px; text-transform: uppercase }
.account-name { color: var(--ink); font-weight: 600 }
.quiet { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--primary); padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 14px }
.quiet:hover { background: var(--primary-soft) }
main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 36px 40px 48px; flex: 1 }
.dock { display: none }

/* Aparición suave del contenido (inspirado en "Fade Content" de reactbits). */
main > * { animation: rise .5s var(--ease) both }
main > *:nth-child(2) { animation-delay: .04s }
main > *:nth-child(3) { animation-delay: .08s }
main > *:nth-child(4) { animation-delay: .12s }
main > *:nth-child(5) { animation-delay: .16s }
main > *:nth-child(n+6) { animation-delay: .2s }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(47 216 149 / .55) } 70% { box-shadow: 0 0 0 8px rgb(47 216 149 / 0) } 100% { box-shadow: 0 0 0 0 rgb(47 216 149 / 0) } }

/* ---------- Encabezados de página ---------- */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-5); flex-wrap: wrap }
.page-heading > div:first-child { min-width: 0; flex: 1 1 380px }
.page-heading p:last-child { margin-bottom: 0 }
.page-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: var(--space-4) }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3) }
.section-title h2 { margin: 0 }
.section-title span, .section-title a { font-size: 14px }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 600; padding: 6px 12px; white-space: nowrap }

/* ---------- Superficies ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: var(--space-4) }
.panel > h2:first-child, .panel > h2:only-child { margin-bottom: var(--space-3) }
.panel > :last-child { margin-bottom: 0 }
.stack > * + * { margin-top: var(--space-4) }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) }

/* Panel "Pendiente hoy" con fondo aurora (CSS puro). */
.today {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  background: var(--navy);
  isolation: isolate;
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow);
}
.today::before, .today::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  animation: aurora 16s ease-in-out infinite alternate;
}
.today::before { background: var(--glow-primary); top: -40%; left: -10% }
.today::after { background: var(--glow-accent); bottom: -55%; right: -12%; animation-delay: -8s }
@keyframes aurora { from { transform: translate(0, 0) scale(1) } to { transform: translate(12%, 10%) scale(1.15) } }
.today .eyebrow { color: var(--on-dark-accent-soft) }
.today h2 { font-size: 24px; margin-bottom: var(--space-4); color: #fff }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2) }
.today-list a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgb(255 255 255 / .09);
  border: 1px solid rgb(255 255 255 / .12);
  color: #fff;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.today-list a:hover { background: rgb(255 255 255 / .16); text-decoration: none; transform: translateX(3px) }
.today-list strong { display: block; font-weight: 600 }
.today-list small { color: var(--on-dark-muted) }
.today-list .grow { flex: 1; min-width: 0 }
.today-list .go { font-size: 14px; font-weight: 600; color: var(--on-dark-accent-soft); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center }
.today-empty { color: var(--on-dark-muted); margin: 0 }
.today-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4) }
.today-actions .button.secondary { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .25) }
.today-actions .button.secondary:hover { background: rgb(255 255 255 / .18) }

/* ---------- Métricas ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-5) }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0 }
.stats span { display: block; font-size: 13px; color: var(--muted) }
.stats strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 650; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; animation: blur-in .7s var(--ease) both; overflow-wrap: anywhere }
.stats .money { font-size: 22px }
@keyframes blur-in { from { opacity: 0; filter: blur(8px); transform: translateY(4px) } to { opacity: 1; filter: none; transform: none } }

/* ---------- Tarjetas de módulos ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4) }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false }
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  isolation: isolate;
}
/* Borde con degradé giratorio al pasar el mouse (idea de "Spotlight / Star Border"). */
.module-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0 70%, var(--primary), var(--accent), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; border-color: transparent }
.module-card:hover::before { opacity: 1; animation: spin 3s linear infinite }
@keyframes spin { to { --angle: 360deg } }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: var(--space-4) }
.module-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary) }
.module-number .icon { width: 22px; height: 22px }
.module-card h3 { font-size: 17px; margin-bottom: 6px }
.module-card p { font-size: 14px; color: var(--muted); margin-bottom: var(--space-5); flex: 1 }
.card-action { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 14px; font-weight: 600 }
.module-card:hover .card-action .icon { transform: translateX(3px) }
.card-action .icon { transition: transform .2s var(--ease) }

/* ---------- Badges y estados ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.badge.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line) }
.badge.info { background: var(--primary-soft); color: var(--primary) }
.badge.warning { background: var(--warning-soft); color: var(--warning) }
.badge.danger { background: var(--danger-soft); color: var(--danger) }
.badge.plain::before { display: none }

.execution-status { display: inline-flex; gap: .5rem; align-items: center; padding: .6rem 1rem; border: 1px solid currentColor; border-radius: var(--radius); font-weight: 650; max-width: 100%; margin-bottom: var(--space-4) }
.execution-status.success { color: var(--accent); background: var(--accent-soft) }
.execution-status.warning { color: var(--warning); background: var(--warning-soft) }
.execution-status.danger { color: var(--danger); background: var(--danger-soft) }
.execution-status.neutral { color: var(--muted); background: var(--surface-2) }
.execution-status.info { color: var(--primary); background: var(--primary-soft) }
td .execution-status, p.execution-status { margin-bottom: 0 }
.execution-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: currentColor; flex-shrink: 0 }

/* Indicador local de progreso: el movimiento sigue al ejecutor real. */
.classroom-loader { min-height: 52px; gap: .85rem }
.lattice { position: relative; display: grid; grid-template-columns: repeat(3, 6px); grid-template-rows: repeat(3, 6px); gap: 3px; flex-shrink: 0; width: 24px; height: 24px }
.lattice-cell { background: currentColor; border-radius: 2px; opacity: .25 }
.classroom-loader[data-mode="working"] .lattice-cell { animation: cnsl-lattice 1.35s ease-in-out infinite }
.lattice-cell:nth-child(2) { animation-delay: .12s } .lattice-cell:nth-child(3) { animation-delay: .24s } .lattice-cell:nth-child(6) { animation-delay: .36s } .lattice-cell:nth-child(9) { animation-delay: .48s } .lattice-cell:nth-child(8) { animation-delay: .60s } .lattice-cell:nth-child(7) { animation-delay: .72s } .lattice-cell:nth-child(4) { animation-delay: .84s } .lattice-cell:nth-child(5) { animation-delay: .96s }
@keyframes cnsl-lattice { 0%, 100% { opacity: .2; transform: scale(.8) } 40% { opacity: 1; transform: scale(1) } }
.lattice-mark { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: 25px; line-height: 1 }
.classroom-loader[data-mode="done"] .lattice-cell, .classroom-loader[data-mode="error"] .lattice-cell, .classroom-loader[data-mode="cancelled"] .lattice-cell { visibility: hidden }
.classroom-loader[data-mode="done"] .lattice-mark, .classroom-loader[data-mode="error"] .lattice-mark, .classroom-loader[data-mode="cancelled"] .lattice-mark { display: flex }
.classroom-loader[data-mode="done"] .lattice-mark::after { content: "✓" } .classroom-loader[data-mode="error"] .lattice-mark::after { content: "×" } .classroom-loader[data-mode="cancelled"] .lattice-mark::after { content: "−" }

/* ---------- Botones ---------- */
.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--primary) 25%, transparent);
  transition: background .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
@media (prefers-color-scheme: dark) { .button:not(.secondary):not(.google):not(.danger) { color: var(--primary-ink, #06223b) } }
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent) }
.button:active { transform: translateY(1px) }
.button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none }
/* Brillo que recorre el botón principal (idea de "Shiny Text"). */
.button:not(.secondary):not(.google)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.button:not(.secondary):not(.google):hover::after { transition: transform .8s var(--ease); transform: translateX(120%) }
.button.secondary, .button.google { background: var(--surface); color: var(--primary); border-color: var(--line-strong); box-shadow: var(--shadow-sm) }
.button.secondary:hover, .button.google:hover { background: var(--primary-soft); border-color: var(--primary) }
.button.danger { background: var(--danger); border-color: var(--danger) }
.button.block { width: 100% }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center }
button:not(.button):not(.quiet):not(.menu-button) { min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer }
button:not(.button):not(.quiet):not(.menu-button):hover { border-color: var(--primary); color: var(--primary) }

/* ---------- Avisos ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); color: var(--ink); padding: 14px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: var(--space-4) }
.notice::before { content: "i"; display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--surface); font-weight: 700; font-size: 13px; font-family: Georgia, serif; font-style: italic }
.notice > div, .notice > span { min-width: 0 }
.notice p { margin: 4px 0 0 }
.notice.success { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent) }
.notice.success::before { content: "✓"; background: var(--accent); font-family: inherit; font-style: normal }
.notice.warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent) }
.notice.warning::before { content: "!"; background: var(--warning); font-family: inherit; font-style: normal }
.notice.danger, .notice.error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent) }
.notice.danger::before, .notice.error::before { content: "!"; background: var(--danger); font-family: inherit; font-style: normal }
.messages { display: grid; gap: var(--space-2); margin-bottom: var(--space-4) }
.messages .notice { margin: 0; box-shadow: var(--shadow); animation: toast .45s var(--ease) both }
@keyframes toast { from { opacity: 0; transform: translateY(-8px) scale(.98) } to { opacity: 1; transform: none } }

/* Información secundaria plegada: evita la acumulación de avisos. */
.more-info { margin: 0 0 var(--space-4); font-size: 14px; color: var(--muted) }
.more-info > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--primary); font-weight: 600; list-style: none }
.more-info > summary::-webkit-details-marker { display: none }
.more-info > summary::before { content: "i"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font: italic 700 11px Georgia, serif }
.more-info[open] > summary { margin-bottom: var(--space-2) }
.more-info > :not(summary) { padding-left: 24px }
.more-info p { margin-bottom: var(--space-2) }

/* ---------- Tablas ---------- */
.table-wrap { padding: 0; overflow: auto }
.panel.table-wrap > h2, .panel.table-wrap > p, .panel.table-wrap > .button-row { margin: 20px 22px 12px }
table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; padding: 12px 18px; white-space: nowrap; border-bottom: 1px solid var(--line) }
td { border-bottom: 1px solid var(--line); padding: 14px 18px; font-size: 14px; vertical-align: top }
tbody tr:last-child td { border-bottom: 0 }
tbody tr { transition: background .15s }
tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent) }
td a { font-weight: 600 }
td small a { font-weight: 600 }
.empty { text-align: center; padding: 36px 20px; color: var(--muted) }
.empty strong { color: var(--ink) }
.empty p { margin: 6px auto; max-width: 560px }
.large { padding: 64px 28px }
.large h2 { font-size: 26px; color: var(--ink) }
.large .button { margin-top: 20px }

/* ---------- Formularios ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: var(--space-5); align-items: start }
form p { margin: 0 0 var(--space-4) }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent) }
input[type=file] { width: 100%; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer }
input[type=file]:hover { border-color: var(--primary) }
input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border-radius: 8px; border: 0; background: var(--primary-soft); color: var(--primary); font-weight: 600; cursor: pointer }
textarea { display: block; min-height: 7rem; resize: vertical; max-width: 100% }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; margin: 0 10px 0 0; vertical-align: -3px; flex-shrink: 0 }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: flex; align-items: flex-start; font-weight: 500; line-height: 1.45 }
label:has(> input[type=checkbox]) input, label:has(> input[type=radio]) input { margin-top: 2px }
.confirm { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px }
.helptext { display: block; margin-top: 6px; font-size: 13px; color: var(--muted) }
.errorlist { list-style: none; color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 var(--space-3) }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; min-width: 0 }
legend { font-weight: 600; padding: 0 6px }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end }
.inline-form p { margin: 0; flex: 1 1 220px }
.rename { margin-top: var(--space-2) }
.rename > summary { display: inline-block; cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600 }
.rename[open] > summary { margin-bottom: var(--space-2) }
.rename .inline-form { max-width: 520px }

/* ---------- Bloques específicos ---------- */
.guidance h2 { margin-bottom: var(--space-4) }
.guidance ol, .steps { padding-left: 0; list-style: none; counter-reset: step; color: var(--muted); font-size: 14px }
.guidance li, .steps li { position: relative; padding-left: 38px; margin-bottom: 14px; counter-increment: step }
.guidance li::before, .steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px }
.guidance p { font-size: 14px }
.issues { font-size: 14px; line-height: 1.8; padding-left: 20px }
.person { padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere }
.person:last-child { border: 0 }
.person .badge { margin: 8px 4px 6px 0 }
.person a { display: block; font-size: 14px }
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-3); font-size: 14px; margin: var(--space-4) }
.pagination a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600 }
.pagination a:hover { border-color: var(--primary); text-decoration: none }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); padding: 18px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line) }
.mail-body { overflow-wrap: anywhere; line-height: 1.7; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: var(--space-3) }
.sender-card { display: grid; gap: var(--space-3); align-content: start }
.sender-card header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap }
.sender-card h2 { margin: 0 }
.campaign-list { list-style: none; margin: 0; padding: 0 }
.campaign-list li { display: flex; align-items: center; gap: var(--space-3); padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap }
.campaign-list li:last-child { border-bottom: 0 }
.campaign-list .grow { flex: 1 1 260px; min-width: 0 }

.classroom-student { padding: 1rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere }
.classroom-student summary { cursor: pointer; line-height: 1.6 }
.classroom-student li { margin-bottom: .65rem }
.classroom-student textarea { margin-top: .5rem }

.review-tabs, .tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 1rem 0; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100% }
.review-tabs a, .tabs a { padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap }
.review-tabs a:hover, .tabs a:hover { color: var(--ink); text-decoration: none; background: var(--surface) }
.review-tabs a[aria-current="page"], .tabs a[aria-current="page"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm) }

/* ---------- Asistente de envío (etapa 4) ---------- */
.flow { margin: 0 0 var(--space-5) }
.flow ol { display: flex; list-style: none; margin: 0; padding: 0 }
.flow-step { position: relative; flex: 1; min-width: 0 }
.flow-step::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; border-radius: 2px; background: var(--line-strong) }
.flow-step:first-child::before { display: none }
.flow-step.is-done::before, .flow-step.is-current::before { background: var(--primary) }
.flow-step > a, .flow-step > span { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none }
.flow-step > a:hover .flow-label, .flow-step > a:focus-visible .flow-label { color: var(--primary); text-decoration: underline }
.flow-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; transition: transform .2s var(--ease) }
.flow-step > a:hover .flow-dot { transform: scale(1.08) }
.is-done .flow-dot { border-color: var(--primary); background: var(--primary); color: var(--surface) }
.is-current .flow-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); animation: flow-pulse 2.4s var(--ease) infinite }
.is-current .flow-label { color: var(--ink) }
@keyframes flow-pulse { 50% { box-shadow: 0 0 0 7px var(--primary-soft) } }

.summary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-4) }
.summary-list > div { min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2) }
.summary-list dt { color: var(--muted); font-size: 12px; font-weight: 600 }
.summary-list dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere }
.send-card { border-top: 3px solid var(--primary) }

.compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start }
.mail-preview { overflow: hidden; padding: 0 }
.mail-preview > h2 { margin: 18px 22px 10px }
.mail-head { display: grid; gap: 4px; padding: 12px 22px; border-block: 1px solid var(--line); background: var(--surface-2); font-size: 14px }
.mail-head span { color: var(--muted) }
.mail-head strong { overflow-wrap: anywhere }
.mail-preview .mail-text { margin: 0; padding: 18px 22px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.55 }
.mail-file { display: inline-flex; align-items: center; gap: 8px; margin: 0 22px 20px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px }

.decision-row { scroll-margin-top: 88px }
.decision-row.is-saving { opacity: .6 }
.decision-row.is-saved { padding-left: 12px; border-left: 3px solid var(--accent) }
.reason-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center }
.reason-chips[hidden] { display: none }
.chip { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer }
.chip:hover, .chip:focus-visible { border-color: var(--primary); color: var(--primary) }
.row-status { display: block; margin-top: 6px; font-size: 13px; font-weight: 600 }
.row-status.ok { color: var(--accent) }
.row-status.error { color: var(--danger) }
.inline-classroom { border-left: 3px solid var(--primary) }

/* ---------- Centro de envíos (etapa 5) ---------- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5) }
.process-card { display: flex; flex-direction: column; gap: var(--space-3); margin: 0 }
.process-card header { display: flex; align-items: center; gap: var(--space-2); color: var(--primary) }
.process-card h2 { margin: 0; color: var(--ink) }
.process-card > .button { margin-top: auto; align-self: flex-start }
.process-sender { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 }
.process-sender small { color: var(--muted); overflow-wrap: anywhere }
.process-facts { display: grid; gap: var(--space-2); margin: 0 }
.process-facts dt { color: var(--muted); font-size: 12px; font-weight: 600 }
.process-facts dd { margin: 0; overflow-wrap: anywhere }

progress { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden }
progress::-webkit-progress-bar { background: var(--line); border-radius: 999px }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .4s var(--ease) }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px }
.progress-card { display: grid; gap: var(--space-2) }
.progress-head { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap }
.progress-head span { color: var(--muted); font-size: 14px }
.campaign-progress { display: grid; gap: 4px; width: 160px; text-align: right }
.campaign-progress small { color: var(--muted); font-size: 12px }

.mini-steps { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 600 }
.mini-steps li { display: flex; align-items: center; gap: var(--space-2) }
.mini-steps .flow-dot { width: 26px; height: 26px; font-size: 12px }
.mini-steps .is-current { color: var(--ink) }

/* ---------- Ingreso ---------- */
.guest main { max-width: none; padding: 0 }
.guest main > * { animation: none }
.activation-panel { max-width: 760px; margin: 5vh auto; padding: clamp(20px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm) }
.activation-panel h2 { margin-top: 32px; font-size: 20px }
.activation-panel form { display: grid; gap: 12px; justify-items: start; margin: 20px 0 }
.activation-panel input { max-width: 100% }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr }
.login-story { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); padding: 9vh 8vw; color: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: center }
.login-story::before, .login-story::after { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(80px); opacity: .5; animation: aurora 18s ease-in-out infinite alternate }
.login-story::before { background: var(--glow-primary); top: -25%; left: -20% }
.login-story::after { background: var(--glow-accent); bottom: -35%; right: -25%; animation-delay: -9s }
.login-logo { width: 70px; height: 95px; object-fit: contain; margin-bottom: 32px }
.login-story .eyebrow { color: var(--on-dark-accent-soft) }
.login-story h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.15; letter-spacing: -.01em; animation: blur-in 1s var(--ease) both }
.login-story p:not(.eyebrow) { color: var(--on-dark-muted); line-height: 1.8 }
.login-caption { margin-top: 48px; font-size: 13px; color: var(--on-dark-faint); letter-spacing: .04em }
.login-panel { max-width: 500px; width: 100%; margin: auto; padding: 48px; animation: rise .6s var(--ease) both }
.login-panel h2 { font-size: 32px; margin-bottom: 6px }
.login-panel .google { width: 100%; margin-top: 16px }
.login-panel details { margin-top: 24px }
.login-panel summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 16px }
.login-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 28px }

/* ---------- PC grande ---------- */
@media (min-width: 1500px) {
  .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) }
}

/* ---------- Tablet: menú lateral en modo íconos ---------- */
@media (max-width: 1100px) and (min-width: 721px) {
  .sidebar { width: var(--rail-w); padding: 22px 12px; overflow-x: hidden; transition: width .25s var(--ease), box-shadow .25s var(--ease) }
  .sidebar .brand { padding: 0 2px 24px; gap: 14px }
  .sidebar .brand > span, .sidebar .nav-label, .sidebar .nav-text, .sidebar-bottom .muted-light, .sidebar-bottom .local-text { opacity: 0; transition: opacity .15s }
  .sidebar nav a { padding: 12px 15px }
  .sidebar nav a[aria-current=page]::before { left: -12px }
  .sidebar-bottom { padding: 20px 14px 0 }
  .sidebar:hover, .sidebar:focus-within { width: var(--sidebar-w); box-shadow: var(--shadow-lg) }
  .sidebar:hover .brand > span, .sidebar:hover .nav-label, .sidebar:hover .nav-text, .sidebar:hover .muted-light, .sidebar:hover .local-text,
  .sidebar:focus-within .brand > span, .sidebar:focus-within .nav-label, .sidebar:focus-within .nav-text, .sidebar:focus-within .muted-light, .sidebar:focus-within .local-text { opacity: 1; transition-delay: .08s }
  .workspace { margin-left: var(--rail-w) }
  main { padding: 28px 28px 40px }
  .topbar { padding: 0 28px }
  .page-footer { padding: 18px 28px }
  .form-layout { grid-template-columns: 1fr }
  .stats .money { font-size: 19px }
  .login-panel { padding: 36px }
}

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
  .campaign-progress { width: 100%; text-align: left }
  .flow-step:not(.is-current) .flow-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap }
  .flow-step::before { top: 15px }
  .compose { grid-template-columns: 1fr }
  body { font-size: 16px }
  .sidebar { width: min(84vw, 300px); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); padding-top: 22px }
  .nav-toggle:checked ~ .sidebar { transform: none }
  .nav-backdrop { position: fixed; inset: 0; z-index: 35; background: rgb(5 15 25 / .5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease) }
  .nav-toggle:checked ~ .nav-backdrop { display: block; opacity: 1; pointer-events: auto }
  .nav-backdrop { display: block }
  .nav-toggle:focus-visible ~ .workspace .menu-button { outline: 3px solid var(--primary); outline-offset: 2px }
  .workspace { margin: 0; padding-bottom: 74px }
  .topbar { height: 58px; padding: 0 12px 0 6px }
  .topbar .separator, .topbar .topbar-org { display: none }
  .menu-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); cursor: pointer }
  .menu-button:hover { background: var(--primary-soft) }
  .topbar-brand { font-weight: 700; color: var(--ink); letter-spacing: .06em }
  .account-name { display: none }
  main { padding: 20px 16px 32px }
  .page-heading { align-items: flex-start; margin-bottom: var(--space-4) }
  .page-heading .page-actions, .page-heading > .button, .page-heading > a.button { width: 100% }
  .page-actions .button { flex: 1 1 auto }
  .today { padding: 22px 18px; border-radius: var(--radius) }
  .today h2 { font-size: 21px }
  .stats { grid-template-columns: 1fr 1fr; gap: var(--space-2) }
  .stats > div { padding: 14px }
  .stats > div:last-child:nth-child(odd) { grid-column: 1 / -1 }
  .stats strong { font-size: 24px }
  .stats .money { font-size: 18px }
  .module-grid { grid-template-columns: 1fr }
  .section-title span { display: none }
  .panel { padding: 18px; border-radius: var(--radius) }
  .grid-2 { grid-template-columns: 1fr }
  .button { width: auto }
  form > .button, .confirm + p > .button, .panel > form > p > .button { width: 100% }

  /* Tablas como tarjetas apiladas. */
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0) }
  .table-wrap tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--line) }
  .table-wrap tbody tr:last-child { border-bottom: 0 }
  .table-wrap td { border: 0; padding: 5px 0; overflow-wrap: anywhere }
  .table-wrap td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em }
  .table-wrap td a { display: inline-block; margin-top: 2px }
  .table-wrap td:not([data-label])::before { display: none }
  .table-wrap td a { white-space: normal }

  /* Barra inferior fija (idea de "Dock"). */
  .dock {
    display: flex;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    justify-content: space-around;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
  }
  .dock a, .dock label { flex: 1; cursor: pointer; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600 }
  .dock a:hover, .dock label:hover { text-decoration: none; color: var(--ink) }
  .dock a[aria-current=page] { color: var(--primary); background: var(--primary-soft) }
  .dock a:active .icon { transform: scale(.9) }
  .dock .icon { width: 22px; height: 22px; transition: transform .15s }

  .page-footer { padding: 16px; flex-direction: column }
  .login-layout { grid-template-columns: 1fr }
  .login-story { padding: 32px 22px; min-height: 0 }
  .login-story h1 { font-size: 30px }
  .login-logo { width: 42px; height: 56px; margin-bottom: 18px }
  .login-caption, .login-story p:not(.eyebrow) { display: none }
  .login-panel { padding: 28px 20px }
}

@media (min-width: 721px) {
  .topbar-brand { display: none }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important }
  .classroom-loader[data-mode="working"] .lattice-cell { opacity: .8; transform: none }
}

/* ---------- Impresión ---------- */
@media print {
  .sidebar, .topbar, .dock, .nav-backdrop, .page-footer, .button, form { display: none !important }
  .workspace { margin: 0 }
  main > * { animation: none }
}

/* ---------- Configuración institucional ---------- */
.field-grid, .color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-5) }
.color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.field-grid .wide { grid-column: 1 / -1 }
input[type=color] { padding: 4px; cursor: pointer }
.logo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) }
.logo-card { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2) }
.logo-card label { margin: 0 }
.logo-preview { width: 72px; height: 72px; object-fit: contain; padding: 6px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line) }
.palette-preview { margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line) }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4) }
.swatch { display: flex; align-items: flex-end; min-height: 64px; padding: 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; color: #fff; border: 1px solid rgb(0 0 0 / .08) }
.swatch-primary { background: var(--primary) }
.swatch-accent { background: var(--accent) }
.swatch-dark { background: var(--navy) }
.swatch-neutral { background: var(--bg); color: var(--ink) }
.swatch-warning { background: var(--warning) }
.swatch-danger { background: var(--danger) }
.palette-preview .button { pointer-events: none }
.logo-card-wide { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: start }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-5); margin: 0 }
.facts dt { color: var(--muted); font-size: 14px }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere }
@media (max-width: 720px) { .logo-card-wide, .facts { grid-template-columns: minmax(0, 1fr) } .facts dd { margin-bottom: var(--space-2) } }
.sticky-actions { position: sticky; bottom: var(--space-4); z-index: 5; justify-content: flex-end; padding: var(--space-3); margin-bottom: var(--space-4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow) }
@media (max-width: 860px) {
  .field-grid, .color-grid { grid-template-columns: minmax(0, 1fr) }
  .logo-grid { grid-template-columns: minmax(0, 1fr) }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width: 720px) {
  .sticky-actions { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px) }
  .sticky-actions .button { width: 100% }
}
