/* ============================================================
   ALMA · Exclusive Agencia — Estilos
   Fondo: #1A1A1A · Dorado: #F0C93A · Texto: #FFFFFF
   ============================================================ */

:root {
  --bg:         #1A1A1A;
  --surface:    #242424;
  --surface-2:  #2E2E2E;
  --surface-3:  #383838;
  --gold:       #F0C93A;
  --gold-dim:   rgba(240,201,58,.12);
  --gold-glow:  rgba(240,201,58,.25);
  --white:      #FFFFFF;
  --secondary:  #AAAAAA;
  --border:     #2E2E2E;
  --border-2:   #3A3A3A;
  --success:    #22c55e;
  --warn:       #f59e0b;
  --danger:     #ef4444;
  --info:       #60a5fa;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:  0 12px 50px rgba(0,0,0,.7);
  --header-h:   62px;
  --sidebar-w:  220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--white);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ======================== LOGIN ======================== */

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(240,201,58,.08) 0%, transparent 60%), var(--bg);
}
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(240,201,58,.06);
}
.login-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 6px;
}
.login-logo { width: 200px; height: auto; max-height: 90px; object-fit: contain; }
.login-brand-text { display: flex; flex-direction: column; }
.login-alma  { font-size: 26px; font-weight: 900; color: var(--gold); letter-spacing: 3px; line-height: 1; }
.login-agencia { font-size: 11px; color: var(--secondary); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }
.login-sub { text-align: center; color: var(--secondary); font-size: 12px; letter-spacing: .5px; margin-bottom: 32px; }
.login-error {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  border-left: 3px solid var(--danger); color: #fca5a5;
  border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.btn-login {
  width: 100%; padding: 13px; background: var(--gold); color: #000;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s; margin-top: 4px;
}
.btn-login:hover { background: #f8d84a; box-shadow: 0 4px 20px rgba(240,201,58,.35); }
.btn-login:active { transform: scale(.98); }

/* ======================== APP LAYOUT ======================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ======================== SIDEBAR ======================== */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #111111;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s;
}
.sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand a { display: block; text-decoration: none; }
.sidebar-brand a:hover { text-decoration: none; }
.sidebar-logo { width: 160px; height: auto; object-fit: contain; display: block; }
.sidebar-nav { list-style: none; padding: 8px 0; flex: 1; }
.sidebar-item { display: block; }
.sidebar-item a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  color: var(--secondary); font-size: 13px; font-weight: 500;
  text-decoration: none; border-left: 3px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap; overflow: hidden;
}
.sidebar-item a:hover { color: var(--white); background: #222222; text-decoration: none; }
.sidebar-item.active a { color: var(--gold); background: var(--gold-dim); border-left-color: var(--gold); }
.sidebar-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; line-height: 1; }
.sidebar-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ======================== APP CONTENT (columna derecha) ======================== */

.app-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ======================== HEADER ======================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(18,18,18,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 20px rgba(0,0,0,.4);
  flex-shrink: 0;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user  { display: flex; align-items: center; gap: 8px; }
.header-user-name { color: var(--white); font-size: 13px; font-weight: 600; }
.hamburger {
  background: none; border: none; color: var(--secondary);
  font-size: 20px; cursor: pointer; padding: 4px 6px;
  border-radius: 6px; transition: color .15s, background .15s;
  display: none;
}
.hamburger:hover { color: var(--white); background: rgba(255,255,255,.05); }
.btn-logout {
  padding: 7px 14px; background: transparent; border: 1px solid var(--border-2);
  color: var(--secondary); border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn-logout:hover { border-color: var(--danger); color: #fca5a5; text-decoration: none; }

/* ======================== MAIN CONTENT ======================== */

.app-main {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1100px;
}

/* ======================== PAGE STRUCTURE ======================== */

.page-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 22px; font-weight: 800; color: var(--white); }
.page-subtitle { color: var(--secondary); font-size: 13px; margin-top: 2px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--secondary); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }

/* Alert bars */
.alert-bar {
  padding: 12px 16px; border-radius: var(--radius); font-size: 13px;
  margin-bottom: 16px; border-left: 3px solid;
}
.alert-error   { background: rgba(239,68,68,.1);  border-color: var(--danger); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.08); border-color: var(--success); color: #4ade80; }
.alert-info    { background: rgba(96,165,250,.08); border-color: var(--info); color: #93c5fd; }

/* Shortcuts grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.shortcut-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s, box-shadow .2s, background .2s;
  cursor: pointer;
}
.shortcut-card:hover {
  border-color: var(--gold); background: var(--gold-dim);
  box-shadow: 0 4px 20px rgba(0,0,0,.3); text-decoration: none;
}
.shortcut-icon { font-size: 28px; }
.shortcut-label { color: var(--white); font-size: 13px; font-weight: 600; text-align: center; }

/* Form card */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ======================== ROLE BADGES ======================== */

.role-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; white-space: nowrap;
}
.role-admin   { background: rgba(249,168,212,.15); color: #f9a8d4; }
.role-manager { background: rgba(96,165,250,.15);  color: #93c5fd; }
.role-chatter { background: rgba(110,231,183,.15); color: #6ee7b7; }
.role-modelo  { background: var(--gold-dim);       color: var(--gold); }

/* ======================== STATS ======================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stats-grid-sm { margin-bottom: 20px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.stat-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.stat-filter { cursor: pointer; user-select: none; }
.stat-filter:hover { border-color: var(--gold-glow); }
.stat-active { border-color: var(--gold) !important; box-shadow: 0 0 0 1px var(--gold-glow) !important; }
.stat-icon { font-size: 24px; flex-shrink: 0; opacity: .8; }
.stat-num  { font-size: 28px; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: 10px; color: var(--secondary); text-transform: uppercase; letter-spacing: .6px; }
.stat-warn    .stat-num { color: var(--warn); }
.stat-success .stat-num { color: var(--success); }
.stat-gold    .stat-num { color: var(--gold); }
.stat-info    .stat-num { color: var(--info); }
.stat-warn    { border-top: 2px solid var(--warn); }
.stat-success { border-top: 2px solid var(--success); }
.stat-gold    { border-top: 2px solid var(--gold); }
.stat-info    { border-top: 2px solid var(--info); }

/* ======================== TOOLBAR ======================== */

.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar-filters { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 160px; max-width: 280px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; }
.search-input {
  width: 100%; padding: 9px 10px 9px 32px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--white); font-size: 13px;
  transition: border-color .2s;
}
.search-input::placeholder { color: #555; }
.search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.filter-select {
  padding: 9px 10px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--white); font-size: 13px;
  cursor: pointer; transition: border-color .2s;
}
.filter-select:focus { outline: none; border-color: var(--gold); }
.filter-select option { background: var(--surface-2); }
.btn-limpiar {
  padding: 8px 12px; background: transparent; border: 1.5px solid var(--border-2);
  color: var(--secondary); border-radius: var(--radius); font-size: 12px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn-limpiar:hover { border-color: var(--danger); color: #fca5a5; }
.filter-count { color: #555; font-size: 12px; white-space: nowrap; margin-left: auto; }

/* ======================== PEDIDOS ======================== */

.pedidos-list { display: flex; flex-direction: column; gap: 10px; }
.state-loading, .state-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; color: #555; gap: 14px;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid #2e2e2e; border-top-color: var(--gold);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state-empty-icon { font-size: 48px; }

/* ======================== CARD ======================== */

.pedido-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; overflow: hidden;
}
.pedido-card:hover { border-color: var(--border-2); }
.pedido-card.is-open { border-color: rgba(240,201,58,.3); box-shadow: 0 4px 24px rgba(0,0,0,.4); }
.pedido-card.is-entregado { opacity: .6; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; cursor: pointer; user-select: none;
  transition: background .15s; flex-wrap: wrap; row-gap: 6px;
}
.card-head:hover { background: rgba(255,255,255,.02); }
.card-tipo-icon { font-size: 17px; flex-shrink: 0; }
.card-info-col { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; flex-wrap: wrap; }
.card-usuario  { font-weight: 700; color: var(--white); font-size: 13px; white-space: nowrap; }
.card-sep      { color: #444; font-size: 11px; }
.card-modelo-name { font-weight: 500; color: var(--white); font-size: 13px; white-space: nowrap; }
.card-modelo   { color: var(--secondary); font-size: 12px; white-space: nowrap; }
.card-cantidad { color: var(--secondary); font-size: 11px; white-space: nowrap; }
.card-meta     { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex-shrink: 0; }
.card-fecha    { font-size: 11px; color: var(--secondary); white-space: nowrap; }
.card-precio   { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.card-arrow    { color: #444; font-size: 10px; transition: transform .2s; flex-shrink: 0; }
.card-arrow.open { transform: rotate(180deg); color: var(--gold); }
.card-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border); animation: fadeIn .15s ease; }
.card-body.open { display: block; }
@keyframes fadeIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }
.card-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; padding: 14px 0;
}
.detail-lbl { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; }
.detail-val { font-size: 13px; color: var(--white); font-weight: 500; word-break: break-word; }
.card-text-block {
  background: var(--surface-2); border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0; padding: 10px 14px; font-size: 13px;
  color: #ccc; line-height: 1.6; margin: 6px 0;
}
.card-notas-block { border-left-color: #555; }
.card-actions { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ======================== BADGES ======================== */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
}
.b-foto         { background: #1e3a5f; color: #93c5fd; }
.b-video        { background: #2e1a4a; color: #c4b5fd; }
.b-videollamada { background: #4a1a30; color: #f9a8d4; }
.b-pendiente    { background: rgba(240,201,58,.15); color: var(--gold); border: 1px solid rgba(240,201,58,.3); }
.b-ent-modelo   { background: rgba(96,165,250,.12);  color: #93c5fd;    border: 1px solid rgba(96,165,250,.3); }
.b-entregado    { background: rgba(34,197,94,.1);    color: #4ade80;    border: 1px solid rgba(34,197,94,.25); }

/* Urgencia */
.badge-urgencia {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.65; } }
.urgencia-hoy     { background: rgba(239,68,68,.2);  color: #f87171; border: 1px solid rgba(239,68,68,.4); }
.urgencia-manana  { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); }
.urgencia-vencido { background: rgba(127,29,29,.4);   color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* Status badges (management tables) */
.status-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-activo   { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.status-inactivo { background: rgba(100,100,100,.1); color: #666;   border: 1px solid rgba(100,100,100,.2); }

/* ======================== ACTION BUTTONS ======================== */

.btn-nuevo {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; background: var(--gold); color: #000;
  font-weight: 800; font-size: 13px;
  border: none; border-radius: var(--radius); cursor: pointer;
  white-space: nowrap; transition: background .15s, box-shadow .15s; flex-shrink: 0;
  text-decoration: none;
}
.btn-nuevo:hover { background: #f8d84a; box-shadow: 0 4px 20px rgba(240,201,58,.3); text-decoration: none; }

.btn-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn-action:disabled { opacity: .4; cursor: not-allowed; }

.btn-ent-modelo   { background: rgba(96,165,250,.1);  color: #93c5fd; border-color: rgba(96,165,250,.25); }
.btn-ent-modelo:hover:not(:disabled)   { background: rgba(96,165,250,.2); }
.btn-ent-cliente  { background: rgba(34,197,94,.1);   color: #4ade80; border-color: rgba(34,197,94,.25); }
.btn-ent-cliente:hover:not(:disabled)  { background: rgba(34,197,94,.2); }
.btn-recordatorio { background: rgba(245,158,11,.1);  color: #fbbf24; border-color: rgba(245,158,11,.25); }
.btn-recordatorio:hover { background: rgba(245,158,11,.2); }
.btn-calendar     { background: rgba(168,85,247,.1);  color: #c4b5fd; border-color: rgba(168,85,247,.25); }
.btn-calendar:hover { background: rgba(168,85,247,.2); }

/* Small buttons (management tables) */
.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn-sm-primary { background: rgba(96,165,250,.1);  color: #93c5fd; border-color: rgba(96,165,250,.25); }
.btn-sm-primary:hover { background: rgba(96,165,250,.2); }
.btn-sm-danger  { background: rgba(239,68,68,.1);   color: #fca5a5; border-color: rgba(239,68,68,.25); }
.btn-sm-danger:hover  { background: rgba(239,68,68,.2); }
.btn-sm-success { background: rgba(34,197,94,.1);   color: #4ade80; border-color: rgba(34,197,94,.25); }
.btn-sm-success:hover { background: rgba(34,197,94,.2); }
.btn-sm-warn    { background: rgba(245,158,11,.1);  color: #fbbf24; border-color: rgba(245,158,11,.25); }
.btn-sm-warn:hover    { background: rgba(245,158,11,.2); }
.btn-sm-info    { background: rgba(96,165,250,.1);  color: #93c5fd; border-color: rgba(96,165,250,.25); }
.btn-sm-info:hover    { background: rgba(96,165,250,.2); }

/* ======================== FORMS ======================== */

.field-group   { display: flex; flex-direction: column; gap: 6px; }
.field-label   { font-size: 11px; font-weight: 700; color: var(--secondary); text-transform: uppercase; letter-spacing: .6px; }
.req           { color: var(--danger); }
.field-input {
  padding: 10px 13px; background: var(--bg); border: 1.5px solid var(--border-2);
  border-radius: var(--radius); color: var(--white); font-size: 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field-input::placeholder { color: #444; }
.field-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); background: #1e1e1e; }
.field-input option { background: var(--surface-2); }
.field-textarea { resize: vertical; min-height: 72px; }
.form-error {
  background: rgba(239,68,68,.1); border-left: 3px solid var(--danger);
  color: #fca5a5; border-radius: var(--radius); padding: 10px 14px; font-size: 13px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ======================== MODAL ======================== */

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.82);
  backdrop-filter: blur(6px); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); width: 100%; max-width: 660px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(240,201,58,.08);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(.97) translateY(-8px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title  { font-size: 16px; font-weight: 700; color: var(--white); }
.modal-close  { background: none; border: none; color: #555; font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px; transition: color .15s; }
.modal-close:hover { color: var(--white); }
.modal-body   { overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel {
  padding: 10px 18px; background: transparent; border: 1.5px solid var(--border-2);
  color: var(--secondary); border-radius: var(--radius); font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn-cancel:hover { border-color: var(--border-2); color: var(--white); }
.btn-submit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; background: var(--gold); color: #000;
  font-weight: 800; font-size: 13px;
  border: none; border-radius: var(--radius); cursor: pointer; transition: background .15s, box-shadow .15s;
}
.btn-submit:hover { background: #f8d84a; box-shadow: 0 4px 20px rgba(240,201,58,.3); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.btn-spin {
  width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.2);
  border-top-color: #000; border-radius: 50%; animation: spin .6s linear infinite;
}

/* ======================== MANAGEMENT TABLES ======================== */

.table-wrap { overflow-x: auto; margin-top: 4px; }
.mgmt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mgmt-table th {
  text-align: left; padding: 10px 14px; color: var(--secondary);
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.mgmt-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mgmt-table tr:last-child td { border-bottom: none; }
.mgmt-table tr:hover td { background: rgba(255,255,255,.02); }
.td-secondary { color: var(--secondary); font-size: 12px; }
.td-actions   { white-space: nowrap; }
.td-actions .btn-sm { margin-right: 5px; }
.td-actions .btn-sm:last-child { margin-right: 0; }

/* ======================== PANEL MIEMBROS ======================== */

.panel-miembros {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-top: 20px;
}
.panel-miembros-header { display: flex; justify-content: space-between; align-items: center; }
.panel-miembros-header h3 { font-size: 15px; font-weight: 700; }
.miembros-list { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.miembros-list li { font-size: 13px; color: var(--white); }

/* ======================== CHART ======================== */

.chart-bars { display: flex; flex-direction: column; gap: 12px; }
.chart-bar-row { display: flex; align-items: center; gap: 10px; }
.chart-bar-label { width: 140px; font-size: 12px; color: var(--secondary); flex-shrink: 0; }
.chart-bar-track { flex: 1; height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.chart-bar-fill  { height: 100%; border-radius: 7px; transition: width .5s ease; }
.chart-bar-value { width: 90px; font-size: 12px; color: var(--white); text-align: right; flex-shrink: 0; }

/* ======================== TOAST ======================== */

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  padding: 13px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
  max-width: 340px; box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--gold);
  background: var(--surface-2); color: var(--white);
}
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warn    { border-left-color: var(--warn); }

/* ======================== UTILS ======================== */

.hidden { display: none !important; }
small   { font-size: 11px; display: block; margin-top: 4px; }

/* ======================== RESPONSIVE ======================== */

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .app-content { margin-left: 0; }
  .app-main { padding: 20px 16px 40px; }
  .header-user-name { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .modal-body   { padding: 14px 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-footer { padding: 12px 16px; }
}

@media (max-width: 480px) {
  .page-title-row { flex-direction: column; align-items: flex-start; }
  .shortcuts-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .card-head { flex-wrap: wrap; }
}
