/* ============================================================
   DARIAS — assets/css/darias.css
   Diseño Premium Negro & Dorado
============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --gold:          #D4AF37;
  --gold-light:    #FFD700;
  --gold-dark:     #B8960C;
  --gold-pale:     #F5E6A3;
  --black:         #000000;
  --black-rich:    #0A0A0A;
  --black-card:    #111111;
  --black-surface: #161616;
  --black-border:  #222222;
  --white:         #FFFFFF;
  --white-dim:     rgba(255,255,255,0.65);
  --white-faint:   rgba(255,255,255,0.08);
  --glow-gold:     0 0 20px rgba(212,175,55,0.35), 0 0 40px rgba(212,175,55,0.15);
  --glow-intense:  0 0 30px rgba(212,175,55,0.55), 0 0 60px rgba(212,175,55,0.25);
  --radius:        10px;
  --font-ui:       'Rajdhani', sans-serif;
  --font-body:     'Exo 2', sans-serif;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--black-rich);
  color: var(--white);
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.35); border-radius: 3px; }

/* ══════════════════════════════════════════════════════
   NAVBAR PRINCIPAL
══════════════════════════════════════════════════════ */
.darias-navbar {
  background: rgba(0,0,0,0.92) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212,175,55,0.2);
  padding: 0 1.5rem;
  height: 65px;
  position: sticky;
  top: 0;
  z-index: 1050;
}
.navbar-brand {
  font-family: var(--font-ui);
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
}
.nav-link-darias {
  font-family: var(--font-ui);
  color: var(--white-dim) !important;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem !important;
  border-radius: 4px;
  transition: all 0.25s;
}
.nav-link-darias:hover,
.nav-link-darias.active {
  color: var(--gold-light) !important;
  background: rgba(212,175,55,0.07);
}

/* ══════════════════════════════════════════════════════
   SIDEBAR (Dashboard)
══════════════════════════════════════════════════════ */
.darias-sidebar {
  width: 255px;
  min-height: calc(100vh - 65px);
  background: var(--black);
  border-right: 1px solid rgba(212,175,55,0.12);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-user-box {
  padding: 1.4rem 1.2rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
}
.sidebar-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 700; font-size: 1.1rem;
  color: var(--black); flex-shrink: 0;
}
.sidebar-name  { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.sidebar-code  { font-family: var(--font-ui); font-size: 0.72rem; color: var(--gold); letter-spacing: 1px; }
.sidebar-badge-estado {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1px; padding: 2px 9px; border-radius: 20px; margin-top: 5px;
}
.estado-activo   { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.estado-standby  { background: rgba(107,114,128,0.12); color: #9ca3af; border: 1px solid rgba(107,114,128,0.25); }
.estado-pendiente{ background: rgba(234,179,8,0.12);  color: #eab308; border: 1px solid rgba(234,179,8,0.25); }

.sidebar-section-label {
  font-family: var(--font-ui); font-size: 0.62rem; font-weight: 700;
  color: rgba(212,175,55,0.4); letter-spacing: 2.5px; text-transform: uppercase;
  padding: 0.9rem 1.3rem 0.25rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: 11px;
  padding: 0.65rem 1.3rem;
  color: var(--white-dim);
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500;
  border-left: 2px solid transparent;
  transition: all 0.2s; cursor: pointer;
  text-decoration: none;
}
.sidebar-link:hover { color: var(--white); background: rgba(212,175,55,0.04); }
.sidebar-link.active {
  color: var(--gold); background: rgba(212,175,55,0.07);
  border-left-color: var(--gold);
}
.sidebar-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-notif-badge {
  margin-left: auto;
  background: var(--gold); color: var(--black);
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}
.sidebar-notif-badge.danger { background: #ef4444; color: #fff; }
.sidebar-notif-badge.orange { background: #f97316; color: #fff; }

/* ══════════════════════════════════════════════════════
   CARDS & KPI
══════════════════════════════════════════════════════ */
.darias-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.darias-card:hover {
  border-color: rgba(212,175,55,0.25);
  box-shadow: var(--glow-gold);
}
.card-header-gold {
  border-bottom: 1px solid var(--black-border);
  padding: 0.9rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700;
  color: var(--gold); letter-spacing: 2px; text-transform: uppercase;
}

.kpi-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  padding: 1.3rem;
  position: relative; overflow: hidden;
  transition: all 0.3s;
}
.kpi-card:hover { border-color: rgba(212,175,55,0.3); box-shadow: var(--glow-gold); }
.kpi-card::after {
  content: ''; position: absolute;
  top: 0; right: 0; width: 70px; height: 70px;
  background: radial-gradient(circle, rgba(212,175,55,0.07) 0%, transparent 70%);
}
.kpi-label {
  font-family: var(--font-ui); font-size: 0.67rem; font-weight: 700;
  color: var(--white-dim); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.kpi-value {
  font-family: var(--font-ui); font-size: 2rem; font-weight: 700;
  color: var(--gold-light); line-height: 1;
}
.kpi-sub { font-size: 0.78rem; color: #22c55e; margin-top: 3px; }
.kpi-icon { position: absolute; top: 1rem; right: 1rem; font-size: 1.4rem; opacity: 0.5; }

/* ══════════════════════════════════════════════════════
   TABLAS
══════════════════════════════════════════════════════ */
.darias-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}
.darias-table thead th {
  font-family: var(--font-ui); font-size: 0.67rem; font-weight: 700;
  color: var(--white-dim); letter-spacing: 1.5px; text-transform: uppercase;
  padding: 0.75rem 1rem;
  background: var(--black-surface);
  border-bottom: 1px solid var(--black-border);
  text-align: left;
}
.darias-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--white-dim);
  vertical-align: middle;
}
.darias-table tbody tr:hover td { background: rgba(212,175,55,0.025); }

/* ══════════════════════════════════════════════════════
   BADGES / PILLS
══════════════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.5px;
}
.pill-pendiente  { background: rgba(234,179,8,0.12);   color: #eab308; border: 1px solid rgba(234,179,8,0.25); }
.pill-confirmado { background: rgba(34,197,94,0.12);   color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.pill-rechazado  { background: rgba(239,68,68,0.12);   color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.pill-baucher    { background: rgba(59,130,246,0.12);   color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.pill-activo     { background: rgba(34,197,94,0.12);   color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.pill-standby    { background: rgba(107,114,128,0.12); color: #9ca3af; border: 1px solid rgba(107,114,128,0.25); }
.pill-abierta    { background: rgba(239,68,68,0.12);   color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.pill-admin      { background: rgba(212,175,55,0.12);  color: var(--gold); border: 1px solid rgba(212,175,55,0.25); }

/* ══════════════════════════════════════════════════════
   BOTONES
══════════════════════════════════════════════════════ */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--black); border: none;
  font-family: var(--font-ui); font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: 5px; transition: all 0.3s;
}
.btn-gold:hover { box-shadow: var(--glow-intense); transform: translateY(-1px); color: var(--black); }

.btn-outline-gold {
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold);
  font-family: var(--font-ui); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  border-radius: 5px; transition: all 0.3s;
}
.btn-outline-gold:hover { background: rgba(212,175,55,0.1); color: var(--gold); box-shadow: var(--glow-gold); }

.btn-accion {
  padding: 4px 11px; border-radius: 4px; font-size: 0.77rem;
  font-family: var(--font-ui); font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: all 0.2s;
}
.btn-ver     { background: rgba(59,130,246,0.12); color: #60a5fa; border-color: rgba(59,130,246,0.25); }
.btn-ver:hover { background: rgba(59,130,246,0.22); }
.btn-aprobar { background: rgba(34,197,94,0.12);  color: #22c55e; border-color: rgba(34,197,94,0.25); }
.btn-aprobar:hover { background: rgba(34,197,94,0.22); }
.btn-rechazar{ background: rgba(239,68,68,0.12);  color: #ef4444; border-color: rgba(239,68,68,0.25); }
.btn-rechazar:hover { background: rgba(239,68,68,0.22); }
.btn-wa      { background: rgba(37,211,102,0.12); color: #25d366; border-color: rgba(37,211,102,0.25); }
.btn-wa:hover { background: rgba(37,211,102,0.22); }
.btn-gold-sm { background: rgba(212,175,55,0.12); color: var(--gold); border-color: rgba(212,175,55,0.25); }
.btn-gold-sm:hover { background: rgba(212,175,55,0.22); }

/* ══════════════════════════════════════════════════════
   FORMULARIOS
══════════════════════════════════════════════════════ */
.form-label-gold {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700;
  color: var(--gold); letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 0.35rem; display: block;
}
.form-control-dark,
.form-select-dark {
  background: var(--black-surface) !important;
  border: 1px solid var(--black-border) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
  font-family: var(--font-body);
  transition: all 0.3s;
}
.form-control-dark:focus,
.form-select-dark:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12) !important;
  outline: none !important;
}
.form-control-dark::placeholder { color: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════════════════════
   LIVE FEED
══════════════════════════════════════════════════════ */
.live-feed-box {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.live-feed-header {
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid var(--black-border);
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
  color: var(--gold); letter-spacing: 2px;
  display: flex; align-items: center; gap: 8px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

.live-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.83rem;
  animation: slideIn 0.35s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateX(-15px)} to{opacity:1;transform:none} }
.live-item-icon { font-size: 1rem; flex-shrink: 0; }
.live-item-text { flex: 1; color: var(--white-dim); }
.live-item-text strong { color: var(--white); }
.live-item-time { font-size: 0.72rem; color: rgba(255,255,255,0.28); white-space: nowrap; }

/* ══════════════════════════════════════════════════════
   PRIORITY CARDS
══════════════════════════════════════════════════════ */
.priority-card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all 0.3s;
}
.priority-card:hover { border-color: rgba(212,175,55,0.2); }
.priority-rank {
  font-family: 'Georgia', serif; font-size: 2rem; font-weight: 700;
  color: rgba(212,175,55,0.18); min-width: 36px; text-align: center;
}
.priority-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 700; color: var(--black);
  font-size: 0.88rem; flex-shrink: 0;
}
.priority-score-num {
  font-family: var(--font-ui); font-size: 1.3rem; font-weight: 700;
  color: var(--gold-light);
}
.priority-bar-wrap {
  width: 90px; height: 4px; background: var(--black-surface);
  border-radius: 2px; margin-top: 4px; overflow: hidden;
}
.priority-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 1s ease;
}

/* ══════════════════════════════════════════════════════
   TOASTS (notificaciones flotantes)
══════════════════════════════════════════════════════ */
#dariasToastContainer {
  position: fixed; top: 75px; right: 1.3rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
}
.darias-toast {
  background: var(--black-card);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 8px; padding: 0.85rem 1.1rem;
  min-width: 290px; max-width: 340px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--glow-gold);
  animation: toastIn 0.35s ease; cursor: pointer;
}
@keyframes toastIn { from{opacity:0;transform:translateX(80px)} to{opacity:1;transform:none} }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-title { font-family: var(--font-ui); font-weight: 700; color: var(--gold); font-size: 0.77rem; }
.toast-msg { color: var(--white-dim); font-size: 0.8rem; margin-top: 2px; }

/* ══════════════════════════════════════════════════════
   UPLOAD ZONE (Baucher)
══════════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed rgba(212,175,55,0.3);
  border-radius: 8px; padding: 2rem; text-align: center;
  cursor: pointer; transition: all 0.3s; background: var(--black-surface);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--gold);
  background: rgba(212,175,55,0.04);
}
.upload-zone input[type=file] { display: none; }

/* ══════════════════════════════════════════════════════
   MODALES
══════════════════════════════════════════════════════ */
.modal-content {
  background: var(--black-card) !important;
  border: 1px solid rgba(212,175,55,0.2) !important;
  color: var(--white) !important;
}
.modal-header {
  border-bottom: 1px solid var(--black-border) !important;
}
.modal-footer {
  border-top: 1px solid var(--black-border) !important;
}
.modal-title {
  font-family: var(--font-ui); font-weight: 700; color: var(--gold);
  letter-spacing: 1px;
}
.btn-close { filter: invert(1) !important; }

/* ══════════════════════════════════════════════════════
   HERO LANDING
══════════════════════════════════════════════════════ */
.hero-section {
  min-height: calc(100vh - 65px);
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.08) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 100%, rgba(212,175,55,0.04) 0%, transparent 55%),
              var(--black);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 1.5rem;
  position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.025;
  background-image: linear-gradient(var(--gold) 1px, transparent 1px),
                    linear-gradient(90deg, var(--gold) 1px, transparent 1px);
  background-size: 55px 55px;
}
.hero-title {
  font-family: var(--font-ui);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 700; letter-spacing: 10px; line-height: 1;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(212,175,55,0.35));
}
.hero-tagline {
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  color: var(--gold); letter-spacing: 6px; text-transform: uppercase;
}
.hero-sub {
  font-size: 1.1rem; color: var(--white-dim); font-style: italic;
}
.hero-divider {
  width: 100px; height: 1px; margin: 1.2rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-stats-bar {
  background: var(--black-card);
  border-top: 1px solid rgba(212,175,55,0.12);
  border-bottom: 1px solid rgba(212,175,55,0.12);
  padding: 1.2rem 2rem;
}

/* ══════════════════════════════════════════════════════
   LOGIN / REGISTER
══════════════════════════════════════════════════════ */
.login-box {
  background: var(--black-card);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px; padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.login-right-panel {
  background: var(--black-card);
  border-left: 1px solid rgba(212,175,55,0.12);
  padding: 2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.live-stat-card {
  background: var(--black-surface);
  border: 1px solid var(--black-border);
  border-radius: 8px; padding: 1rem;
}
.live-stat-card-title {
  font-family: var(--font-ui); font-size: 0.67rem; font-weight: 700;
  color: var(--gold); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 0.7rem;
  display: flex; align-items: center; gap: 6px;
}
.live-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem; color: var(--white-dim);
}
.live-stat-row:last-child { border-bottom: none; }
.live-stat-val { color: var(--gold-light); font-family: var(--font-ui); font-weight: 700; }

/* ══════════════════════════════════════════════════════
   ÁRBOL DE RED (Network)
══════════════════════════════════════════════════════ */
.tree-node { display: flex; flex-direction: column; align-items: center; }
.tree-user-card {
  background: var(--black-surface); border: 1px solid var(--black-border);
  border-radius: 8px; padding: 0.7rem 1rem; text-align: center;
  min-width: 110px; transition: all 0.3s; cursor: default;
}
.tree-user-card.root { border-color: rgba(212,175,55,0.4); background: rgba(212,175,55,0.04); }
.tree-user-card:hover { border-color: var(--gold); box-shadow: var(--glow-gold); }
.tree-user-name { font-weight: 700; font-size: 0.85rem; }
.tree-user-id   { font-family: var(--font-ui); font-size: 0.68rem; color: var(--gold); }
.tree-connector {
  width: 1px; height: 22px; background: rgba(212,175,55,0.2); margin: 0 auto;
}
.tree-children-row {
  display: flex; gap: 1.5rem; position: relative;
}

/* ══════════════════════════════════════════════════════
   LINK REFERIDO BOX
══════════════════════════════════════════════════════ */
.referral-box {
  background: rgba(212,175,55,0.04);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 8px; padding: 1rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.8rem;
}
.referral-link {
  font-family: var(--font-ui); font-size: 0.88rem; color: var(--white);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .darias-sidebar { display: none; }
  .login-right-panel { display: none; }
  .hero-title { letter-spacing: 5px; }
}

/* ══════════════════════════════════════════════════════
   TEMA CLARO (light mode)
══════════════════════════════════════════════════════ */
body.theme-light {
  --black:         #F5F5F0;
  --black-rich:    #EFEFEA;
  --black-card:    #FFFFFF;
  --black-surface: #F0F0EB;
  --black-border:  #D8D8D0;
  --white:         #1A1A1A;
  --white-dim:     rgba(30,30,30,0.65);
  --white-faint:   rgba(0,0,0,0.06);
  --glow-gold:     0 0 20px rgba(212,175,55,0.25), 0 0 40px rgba(212,175,55,0.1);
  --glow-intense:  0 0 30px rgba(212,175,55,0.4),  0 0 60px rgba(212,175,55,0.2);
  color: #1A1A1A;
  background: #F5F5F0;
}

/* Navbar en tema claro */
body.theme-light .darias-navbar {
  background: rgba(245,245,240,0.95) !important;
  border-bottom: 1px solid rgba(212,175,55,0.25);
}
body.theme-light .nav-link-darias       { color: rgba(30,30,30,0.65) !important; }
body.theme-light .nav-link-darias:hover { color: var(--gold-dark) !important; }

/* Hero en tema claro */
body.theme-light .hero-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.1) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 100%, rgba(212,175,55,0.06) 0%, transparent 55%),
              #F5F5F0;
}
body.theme-light .hero-grid-bg { opacity: 0.04; filter: invert(1); }
body.theme-light .hero-sub     { color: rgba(30,30,30,0.6); }

/* Cards en tema claro */
body.theme-light .darias-card  { background: #FFFFFF; border-color: #D8D8D0; }
body.theme-light .kpi-card     { background: #FFFFFF; border-color: #D8D8D0; }
body.theme-light .login-box    { background: #FFFFFF; border-color: rgba(212,175,55,0.2); box-shadow: 0 4px 30px rgba(0,0,0,0.08); }
body.theme-light .live-feed-box{ background: #FFFFFF; border-color: #D8D8D0; }
body.theme-light .priority-card{ background: #FFFFFF; border-color: #D8D8D0; }
body.theme-light .admin-card   { background: #FFFFFF; border-color: #D8D8D0; }

/* Sidebar en tema claro */
body.theme-light .darias-sidebar {
  background: #FFFFFF;
  border-right: 1px solid #D8D8D0;
}
body.theme-light .sidebar-link       { color: rgba(30,30,30,0.6); }
body.theme-light .sidebar-link:hover { color: #1A1A1A; background: rgba(212,175,55,0.06); }
body.theme-light .sidebar-link.active{ color: var(--gold-dark); background: rgba(212,175,55,0.08); border-left-color: var(--gold-dark); }

/* Formularios en tema claro */
body.theme-light .form-control-dark,
body.theme-light .form-select-dark {
  background: #F5F5F0 !important;
  border-color: #D0D0C8 !important;
  color: #1A1A1A !important;
}
body.theme-light .form-control-dark::placeholder { color: rgba(30,30,30,0.35); }

/* Tablas en tema claro */
body.theme-light .darias-table thead th { background: #F0F0EB; color: rgba(30,30,30,0.5); }
body.theme-light .darias-table tbody td { border-bottom-color: #EBEBEB; color: rgba(30,30,30,0.7); }
body.theme-light .darias-table tbody tr:hover td { background: rgba(212,175,55,0.04); }
body.theme-light .admin-table th { background: #F0F0EB; }
body.theme-light .admin-table td { border-bottom-color: #EBEBEB; color: rgba(30,30,30,0.7); }

/* Modal en tema claro */
body.theme-light .modal-content { background: #FFFFFF !important; border-color: rgba(212,175,55,0.2) !important; color: #1A1A1A !important; }
body.theme-light .modal-header  { border-bottom-color: #E8E8E0 !important; }
body.theme-light .modal-footer  { border-top-color: #E8E8E0 !important; }
body.theme-light .btn-close     { filter: none !important; }

/* Accordion FAQ en tema claro */
body.theme-light .accordion-button         { background: #FFFFFF !important; color: #1A1A1A !important; }
body.theme-light .accordion-body           { background: #F5F5F0 !important; color: rgba(30,30,30,0.7) !important; }
body.theme-light .accordion-button::after  { filter: invert(1); }

/* Upload zone en tema claro */
body.theme-light .upload-zone { background: #F5F5F0; border-color: rgba(212,175,55,0.35); }

/* Live feed en tema claro */
body.theme-light .live-feed-header { border-bottom-color: #E8E8E0; }
body.theme-light .live-item        { border-bottom-color: #EFEFEF; }
body.theme-light .live-item-text   { color: rgba(30,30,30,0.65); }
body.theme-light .live-item-text strong { color: #1A1A1A; }

/* Footer en tema claro */
body.theme-light footer { background: #FFFFFF; border-top-color: rgba(212,175,55,0.15); }

/* Scrollbar en tema claro */
body.theme-light ::-webkit-scrollbar-track { background: #F0F0EB; }
body.theme-light ::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.4); }

/* Offcanvas en tema claro */
body.theme-light #offcanvasNotif { background: #FFFFFF !important; border-left-color: rgba(212,175,55,0.2) !important; }

/* Botón toggle tema */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 0.5px;
}
.btn-theme-toggle:hover {
  background: rgba(212,175,55,0.1);
  box-shadow: var(--glow-gold);
}
body.theme-light .btn-theme-toggle {
  border-color: rgba(180,140,20,0.4);
  color: var(--gold-dark);
}

/* Aplicar variables al html también para el early load */
html.theme-light-early body,
html.theme-light-early {
  background: #F5F5F0 !important;
}

/* ══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Sidebar como drawer
══════════════════════════════════════════════════════ */

/* Botón hamburguesa */
.btn-hamburger {
  display: none;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 6px;
  color: var(--gold);
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* Overlay oscuro detrás del drawer */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9998;
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {

  /* Mostrar hamburguesa */
  .btn-hamburger { display: flex; align-items: center; }

  /* Sidebar OCULTO por defecto en mobile — drawer deslizable */
  .darias-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    z-index: 9999 !important;
    transition: left 0.28s ease !important;
    box-shadow: none !important;
    width: 260px !important;
    overflow-y: auto !important;
    display: flex !important;      /* siempre visible en DOM */
    flex-direction: column !important;
  }
  .darias-sidebar.open {
    left: 0 !important;
    box-shadow: 8px 0 40px rgba(0,0,0,0.8) !important;
  }

  /* El contenido NO se desplaza con el sidebar */
  .d-flex > .flex-grow-1 {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Main content full width en mobile */
  .flex-grow-1.p-4 { padding: 1rem !important; }

  /* Navbar compacta */
  .darias-navbar { padding: 0 1rem !important; }
  .navbar-brand  { font-size: 1.3rem !important; letter-spacing: 2px !important; }

  /* Ocultar texto largo en navbar */
  .navbar-user-name { display: none !important; }

  /* KPI cards 2 columnas en mobile */
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }

  /* Tablas scrollables horizontalmente */
  .darias-card { overflow-x: auto; }

  /* Acordeón ⚙ más pequeño en mobile */
  .dropdown-menu { min-width: 150px !important; }

  /* Link referido responsive */
  .referral-box { flex-direction: column; align-items: flex-start !important; }

  /* Priority cards más compactas */
  .priority-card { padding: 0.7rem !important; gap: 0.6rem !important; }
  .priority-rank { font-size: 1.3rem !important; min-width: 25px !important; }
  .priority-bar-wrap { width: 60px !important; }

  /* Modal full screen en mobile */
  .modal-dialog { margin: 0.5rem !important; }

  /* Ocultar columnas menos importantes en tablas */
  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3rem !important; letter-spacing: 4px !important; }
  .hero-tagline { font-size: 0.72rem !important; letter-spacing: 3px !important; }
  .hero-sub { font-size: 0.9rem !important; }
  .login-box { padding: 1.5rem !important; }
}

/* ── Toggle contraseña (ojito) ─────────────────────────── */
.pass-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.pass-wrap input {
  padding-right: 2.8rem !important;
  width: 100%;
}
.btn-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white-dim);
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}
.btn-eye:hover { color: var(--gold); }
