/* ═══════════════════════════════════════════════════════════════════════════
   F2P Commerce CRM — Design System
   Font: Inter (Google Fonts)
   Palette: Minimalist, professional, accent-only color
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:           #F5F6FA;
  --surface:      #FFFFFF;
  --surface-2:    #F9FAFB;
  --border:       #E5E7EB;
  --border-light: #F3F4F6;
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;

  /* Brand */
  --accent:       #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;
  --accent-soft:  #DBEAFE;

  /* Priority */
  --critical:     #EF4444;
  --critical-bg:  #FEF2F2;
  --high:         #F97316;
  --high-bg:      #FFF7ED;
  --medium:       #3B82F6;
  --medium-bg:    #EFF6FF;
  --low:          #9CA3AF;
  --low-bg:       #F9FAFB;

  /* Status */
  --success:      #10B981;
  --success-bg:   #ECFDF5;
  --warning:      #F59E0B;
  --warning-bg:   #FFFBEB;
  --error:        #EF4444;
  --error-bg:     #FEF2F2;
  --info:         #3B82F6;
  --info-bg:      #EFF6FF;
  --purple:       #8B5CF6;
  --purple-bg:    #F5F3FF;

  /* Spacing */
  --nav-h:        60px;
  --sidebar-w:    260px;
  --radius:       8px;
  --radius-sm:    5px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Shadow */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:    0 12px 32px rgba(0,0,0,.10);

  /* Animation */
  --transition:   150ms ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4 { font-size: 0.9rem; font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.6; }

/* ── Top Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.nav-brand {
  font-weight: 800; font-size: 1.1rem;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
  margin-right: 24px;
  flex-shrink: 0;
}
.nav-brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.nav-link.active { color: var(--accent); background: var(--accent-light); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-alarm-btn {
  position: relative; cursor: pointer;
  padding: 6px; border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  border: none; background: none;
}
.nav-alarm-btn:hover { color: var(--error); background: var(--error-bg); }
.alarm-badge {
  position: absolute; top: 0; right: 0;
  background: var(--error); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}
.nav-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.nav-user-name { font-size: 0.85rem; font-weight: 500; }
.nav-role-badge {
  font-size: 10px; color: var(--text-light);
  background: var(--bg); padding: 1px 6px;
  border-radius: 20px; border: 1px solid var(--border);
  text-transform: capitalize;
}

/* Notification Dropdown */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 200;
  display: none; /* Hidden by default */
  animation: fadeIn 0.2s ease;
}
.notif-dropdown.open {
  display: block; /* Show when 'open' class is added */
}

.notif-header {
  padding: 12px 16px; display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 0.85rem;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background var(--transition);
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item-title { font-weight: 500; font-size: 0.85rem; color: var(--text); }
.notif-item-msg { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.notif-item-time { font-size: 0.75rem; color: var(--text-light); margin-top: 4px; }

/* ── Main Layout ─────────────────────────────────────────────────────────── */
.app-layout { display: flex; padding-top: var(--nav-h); min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 12px;
}
.main-content {
  flex: 1; min-width: 0;
  padding: 24px;
  max-width: calc(100% - var(--sidebar-w));
}
.main-content.full { max-width: 100%; }

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-bottom: 24px;
}
.page-title { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.page-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-weight: 600; font-size: 0.9rem; }
.card-body { padding: 16px 20px; }

/* Stat Cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 2rem; font-weight: 700; margin: 4px 0; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 0.78rem; color: var(--text-light); }
.stat-card.accent { border-left: 3px solid var(--accent); }
.stat-card.red    { border-left: 3px solid var(--error); }
.stat-card.green  { border-left: 3px solid var(--success); }
.stat-card.orange { border-left: 3px solid var(--high); }
.stat-card.purple { border-left: 3px solid var(--purple); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger  { background: var(--error-bg); color: var(--error); border-color: #FECACA; }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-success { background: var(--success-bg); color: var(--success); border-color: #A7F3D0; }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-muted); border: none; padding: 5px 10px; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-lg { padding: 10px 20px; font-size: 0.95rem; }
.btn-icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* ── Badges / Pills ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-critical { background: var(--critical-bg); color: var(--critical); border: 1px solid #FECACA; }
.badge-high     { background: var(--high-bg);     color: var(--high);     border: 1px solid #FED7AA; }
.badge-medium   { background: var(--medium-bg);   color: var(--medium);   border: 1px solid #BFDBFE; }
.badge-low      { background: var(--low-bg);       color: var(--low);      border: 1px solid var(--border); }

.badge-new       { background: #F3F4F6; color: #6B7280; }
.badge-inprogress{ background: #EFF6FF; color: #3B82F6; }
.badge-onhold    { background: #FFFBEB; color: #D97706; }
.badge-waiting   { background: #F5F3FF; color: #7C3AED; }
.badge-completed { background: #ECFDF5; color: #059669; }
.badge-cancelled { background: #FEF2F2; color: #DC2626; }

.badge-premium  { background: #FEF9C3; color: #92400E; }
.badge-standard { background: #EFF6FF; color: #1E40AF; }
.badge-basic    { background: #F9FAFB; color: #6B7280; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); }
.table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
}
.table th {
  padding: 10px 14px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); text-align: left;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase; letter-spacing: .4px;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem; color: var(--text);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg); }
.table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 5px;
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.form-control {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem; color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.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: 0.78rem; color: var(--text-light); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 15px; height: 15px; cursor: pointer; }
.form-check label { font-size: 0.875rem; cursor: pointer; }

/* Skill checkboxes */
.skill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.8rem; font-weight: 500; transition: all var(--transition);
}
.skill-chip input[type=checkbox] { display: none; }
.skill-chip:has(input:checked) {
  background: var(--accent-light); border-color: var(--accent); color: var(--accent);
}

/* ── Filter Sidebar ──────────────────────────────────────────────────────── */
.filter-section { margin-bottom: 20px; }
.filter-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-light);
  margin-bottom: 8px; display: block;
}
.filter-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.85rem; color: var(--text-muted);
  transition: all var(--transition);
}
.filter-item:hover { background: var(--bg); color: var(--text); }
.filter-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.filter-count { margin-left: auto; font-size: 0.75rem; background: var(--bg); padding: 1px 6px; border-radius: 10px; }

/* ── Alarm Banner ────────────────────────────────────────────────────────── */
.alarm-banner {
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.alarm-icon { font-size: 1.25rem; flex-shrink: 0; }
.alarm-text { flex: 1; }
.alarm-title { font-weight: 600; color: var(--error); font-size: 0.9rem; }
.alarm-subtitle { font-size: 0.82rem; color: #7F1D1D; margin-top: 2px; }
.alarm-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Flash Messages ──────────────────────────────────────────────────────── */
.flash {
  padding: 10px 16px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.flash-success { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.flash-error   { background: var(--error-bg);   color: #7F1D1D; border: 1px solid #FECACA; }
.flash-info    { background: var(--info-bg);     color: #1E40AF; border: 1px solid #BFDBFE; }
.flash-warning { background: var(--warning-bg);  color: #92400E; border: 1px solid #FDE68A; }

/* ── Charts ──────────────────────────────────────────────────────────────── */
.chart-container { position: relative; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.chart-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 16px; }

/* ── Activity Feed ───────────────────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  margin-top: 2px;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 0.85rem; color: var(--text); }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 0.75rem; color: var(--text-light); margin-top: 3px; }
.activity-type-icon { font-size: 0.9rem; }

/* ── Task Cards (Kanban style items) ─────────────────────────────────────── */
.task-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative; overflow: hidden;
}
.task-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.task-card-alarm { border-left: 3px solid var(--error); }
.task-card-title {
  font-weight: 600; font-size: 0.9rem;
  color: var(--text); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-card-client { font-size: 0.78rem; color: var(--text-muted); }
.task-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.task-due { font-size: 0.75rem; color: var(--text-light); }
.task-due.overdue { color: var(--error); font-weight: 600; }
.task-due.soon { color: var(--warning); font-weight: 600; }

/* ── Slide-Over Panel ────────────────────────────────────────────────────── */
.slideover-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.25);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.slideover-overlay.open { opacity: 1; pointer-events: all; }
.slideover {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(600px, 95vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  transform: translateX(100%);
  transition: transform 250ms ease;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.slideover.open { transform: translateX(0); }
.slideover-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.slideover-body { flex: 1; padding: 24px; }
.slideover-close {
  cursor: pointer; border: none; background: none;
  font-size: 1.25rem; color: var(--text-muted); padding: 4px;
  transition: color var(--transition); line-height: 1;
}
.slideover-close:hover { color: var(--text); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px 32px; max-width: 520px; width: 90%;
  box-shadow: var(--shadow-lg);
  transform: scale(.95); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.modal-body  { color: var(--text-muted); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Channel Cards ───────────────────────────────────────────────────────── */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.channel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition);
}
.channel-card:hover { box-shadow: var(--shadow); }
.channel-icon { font-size: 1.75rem; margin-bottom: 10px; }
.channel-name { font-weight: 600; font-size: 0.9rem; }
.channel-type { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.channel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.channel-stat-item { text-align: center; background: var(--bg); border-radius: var(--radius-sm); padding: 8px 4px; }
.channel-stat-num { font-size: 1.2rem; font-weight: 700; }
.channel-stat-label { font-size: 0.7rem; color: var(--text-muted); }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-light);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.empty-desc  { font-size: 0.875rem; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 20px; }
.page-btn {
  min-width: 32px; height: 32px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; cursor: pointer; transition: all var(--transition);
  padding: 0 8px; color: var(--text-muted);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Progress Bar ────────────────────────────────────────────────────────── */
.progress { background: var(--border); border-radius: 10px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 10px; transition: width .5s ease; }
.progress-bar.accent  { background: var(--accent); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.error   { background: var(--error); }

/* ── Login Page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 60%, #1D4ED8 100%);
}
.login-left {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 44px 40px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo { margin-bottom: 28px; }
.login-logo-title { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.login-logo-sub   { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; }
.login-title   { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.login-subtitle{ color: var(--text-muted); font-size: 0.875rem; margin-bottom: 28px; }
.login-right {
  flex: 1; display: none;
  padding: 60px; align-items: center; justify-content: center;
}
@media (min-width: 900px) { .login-right { display: flex; } }
.login-hero-text { color: rgba(255,255,255,.85); }
.login-hero-title { font-size: 2.5rem; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 16px; }
.login-hero-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.login-hero-points li {
  display: flex; align-items: flex-start; gap: 10px;
  color: rgba(255,255,255,.8); font-size: 0.95rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { max-width: 100%; padding: 16px; }
  .chart-row { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .nav-links .nav-link { display: none; }
  .nav-links .nav-link:last-child, .nav-links .nav-link:first-child { display: flex; }
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .25s ease; }
@keyframes slideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.slide-in { animation: slideInRight .2s ease; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .5 } }
.pulsing { animation: pulse 1.5s ease infinite; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-4   { gap: 4px; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-light  { color: var(--text-light); }
.text-sm     { font-size: 0.82rem; }
.text-xs     { font-size: 0.75rem; }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-mono   { font-family: monospace; }
.w-full  { width: 100%; }
.hidden  { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); border: none; background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Strategy Suggestion Card ────────────────────────────────────────────── */
.suggestion-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg); padding: 16px 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
  transition: box-shadow var(--transition);
}
.suggestion-card:hover { box-shadow: var(--shadow); }
.suggestion-text { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.suggestion-rationale { font-size: 0.82rem; color: var(--text-muted); }
.suggestion-footer { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  background: #1F2937; color: #fff;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 0.75rem; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity var(--transition);
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Score Indicator ─────────────────────────────────────────────────────── */
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-num { font-size: 0.8rem; font-weight: 700; min-width: 30px; }
.score-track { flex: 1; background: var(--border); border-radius: 4px; height: 4px; overflow: hidden; }
.score-fill  { height: 100%; border-radius: 4px; transition: width .4s ease; }

/* Notification bell ring animation */
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30%, 50%, 70%, 90% { transform: rotate(8deg); } 20%, 40%, 60%, 80% { transform: rotate(-8deg); } }
.ring-anim { animation: ring .8s ease; }
