/* =============================================
   NEXTGEN SALES DASHBOARD — PREMIUM DESIGN
   Clean, conflict-free, professional & animated
   ============================================= */

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

/* ── CSS VARIABLES ─────────────────────────── */
:root {
  --bg-base:     #050c1a;
  --bg-surface:  #0a1628;
  --bg-glass:    rgba(255,255,255,0.05);
  --bg-glass-h:  rgba(255,255,255,0.09);
  --border:      rgba(255,255,255,0.08);
  --border-glow: rgba(56,189,248,0.3);

  --cyan:   #38bdf8;
  --purple: #a78bfa;
  --pink:   #f472b6;
  --green:  #34d399;
  --amber:  #fbbf24;
  --red:    #f87171;

  --text-primary:   #f0f6ff;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(56,189,248,0.2);

  --sidebar-w: 256px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Rajdhani', sans-serif; font-weight: 700; }
a { color: inherit; text-decoration: none; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }

/* ── ANIMATED BACKGROUND ───────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(56,189,248,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 85% 5%,  rgba(167,139,250,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 95%, rgba(244,114,182,0.08) 0%, transparent 55%),
    var(--bg-base);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ── VIEWER LAYOUT ─────────────────────────── */
.page-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── ADMIN LAYOUT ──────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(5,12,26,0.97);
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.sidebar a:hover {
  color: var(--text-primary);
  background: var(--bg-glass-h);
}

/* ── ADMIN CONTENT ─────────────────────────── */
.admin-content {
  flex: 1;
  padding: 36px 40px;
  min-width: 0;
}

/* ── VIEWER TITLE ──────────────────────────── */
.title {
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 36px 20px 24px;
  animation: titleReveal 0.8s ease forwards;
}

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

/* ── SECTION TITLES ────────────────────────── */
.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  padding-left: 14px;
  border-left: 3px solid var(--cyan);
  margin: 40px 24px 18px;
}

/* ── CARDS ─────────────────────────────────── */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: cardIn 0.5s ease both;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.card b {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.card span {
  font-family: 'Rajdhani', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--cyan);
  display: block;
  margin-top: 4px;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── GRID ──────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 0 24px;
}

/* ── KPI CARDS ─────────────────────────────── */
#kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 0 24px 8px;
}

.kpi-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: kpiIn 0.6s ease both;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.10s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.20s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }
.kpi-card:nth-child(6) { animation-delay: 0.30s; }
.kpi-card:nth-child(7) { animation-delay: 0.35s; }

.kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.6;
}

/* Subtle inner glow on hover */
.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.kpi-card:hover::before { opacity: 0.06; }

.kpi-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

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

.kpi-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(12px, 1.3vw, 17px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}

.kpi-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 700;
  line-height: 1;
}

/* ── TOP AGENT / TEAM ──────────────────────── */
.center-box {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  padding: 8px 24px 0;
  flex-wrap: wrap;
}

.highlight {
  flex: 1;
  min-width: 240px;
  max-width: 400px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.9;
  position: relative;
  overflow: hidden;
  animation: highlightIn 0.8s ease both;
  transition: transform var(--transition), border-color var(--transition);
}

.highlight:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.highlight b {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  display: block;
  color: var(--cyan);
}

.top-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 6px;
}

.highlight::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 5s infinite;
}

@keyframes shimmer {
  from { left: -100%; }
  to   { left: 150%; }
}

@keyframes highlightIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── TEAM CARDS ────────────────────────────── */
#teams { padding: 0 24px; }
#teams .card { text-align: center; font-size: 15px; line-height: 2.1; }
#teams .card b {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--cyan);
  display: block;
  margin-bottom: 8px;
}

/* ── AGENT TABLE ───────────────────────────── */
.table-wrapper {
  margin: 0 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead { background: rgba(5,12,26,0.95); position: sticky; top: 0; z-index: 1; }

th {
  padding: 14px 18px;
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

tbody tr { transition: background var(--transition); }
tbody tr:hover td { background: rgba(56,189,248,0.07); }
tbody tr:last-child td { border-bottom: none; }

/* Top 3 rows — improved contrast */
tr.agent-top1 td { background: rgba(52,211,153,0.10); color: #6ee7b7; font-weight: 600; }
tr.agent-top2 td { background: rgba(56,189,248,0.08); color: #7dd3fc; font-weight: 600; }
tr.agent-top3 td { background: rgba(251,191,36,0.08); color: #fcd34d; font-weight: 600; }
tr.agent-top1:hover td { background: rgba(52,211,153,0.16); }
tr.agent-top2:hover td { background: rgba(56,189,248,0.14); }
tr.agent-top3:hover td { background: rgba(251,191,36,0.14); }

/* ── FORMS ─────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

input::placeholder { color: var(--text-muted); }
select option { background: var(--bg-surface); color: var(--text-primary); }

input[type="color"] {
  padding: 3px;
  height: 42px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* ── BUTTONS ───────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0ea5e9);
  color: #020617;
  transition: var(--transition);
}

button:hover, .btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56,189,248,0.35);
}

.btn-danger {
  background: rgba(248,113,113,0.15);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.25);
}
.btn-danger:hover {
  background: rgba(248,113,113,0.25);
  box-shadow: none;
}

/* ── LOGIN PAGE ────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  backdrop-filter: blur(20px);
  animation: cardIn 0.6s ease;
}

.login-logo {
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

/* ── ALERTS ────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  animation: cardIn 0.3s ease;
}

.alert-success {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--green);
}

.alert-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--red);
}

/* ── BADGES ────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-admin   { background: rgba(167,139,250,0.2); color: var(--purple); }
.badge-sub     { background: rgba(56,189,248,0.2);  color: var(--cyan);   }
.badge-viewer  { background: rgba(148,163,184,0.2); color: var(--text-secondary); }
.badge-active  { background: rgba(52,211,153,0.2);  color: var(--green);  }
.badge-disabled{ background: rgba(248,113,113,0.2); color: var(--red);    }

/* ── FILTER BAR ────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.filter-bar label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar input[type="date"] { width: auto; }

/* ── SNAPSHOT BLOCKS ───────────────────────── */
.snapshot-block {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  animation: cardIn 0.4s ease;
}

.snapshot-block h2 {
  font-size: 17px;
  color: var(--cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.snapshot-block h2::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
}

.snapshot-block h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 10px;
}

.snapshot-block table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ── SETTINGS GRID ─────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 0;
}

.setting-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition);
}

.setting-card:hover { border-color: var(--border-glow); }

.setting-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   ══════════════════════════════════════════════ */

/* ── Tablet (≤900px) ───────────────────────── */
@media (max-width: 900px) {

  /* Admin layout: sidebar on top */
  .admin-layout { flex-direction: column; }

  /* Sidebar becomes a compact top nav bar */
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 14px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: rgba(5,12,26,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .sidebar h2 {
    width: 100%;
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    letter-spacing: 2px;
  }

  .sidebar a {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 7px 10px;
    gap: 6px;
    border-radius: 6px;
  }

  /* Slightly wider content area */
  .admin-content { padding: 20px 16px; }

  /* Viewer dashboard padding */
  .grid          { padding: 0 12px; gap: 14px; }
  #kpis          { padding: 0 12px 6px; gap: 12px; }
  .center-box    { padding: 0 12px; gap: 14px; }
  #teams         { padding: 0 12px; }
  .table-wrapper { margin: 0 12px; }
  .section-title { margin-left: 12px; margin-right: 12px; font-size: 16px; }

  /* Login card */
  .login-card { padding: 36px 28px; }
}

/* ── Mobile (≤640px) ───────────────────────── */
@media (max-width: 640px) {

  /* Viewer dashboard header */
  #dash-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 14px 12px;
  }
  #dash-header-spacer { display: none; }
  #dash-header-right  { width: 100%; justify-content: center; }
  #dash-header .title { font-size: clamp(22px, 7vw, 36px); padding: 0; }

  /* Current hour widget — full width on mobile */
  #cur-hour-widget {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
  }
  #chw-num      { font-size: 32px; }
  #chw-ring-wrap { width: 48px; height: 48px; flex-shrink: 0; }
  #chw-ring     { width: 48px; height: 48px; }

  /* KPI cards: 2-column grid on small screens */
  #kpis {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 10px 4px;
    gap: 8px;
  }
  .kpi-card { padding: 18px 12px; }
  .kpi-value { font-size: clamp(32px, 8vw, 52px); }
  .kpi-title { font-size: 10px; letter-spacing: 1px; }

  /* Top agent/team highlights: stack vertically */
  .center-box {
    flex-direction: column;
    align-items: stretch;
    padding: 0 10px;
    gap: 10px;
  }
  .highlight {
    min-width: unset;
    max-width: 100%;
    padding: 20px 20px;
    font-size: 15px;
  }
  .highlight b { font-size: clamp(18px, 5vw, 24px); }
  .top-icon    { font-size: 24px; margin-bottom: 4px; }

  /* Team cards: 2 per row */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 10px;
    gap: 8px;
  }
  .card { padding: 16px 14px; }

  /* Section titles */
  .section-title { font-size: 14px; margin: 28px 10px 12px; }

  /* Agent table: horizontal scroll with sticky first column */
  .table-wrapper {
    margin: 0 10px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table   { min-width: 400px; font-size: 13px; }
  th, td  { padding: 10px 12px; }

  /* Admin content */
  .admin-content { padding: 14px 10px; }

  /* Admin sidebar: icon-only compact nav */
  .sidebar {
    padding: 8px 10px;
    gap: 3px;
  }
  .sidebar h2 {
    font-size: 14px;
    padding-bottom: 6px;
    margin-bottom: 2px;
    letter-spacing: 1.5px;
  }
  .sidebar a {
    font-size: 11px;
    padding: 6px 8px;
    gap: 5px;
  }

  /* Filter bars */
  .filter-bar, .date-filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }
  .filter-bar label, .date-filter-bar label { font-size: 12px; }

  /* Forms */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select, textarea { font-size: 16px; } /* prevents iOS zoom */

  /* Login card */
  .login-card {
    margin: 16px;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .login-logo { font-size: 24px; }

  /* Snapshot blocks */
  .snapshot-block { padding: 16px; }
  .snapshot-block table { min-width: 320px; }

  /* Settings grid: single column */
  .settings-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Hourly table scroll */
  .hourly-table th, .hourly-table td { padding: 8px 10px; font-size: 12px; }

  /* Buttons */
  button, .btn { padding: 9px 14px; font-size: 13px; }
}

/* ── Small phones (≤400px) ─────────────────── */
@media (max-width: 400px) {
  #kpis { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpi-value { font-size: 28px; }
  .grid { grid-template-columns: 1fr; }
  #dash-header .title { font-size: 20px; letter-spacing: 2px; }
}
