/* ============================================================
   ZG TRAINING ACADEMY v4 — main.css CORREGIDO
   Fixes: header agrupado, footer sticky, modales, imagen URL
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --gold:        #C9A84C;
  --gold-dark:   #a8863a;
  --gold-light:  #e8c96d;
  --gold-pale:   #fdf8ee;
  --gold-border: #e8d9a8;
  --bg:          #f7f6f3;
  --surface:     #ffffff;
  --surface-2:   #f2f1ed;
  --surface-3:   #ebe9e3;
  --text:        #1a1814;
  --text-2:      #5a5648;
  --text-3:      #9a9284;
  --text-gold:   #7a6020;
  --border:      #e0ddd5;
  --border-2:    #ccc9bf;
  --success:     #1e7a45;  --success-bg: #edfaf3;
  --error:       #b91c1c;  --error-bg:   #fef2f2;
  --warning:     #92400e;  --warning-bg: #fffbeb;
  --info:        #1e40af;  --info-bg:    #eff6ff;
  --sidebar-w:   230px;
  --topbar-h:    52px;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 2px 12px rgba(0,0,0,.07);
  --shadow-md:   0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --transition:  0.16s ease;
}

/* ── Reset ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { height:100%; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Layout: todo en columna, sin overflow del body */
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
img { max-width:100%; display:block; }
a { color:var(--gold); text-decoration:none; }
a:hover { color:var(--gold-dark); }

/* ── Typography ── */
h1,h2,h3,h4 { font-family:'Bebas Neue',sans-serif; letter-spacing:.5px; color:var(--text); line-height:1.1; }
h1{font-size:38px;} h2{font-size:28px;} h3{font-size:22px;} h4{font-size:17px;}
p { color:var(--text-2); }
label { font-size:12px; font-weight:600; color:var(--text-2); letter-spacing:.04em; text-transform:uppercase; display:block; margin-bottom:4px; }
.page-title { font-family:'Bebas Neue',sans-serif; font-size:26px; color:var(--text); letter-spacing:.5px; }
.text-muted { color:var(--text-3); }
.text-sm    { font-size:12px; }
.text-gold  { color:var(--text-gold); }
.fw-600     { font-weight:600; }
.mono       { font-family:monospace; }

/* ══════════════════════════════════════════════════════════
   GREETING BAR — FIX: layout en dos lados, sin agrupar
   ══════════════════════════════════════════════════════════ */
.greeting-bar {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  padding: 0 22px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;   /* ← clave: izquierda y derecha */
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: nowrap;                /* ← no agrupar en una línea */
}
.greeting-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.greeting-icon { font-size: 18px; flex-shrink:0; }
.greeting-text { font-weight:600; font-size:13px; white-space:nowrap; }
.greeting-sub  { font-size:11px; opacity:.8; margin-top:1px; white-space:nowrap; }
.greeting-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  opacity: .9;
  flex-shrink: 0;
  margin-left: auto;                /* ← empuja al lado derecho */
}
.greeting-right span { white-space:nowrap; }

/* ── Topbar ── */
.topbar {
  grid-column: 1 / -1;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 100;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--sidebar-w);
  padding-right: 16px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-logo { font-family:'Bebas Neue',sans-serif; font-size:20px; color:var(--gold); letter-spacing:1px; }
.topbar-right { margin-left:auto; display:flex; align-items:center; gap:8px; }

/* ── App layout ── */
.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 8px 0;
  overflow-y: auto;
  height: 100%;
}
.sidebar-section { font-size:10px; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.1em; padding:10px 16px 3px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-item:hover { background:var(--surface-2); color:var(--text); }
.nav-item.active { background:var(--gold-pale); color:var(--gold-dark); border-left-color:var(--gold); font-weight:500; }
.nav-icon { font-size:14px; width:16px; text-align:center; flex-shrink:0; }

/* ── Main content ── */
.main-content { padding:20px; overflow-y:auto; background:var(--bg); }

/* ══════════════════════════════════════════════════════════
   FOOTER STICKY — siempre al fondo, nunca se va
   ══════════════════════════════════════════════════════════ */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0 22px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;              /* ← no se encoge */
  flex-wrap: nowrap;
  position: sticky;
  bottom: 0;
  z-index: 50;
}
.footer-dev { display:flex; align-items:center; gap:12px; flex-wrap:nowrap; }
.footer-brand { font-family:'Bebas Neue',sans-serif; font-size:13px; color:var(--gold); letter-spacing:.5px; }
.app-footer a { color:var(--gold); }
.app-footer a:hover { color:var(--gold-dark); }
.app-footer strong { color:var(--text-2); }

/* ── Buttons ── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 16px; border-radius:var(--radius); border:1.5px solid transparent; font-family:'DM Sans',sans-serif; font-size:13px; font-weight:500; cursor:pointer; transition:all var(--transition); white-space:nowrap; text-decoration:none; line-height:1; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-primary { background:var(--gold); color:#fff; border-color:var(--gold); }
.btn-primary:hover { background:var(--gold-dark); border-color:var(--gold-dark); color:#fff; }
.btn-outline { background:transparent; color:var(--text-2); border-color:var(--border-2); }
.btn-outline:hover { border-color:var(--gold); color:var(--gold); background:var(--gold-pale); }
.btn-ghost { background:transparent; color:var(--text-2); border-color:transparent; }
.btn-ghost:hover { background:var(--surface-2); color:var(--text); }
.btn-danger { background:var(--error-bg); color:var(--error); border-color:#fca5a5; }
.btn-danger:hover { background:#fee2e2; }
.btn-success { background:var(--success-bg); color:var(--success); border-color:#86efac; }
.btn-sm { padding:5px 10px; font-size:12px; border-radius:7px; }
.btn-lg { padding:11px 24px; font-size:15px; }
.btn-block { width:100%; }
.btn-icon { padding:7px; border-radius:8px; }

/* ── Forms ── */
.form-group { margin-bottom:14px; }
.form-label { font-size:12px; font-weight:600; color:var(--text-2); letter-spacing:.04em; text-transform:uppercase; display:block; margin-bottom:4px; }
.form-control { width:100%; padding:9px 12px; border:1.5px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); font-family:'DM Sans',sans-serif; font-size:13px; transition:border-color var(--transition),box-shadow var(--transition); outline:none; }
.form-control:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,168,76,.1); }
.form-control::placeholder { color:var(--text-3); }
.form-control:disabled { background:var(--surface-2); cursor:not-allowed; }
select.form-control { cursor:pointer; }
textarea.form-control { resize:vertical; min-height:70px; }
.form-hint { font-size:11px; color:var(--text-3); margin-top:3px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-row-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }
.full { grid-column:1/-1; }
.input-group { position:relative; }
.input-group .form-control { padding-left:36px; }
.input-group-icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--text-3); font-size:15px; pointer-events:none; }

/* ── Cards ── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow); overflow:hidden; }
.card-header { padding:14px 18px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.card-body { padding:18px; }
.card-footer { padding:12px 18px; border-top:1px solid var(--border); background:var(--surface-2); }
.card-title { font-size:14px; font-weight:600; color:var(--text); }
.dash-kpi { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px 18px; display:flex; align-items:center; gap:12px; }
.dash-kpi-icon { width:42px; height:42px; border-radius:10px; background:var(--gold-pale); border:1px solid var(--gold-border); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.dash-kpi-val { font-size:24px; font-weight:700; color:var(--text); line-height:1; }
.dash-kpi-lbl { font-size:10px; color:var(--text-3); text-transform:uppercase; letter-spacing:.06em; margin-top:3px; }

/* ── Tables ── */
.table-wrapper { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow); }
.table-toolbar { padding:12px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.table-toolbar-title { font-weight:600; font-size:13px; color:var(--text); }
table { width:100%; border-collapse:collapse; }
thead th { background:var(--surface-2); padding:9px 14px; text-align:left; font-size:11px; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:.07em; border-bottom:1px solid var(--border); white-space:nowrap; }
tbody td { padding:10px 14px; border-bottom:1px solid var(--border); font-size:13px; color:var(--text-2); vertical-align:middle; }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover td { background:var(--gold-pale); }
.table-actions { display:flex; gap:5px; flex-wrap:wrap; }

/* ── Badges ── */
.badge { display:inline-flex; align-items:center; gap:3px; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:600; white-space:nowrap; }
.badge::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; }
.badge-success { background:var(--success-bg); color:var(--success); }
.badge-warning { background:var(--warning-bg); color:var(--warning); }
.badge-error   { background:var(--error-bg);   color:var(--error); }
.badge-info    { background:var(--info-bg);     color:var(--info); }
.badge-gray    { background:var(--surface-2);   color:var(--text-2); }
.badge-gold    { background:var(--gold-pale);   color:var(--text-gold); border:1px solid var(--gold-border); }

/* ── Alerts ── */
.alert { padding:10px 14px; border-radius:var(--radius); font-size:13px; display:flex; align-items:flex-start; gap:8px; margin-bottom:14px; }
.alert-success { background:var(--success-bg); color:var(--success); border:1px solid #86efac; }
.alert-error   { background:var(--error-bg);   color:var(--error);   border:1px solid #fca5a5; }
.alert-warning { background:var(--warning-bg); color:var(--warning); border:1px solid #fcd34d; }
.alert-info    { background:var(--info-bg);    color:var(--info);    border:1px solid #93c5fd; }

/* ══════════════════════════════════════════════════════════
   MODALES — FIX CRÍTICO: pointer-events y z-index
   ══════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;              /* ← muy alto para estar sobre todo */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;       /* ← cuando está cerrado, no intercepta clicks */
  transition: opacity .2s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;        /* ← cuando está abierto, sí intercepta */
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;           /* ← límite de altura para que no se salga */
  display: flex;
  flex-direction: column;
  transform: translateY(16px);
  transition: transform .2s ease;
  position: relative;
  z-index: 9001;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size:17px; font-weight:600; color:var(--text); }
/* FIX: botón cerrar modal */
.modal-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
  transition: all var(--transition);
  /* Asegurar que sea clickeable */
  pointer-events: all !important;
  position: relative;
  z-index: 9002;
}
.modal-close:hover { background:var(--error-bg); color:var(--error); border-color:#fca5a5; }
.modal-body {
  padding: 18px 22px;
  overflow-y: auto;           /* ← scroll interno en el modal */
  flex: 1;
}
.modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ══════════════════════════════════════════════════════════
   IMAGEN URL PREVIEW — FIX: tamaño controlado
   ══════════════════════════════════════════════════════════ */
.img-url-preview {
  width: 100%;
  max-height: 100px;          /* ← altura máxima para que no tape el form */
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 6px;
  display: none;
  background: var(--surface-2);
}
.img-url-preview.loaded { display: block; }

/* ══════════════════════════════════════════════════════════
   LOGÍSTICA TABS — rediseñado más limpio
   ══════════════════════════════════════════════════════════ */
.logistica-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.logistica-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
}
.logistica-selector label { margin:0; font-size:12px; color:var(--text-3); }
.logistica-selector select.form-control { border:none; padding:4px 8px; font-size:13px; background:transparent; width:auto; box-shadow:none; }
.logistica-selector select.form-control:focus { box-shadow:none; border-color:transparent; }

.log-tabs-bar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}
.log-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.log-tab-btn:hover { background: var(--surface-2); color:var(--text); }
.log-tab-btn.active {
  background: var(--gold);
  color: #fff;
  font-weight: 500;
}

/* Logística card estilo más limpio */
.log-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: border-color var(--transition);
}
.log-item-card:hover { border-color: var(--gold-border); }
.log-item-info { flex: 1; }
.log-item-title { font-weight:600; font-size:13px; color:var(--text); margin-bottom:2px; }
.log-item-meta  { font-size:12px; color:var(--text-3); }
.log-item-actions { display:flex; gap:4px; flex-shrink:0; }

/* ── Almacén ── */
.activo-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:all var(--transition); }
.activo-card:hover { box-shadow:var(--shadow-md); border-color:var(--gold-border); }
.activo-img { height:80px; background:var(--gold-pale); display:flex; align-items:center; justify-content:center; font-size:32px; border-bottom:1px solid var(--border); overflow:hidden; }
.activo-img img { width:100%; height:100%; object-fit:cover; }
.activo-body { padding:12px; }
.activo-name { font-weight:600; font-size:13px; color:var(--text); margin-bottom:2px; }
.activo-serial { font-size:11px; color:var(--text-3); font-family:monospace; margin-bottom:6px; }
.stock-bar { height:4px; background:var(--surface-2); border-radius:2px; margin:5px 0; overflow:hidden; }
.stock-fill { height:100%; border-radius:2px; background:var(--gold); transition:width .4s; }
.stock-fill.low { background:var(--error); }
.stock-fill.ok  { background:var(--success); }

/* ── Combos / Productos ── */
.combo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.combo-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:all var(--transition); }
.combo-card:hover { border-color:var(--gold); box-shadow:var(--shadow-md); transform:translateY(-2px); }
.combo-img { height:80px; background:var(--gold-pale); display:flex; align-items:center; justify-content:center; font-size:32px; overflow:hidden; }
.combo-img img { width:100%; height:100%; object-fit:cover; }
.combo-body { padding:12px; }
.combo-name { font-size:13px; font-weight:600; color:var(--text); margin-bottom:3px; }
.combo-desc { font-size:11px; color:var(--text-3); margin-bottom:8px; }
.combo-prices { display:flex; align-items:center; gap:7px; }
.combo-original { font-size:12px; color:var(--text-3); text-decoration:line-through; }
.combo-offer    { font-size:16px; font-weight:700; color:var(--gold-dark); }
.combo-save     { font-size:10px; background:var(--success-bg); color:var(--success); padding:1px 5px; border-radius:4px; font-weight:600; }

/* ── Plan cards ── */
.plan-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.plan-card { background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius-lg); padding:18px; cursor:pointer; transition:all var(--transition); text-align:center; }
.plan-card:hover, .plan-card.selected { border-color:var(--gold); background:var(--gold-pale); }
.plan-name  { font-family:'Bebas Neue',sans-serif; font-size:20px; color:var(--text); letter-spacing:.5px; }
.plan-price { font-size:26px; font-weight:700; color:var(--text-gold); margin:4px 0 2px; }
.plan-period{ font-size:12px; color:var(--text-3); margin-bottom:12px; }
.plan-features { list-style:none; text-align:left; }
.plan-features li { font-size:12px; color:var(--text-2); padding:3px 0; display:flex; align-items:center; gap:5px; }
.plan-features li::before { content:'✓'; color:var(--success); font-weight:700; }

/* ── User roles ── */
.user-role { display:inline-block; padding:2px 8px; border-radius:10px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.role-admin        { background:var(--gold-pale);  color:var(--text-gold); border:1px solid var(--gold-border); }
.role-instructor   { background:var(--info-bg);    color:var(--info); }
.role-participante { background:var(--surface-2);  color:var(--text-2); }

/* ── Avatar ── */
.avatar    { width:32px; height:32px; border-radius:50%; background:var(--gold); color:#fff; font-size:12px; font-weight:600; display:flex; align-items:center; justify-content:center; cursor:pointer; border:2px solid var(--gold-border); flex-shrink:0; }
.avatar-sm { width:26px; height:26px; font-size:10px; }
.avatar-lg { width:48px; height:48px; font-size:16px; }

/* ── Toggle switch ── */
.toggle-switch { position:relative; display:inline-block; width:38px; height:21px; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--border-2); border-radius:21px; cursor:pointer; transition:.2s; }
.toggle-slider::before { content:''; position:absolute; width:15px; height:15px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.2s; }
.toggle-switch input:checked + .toggle-slider { background:var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform:translateX(17px); }

/* ── Arma fields ── */
.arma-fields { background:var(--gold-pale); border:1.5px solid var(--gold-border); border-radius:var(--radius); padding:14px; margin-top:8px; display:none; }
.arma-fields.visible { display:block; animation:fadeIn .2s ease; }

/* ── Check wrap ── */
.check-wrap { display:flex; align-items:center; gap:7px; cursor:pointer; }
.check-wrap input[type=checkbox] { width:15px; height:15px; accent-color:var(--gold); cursor:pointer; }
.check-wrap span { font-size:13px; color:var(--text-2); }

/* ── Activity feed ── */
.activity-feed { display:flex; flex-direction:column; }
.activity-item { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.activity-item:last-child { border-bottom:none; }
.activity-icon { width:32px; height:32px; border-radius:8px; background:var(--gold-pale); border:1px solid var(--gold-border); display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.activity-text { font-size:12px; color:var(--text); }
.activity-time { font-size:11px; color:var(--text-3); margin-top:1px; }

/* ── Color swatch ── */
.color-swatch-grid { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.color-swatch { width:32px; height:32px; border-radius:50%; cursor:pointer; border:3px solid transparent; transition:all .15s; }
.color-swatch.active, .color-swatch:hover { border-color:var(--text); transform:scale(1.12); }

/* ── Chart container ── */
.chart-container { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px; box-shadow:var(--shadow); }
.chart-title { font-weight:600; font-size:13px; color:var(--text); margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; }

/* ── Misc ── */
.divider { height:1px; background:var(--border); margin:16px 0; }
.empty-state { text-align:center; padding:40px 20px; color:var(--text-3); }
.empty-state-icon { font-size:36px; margin-bottom:10px; }
.empty-state h4 { color:var(--text-2); margin-bottom:5px; font-family:'DM Sans',sans-serif; font-weight:600; }
.spinner { width:18px; height:18px; border:2px solid var(--border); border-top-color:var(--gold); border-radius:50%; animation:spin .6s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none} }
.fade-in   { animation:fadeIn .25s ease forwards; }
.fade-in-1 { animation-delay:.05s; opacity:0; }
.fade-in-2 { animation-delay:.10s; opacity:0; }
.fade-in-3 { animation-delay:.15s; opacity:0; }
.fade-in-4 { animation-delay:.20s; opacity:0; }
.mb-16 { margin-bottom:16px; }
.mt-16 { margin-top:16px; }
.w-100 { width:100%; }

/* ── Responsive ── */
@media (max-width:768px) {
  body { height:auto; overflow:auto; }
  .app-layout { grid-template-columns:1fr; }
  .topbar-brand { display:none; }
  .sidebar { display:none; position:fixed; top:var(--topbar-h); left:0; bottom:42px; width:220px; z-index:200; height:auto; overflow-y:auto; }
  .sidebar.open { display:block; }
  .plan-cards, .combo-grid { grid-template-columns:1fr; }
  .form-row, .form-row-3 { grid-template-columns:1fr; }
  .main-content { padding:14px; }
  .greeting-right { display:none; }
  .footer-dev span:not(.footer-brand):not(:first-child) { display:none; }
}
