/* ============================================
   LeadFlow CRM - Global Styles
   Style: Modern dark sidebar, clean cards
   Font: DM Sans + DM Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg-dark:    #0F1117;
  --bg-card:    #1A1D27;
  --bg-input:   #232635;
  --sidebar-w:  240px;
  --border:     rgba(255,255,255,0.08);
  --border-act: rgba(99,102,241,0.5);

  --text-primary:   #F0F0F8;
  --text-secondary: #9094A8;
  --text-muted:     #5A5E72;

  --accent:      #6366F1;
  --accent-glow: rgba(99,102,241,0.25);
  --accent-2:    #818CF8;
  --green:       #22C55E;
  --red:         #EF4444;
  --yellow:      #F59E0B;
  --blue:        #3B82F6;
  --purple:      #A855F7;
  --pink:        #EC4899;
  --teal:        #14B8A6;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 12px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 12px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-glow);
  color: var(--accent-2);
  border: 1px solid var(--border-act);
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.user-name { font-size: 0.8rem; font-weight: 600; }
.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 1rem;
  transition: color 0.15s;
}

.logout-btn:hover { color: var(--red); }

/* ── Main content ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,17,23,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.main-content {
  padding: 24px 28px;
  flex: 1;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover { transform: translateY(-2px); border-color: var(--border-act); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--accent));
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-family: 'DM Mono', monospace;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.stat-change {
  font-size: 0.75rem;
  margin-top: 8px;
  font-weight: 600;
}

.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger  { background: var(--red);   color: #fff; border-color: var(--red); }
.btn-warning { background: var(--yellow);color: #111; border-color: var(--yellow); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-icon { padding: 7px; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: rgba(255,255,255,0.03);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }

tbody td {
  padding: 12px 14px;
  vertical-align: middle;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-new         { background: rgba(99,102,241,0.15); color: var(--accent-2); border: 1px solid rgba(99,102,241,0.3); }
.badge-contacted   { background: rgba(59,130,246,0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.3); }
.badge-qualified   { background: rgba(20,184,166,0.15); color: #2DD4BF; border: 1px solid rgba(20,184,166,0.3); }
.badge-proposal    { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.badge-negotiation { background: rgba(168,85,247,0.15); color: #C084FC; border: 1px solid rgba(168,85,247,0.3); }
.badge-won         { background: rgba(34,197,94,0.15);  color: #4ADE80; border: 1px solid rgba(34,197,94,0.3); }
.badge-lost        { background: rgba(239,68,68,0.15);  color: #F87171; border: 1px solid rgba(239,68,68,0.3); }

.priority {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority::before { content: '●  '; font-size: 0.6rem; }
.priority-low    { color: var(--text-muted); }
.priority-medium { color: var(--yellow); }
.priority-high   { color: var(--red); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-label span { color: var(--red); }

.form-control,
.form-select,
textarea.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239094A8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.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.73rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 0.73rem;
  color: var(--red);
  margin-top: 5px;
}

/* ── Flash messages ── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

.flash span {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.flash-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #4ADE80; }
.flash-success span { background: var(--green); color: #fff; }
.flash-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #F87171; }
.flash-error span { background: var(--red); color: #fff; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ── Activity Feed ── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-body { flex: 1; }

.activity-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.activity-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Pipeline ── */
.pipeline {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-col {
  min-width: 220px;
  max-width: 240px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  flex-shrink: 0;
}

.pipeline-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pipeline-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-count {
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.pipeline-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.pipeline-card-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.pipeline-card-sub { font-size: 0.75rem; color: var(--text-muted); }
.pipeline-card-value { font-size: 0.8rem; color: var(--green); font-weight: 600; margin-top: 8px; font-family: 'DM Mono', monospace; }

/* ── Filters bar ── */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-input-wrap .form-control { padding-left: 32px; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  place-items: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: grid; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

/* ── Grids ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }

/* ── Lead detail ── */
.lead-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.lead-status-bar {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}

.status-step {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.status-step.active { background: var(--accent); }
.status-step.done   { background: var(--green); }
.status-step.lost   { background: var(--red); }

/* ── Progress bar ── */
.progress-bar-wrap {
  background: var(--bg-input);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.5s ease;
}

/* ── Contact info box ── */
.info-grid {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-icon { font-size: 1rem; width: 20px; margin-top: 2px; }
.info-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.info-value { font-size: 0.875rem; color: var(--text-primary); }
.info-value a { color: var(--accent-2); text-decoration: none; }
.info-value a:hover { text-decoration: underline; }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 40%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(168,85,247,0.08) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 0 24px var(--accent-glow);
}

.login-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; }
.login-sub { font-size: 1rem; color: var(--text-muted); margin-top: 3px; }

.login-form h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.login-form p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }

.demo-accounts {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 20px;
}

.demo-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

.demo-btn {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-btn:last-child { margin-bottom: 0; }
.demo-btn:hover { border-color: var(--accent); }
.demo-btn-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.konverge-mini-logo {
  width: 50px;
}

.forgot-pwd {
  float: right; 
  margin-bottom: 10px; 
  color:aliceblue; 
  font-size: 0.8rem;
}

.action-div {
  display:flex;
  gap:6px;
  align-items:center
}

.pagination-container {
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:15px;
  margin-top:20px;
  padding:5px 10px;
  background:#1a1d27;
  border:1px solid #1a1d27;
  border-radius:8px;
}

.pagination-info,
.pagination-page-info {
  font-size: 0.85rem;
  color: #fff;
}

.pagination-wrap {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.pagination-btn {
  padding:3px 14px;
  border:1px solid #1a1d27;
  text-decoration:none;
  border-radius:6px;
  background:#1a1d27;
  color:#fff;
  transition:0.2s;
  font-size:0.85rem;
}

.pagination-btn:hover {
  background:#12151f;
}

.pagination-btn.active {
  background:#4e587b;
  color:#fff;
  border-color:#4e587b;
}

.demo-btn-info { flex: 1; }
.demo-btn-name { font-size: 0.8rem; font-weight: 600; }
.demo-btn-role { font-size: 0.7rem; color: var(--text-muted); }
.demo-btn-tag { font-size: 0.7rem; color: var(--text-muted); font-family: 'DM Mono', monospace; }

/* ── Dashboard chart bars ── */
.chart-bar-wrap { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
.chart-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; transition: height 0.6s ease; }
.chart-bar-label { font-size: 0.65rem; color: var(--text-muted); text-align: center; }
.chart-bar-val { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }

/* ── Utility ── */
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent-2); }
.text-sm     { font-size: 0.8rem; }
.text-xs     { font-size: 0.72rem; }
.text-center { text-align: center; }
.font-mono   { font-family: 'DM Mono', monospace; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .main-content { padding: 16px; }
  .topbar { padding: 14px 16px; }
}

@media (max-width: 600px) {
  .three-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

