/* =============================================
   Grupo Cuesa CRM — Main Stylesheet
   Brand: Dark (#1A1A1A) + Orange (#F5921E)
   ============================================= */

:root {
  --brand-dark:    #1A1A1A;
  --brand-darker:  #111111;
  --brand-orange:  #F5921E;
  --brand-orange2: #E07D0A;
  --sidebar-bg:    #1E1E1E;
  --sidebar-w:     240px;
  --sidebar-w-col: 64px;
  --topbar-h:      60px;
  --white:         #FFFFFF;
  --gray-50:       #FAFAFA;
  --gray-100:      #F5F5F5;
  --gray-200:      #E8E8E8;
  --gray-300:      #D0D0D0;
  --gray-500:      #9E9E9E;
  --gray-700:      #555555;
  --gray-900:      #1A1A1A;
  --text:          #222222;
  --text-muted:    #777777;
  --border:        #E5E5E5;
  --green:         #27AE60;
  --green-light:   #E8F8F0;
  --red:           #E74C3C;
  --red-light:     #FDECEA;
  --blue:          #2980B9;
  --blue-light:    #EBF5FB;
  --yellow:        #F39C12;
  --yellow-light:  #FEF9E7;
  --purple:        #8E44AD;
  --purple-light:  #F5EEF8;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow:        0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.16);
  --transition:    all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ── LOGIN ──────────────────────────────────── */
#login-page {
  min-height: 100vh;
  display: flex;
  background: var(--brand-dark);
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(245,146,30,0.06);
  top: -100px; right: -100px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(245,146,30,0.04);
  bottom: -80px; left: -80px;
}
.login-brand {
  position: relative; z-index: 1; text-align: center;
}
.login-brand-grupo {
  font-size: 11px; font-weight: 700; letter-spacing: 5px;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.login-brand-cuesa {
  font-size: 64px; font-weight: 900; letter-spacing: 4px;
  color: var(--brand-orange); line-height: 1; margin-bottom: 16px;
}
.login-brand-sub {
  font-size: 14px; color: rgba(255,255,255,0.35); letter-spacing: 2px;
  text-transform: uppercase;
}
.login-right {
  width: 440px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}
.login-form-wrap { width: 100%; }
.login-title {
  font-size: 24px; font-weight: 800; color: var(--brand-dark);
  margin-bottom: 6px;
}
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--white);
  transition: var(--transition); outline: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(245,146,30,0.12);
}
.form-field textarea { resize: vertical; min-height: 80px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 20px;
  border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-orange); color: var(--white);
}
.btn-primary:hover { background: var(--brand-orange2); transform: translateY(-1px); }
.btn-secondary {
  background: var(--gray-100); color: var(--gray-700); border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--green); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-full { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.login-forgot {
  text-align: right; margin-top: -10px; margin-bottom: 20px;
}
.login-forgot a {
  font-size: 12px; color: var(--brand-orange); text-decoration: none;
}
.login-forgot a:hover { text-decoration: underline; }
.form-error {
  background: var(--red-light); color: var(--red);
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 16px; display: none;
}
.form-error.show { display: block; }

/* ── APP LAYOUT ─────────────────────────────── */
#app { display: none; height: 100vh; overflow: hidden; }
.app-layout { display: flex; height: 100vh; }

/* ── SIDEBAR ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  transition: width 0.25s ease;
  flex-shrink: 0;
  position: relative; z-index: 50;
}
.sidebar.collapsed { width: var(--sidebar-w-col); }

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  min-height: var(--topbar-h);
}
.sidebar-logo {
  display: flex; flex-direction: column; overflow: hidden;
  white-space: nowrap;
}
.sidebar-logo-grupo {
  font-size: 8px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  line-height: 1;
}
.sidebar-logo-cuesa {
  font-size: 22px; font-weight: 900; letter-spacing: 2px;
  color: var(--brand-orange); line-height: 1;
}
.sidebar-toggle {
  margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,0.4); cursor: pointer;
  padding: 4px; border-radius: 4px; flex-shrink: 0;
  font-size: 18px; transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--white); background: rgba(255,255,255,0.08); }

.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  overflow: hidden;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10px; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-section {
  padding: 8px 16px 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,0.2);
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .sidebar-section { opacity: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; margin: 1px 8px;
  border-radius: var(--radius); cursor: pointer;
  transition: var(--transition); white-space: nowrap;
  color: rgba(255,255,255,0.55);
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.nav-item.active {
  background: rgba(245,146,30,0.15); color: var(--brand-orange);
}
.nav-item.active .nav-icon { color: var(--brand-orange); }
.nav-icon { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-label { font-size: 13px; font-weight: 500; overflow: hidden; }
.nav-badge {
  margin-left: auto; background: var(--brand-orange);
  color: var(--white); border-radius: 10px;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  min-width: 18px; text-align: center;
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge { display: none; }

.sidebar-bottom {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── MAIN CONTENT ───────────────────────────── */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  flex-shrink: 0; z-index: 40;
}
.topbar-title {
  font-size: 16px; font-weight: 700; color: var(--brand-dark);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-100); border: 1.5px solid transparent;
  border-radius: var(--radius); padding: 7px 12px;
  transition: var(--transition);
}
.topbar-search:focus-within {
  background: var(--white); border-color: var(--brand-orange);
}
.topbar-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 200px;
}
.topbar-search input::placeholder { color: var(--gray-500); }

.page-content {
  flex: 1; overflow-y: auto; padding: 24px;
}

/* ── KPI CARDS ──────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.kpi-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px 24px; box-shadow: var(--shadow);
  border-left: 4px solid var(--brand-orange);
  display: flex; align-items: center; gap: 16px;
}
.kpi-card:nth-child(2) { border-left-color: var(--green); }
.kpi-card:nth-child(3) { border-left-color: var(--blue); }
.kpi-card:nth-child(4) { border-left-color: var(--purple); }
.kpi-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  background: rgba(245,146,30,0.1);
}
.kpi-card:nth-child(2) .kpi-icon { background: rgba(39,174,96,0.1); }
.kpi-card:nth-child(3) .kpi-icon { background: rgba(41,128,185,0.1); }
.kpi-card:nth-child(4) .kpi-icon { background: rgba(142,68,173,0.1); }
.kpi-value {
  font-size: 28px; font-weight: 800; color: var(--brand-dark); line-height: 1;
}
.kpi-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-top: 4px;
}

/* ── MODULE TOOLBAR ─────────────────────────── */
.module-toolbar {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 14px 20px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; box-shadow: var(--shadow);
}
.toolbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-100); border: 1.5px solid transparent;
  border-radius: var(--radius); padding: 8px 12px; flex: 1; min-width: 200px;
  transition: var(--transition);
}
.toolbar-search:focus-within { background: var(--white); border-color: var(--brand-orange); }
.toolbar-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
}
.toolbar-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-select {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--white); outline: none; cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--brand-orange); }
.view-toggle { display: flex; gap: 2px; }
.view-btn {
  padding: 8px 10px; border: 1.5px solid var(--border);
  background: var(--white); cursor: pointer; font-size: 15px;
  color: var(--gray-500); transition: var(--transition);
}
.view-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.view-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.view-btn.active { background: var(--brand-orange); border-color: var(--brand-orange); color: var(--white); }

/* ── TAB NAV ────────────────────────────────── */
.tab-nav {
  display: flex; gap: 2px; margin-bottom: 16px;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 6px; box-shadow: var(--shadow);
}
.tab-btn {
  padding: 8px 18px; border: none; background: transparent;
  border-radius: var(--radius); font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tab-btn.active { background: var(--brand-orange); color: var(--white); font-weight: 600; }
.tab-btn:hover:not(.active) { background: var(--gray-100); color: var(--text); }
.tab-count {
  background: rgba(255,255,255,0.3); border-radius: 10px;
  font-size: 11px; font-weight: 700; padding: 1px 6px;
}
.tab-btn:not(.active) .tab-count { background: var(--gray-200); color: var(--gray-700); }

/* ── TABLE VIEW ─────────────────────────────── */
.data-table-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table thead tr { background: var(--brand-dark); }
.data-table thead th {
  padding: 12px 16px; color: rgba(255,255,255,0.7);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; text-align: left; white-space: nowrap;
}
.data-table thead th:first-child { border-radius: 0; }
.data-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition); cursor: pointer;
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody td { padding: 12px 16px; vertical-align: middle; }
.data-table tbody tr:last-child { border-bottom: none; }

/* ── CARD VIEW ──────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.lead-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 16px 20px; box-shadow: var(--shadow);
  border-left: 4px solid var(--brand-orange);
  transition: var(--transition); cursor: pointer;
}
.lead-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lead-card.vendido { border-left-color: var(--green); background: #f8fffe; }
.lead-card.oferta  { border-left-color: var(--yellow); background: #fffef8; }
.lead-card-name {
  font-size: 15px; font-weight: 700; color: var(--brand-dark); margin-bottom: 4px;
}
.lead-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--text-muted); margin-bottom: 10px;
}
.lead-card-meta span { display: flex; align-items: center; gap: 3px; }
.lead-card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.lead-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
}

/* ── KANBAN VIEW ────────────────────────────── */
.kanban-board {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 12px; min-height: 400px;
}
.kanban-col {
  flex-shrink: 0; width: 280px;
  background: var(--gray-100); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; max-height: 75vh;
}
.kanban-col-header {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand-dark); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kanban-col-title { font-size: 12px; font-weight: 700; color: var(--white); }
.kanban-col-count {
  background: rgba(255,255,255,0.15); color: var(--white);
  border-radius: 10px; font-size: 11px; font-weight: 700;
  padding: 2px 8px;
}
.kanban-col-body {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.kanban-card {
  background: var(--white); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
  cursor: grab; transition: var(--transition);
  border-left: 3px solid var(--brand-orange);
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-col-body.drag-over { background: rgba(245,146,30,0.08); }
.kanban-card-name { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin-bottom: 4px; }
.kanban-card-meta { font-size: 11px; color: var(--text-muted); }

/* ── BADGES ─────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.badge-orange  { background: rgba(245,146,30,0.12); color: var(--brand-orange2); }
.badge-green   { background: var(--green-light); color: var(--green); }
.badge-red     { background: var(--red-light); color: var(--red); }
.badge-blue    { background: var(--blue-light); color: var(--blue); }
.badge-yellow  { background: var(--yellow-light); color: var(--yellow); }
.badge-purple  { background: var(--purple-light); color: var(--purple); }
.badge-gray    { background: var(--gray-200); color: var(--gray-700); }

/* ── CARGAS SPECIFIC ────────────────────────── */
.carga-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 16px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  transition: var(--transition); cursor: pointer;
  border-left: 4px solid var(--brand-orange);
  margin-bottom: 10px;
}
.carga-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.carga-card.en-proceso { border-left-color: var(--blue); }
.carga-card.cargado    { border-left-color: var(--green); }
.carga-card.error      { border-left-color: var(--red); }
.carga-info { flex: 1; min-width: 0; }
.carga-name { font-size: 15px; font-weight: 700; color: var(--brand-dark); margin-bottom: 3px; }
.carga-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 10px; }
.carga-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.carga-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center;
  justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 600px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }
.modal-header {
  padding: 20px 24px; 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: 700; color: var(--brand-dark); }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-100); border: none; cursor: pointer;
  font-size: 16px; color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--brand-dark); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0;
}

/* ── FORM GRID ──────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title {
  grid-column: 1 / -1; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--brand-orange); padding-bottom: 8px;
  border-bottom: 2px solid rgba(245,146,30,0.2);
  margin-top: 8px;
}
.info-bar {
  grid-column: 1 / -1;
  background: var(--gray-100); border-radius: var(--radius);
  padding: 10px 14px; font-size: 12px; color: var(--text-muted);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.info-bar strong { color: var(--brand-dark); }
.form-field.req label::after { content: ' *'; color: var(--red); }

/* ── ADMIN PANEL ────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.admin-card-title {
  font-size: 14px; font-weight: 700; color: var(--brand-dark);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.user-row:last-child { border-bottom: none; }
.user-avatar-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-orange); display: flex;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.user-email { font-size: 11px; color: var(--text-muted); }

/* ── EMPTY STATE ────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.empty-sub { font-size: 13px; }

/* ── SPINNER ─────────────────────────────────── */
.spinner-wrap {
  display: flex; align-items: center; justify-content: center; padding: 60px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--brand-orange);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ───────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--white);
  box-shadow: var(--shadow-md); max-width: 320px;
  animation: toastIn 0.3s ease;
}
.toast-ok      { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-warning { background: var(--yellow); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── CHART WRAPPER ───────────────────────────── */
.chart-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.chart-title {
  font-size: 13px; font-weight: 700; color: var(--brand-dark);
  margin-bottom: 16px;
}
.chart-wrap { position: relative; height: 240px; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-w-col); }
  .sidebar .nav-label, .sidebar .nav-badge,
  .sidebar .sidebar-logo, .sidebar .sidebar-user-info,
  .sidebar .sidebar-section { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .page-content { padding: 16px; }
}
