/* ═══════════════════════════════════════════════════════════════════════════
   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:        100px;
  --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:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Smooth Scrolling ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── 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 ─────────────────────────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 40px;
}
.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%; padding-top: 24px; }

/* ── 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(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes slideInRight { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.slide-in { animation: slideInRight .25s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .5 } }
.pulsing { animation: pulse 1.5s ease infinite; }

/* ── Skeleton Loading ────────────────────────────────────────────────────── */
@keyframes skeleton-loading {
  0% { background-color: #f0f0f0; }
  100% { background-color: #e0e0e0; }
}
.skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
  border-radius: 4px;
}

/* ── Micro-Interactions ──────────────────────────────────────────────────── */
.hover-scale { transition: transform var(--transition); }
.hover-scale:hover { transform: scale(1.02); }
.hover-lift { transition: all var(--transition); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }


/* ── 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-error   { color: var(--error); }
.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; }

/* ── Global Search Styles ────────────────────────────────────────────── */
.nav-search-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 20px; cursor: pointer;
  color: var(--text-light); transition: all var(--transition);
  font-size: 0.85rem; min-width: 140px;
}
.nav-search-trigger:hover { border-color: var(--accent); background: #fff; }
.nav-search-trigger .kb-hint {
  margin-left: auto; background: var(--surface); color: var(--text-light);
  font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
}

.search-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 100px; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-modal {
  background: var(--surface); width: 100%; max-width: 600px;
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: fadeIn .2s ease;
}
.search-input-wrap {
  display: flex; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 1.1rem; padding: 0 12px; color: var(--text);
}
.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.search-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--radius-lg); transition: background .1s ease;
}
.search-item:hover { background: var(--bg); text-decoration: none; }
.search-empty { padding: 40px; text-align: center; color: var(--text-light); font-size: 0.9rem; }
.search-footer {
  padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--border);
  display: flex; gap: 20px; font-size: 0.75rem; color: var(--text-light);
}
.search-footer kbd {
  background: #fff; border: 1px solid var(--border); padding: 1px 4px;
  border-radius: 3px; font-family: sans-serif;
}

/* ── Modern UI Refinements ─────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.health-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1) !important;
}

/* Improved Typography & Spacing */
.font-heading { font-weight: 800; letter-spacing: -0.02em; }
.nav-link { letter-spacing: 0.01em; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ── Mobile Navigation Toggle & Drawer ───────────────────────────────── */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 250;
  margin-right: 12px;
  padding: 0;
}
.nav-mobile-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-mobile-toggle.open .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-mobile-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle.open .bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 230;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.nav-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Responsive adjustments for top nav */
@media (max-width: 900px) {
  :root {
    --nav-h: 70px;
  }
  .nav-mobile-toggle {
    display: flex;
  }
  .nav-brand {
    margin-right: 8px;
  }
  .nav-logo {
    max-height: 36px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 240;
    flex-direction: column;
    align-items: stretch !important;
    padding: calc(var(--nav-h) + 20px) 20px 20px;
    gap: 8px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    flex: none;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links .nav-link {
    display: flex !important;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
  }
  .nav-links .nav-link.active {
    border-left-color: var(--accent);
    background: var(--accent-light);
  }

  /* Compact top nav items on mobile */
  .nav-search-trigger {
    min-width: unset;
    padding: 6px;
    border-radius: 50%;
    background: none;
    border: none;
  }
  .nav-search-trigger:hover {
    background: var(--bg);
  }
  .nav-search-trigger .text,
  .nav-search-trigger .kb-hint {
    display: none !important;
  }

  .nav-user-btn {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    font-weight: 700;
  }
  .nav-user-btn .nav-user-name,
  .nav-user-btn .nav-role-badge {
    display: none !important;
  }
  .nav-avatar-initial {
    display: inline !important;
    font-size: 0.95rem;
  }
}

@media (min-width: 901px) {
  .nav-avatar-initial {
    display: none;
  }
}

/* ── Layout & Grid Responsiveness ────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ── Daily Command Center Layout ──────────────────────────────────────── */
.command-center-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
@media (max-width: 1024px) {
  .command-center-container {
    grid-template-columns: 1fr;
  }
}

.agenda-card {
  background: linear-gradient(135deg, #ffffff 0%, #fcfdfd 100%) !important;
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.agenda-header {
  border-bottom: 1px solid var(--border-light) !important;
  background: rgba(37, 99, 235, 0.02) !important;
  padding: 16px 20px !important;
}

.agenda-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-status {
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 700;
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.agenda-progress-container {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.agenda-progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.agenda-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.agenda-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--purple) 100%);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 6px;
}

.agenda-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: all var(--transition);
}

.agenda-row:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.agenda-checkbox {
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  user-select: none;
  transition: transform var(--transition-fast);
}

.agenda-checkbox:active {
  transform: scale(0.9);
}

.agenda-text {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition), text-decoration var(--transition);
}

.agenda-text.completed {
  color: var(--text-light);
  text-decoration: line-through;
}

.agenda-remove-btn {
  background: none;
  border: none;
  color: var(--text-light);
  opacity: 0.5;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
  line-height: 1;
  transition: all var(--transition-fast);
}

.agenda-remove-btn:hover {
  opacity: 1;
  color: var(--error);
  transform: scale(1.1);
}

.agenda-input-wrap {
  display: flex;
  gap: 10px;
}

.agenda-input-wrap input {
  flex: 1;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  transition: all var(--transition-fast);
}

.agenda-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.suggestions-popover-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease;
}

/* Timeline card style */
.timeline-card {
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.timeline-header {
  border-bottom: 1px solid var(--border-light) !important;
  background: transparent !important;
  padding: 16px 20px !important;
}

.timeline-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-v-line {
  position: relative;
  border-left: 2px dashed var(--border);
  margin-left: 12px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -37px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.timeline-content {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  transition: all var(--transition);
}

.timeline-content:hover {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.timeline-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.timeline-time-label {
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.timeline-text-plan {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-text-tasks, .timeline-text-notes {
  font-size: 0.82rem;
  margin-top: 8px;
}

.timeline-text-tasks strong, .timeline-text-notes strong {
  display: block;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.timeline-text-notes em {
  font-style: italic;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .timeline-v-line {
    margin-left: 8px;
    padding-left: 16px;
  }
  .timeline-marker {
    left: -27px;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }
}

/* ── Suggestion Chips hover effects ─────────────────────────────────── */
.suggestion-chip-select {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.suggestion-chip-select:hover {
  background: var(--surface-2) !important;
  border-color: var(--text-light) !important;
  transform: translateY(-1px);
}
.suggestion-chip-select.selected:hover {
  background: var(--accent-soft) !important;
}
