/* ═══════════════════════════════════════════════════════════════
   AccountechHub — Core Styles + Theme System
   Compact Professional Design — Dynamic Responsive
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --primary-bg: #EEF2FF;
  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --info: #0891B2;
  --info-bg: #ECFEFF;

  --bg: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1E1B4B;
  --bg-sidebar-hover: #312E81;
  --bg-sidebar-active: #4338CA;
  --bg-input: #FFFFFF;
  --bg-hover: #F1F5F9;

  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-sidebar: #C7D2FE;
  --text-sidebar-active: #FFFFFF;

  --border: #E2E8F0;
  --border-focus: #4F46E5;
  --shadow: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 6px 16px rgba(0,0,0,0.08);
  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-width: 230px;
  --header-height: 52px;
  --transition: 0.15s ease;
  --font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  --z-modal: 1000;
  --z-toast: 2000;
  --z-loading: 3000;

  /* ── Fluid Type Scale ── */
  --font-size-2xs: clamp(10px, 0.65vw, 11px);
  --font-size-xs: clamp(11px, 0.7vw, 12px);
  --font-size-sm: clamp(12px, 0.75vw, 13px);
  --font-size-base: clamp(13px, 0.8vw, 14px);
  --font-size-lg: clamp(14px, 0.85vw, 15px);
  --font-size-xl: clamp(16px, 1vw, 18px);
  --font-size-2xl: clamp(18px, 1.2vw, 22px);

  /* ── Fluid Spacing ── */
  --space-xs: clamp(4px, 0.3vw, 6px);
  --space-sm: clamp(6px, 0.5vw, 8px);
  --space-md: clamp(10px, 0.8vw, 14px);
  --space-lg: clamp(14px, 1.1vw, 20px);
  --space-xl: clamp(18px, 1.4vw, 24px);
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-sidebar: #020617;
  --bg-sidebar-hover: #1E293B;
  --bg-sidebar-active: #334155;
  --bg-input: #334155;
  --bg-hover: #334155;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-sidebar: #94A3B8;
  --text-sidebar-active: #FFFFFF;
  --border: #334155;
  --shadow: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 6px 16px rgba(0,0,0,0.35);
  --primary-bg: #1E1B4B;
  --success-bg: #064E3B;
  --warning-bg: #78350F;
  --danger-bg: #7F1D1D;
  --info-bg: #164E63;
}

/* ── Theme Presets ── */
[data-theme-preset="ocean"] { --primary: #0284C7; --primary-light: #38BDF8; --primary-dark: #0369A1; --primary-bg: #E0F2FE; --bg-sidebar: #0C4A6E; --bg-sidebar-hover: #075985; --bg-sidebar-active: #0284C7; }
[data-theme-preset="forest"] { --primary: #059669; --primary-light: #34D399; --primary-dark: #047857; --primary-bg: #ECFDF5; --bg-sidebar: #064E3B; --bg-sidebar-hover: #065F46; --bg-sidebar-active: #059669; }
[data-theme-preset="sunset"] { --primary: #EA580C; --primary-light: #FB923C; --primary-dark: #C2410C; --primary-bg: #FFF7ED; --bg-sidebar: #7C2D12; --bg-sidebar-hover: #9A3412; --bg-sidebar-active: #EA580C; }
[data-theme-preset="rose"] { --primary: #DB2777; --primary-light: #F472B6; --primary-dark: #BE185D; --primary-bg: #FDF2F8; --bg-sidebar: #831843; --bg-sidebar-hover: #9D174D; --bg-sidebar-active: #DB2777; }
[data-theme-preset="amber"] { --primary: #D97706; --primary-light: #FBBF24; --primary-dark: #B45309; --primary-bg: #FFFBEB; --bg-sidebar: #78350F; --bg-sidebar-hover: #92400E; --bg-sidebar-active: #D97706; }
[data-theme-preset="slate"] { --primary: #475569; --primary-light: #94A3B8; --primary-dark: #334155; --primary-bg: #F8FAFC; --bg-sidebar: #1E293B; --bg-sidebar-hover: #334155; --bg-sidebar-active: #475569; }
[data-theme-preset="navy"] { --primary: #1E40AF; --primary-light: #60A5FA; --primary-dark: #1E3A8A; --primary-bg: #EFF6FF; --bg-sidebar: #172554; --bg-sidebar-hover: #1E3A8A; --bg-sidebar-active: #1E40AF; }
[data-theme-preset="emerald"] { --primary: #047857; --primary-light: #6EE7B7; --primary-dark: #065F46; --primary-bg: #D1FAE5; --bg-sidebar: #022C22; --bg-sidebar-hover: #064E3B; --bg-sidebar-active: #047857; }
[data-theme-preset="burgundy"] { --primary: #9F1239; --primary-light: #FB7185; --primary-dark: #881337; --primary-bg: #FFF1F2; --bg-sidebar: #4C0519; --bg-sidebar-hover: #881337; --bg-sidebar-active: #9F1239; }

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size-base);
  line-height: 1.55;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app { height: 100vh; display: flex; }

/* ── Loading ── */
.loading-screen {
  position: fixed; inset: 0; z-index: var(--z-loading);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-sidebar) 0%, var(--primary) 100%);
}
.loading-logo { text-align: center; color: white; }
.logo-icon {
  width: clamp(56px, 5vw, 72px); height: clamp(56px, 5vw, 72px);
  border-radius: 16px;
  background: rgba(255,255,255,0.15); display: flex;
  align-items: center; justify-content: center;
  font-size: clamp(18px, 1.5vw, 22px); font-weight: 800; margin: 0 auto var(--space-md);
  backdrop-filter: blur(10px);
}
.loading-logo h1 { font-size: var(--font-size-2xl); margin-bottom: var(--space-xs); }
.loading-logo p { opacity: 0.7; font-size: var(--font-size-base); }

/* ── Auth Pages ── */
.auth-container {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100vh;
  background: linear-gradient(135deg, var(--bg-sidebar) 0%, #312E81 50%, var(--primary) 100%);
}
.auth-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px); width: clamp(340px, 30vw, 420px); max-width: 95%;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: var(--space-xl); }
.auth-logo .logo-icon {
  background: var(--primary); color: white;
  width: clamp(48px, 4vw, 56px); height: clamp(48px, 4vw, 56px);
  font-size: clamp(16px, 1.2vw, 18px);
  border-radius: var(--radius-lg); margin: 0;
}
.auth-logo h1 { font-size: var(--font-size-xl); color: var(--text); margin-top: var(--space-sm); }
.auth-logo p { color: var(--text-secondary); font-size: var(--font-size-sm); }

.auth-form .form-group { margin-bottom: var(--space-md); }
.auth-form label, .form-group label {
  display: block; margin-bottom: var(--space-xs);
  font-weight: 600; font-size: var(--font-size-xs); color: var(--text-secondary);
}
.auth-form input, .form-input {
  width: 100%; padding: clamp(7px, 0.55vw, 9px) clamp(10px, 0.8vw, 12px);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: var(--font-size-base); background: var(--bg-input);
  transition: border var(--transition); font-family: inherit; color: var(--text);
}
.auth-form input:focus, .form-input:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.1);
}
.auth-form select, .form-select {
  width: 100%; padding: clamp(7px, 0.55vw, 9px) clamp(10px, 0.8vw, 12px);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: var(--font-size-base); background: var(--bg-input);
  font-family: inherit; cursor: pointer; color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: clamp(6px, 0.5vw, 9px) clamp(12px, 1vw, 16px);
  border-radius: var(--radius); font-size: var(--font-size-sm);
  font-weight: 600; cursor: pointer; border: none;
  transition: all var(--transition); font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-bg); }
.btn-full { width: 100%; }
.btn-sm { padding: clamp(4px, 0.3vw, 5px) clamp(8px, 0.6vw, 10px); font-size: var(--font-size-xs); }
.btn-xs { padding: 3px 6px; font-size: var(--font-size-2xs); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-warning { background: var(--warning); color: white; }
.btn-icon { padding: clamp(4px, 0.3vw, 6px); min-width: 28px; }

.auth-link { text-align: center; margin-top: var(--space-md); }
.auth-link a { color: var(--primary); text-decoration: none; font-size: var(--font-size-sm); cursor: pointer; }
.auth-link a:hover { text-decoration: underline; }

.verification-inputs {
  display: flex; gap: 6px; justify-content: center; direction: ltr; margin: var(--space-md) 0;
}
.verification-inputs input {
  width: clamp(38px, 3vw, 44px); height: clamp(44px, 3.5vw, 50px); text-align: center;
  font-size: clamp(18px, 1.5vw, 22px); font-weight: 700; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--bg-input); color: var(--text);
}

.alert {
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius);
  font-size: var(--font-size-xs); margin-bottom: var(--space-md);
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #A7F3D0; }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid #A5F3FC; }

/* ══════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════ */
.app-layout { display: flex; width: 100%; height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width); background: var(--bg-sidebar);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow-y: auto; transition: width var(--transition);
}
.sidebar-header {
  padding: var(--space-md); display: flex; align-items: center; gap: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header .logo-icon {
  width: clamp(30px, 2.5vw, 36px); height: clamp(30px, 2.5vw, 36px);
  font-size: var(--font-size-xs);
  background: var(--primary); color: white;
  border-radius: 8px; margin: 0;
}
.sidebar-header h2 { color: white; font-size: var(--font-size-sm); font-weight: 700; }

.sidebar-nav { padding: var(--space-sm); flex: 1; }
.sidebar-section { margin-bottom: var(--space-lg); }
.sidebar-section-title {
  color: var(--text-muted); font-size: var(--font-size-2xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 0 var(--space-sm); margin-bottom: var(--space-xs);
}
.nav-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: clamp(6px, 0.5vw, 8px) var(--space-sm); border-radius: var(--radius);
  color: var(--text-sidebar); cursor: pointer;
  transition: all var(--transition); font-size: var(--font-size-sm); margin-bottom: 1px;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: white; }
.nav-item.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); font-weight: 600; }
.nav-item .nav-icon { width: 18px; text-align: center; font-size: var(--font-size-base); }
.nav-item .badge {
  margin-inline-start: auto; background: var(--danger);
  color: white; font-size: var(--font-size-2xs); padding: 1px 6px;
  border-radius: 8px; font-weight: 600;
}

.sidebar-footer { padding: var(--space-sm) var(--space-md); border-top: 1px solid rgba(255,255,255,0.08); }
.user-profile {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm); border-radius: var(--radius); cursor: pointer;
  transition: background var(--transition);
}
.user-profile:hover { background: var(--bg-sidebar-hover); }
.user-avatar {
  width: clamp(28px, 2.2vw, 34px); height: clamp(28px, 2.2vw, 34px); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: var(--font-size-xs); flex-shrink: 0;
}
.user-profile .user-name { color: white; font-size: var(--font-size-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-profile .user-role { color: var(--text-sidebar); font-size: var(--font-size-2xs); }

/* ── Main Content ── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.top-header {
  height: var(--header-height); background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-lg); flex-shrink: 0;
}
.top-header h1 { font-size: var(--font-size-lg); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: var(--space-sm); }

.notification-btn {
  position: relative; background: none; border: none;
  cursor: pointer; font-size: var(--font-size-lg); padding: 6px;
  border-radius: var(--radius); color: var(--text-secondary);
}
.notification-btn:hover { background: var(--bg-hover); }
.notification-btn .notif-badge {
  position: absolute; top: 1px; inset-inline-end: 1px;
  width: 16px; height: 16px; background: var(--danger);
  color: white; font-size: 9px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.page-content { flex: 1; overflow-y: auto; padding: var(--space-lg); }

/* ── View Toggle ── */
.view-toggle {
  display: inline-flex; border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.view-toggle-btn {
  padding: clamp(4px, 0.3vw, 5px) clamp(10px, 0.8vw, 12px);
  cursor: pointer; font-size: var(--font-size-xs);
  background: var(--bg-card); color: var(--text-secondary); border: none;
  font-family: inherit; transition: all var(--transition);
  display: flex; align-items: center; gap: 3px;
}
.view-toggle-btn:not(:last-child) { border-inline-end: 1px solid var(--border); }
.view-toggle-btn.active { background: var(--primary); color: white; }
.view-toggle-btn:hover:not(.active) { background: var(--bg-hover); }

/* ── Page Header ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-lg); flex-wrap: wrap; gap: var(--space-sm);
}
.page-header h2 { font-size: var(--font-size-xl); font-weight: 700; }
.page-header-actions { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }

/* ══════════════════════════════════════
   STATS & CARDS
   ══════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 14vw, 200px), 1fr));
  gap: var(--space-md); margin-bottom: var(--space-lg);
}
.stat-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-md); box-shadow: var(--shadow);
  border-inline-start: 3px solid var(--primary);
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon { font-size: clamp(20px, 1.6vw, 24px); margin-bottom: var(--space-xs); }
.stat-card .stat-value { font-size: clamp(20px, 1.6vw, 26px); font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { font-size: var(--font-size-xs); color: var(--text-secondary); margin-top: 2px; }
.stat-card.success { border-right-color: var(--success); }
.stat-card.warning { border-right-color: var(--warning); }
.stat-card.danger { border-right-color: var(--danger); }
.stat-card.info { border-right-color: var(--info); }

/* ── Generic Cards ── */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: var(--font-size-base); font-weight: 700; }
.card-body { padding: var(--space-md) var(--space-lg); }
.card-body.no-padding { padding: 0; }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: var(--space-sm) var(--space-md); text-align: right;
  font-size: var(--font-size-2xs); font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border);
  font-size: var(--font-size-sm); vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Status Badges ── */
.badge-status {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 12px; font-size: var(--font-size-2xs); font-weight: 600;
}
.badge-planning { background: #DBEAFE; color: #1D4ED8; }
.badge-in_progress, .badge-in-progress { background: #FEF3C7; color: #B45309; }
.badge-review { background: #E0E7FF; color: #4338CA; }
.badge-completed { background: #D1FAE5; color: #065F46; }
.badge-on_hold { background: #F3F4F6; color: #4B5563; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }
.badge-todo { background: #F1F5F9; color: #475569; }
.badge-pending { background: #F1F5F9; color: #475569; }

.badge-priority {
  display: inline-flex; padding: 1px 6px; border-radius: 3px;
  font-size: var(--font-size-2xs); font-weight: 700;
}
.badge-high, .badge-urgent { background: #FEE2E2; color: #DC2626; }
.badge-medium { background: #FEF3C7; color: #D97706; }
.badge-low { background: #D1FAE5; color: #059669; }

[data-theme="dark"] .badge-planning { background: #1E3A5F; color: #60A5FA; }
[data-theme="dark"] .badge-in_progress { background: #4A3500; color: #FBBF24; }
[data-theme="dark"] .badge-review { background: #312E81; color: #A5B4FC; }
[data-theme="dark"] .badge-completed { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .badge-on_hold { background: #27272A; color: #A1A1AA; }
[data-theme="dark"] .badge-cancelled { background: #450A0A; color: #FCA5A5; }
[data-theme="dark"] .badge-todo, [data-theme="dark"] .badge-pending { background: #334155; color: #CBD5E1; }
[data-theme="dark"] .badge-high, [data-theme="dark"] .badge-urgent { background: #450A0A; color: #FCA5A5; }
[data-theme="dark"] .badge-medium { background: #451A03; color: #FCD34D; }
[data-theme="dark"] .badge-low { background: #052E16; color: #6EE7B7; }

/* ── Overdue ── */
.overdue { border-inline-start: 3px solid var(--danger) !important; }
.overdue .task-due-date { color: var(--danger); font-weight: 600; }
.overdue-text { color: var(--danger); font-weight: 600; }

/* ── Progress Bar ── */
.progress-bar {
  width: 100%; height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.3s ease;
}
.progress-text { font-size: var(--font-size-2xs); color: var(--text-secondary); margin-top: 2px; }

/* ══════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════ */
.dashboard-page { display: flex; flex-direction: column; min-height: 100%; }
.dashboard-page .stats-grid { flex-shrink: 0; }
.dashboard-page .dashboard-grid { flex: 1; min-height: 0; grid-template-rows: 1fr auto; }
.dashboard-page .dashboard-grid > .card:not(.full-width) { display: flex; flex-direction: column; min-height: 0; }
.dashboard-page .dashboard-grid > .card:not(.full-width) .card-header { flex-shrink: 0; }
.dashboard-page .dashboard-grid > .card:not(.full-width) .card-body { flex: 1; min-height: 0; overflow: hidden; }

.dashboard-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);
}
.dashboard-grid .full-width { grid-column: 1 / -1; }

.activity-list { list-style: none; }
.activity-item {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  padding: var(--space-sm) 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-avatar, .comment-avatar, .task-assignee, .member-avatar, .phase-member-avatar {
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; flex-shrink: 0; border-radius: 50%;
}
.activity-avatar { width: clamp(26px, 2vw, 30px); height: clamp(26px, 2vw, 30px); font-size: var(--font-size-2xs); }
.activity-content .activity-text { font-size: var(--font-size-xs); }
.activity-content .activity-time { font-size: var(--font-size-2xs); color: var(--text-muted); margin-top: 1px; }

.deadline-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) 0; border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: var(--radius); transition: background var(--transition);
}
.deadline-item:hover { background: var(--bg-hover); }
.deadline-item:last-child { border-bottom: none; }
.deadline-date {
  background: var(--primary-bg); color: var(--primary);
  padding: 3px 8px; border-radius: var(--radius);
  font-size: var(--font-size-2xs); font-weight: 700; white-space: nowrap;
}
.deadline-date.overdue { background: var(--danger-bg); color: var(--danger); }

/* ── Filters Bar ── */
.filters-bar {
  display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); flex-wrap: wrap; align-items: center;
}
.filters-bar select, .filters-bar input {
  padding: clamp(5px, 0.4vw, 7px) var(--space-sm); border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: var(--font-size-xs);
  background: var(--bg-card); font-family: inherit; color: var(--text);
}

/* ══════════════════════════════════════
   TASK BOARD (Kanban)
   ══════════════════════════════════════ */
.task-board {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm); min-height: 300px;
}
.task-column {
  background: var(--bg); border-radius: var(--radius);
  padding: var(--space-sm); min-height: 200px;
}
.task-column-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-xs) 2px; margin-bottom: var(--space-sm);
}
.task-column-header h4 { font-size: var(--font-size-xs); font-weight: 700; }
.task-column-header .count {
  background: var(--border); padding: 1px 6px;
  border-radius: 8px; font-size: var(--font-size-2xs); font-weight: 600;
}

.task-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-sm); margin-bottom: 6px; cursor: pointer;
  box-shadow: var(--shadow); border-inline-start: 3px solid transparent;
  transition: all var(--transition);
}
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.task-card.priority-high, .task-card.priority-urgent { border-right-color: var(--danger); }
.task-card.priority-medium { border-right-color: var(--warning); }
.task-card.priority-low { border-right-color: var(--success); }
.task-card .task-title { font-size: var(--font-size-xs); font-weight: 600; margin-bottom: var(--space-xs); }
.task-card .task-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--font-size-2xs); color: var(--text-muted);
}
.task-assignee { width: clamp(20px, 1.6vw, 24px); height: clamp(20px, 1.6vw, 24px); font-size: 9px; }
.task-card .task-due { font-size: var(--font-size-2xs); }
.task-card .task-due.overdue { color: var(--danger); font-weight: 600; }
.task-card .phase-count { font-size: var(--font-size-2xs); color: var(--primary); margin-top: var(--space-xs); }

/* ══════════════════════════════════════
   CLIENT CARDS
   ══════════════════════════════════════ */
.clients-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 20vw, 300px), 1fr)); gap: var(--space-md);
}
.client-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-md); box-shadow: var(--shadow);
  cursor: pointer; transition: all var(--transition);
  border: 1px solid var(--border);
}
.client-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.client-card .client-name { font-size: var(--font-size-base); font-weight: 700; margin-bottom: 2px; }
.client-card .client-name-ar { font-size: var(--font-size-sm); color: var(--text-secondary); margin-bottom: var(--space-sm); }
.client-card .client-info { display: flex; flex-direction: column; gap: 4px; font-size: var(--font-size-xs); color: var(--text-secondary); }
.client-card .client-info span { display: flex; align-items: center; gap: 4px; }
.client-card .client-stats {
  display: flex; gap: var(--space-md); margin-top: var(--space-sm);
  padding-top: var(--space-sm); border-top: 1px solid var(--border);
}
.client-card .client-stat { text-align: center; }
.client-card .client-stat .value { font-size: var(--font-size-base); font-weight: 700; color: var(--primary); }
.client-card .client-stat .label { font-size: var(--font-size-2xs); color: var(--text-muted); }

/* ══════════════════════════════════════
   MODAL
   ══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(0,0,0,0.45); display: flex;
  align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: var(--bg-card); border-radius: var(--radius-lg);
  width: clamp(400px, 38vw, 520px); max-width: 95%;
  max-height: 85vh;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-content.modal-lg { width: clamp(520px, 50vw, 680px); }
.modal-content.modal-xl { width: clamp(620px, 60vw, 820px); }
.modal-content.modal-fullscreen { width: 95vw; height: 92vh; max-width: none; max-height: none; }
.modal-content.modal-fullscreen .modal-body { padding: 0; overflow: hidden; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: var(--font-size-base); font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text-muted); padding: 2px 4px; border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }
.modal-body { padding: var(--space-lg); overflow-y: auto; flex: 1; }

/* ── Letter Editor ── */
.letter-editor { display: flex; flex-direction: column; height: 100%; }
.letter-ribbon { flex-shrink: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.ribbon-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px var(--space-lg); }
.ribbon-tabs-row { justify-content: space-between; border-bottom: 1px solid var(--border); }
.ribbon-format-row { gap: 2px; padding-block: 4px; background: var(--bg); }
.ribbon-format-row .ql-formats { display: inline-flex; align-items: center; gap: 2px; padding-inline: 4px; border-inline-end: 1px solid var(--border); }
.ribbon-format-row .ql-formats:last-child { border-inline-end: none; }
.ribbon-format-row button {
  width: 28px; height: 28px; border: none; background: transparent; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; padding: 0;
}
.ribbon-format-row button:hover { background: var(--bg-hover); }
.ribbon-format-row button.ql-active, .ribbon-format-row button:active { background: var(--primary-bg); color: var(--primary); }
.ribbon-format-row .ql-bold::before { content: 'B'; font-weight: 700; }
.ribbon-format-row .ql-italic::before { content: 'I'; font-style: italic; }
.ribbon-format-row .ql-underline::before { content: 'U'; text-decoration: underline; }
.ribbon-format-row .ql-strike::before { content: 'S'; text-decoration: line-through; }
.ribbon-format-row .ql-blockquote::before { content: '"'; font-size: 18px; font-weight: 700; }
.ribbon-format-row .ql-script[value="sub"]::before { content: 'X₂'; font-size: 11px; }
.ribbon-format-row .ql-script[value="super"]::before { content: 'X²'; font-size: 11px; }
.ribbon-format-row .ql-link::before { content: '🔗'; font-size: 13px; }
.ribbon-format-row .ql-clean::before { content: '🧹'; font-size: 13px; }
.ribbon-format-row .ql-list[value="ordered"]::before { content: '1.'; font-size: 12px; font-weight: 600; }
.ribbon-format-row .ql-list[value="bullet"]::before { content: '•'; font-size: 18px; }
.ribbon-format-row .ql-indent[value="-1"]::before { content: '←'; font-size: 14px; }
.ribbon-format-row .ql-indent[value="+1"]::before { content: '→'; font-size: 14px; }
.ribbon-format-row .ql-direction::before { content: '⇆'; font-size: 14px; }
.ribbon-format-row select {
  height: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--text-primary); font-size: 12px; padding: 0 4px; cursor: pointer; min-width: 60px;
}
.ribbon-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.letter-toolbar-tabs, .letter-toolbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.letter-blocks, .letter-page-setup { flex: 1; overflow-y: auto; padding: var(--space-lg); }
.letter-block {
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; background: var(--bg-card);
  transition: border-color 0.15s;
}
.letter-block-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-bg); }
.letter-block-controls {
  display: flex; align-items: center; gap: 4px; padding: 4px 8px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.letter-block-type { font-size: 11px; color: var(--text-secondary); flex: 1; }
.quill-block-container .ql-editor { min-height: 90px; font-size: 13px; }
.quill-block-container .ql-toolbar { display: none; }
.quill-block-container.quill-mini .ql-editor { min-height: 50px; }
.letter-table-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--border); }
.letter-table-editor { width: 100%; border-collapse: collapse; }
.letter-table-editor td { border: 1px solid var(--border); padding: 2px; }
.letter-table-editor td input {
  width: 100%; border: none; background: transparent; padding: 6px; font-size: 13px;
  font-family: inherit; color: var(--text-primary); text-align: inherit;
}
.letter-table-editor td input:focus { outline: 1.5px solid var(--primary); background: var(--bg-hover); }
.modal-footer {
  padding: var(--space-sm) var(--space-lg); border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: var(--space-xs);
}

.form-group { margin-bottom: var(--space-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-md); }
textarea.form-input { resize: vertical; min-height: 60px; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: var(--space-lg); inset-inline-end: var(--space-lg); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-xs);
}
.toast {
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius);
  color: white; font-size: var(--font-size-sm); font-weight: 500;
  box-shadow: var(--shadow-lg); animation: slideUp 0.25s ease;
  display: flex; align-items: center; gap: 6px; min-width: 240px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
.toast-warning { background: var(--warning); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Empty State ── */
.empty-state { text-align: center; padding: var(--space-xl) var(--space-lg); color: var(--text-muted); }
.empty-state .empty-icon { font-size: clamp(32px, 3vw, 40px); margin-bottom: var(--space-md); }
.empty-state h3 { font-size: var(--font-size-base); color: var(--text-secondary); margin-bottom: var(--space-xs); }
.empty-state p { font-size: var(--font-size-sm); margin-bottom: var(--space-md); }

/* ══════════════════════════════════════
   TASK DETAIL & COMMENTS
   ══════════════════════════════════════ */
.task-detail { display: flex; flex-direction: column; gap: var(--space-md); }
.task-detail .detail-row { display: flex; align-items: center; gap: var(--space-sm); }
.task-detail .detail-label { font-size: var(--font-size-xs); color: var(--text-secondary); font-weight: 600; min-width: 90px; }

.comments-section { margin-top: var(--space-lg); }
.comments-section h4 { font-size: var(--font-size-sm); font-weight: 700; margin-bottom: var(--space-sm); }
.comment-item {
  display: flex; gap: var(--space-sm); margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: clamp(26px, 2vw, 30px); height: clamp(26px, 2vw, 30px); font-size: var(--font-size-2xs); }
.comment-header { display: flex; gap: 6px; align-items: baseline; margin-bottom: 2px; }
.comment-author { font-weight: 600; font-size: var(--font-size-xs); }
.comment-time { font-size: var(--font-size-2xs); color: var(--text-muted); }
.comment-text { font-size: var(--font-size-xs); line-height: 1.5; }
.comment-form { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }
.comment-form input { flex: 1; }

/* ══════════════════════════════════════
   PHASE TIMELINE
   ══════════════════════════════════════ */
.phases-section { margin-top: var(--space-lg); border-top: 1px solid var(--border); padding-top: var(--space-md); }
.phases-section h4 { font-size: var(--font-size-sm); font-weight: 700; margin-bottom: var(--space-md); display: flex; align-items: center; justify-content: space-between; }

.phase-timeline { position: relative; padding-inline-start: 20px; }
.phase-timeline::before {
  content: ''; position: absolute; inset-inline-start: 6px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.phase-item {
  position: relative; margin-bottom: var(--space-md); padding: var(--space-md);
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--border); transition: all var(--transition);
}
.phase-item:hover { border-color: var(--primary-light); }
.phase-item::before {
  content: ''; position: absolute; inset-inline-start: -20px; top: 16px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--primary);
}
.phase-item.phase-completed::before { background: var(--success); border-color: var(--success); }
.phase-item.phase-in_progress::before { background: var(--warning); border-color: var(--warning); }
.phase-item.phase-pending::before { background: var(--bg-card); border-color: var(--border); }

.phase-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-xs); }
.phase-title { font-weight: 700; font-size: var(--font-size-sm); }
.phase-dates { font-size: var(--font-size-2xs); color: var(--text-muted); margin-top: 2px; }
.phase-dates.overdue { color: var(--danger); font-weight: 600; }
.phase-desc { font-size: var(--font-size-xs); color: var(--text-secondary); margin-bottom: var(--space-xs); }

.phase-members-row {
  display: flex; align-items: center; gap: 3px; margin-top: var(--space-xs); flex-wrap: wrap;
}
.phase-member-avatar { width: clamp(22px, 1.8vw, 26px); height: clamp(22px, 1.8vw, 26px); font-size: 9px; cursor: pointer; }
.phase-member-avatar:hover { transform: scale(1.1); }
.phase-add-member-btn {
  width: clamp(22px, 1.8vw, 26px); height: clamp(22px, 1.8vw, 26px); border-radius: 50%; border: 1.5px dashed var(--border);
  background: transparent; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  transition: all var(--transition);
}
.phase-add-member-btn:hover { border-color: var(--primary); color: var(--primary); }

.phase-actions { display: flex; gap: 3px; }

/* ══════════════════════════════════════
   TEAM
   ══════════════════════════════════════ */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 16vw, 240px), 1fr)); gap: var(--space-md);
}
.team-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-md); text-align: center; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.team-card .member-avatar { width: clamp(40px, 3.5vw, 50px); height: clamp(40px, 3.5vw, 50px); font-size: var(--font-size-lg); margin: 0 auto var(--space-sm); }
.team-card .member-name { font-size: var(--font-size-sm); font-weight: 700; }
.team-card .member-email { font-size: var(--font-size-2xs); color: var(--text-secondary); margin: 2px 0; }
.team-card .member-role {
  display: inline-block; padding: 2px 10px;
  background: var(--primary-bg); color: var(--primary);
  border-radius: 10px; font-size: var(--font-size-2xs); font-weight: 600; margin: var(--space-xs) 0;
}
.team-card .member-stats {
  display: flex; justify-content: center; gap: var(--space-lg);
  margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--border);
}
.team-card .member-stat .value { font-size: var(--font-size-base); font-weight: 700; font-variant-numeric: tabular-nums; }
.team-card .member-stat .label { font-size: var(--font-size-2xs); color: var(--text-muted); }
.team-card .member-actions { margin-top: var(--space-sm); display: flex; gap: var(--space-xs); justify-content: center; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-inline-start: 5px; }
.status-dot.active { background: var(--success); }
.status-dot.inactive { background: var(--text-muted); }

/* ══════════════════════════════════════
   SETTINGS
   ══════════════════════════════════════ */
.settings-section {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-lg); margin-bottom: var(--space-md); box-shadow: var(--shadow);
}
.settings-section h3 {
  font-size: var(--font-size-base); font-weight: 700; margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border);
}

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: var(--space-md); overflow-x: auto; }
.tab {
  padding: var(--space-sm) var(--space-md); cursor: pointer; font-size: var(--font-size-sm);
  font-weight: 600; color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Engagement Header ── */
.engagement-header-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-lg); margin-bottom: var(--space-md); box-shadow: var(--shadow);
}
.engagement-header-card .eng-title { font-size: var(--font-size-xl); font-weight: 800; margin-bottom: var(--space-xs); }
.engagement-header-card .eng-meta {
  display: flex; gap: var(--space-lg); flex-wrap: wrap; color: var(--text-secondary); font-size: var(--font-size-sm);
}
.engagement-header-card .eng-meta span { display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════
   THEME BUILDER
   ══════════════════════════════════════ */
.theme-builder { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

.theme-presets {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(90px, 8vw, 110px), 1fr)); gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.theme-preset-card {
  padding: var(--space-sm) var(--space-xs); border-radius: var(--radius); text-align: center;
  cursor: pointer; border: 2px solid var(--border); transition: all var(--transition);
}
.theme-preset-card:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.theme-preset-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,0.15); }
.theme-preset-card .preset-colors {
  display: flex; gap: 3px; justify-content: center; margin-bottom: var(--space-xs);
}
.theme-preset-card .preset-dot { width: 16px; height: 16px; border-radius: 50%; }
.theme-preset-card .preset-name { font-size: var(--font-size-2xs); font-weight: 600; }

.color-picker-group { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.color-picker-group label { min-width: 100px; font-size: var(--font-size-xs); font-weight: 600; }
.color-picker-group input[type="color"] {
  width: 32px; height: 28px; border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; padding: 2px;
}
.color-picker-group .color-value {
  font-size: var(--font-size-2xs); color: var(--text-muted); font-family: monospace; direction: ltr;
}

.slider-group { margin-bottom: var(--space-md); }
.slider-group label { display: flex; justify-content: space-between; margin-bottom: var(--space-xs); font-weight: 600; font-size: var(--font-size-xs); }
.slider-group input[type="range"] { width: 100%; accent-color: var(--primary); height: 4px; }
.slider-value { font-weight: 700; color: var(--primary); }

.font-family-select { width: 100%; }

/* ── Toggle Switch ── */
.toggle { position: relative; display: inline-block; width: 38px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border); border-radius: 10px; transition: var(--transition);
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; bottom: 2px; inset-inline-start: 2px; transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(-18px); }

/* ── Add Member ── */
.add-member-section {
  background: var(--bg); border-radius: var(--radius);
  padding: var(--space-md); margin-top: var(--space-md); border: 1px solid var(--border);
}
.add-member-section h4 { font-size: var(--font-size-sm); font-weight: 700; margin-bottom: var(--space-sm); }
.member-search-list { max-height: 180px; overflow-y: auto; }
.member-search-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm); border-radius: var(--radius); cursor: pointer;
  transition: background var(--transition);
}
.member-search-item:hover { background: var(--bg-hover); }
.member-search-item .member-search-avatar { width: 28px; height: 28px; font-size: var(--font-size-2xs); }
.hoverable-label:hover { background: var(--bg-hover); }

/* ── Theme Preview ── */
.theme-preview {
  background: var(--bg); border-radius: var(--radius);
  padding: var(--space-md); border: 1px solid var(--border);
  margin-top: var(--space-md);
}
.theme-preview-sidebar {
  background: var(--bg-sidebar); border-radius: var(--radius);
  padding: var(--space-sm); color: var(--text-sidebar); font-size: var(--font-size-xs);
  margin-bottom: var(--space-sm);
}
.theme-preview-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: var(--space-sm); border: 1px solid var(--border);
}

/* ══════════════════════════════════════
   CHECKLIST & ATTACHMENTS & CONVERTER
   ══════════════════════════════════════ */
.checklist-item {
  display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.checklist-item.checked .checklist-title { text-decoration: line-through; color: var(--text-muted); }
.checklist-title { flex: 1; font-size: var(--font-size-xs); }
.checklist-progress { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); font-size: var(--font-size-xs); color: var(--text-secondary); }

.attachment-item {
  display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm);
  background: var(--bg-hover); border-radius: var(--radius); margin-bottom: 4px;
}
.attachment-icon { font-size: var(--font-size-lg); flex-shrink: 0; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-name { font-size: var(--font-size-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-meta { font-size: var(--font-size-2xs); color: var(--text-muted); }
.attachment-actions { display: flex; gap: 3px; flex-shrink: 0; }

.converter-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-lg); box-shadow: var(--shadow);
}
.converter-result {
  background: var(--primary-bg); border: 1px solid var(--primary-light); border-radius: var(--radius);
  padding: var(--space-md); text-align: center; font-size: var(--font-size-lg); font-weight: 600; color: var(--primary);
}

/* ══════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Table Responsive ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════ */

/* Large screens (< 1400px) */
@media (max-width: 1400px) {
  :root { --sidebar-width: 210px; }
}

/* Medium-large (< 1200px) */
@media (max-width: 1200px) {
  .task-board { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .theme-builder { grid-template-columns: 1fr; }
}

/* Tablets (< 900px) */
@media (max-width: 900px) {
  :root { --sidebar-width: 190px; }
  .sidebar-header h2 { font-size: var(--font-size-xs); }
  .form-row, .form-row-3 { display: flex; flex-direction: column; }
  .form-row > *, .form-row-3 > * { width: 100%; }
  .task-board { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-content { width: 95% !important; max-width: 95% !important; }
  .engagement-header-card .eng-meta { gap: var(--space-sm); font-size: var(--font-size-xs); }
  .clients-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* Small screens (< 700px) */
@media (max-width: 700px) {
  .sidebar { display: none; }
  .main-content { margin-inline-start: 0 !important; }
  .stats-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: var(--space-sm); align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .engagement-header-card .eng-meta { flex-direction: column; gap: var(--space-xs); }
}

@media print {
  .sidebar, .page-header-actions, .filters-bar, .nav-item,
  .notification-btn, .btn, .toggle, .modal-overlay,
  #toast-container, .fab, .view-toggle { display: none !important; }
  .main-content { margin: 0 !important; padding: 0 !important; }
  .page-header { padding: var(--space-sm) 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { background: white; color: black; font-size: 11pt; }
  a { text-decoration: none; color: inherit; }
}
