/* ═══════════════════════════════════════════════════════════
   RANK-RENT Lead Manager — Dark Mode CSS
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-900:    #0f172a;
  --bg-800:    #1e293b;
  --bg-700:    #273549;
  --bg-600:    #334155;
  --border:    #334155;
  --primary:   #6366f1;
  --primary-h: #4f46e5;
  --primary-l: #818cf8;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --info:      #38bdf8;
  --purple:    #a855f7;
  --teal:      #14b8a6;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --sidebar-w: 260px;
  --header-h:  64px;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.35);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-900);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--primary-l); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; }
ul { list-style: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-800); }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 4px; }

/* ══════════════════ LAYOUT ══════════════════ */

html, body { height: 100%; }
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }

.layout { display: flex; min-height: 100vh; width: 100%; max-width: 100vw; overflow-x: hidden; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh; /* dynamic viewport height para móviles */
  background: var(--bg-800);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform .3s ease;
  transform: translateX(0);
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.1rem;
}
.sidebar-logo .logo-text { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.sidebar-logo .logo-text span { color: var(--text-muted); font-weight: 400; font-size: .75rem; display: block; }

.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.nav-group-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 14px 20px 6px;
}
.nav-item { display: block; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--text-muted);
  font-size: .875rem;
  border-radius: 0;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.nav-link:hover { color: var(--text); background: rgba(99,102,241,.08); }
.nav-link.active {
  color: var(--primary-l);
  background: rgba(99,102,241,.12);
  border-left-color: var(--primary);
}
.nav-link .nav-icon { width: 18px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: .65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-muted);
}

/* Main */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; max-width: 100%; overflow-x: hidden; }

/* Topbar */
.topbar {
  height: var(--header-h);
  background: var(--bg-800);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 1.05rem; font-weight: 600; }
.topbar-breadcrumb { font-size: .8rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-btn {
  width: 36px; height: 36px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer; color: var(--text-muted);
  font-size: .95rem;
  transition: all .15s;
  text-decoration: none;
}
.topbar-btn:hover { color: var(--text); border-color: var(--primary); }
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .8rem;
}
.topbar-avatar {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .75rem;
  font-weight: 700;
}

/* Content */
.content { padding: 28px 28px; flex: 1; overflow-x: hidden; max-width: 100%; box-sizing: border-box; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 1.4rem; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: .875rem; margin-top: 2px; }

/* ══════════════════ CARDS ══════════════════ */
.card {
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-weight: 600; font-size: .95rem; }
.card-body { }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; max-width: 100%; }
.stat-card {
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .2s;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.stat-card { cursor: default; }
a.stat-card { cursor: pointer; text-decoration: none; color: inherit; display: flex; }
a.stat-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.15); color: inherit; }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(99,102,241,.15); }
.stat-icon.green  { background: rgba(34,197,94,.15); }
.stat-icon.yellow { background: rgba(245,158,11,.15); }
.stat-icon.red    { background: rgba(239,68,68,.15); }
.stat-icon.purple { background: rgba(168,85,247,.15); }
.stat-icon.teal   { background: rgba(20,184,166,.15); }
.stat-icon.orange { background: rgba(249,115,22,.15); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }
.stat-change { font-size: .75rem; margin-top: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ══════════════════ TABLAS ══════════════════ */
.table-wrapper { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--bg-700);
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid rgba(51,65,85,.5); transition: background .12s; }
tbody tr:hover { background: rgba(99,102,241,.04); }
tbody td { padding: 11px 14px; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ══════════════════ FORMULARIOS ══════════════════ */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }
input[type=text], input[type=email], input[type=password],
input[type=number], input[type=url], input[type=tel],
input[type=date], select, textarea {
  width: 100%;
  background: var(--bg-900);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
select option { background: var(--bg-800); }
textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }

/* ══════════════════ BOTONES ══════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-h); color: white; }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover { opacity: .85; }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover { opacity: .85; }
.btn-warning   { background: var(--warning); color: #1e293b; }
.btn-secondary {
  background: var(--bg-700);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg-600); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--bg-700); }
.btn-sm { padding: 5px 10px; font-size: .78rem; }
.btn-xs { padding: 3px 8px; font-size: .72rem; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════════ BADGES ══════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.badge-info      { background: rgba(56,189,248,.15); color: var(--info); }
.badge-primary   { background: rgba(99,102,241,.15); color: var(--primary-l); }
.badge-success   { background: rgba(34,197,94,.15);  color: var(--success); }
.badge-warning   { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-danger    { background: rgba(239,68,68,.15);  color: var(--danger); }
.badge-secondary { background: rgba(148,163,184,.1); color: var(--text-muted); }
.badge-purple    { background: rgba(168,85,247,.15); color: var(--purple); }
.badge-teal      { background: rgba(20,184,166,.15); color: var(--teal); }

/* ══════════════════ ALERTS ══════════════════ */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: .875rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(34,197,94,.1); border-color: var(--success); color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.1); border-color: var(--danger); color: #f87171; }
.alert-warning { background: rgba(245,158,11,.1); border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(56,189,248,.1); border-color: var(--info); color: var(--info); }

/* ══════════════════ FILTROS ══════════════════ */
.filters-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.filters-bar input, .filters-bar select { width: auto; flex: 1; min-width: 150px; margin: 0; }
.filters-bar label { margin: 0; white-space: nowrap; }

/* ══════════════════ MODALES ══════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  place-items: center;
}
.modal-overlay.open { display: grid; }
.modal {
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
@keyframes modalIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; transition: color .15s; }
.modal-close:hover { color: var(--text); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ══════════════════ TABS ══════════════════ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 9px 16px; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: all .15s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary-l); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ══════════════════ TIMELINE / COMUNICACIONES ══════════════════ */
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-item {
  display: flex; gap: 12px;
}
.timeline-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.timeline-avatar.admin   { background: rgba(99,102,241,.2); color: var(--primary-l); }
.timeline-avatar.empresa { background: rgba(34,197,94,.2); color: var(--success); }
.timeline-bubble { flex: 1; }
.timeline-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 5px; }
.timeline-msg {
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .875rem;
  line-height: 1.5;
}

/* ══════════════════ CHARTS ══════════════════ */
.chart-container { position: relative; height: 250px; max-width: 100%; overflow: hidden; }

/* ══════════════════ EMPTY STATE ══════════════════ */
.empty-state {
  text-align: center; padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: .9rem; }

/* ══════════════════ LEAD CARD (detalle) ══════════════════ */
.lead-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-info-item label { font-size: .75rem; color: var(--text-muted); margin-bottom: 3px; }
.lead-info-item p { font-size: .9rem; font-weight: 500; }

/* ══════════════════ PROGRESS BAR ══════════════════ */
.progress { height: 6px; background: var(--bg-600); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .4s; }
.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }

/* ══════════════════ TOOLTIP ══════════════════ */
[data-tip] { position: relative; cursor: default; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-600); color: var(--text);
  font-size: .72rem; padding: 4px 8px; border-radius: 5px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
[data-tip]:hover::after { opacity: 1; }

/* ══════════════════ SIDEBAR TOGGLE (móvil) ══════════════════ */
.sidebar-toggle {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.2rem; cursor: pointer;
}

/* ══════════════════ OVERLAY ══════════════════ */
#sidebarOverlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}
#sidebarOverlay.active { display: block; }

/* Logout móvil – oculto en escritorio */
.logout-mobile { display: none !important; }

/* ══════════════════ PAGINATION ══════════════════ */
.pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; }
.page-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--bg-700); border: 1px solid var(--border);
  border-radius: 6px; font-size: .8rem; color: var(--text-muted);
  transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--text); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ══════════════════ RESPONSIVE ══════════════════ */
/* ═══ DASHBOARD LAYOUT GRIDS ═══ */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  max-width: 100%;
}
.dash-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  max-width: 100%;
}
.dash-charts-grid .card,
.dash-tables-grid .card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* hide on mobile helper */
.hide-mobile { }

@media (max-width: 1024px) {
  .main { margin-left: 0; width: 100%; max-width: 100vw; }
  .content { max-width: 100vw; }
  .sidebar-toggle { display: flex !important; align-items: center; justify-content: center; }
  .logout-mobile { display: flex !important; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  body.sidebar-open { overflow: hidden; }
}
@media (max-width: 768px) {
  .dash-charts-grid,
  .dash-tables-grid {
    grid-template-columns: 1fr;
  }
  .chart-container { height: 200px; }
}
@media (max-width: 640px) {
  .content { padding: 14px 12px; max-width: 100vw; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 12px 14px; gap: 10px; }
  .stat-value { font-size: 1.3rem; }
  .stat-icon { width: 38px; height: 38px; font-size: 1rem; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .lead-info-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 1.15rem; }
  .hide-mobile { display: none !important; }
  .card { padding: 14px; max-width: 100%; overflow-x: auto; }
  .card-header { margin-bottom: 12px; padding-bottom: 10px; }
  .topbar { padding: 0 14px; }
  .topbar-title { font-size: .9rem; }
  .topbar-breadcrumb { display: none; }
  .col-actions { flex-wrap: wrap; }
  thead th, tbody td { padding: 8px 10px; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 10px 12px; }
  .stat-value { font-size: 1.2rem; }
  .stat-icon { width: 32px; height: 32px; font-size: .9rem; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn-group .btn { width: 100%; justify-content: center; }
}

/* ══════════════════ EMPRESA PORTAL LAYOUT ══════════════════ */
.emp-layout { display:flex; min-height:100vh; width:100%; max-width:100vw; overflow-x:hidden; }
.emp-sidebar {
  width:220px; background:var(--bg-800); border-right:1px solid var(--border);
  padding:20px 0; flex-shrink:0;
  position:fixed; top:0; left:0; height:100vh; height:100dvh; z-index:200;
  transition:transform .3s;
  overflow-y:auto;
  overflow-x:hidden;
}
.emp-sidebar .logo { padding:0 20px 20px; border-bottom:1px solid var(--border); font-weight:700; font-size:.95rem; }
.emp-sidebar nav a {
  display:flex; align-items:center; gap:10px; padding:10px 20px;
  color:var(--text-muted); text-decoration:none; font-size:.875rem; transition:background .15s;
}
.emp-sidebar nav a:hover, .emp-sidebar nav a.active { background:var(--bg-700); color:var(--text); }
.emp-main { margin-left:220px; flex:1; min-width:0; max-width:100%; overflow-x:hidden; display:flex; flex-direction:column; }
.emp-topbar {
  background:var(--bg-800); border-bottom:1px solid var(--border);
  padding:12px 24px; display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:50;
}
.emp-toggle { display:none; background:none; border:none; color:var(--text); font-size:1.3rem; cursor:pointer; padding:4px 8px; }
.emp-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:150; }
.emp-overlay.open { display:block; }
.emp-content { padding:24px; flex:1; overflow-x:hidden; max-width:100%; box-sizing:border-box; }
.emp-stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:24px; }
.emp-pack-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:12px; flex-wrap:wrap; }

@media (max-width:768px) {
  .emp-sidebar { transform:translateX(-100%); }
  .emp-sidebar.open { transform:translateX(0); }
  .emp-main { margin-left:0; width:100%; max-width:100vw; }
  .emp-content { max-width:100vw; padding:16px 14px; }
  .emp-toggle { display:block; }
  .emp-stats-grid { grid-template-columns:repeat(3,1fr); }
  .emp-topbar { padding:10px 14px; }
  body.emp-sidebar-open { overflow:hidden; }
}
@media (max-width:480px) {
  .emp-stats-grid { grid-template-columns:1fr 1fr; }
  .emp-pack-row { flex-direction:column; align-items:flex-start; }
}
@media (max-width:360px) {
  .emp-stats-grid { grid-template-columns:1fr; }
  .emp-stat-value { font-size:1.3rem; }
  .emp-content { padding:12px 10px; }
}

/* ══════════════════ LOGIN PAGE ══════════════════ */
.login-wrapper {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--bg-900);
  background-image: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,.06) 0%, transparent 50%);
}
.login-card {
  background: var(--bg-800);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo .logo-circle {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 14px;
  display: inline-grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 10px;
}
.login-logo h1 { font-size: 1.2rem; font-weight: 700; }
.login-logo p  { color: var(--text-muted); font-size: .82rem; margin-top: 3px; }

/* ══════════════════ NOTIF DOT ══════════════════ */
.notif-dot {
  position: relative;
}
.notif-dot::after {
  content: '';
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%;
  border: 2px solid var(--bg-800);
}

/* ══════════════════ COL ACTIONS ══════════════════ */
.col-actions { display: flex; gap: 6px; align-items: center; }

/* ══════════════════ TOGGLE SWITCH ══════════════════ */
.toggle-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-track {
  width: 38px; height: 20px;
  background: var(--bg-600);
  border-radius: 10px; position: relative; transition: background .2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--primary); }
.toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white; border-radius: 50%; transition: left .2s;
}
.toggle-switch input:checked + .toggle-track::after { left: 20px; }

/* ══════════════════ DROPDOWN ══════════════════ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-800); border: 1px solid var(--border);
  border-radius: 10px; min-width: 180px; z-index: 150;
  box-shadow: var(--shadow); overflow: hidden;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: .85rem; color: var(--text-muted);
  cursor: pointer; transition: all .12s;
}
.dropdown-item:hover { background: var(--bg-700); color: var(--text); }
.dropdown-item.danger:hover { color: var(--danger); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
