/* ============================================================
   DIGI-TIENDA MANAGER · Design System
   Paleta extraída del logo oficial:
   negro #000000 · azul eléctrico #0F6FE0 · cyan #33D2F2 · violeta #8B3FE8
   ============================================================ */

:root {
  --brand-blue:   #0F6FE0;
  --brand-cyan:   #33D2F2;
  --brand-violet: #8B3FE8;
  --brand-deep:   #0A2A6B;

  --grad-brand: linear-gradient(100deg, #0F6FE0 0%, #33D2F2 48%, #8B3FE8 100%);
  --grad-soft:  linear-gradient(100deg, rgba(15,111,224,.16) 0%, rgba(51,210,242,.14) 50%, rgba(139,63,232,.16) 100%);

  --st-activo:     #22C55E;
  --st-pendiente:  #E8A80A;
  --st-vencido:    #F04747;
  --st-suspendido: #7A8093;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ── Dark (default, coherente con el logo) ────────────────── */
[data-theme="dark"] {
  --bg-primary:   #08090F;
  --bg-secondary: #10131C;
  --bg-tertiary:  #171B27;
  --surface:      #12151F;
  --surface-2:    #1A1E2B;
  --text-primary: #F2F4F8;
  --text-secondary: #A2A8BA;
  --text-muted:   #6B7080;
  --border:       #232839;
  --border-soft:  #1B1F2C;
  --accent:       #2D8BF0;
  --accent-hover: #4BA0FF;
  --accent-text:  #FFFFFF;
  --danger:       #F04747;
  --success:      #22C55E;
  --warning:      #E8A80A;
  --shadow:       rgba(0, 0, 0, .55);
  --glow:         rgba(45, 139, 240, .18);
}

/* ── Light ─────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:   #FFFFFF;
  --bg-secondary: #F4F6FA;
  --bg-tertiary:  #E9EDF5;
  --surface:      #FFFFFF;
  --surface-2:    #F7F9FC;
  --text-primary: #0A0C12;
  --text-secondary: #4A5163;
  --text-muted:   #7C8397;
  --border:       #D6DBE6;
  --border-soft:  #E6EAF2;
  --accent:       #0F5FD0;
  --accent-hover: #0B4CAB;
  --accent-text:  #FFFFFF;
  --danger:       #C42B2B;
  --success:      #127A42;
  --warning:      #A66A05;
  --shadow:       rgba(16, 24, 48, .10);
  --glow:         rgba(15, 111, 224, .12);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p  { margin: 0; }
a  { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  font-weight: 600;
}
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-cyan);
}
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============================================================
   SPLASH
   ============================================================ */
#splash {
  position: fixed; inset: 0; z-index: 10000;
  background: #000;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity .5s var(--ease);
}
#splash::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 42%, rgba(15,111,224,.28) 0%, transparent 62%),
    radial-gradient(80% 60% at 78% 88%, rgba(139,63,232,.22) 0%, transparent 66%),
    radial-gradient(70% 50% at 18% 78%, rgba(51,210,242,.16) 0%, transparent 62%);
}
.splash-inner { position: relative; text-align: center; padding: 0 1.5rem; }
.splash-logo {
  width: 260px; max-width: 74vw;
  filter: drop-shadow(0 12px 48px rgba(15,111,224,.5));
  animation: splashIn 1s var(--ease) both;
}
@keyframes splashIn {
  from { opacity: 0; transform: scale(.9) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.splash-lema {
  margin-top: 1.25rem;
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: #8891A8; font-weight: 600;
}
.splash-bar-wrap {
  position: relative;
  width: 220px; max-width: 60vw; height: 3px;
  margin: 1.75rem auto 0;
  background: rgba(255,255,255,.10); border-radius: 3px; overflow: hidden;
}
#splash-bar {
  height: 100%; width: 0%;
  background: var(--grad-brand);
  transition: width .1s linear;
}

/* ============================================================
   LAYOUT · asimétrico: sidebar angosta + contenido ancho
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 244px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-soft);
  padding: 1.25rem 0.875rem 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: .25rem .5rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; background: #000; }
.sidebar-brand-txt { min-width: 0; }
.sidebar-brand-txt strong { display: block; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.sidebar-brand-txt span { display: block; font-size: 9px; letter-spacing: .16em; color: var(--text-muted); text-transform: uppercase; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > .label { padding: .5rem .75rem .35rem; font-size: 10px; }
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  transition: background .16s var(--ease), color .16s var(--ease);
  position: relative;
}
.nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-item.active {
  color: var(--text-primary);
  background: var(--grad-soft);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -0.875rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--grad-brand);
}
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; opacity: .9; }
.nav-item .badge {
  margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 7px;
  border-radius: 20px; background: var(--danger); color: #fff; min-width: 20px; text-align: center;
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1.5rem;
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
@supports not (backdrop-filter: blur(2px)) { .topbar { background: var(--bg-primary); } }
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-title strong { font-size: 16px; font-weight: 650; }
.topbar-title span { font-size: 11px; color: var(--text-muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-logo { display: none; }

.view { padding: 1.75rem 1.5rem 3rem; max-width: 1280px; width: 100%; margin: 0 auto; flex: 1; }

/* ── Footer nav mobile ─────────────────────────────────────── */
.footer-nav { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: .75rem 1rem; }
  .topbar-logo { display: block; width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #000; }
  .view { padding: 1.25rem 1rem 5.5rem; }

  .footer-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    height: 64px;
    background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .footer-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 600;
    color: var(--text-muted); background: none; border: none;
    min-height: 44px; position: relative;
  }
  .footer-nav button .ico { font-size: 17px; }
  .footer-nav button.active { color: var(--text-primary); }
  .footer-nav button.active::after {
    content: ''; position: absolute; top: 0; left: 22%; right: 22%;
    height: 2px; border-radius: 0 0 2px 2px; background: var(--grad-brand);
  }
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.15rem;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1;
  transition: transform .12s var(--ease), filter .16s var(--ease), background .16s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 20px var(--glow); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.12); }

.btn-secondary { background: var(--surface-2); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-tertiary); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-tertiary); color: var(--text-primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-wa { background: #25D366; color: #06301A; }
.btn-wa:hover:not(:disabled) { filter: brightness(1.08); }

.btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: 13px; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; border-radius: var(--r-sm); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 16px;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.icon-btn:hover { color: var(--text-primary); background: var(--bg-tertiary); }

/* ============================================================
   PANELES · nada de cards rectangulares planas
   ============================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.panel-head {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
}
.panel-head h3 { font-size: 15px; font-weight: 650; }
.panel-head .btn { margin-left: auto; }
.panel-body { padding: 1.25rem; }
.panel-body.flush { padding: 0; }

/* KPI — esquina superior con acento en degradé */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .875rem;
}
.kpi {
  position: relative;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.kpi:hover { border-color: var(--border); transform: translateY(-2px); }
.kpi::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 92px; height: 92px;
  background: radial-gradient(circle at 100% 0%, var(--kpi-c, var(--brand-blue)) 0%, transparent 68%);
  opacity: .16; pointer-events: none;
}
.kpi-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.kpi-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kpi-c, var(--brand-blue)); flex-shrink: 0; }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi-val.small { font-size: 23px; }
.kpi-sub { margin-top: .3rem; font-size: 12px; color: var(--text-muted); }
.kpi.clickable { cursor: pointer; }

/* Hero del dashboard — composición asimétrica */
.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  overflow: hidden;
}
.hero-panel::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(90% 130% at 88% 8%, rgba(139,63,232,.20) 0%, transparent 58%),
    radial-gradient(70% 120% at 4% 96%, rgba(15,111,224,.20) 0%, transparent 60%);
  pointer-events: none;
}
.hero-panel > * { position: relative; }
.hero-panel h1 { font-size: 26px; letter-spacing: -.02em; }
.hero-side { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
@media (max-width: 820px) {
  .hero-panel { grid-template-columns: 1fr; padding: 1.35rem; }
  .hero-side { align-items: flex-start; }
  .hero-panel h1 { font-size: 21px; }
}

/* ============================================================
   LISTAS Y TABLAS
   ============================================================ */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
  transition: background .14s var(--ease);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

.avatar-serv {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: var(--sv-c, var(--brand-blue));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.data th {
  text-align: left; padding: .7rem 1rem;
  font-size: 10px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }

/* ── Estados ───────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .22rem .6rem;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
  white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-activo     { color: var(--st-activo);     background: color-mix(in srgb, var(--st-activo) 14%, transparent); }
.chip-pendiente  { color: var(--st-pendiente);  background: color-mix(in srgb, var(--st-pendiente) 15%, transparent); }
.chip-vencido    { color: var(--st-vencido);    background: color-mix(in srgb, var(--st-vencido) 15%, transparent); }
.chip-suspendido { color: var(--st-suspendido); background: color-mix(in srgb, var(--st-suspendido) 18%, transparent); }
.chip-neutro     { color: var(--text-secondary); background: var(--bg-tertiary); }

.row-alert { box-shadow: inset 3px 0 0 var(--st-vencido); }
.row-warn  { box-shadow: inset 3px 0 0 var(--st-pendiente); }

/* ============================================================
   FORMULARIOS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.field .req { color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 44px;
  padding: .65rem .85rem;
  font-size: 15px; font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
textarea.input { min-height: 88px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.input::placeholder { color: var(--text-muted); }
.input:disabled { opacity: .6; }
.field-error { font-size: 12px; color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.switch { display: flex; align-items: center; gap: .65rem; cursor: pointer; min-height: 44px; }
.switch input { display: none; }
.switch .track {
  width: 42px; height: 24px; border-radius: 20px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  position: relative; transition: background .18s var(--ease);
  flex-shrink: 0;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted); transition: transform .18s var(--ease), background .18s var(--ease);
}
.switch input:checked + .track { background: var(--grad-brand); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }

/* ============================================================
   MODALES
   ============================================================ */
.modal-wrapper {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .68);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn .16s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px var(--shadow);
  animation: modalIn .2s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-size: 16px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { flex: 1; overflow-y: auto; padding: 1.35rem; }
.modal-footer {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border-soft);
  display: flex; gap: .75rem; justify-content: flex-end;
  background: var(--bg-primary);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .modal-wrapper { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: none; }
  .modal-footer { border-radius: 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1; }
}

/* ============================================================
   ESTADOS DE UI
   ============================================================ */
.empty-state, .error-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: .6rem;
  padding: 3rem 1.5rem;
}
.empty-icon {
  width: 62px; height: 62px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: .35rem;
  background: var(--grad-soft);
  border: 1px solid var(--border-soft);
}
.empty-state h3, .error-state h3 { font-size: 16px; }
.empty-state p, .error-state p { font-size: 14px; color: var(--text-secondary); max-width: 380px; }
.empty-state .btn, .error-state .btn { margin-top: .6rem; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--surface-2) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-line { height: 13px; margin-bottom: .55rem; }
.sk-kpi  { height: 116px; border-radius: var(--r-lg); }

.spinner {
  width: 17px; height: 17px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toasts ────────────────────────────────────────────────── */
#toast-host {
  position: fixed; left: 50%; bottom: 88px; z-index: 9999;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  pointer-events: none; width: max-content; max-width: 92vw;
}
@media (min-width: 901px) { #toast-host { bottom: 28px; } }
.toast {
  padding: .7rem 1.15rem;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: #fff;
  box-shadow: 0 10px 32px rgba(0,0,0,.4);
  animation: toastIn .22s var(--ease);
  max-width: 92vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.toast-error   { background: var(--danger); }
.toast-success { background: var(--success); color: #04140A; }
.toast-warning { background: var(--warning); color: #1A1200; }
.toast-info    { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); }

/* ── Offline ──────────────────────────────────────────────── */
#offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10001;
  background: var(--warning); color: #1A1200;
  text-align: center; padding: .45rem; font-size: 13px; font-weight: 600;
  display: none;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg-primary);
}
.login-art {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem;
  background: #000;
  overflow: hidden;
}
.login-art::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(100% 70% at 22% 26%, rgba(15,111,224,.34) 0%, transparent 60%),
    radial-gradient(90% 70% at 82% 78%, rgba(139,63,232,.30) 0%, transparent 62%),
    radial-gradient(60% 50% at 60% 50%, rgba(51,210,242,.14) 0%, transparent 60%);
}
.login-art > * { position: relative; }
.login-art img { width: 300px; max-width: 68%; filter: drop-shadow(0 14px 46px rgba(15,111,224,.45)); }
.login-art .lema {
  margin-top: 2rem; font-size: 11px; letter-spacing: .3em;
  text-transform: uppercase; color: #7E88A0; font-weight: 600;
}
.login-art .claim { margin-top: .75rem; font-size: 20px; font-weight: 600; color: #E8ECF5; max-width: 400px; line-height: 1.4; }
.login-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.login-tags span {
  font-size: 11px; font-weight: 600; padding: .3rem .7rem; border-radius: 20px;
  color: #9AA4BC; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
}

.login-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
}
.login-card { width: 100%; max-width: 380px; }
.login-card .logo-mobile { display: none; }

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-form-side { min-height: 100vh; background: var(--bg-primary); }
  .login-card .logo-mobile {
    display: block; width: 170px; margin: 0 auto 1.75rem;
    filter: drop-shadow(0 10px 30px rgba(15,111,224,.35));
  }
}

/* ── Utilidades ───────────────────────────────────────────── */
.stack   { display: flex; flex-direction: column; }
.gap-xs  { gap: .4rem; }  .gap-sm { gap: .65rem; }
.gap-md  { gap: 1rem; }   .gap-lg { gap: 1.5rem; }
.row     { display: flex; align-items: center; }
.wrap    { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-lg   { margin-top: 1.5rem; }
.mb-md   { margin-bottom: 1rem; }
.grow    { flex: 1; min-width: 0; }
.t-sec   { color: var(--text-secondary); }
.t-mut   { color: var(--text-muted); }
.fs-sm   { font-size: 13px; }
.fs-xs   { font-size: 12px; }
.fw-6    { font-weight: 600; }
.tr      { text-align: right; }
.hide    { display: none !important; }

.split-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 980px) { .split-2 { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
