/* =========================================================
   Sarswat Admin Panel — Premium Admin UI
   ========================================================= */

:root {
  --c-bg: #f4f6fb;
  --c-card: #ffffff;
  --c-text: #0f172a;
  --c-muted: #64748b;
  --c-border: #e6e9f2;
  --c-primary: #1e3a8a;
  --c-primary-2: #2848b3;
  --c-accent: #06b6d4;
  --c-accent-2: #6366f1;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;

  --grad-primary: linear-gradient(135deg, #1e3a8a 0%, #2848b3 50%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff 0%, #e0f7ff 100%);
  --grad-dark: linear-gradient(180deg, #0b1f4a 0%, #1e3a8a 100%);

  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(30, 58, 138, .15);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --sidebar-w: 250px;
  --topbar-h: 68px;

  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea, button { font-family: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; color: var(--c-text); }
p { margin: 0; }
img { max-width: 100%; display: block; }

/* ===== LOGIN SCREEN ===== */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 500px at 80% 0%, rgba(6,182,212,.18), transparent 60%),
    radial-gradient(800px 400px at 20% 100%, rgba(99,102,241,.18), transparent 60%),
    var(--grad-dark);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, .98);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-primary);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.login-logo .mark {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-primary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
}
.login-logo .text { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.1; }
.login-logo .text small { display: block; font-weight: 500; font-size: 11px; color: var(--c-muted); letter-spacing: .8px; text-transform: uppercase; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .lead { color: var(--c-muted); font-size: 14px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 14px; }
.login-card label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.login-card input {
  width: 100%; padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: #fff; font-size: 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.login-card input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.login-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fef2f2; color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 13px;
  font-weight: 500;
}
.login-hint {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  font-size: 12px; color: var(--c-muted);
  text-align: center;
}
.login-hint code { background: #fff; padding: 2px 6px; border-radius: 4px; font-size: 11px; color: var(--c-primary); font-weight: 600; }

/* ===== APP LAYOUT ===== */
.app { display: none; min-height: 100vh; }
.app.active { display: block; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--grad-dark);
  color: #cbd5e1;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease);
}
.sidebar-head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-head .mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}
.sidebar-head .text { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #fff; line-height: 1.1; }
.sidebar-head .text small { display: block; font-weight: 500; font-size: 10px; color: rgba(255,255,255,.6); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.side-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.side-nav .label {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 14px 12px 8px;
}
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .2s var(--ease), color .2s var(--ease);
  cursor: pointer;
}
.side-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(6,182,212,.18); color: #fff; box-shadow: inset 3px 0 0 var(--c-accent); }

.sidebar-foot {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.btn-logout {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.25);
  font-weight: 600;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s var(--ease);
}
.btn-logout:hover { background: rgba(239,68,68,.22); color: #fff; }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  z-index: 30;
}
.topbar h2 { font-size: 20px; }
.topbar .tools { display: flex; align-items: center; gap: 10px; }
.btn-mini-menu {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-bg);
  align-items: center; justify-content: center;
}
.btn-mini-menu span {
  width: 18px; height: 2px; background: var(--c-text);
  position: relative;
}
.btn-mini-menu span::before, .btn-mini-menu span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--c-text);
}
.btn-mini-menu span::before { top: -6px; }
.btn-mini-menu span::after { top: 6px; }
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: var(--c-bg);
}
.user-pill .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}
.user-pill span { font-size: 13px; font-weight: 500; }

.content {
  padding: 26px 28px 60px;
  flex: 1;
}

/* ===== PAGES ===== */
.page { display: none; animation: fadeIn .3s var(--ease); }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 26px; }
.page-head .sub { color: var(--c-muted); font-size: 14px; margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 18px rgba(30,58,138,.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30,58,138,.35); }
.btn-outline { background: #fff; color: var(--c-primary); border-color: var(--c-border); }
.btn-outline:hover { border-color: var(--c-primary); }
.btn-danger { background: #fff; color: var(--c-danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-icon-only { padding: 8px; width: 34px; height: 34px; }

/* ===== CARDS ===== */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 17px; }
.card-head .sub { font-size: 13px; color: var(--c-muted); margin-top: 2px; }

/* ===== STAT CARDS ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.stat-card .ico svg { width: 22px; height: 22px; color: #fff; }
.stat-card .ico.b1 { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.stat-card .ico.b2 { background: linear-gradient(135deg, #f97316, #ec4899); }
.stat-card .ico.b3 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.stat-card .ico.b4 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.stat-card .label { font-size: 12px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-card .num { font-family: var(--font-head); font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat-card .delta { font-size: 12px; color: var(--c-success); font-weight: 600; margin-top: 4px; }
.stat-card .delta.neg { color: var(--c-danger); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--c-border); background: #fff; }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data thead {
  background: var(--c-bg);
}
table.data th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-muted);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
}
table.data td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(238, 242, 255, .4); }
table.data .empty {
  text-align: center;
  color: var(--c-muted);
  padding: 50px 20px !important;
  font-size: 14px;
}

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.tag.new { background: #fef3c7; color: #92400e; }
.tag.contacted { background: #dbeafe; color: #1e40af; }
.tag.converted { background: #d1fae5; color: #065f46; }
.tag.lost { background: #fee2e2; color: #991b1b; }

.row-actions { display: flex; gap: 6px; }
.row-actions button {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-muted);
  transition: all .15s var(--ease);
}
.row-actions button:hover { color: var(--c-primary); border-color: var(--c-primary); transform: translateY(-1px); }
.row-actions button.del:hover { color: var(--c-danger); border-color: var(--c-danger); }
.row-actions button.ok:hover { color: var(--c-success); border-color: var(--c-success); }
.row-actions button svg { width: 14px; height: 14px; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-bar .search {
  flex: 1;
  position: relative;
  min-width: 220px;
}
.filter-bar .search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: #fff;
  font-size: 14px;
}
.filter-bar .search svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-muted);
}
.filter-bar .search input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.filter-bar select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: #fff;
  font-size: 14px;
}

/* ===== FORMS ===== */
.form-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.form-grid.cols-1 { grid-template-columns: 1fr; }
.field label {
  display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--c-text);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: #fff;
  font-size: 14px;
  color: var(--c-text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15);
}
.field .hint { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.form-actions {
  display: flex; gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

/* ===== ITEM LIST (services / pricing) ===== */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.item-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
  display: flex;
  flex-direction: column;
}
.item-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.item-card .top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.item-card .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  color: var(--c-primary);
  font-size: 18px;
  flex-shrink: 0;
}
.item-card h4 { font-size: 16px; }
.item-card p { font-size: 13px; color: var(--c-muted); flex: 1; margin-bottom: 12px; }
.item-card .price { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--c-primary); margin-bottom: 6px; }
.item-card ul { margin: 8px 0 14px; padding: 0; }
.item-card ul li {
  font-size: 13px; padding: 4px 0;
  color: var(--c-text);
  display: flex; align-items: center; gap: 6px;
}
.item-card ul li::before { content: "✓"; color: var(--c-success); font-weight: 700; }
.item-card .actions { display: flex; gap: 6px; margin-top: auto; }

/* ===== MODAL ===== */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(11, 31, 74, .55);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-back.show { display: flex; animation: fadeIn .25s var(--ease); }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%; max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: popIn .3s var(--ease);
}
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-head h3 { font-size: 18px; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: 18px;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--c-danger); color: #fff; }
.modal-body { padding: 22px 24px; }

/* ===== TOAST ===== */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 200;
  display: flex; flex-direction: column;
  gap: 10px;
}
.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s var(--ease);
  max-width: 360px;
}
.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-danger); }
.toast.info    { background: var(--c-primary); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== LEAD DETAIL ===== */
.lead-detail { display: grid; gap: 14px; }
.lead-detail .row {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 14px;
  background: var(--c-bg);
  border-radius: 10px;
}
.lead-detail .row .k { font-weight: 600; min-width: 110px; font-size: 13px; color: var(--c-muted); }
.lead-detail .row .v { font-size: 14px; }
.lead-detail .row .v a { color: var(--c-primary); text-decoration: underline; }

/* ===== RECENT LEADS LIST ===== */
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--c-bg);
}
.recent-row .ava {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.recent-row .info strong { display: block; font-size: 14px; }
.recent-row .info span { display: block; font-size: 12px; color: var(--c-muted); }
.recent-row .meta { font-size: 12px; color: var(--c-muted); text-align: right; }

/* ===== TWO COLUMN ===== */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

/* ===== FEATURES INPUT ===== */
.feat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.feat-row {
  display: flex; gap: 6px;
}
.feat-row input { flex: 1; }
.feat-row button {
  width: 38px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-danger);
}
.feat-row button:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.add-feat {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--c-bg);
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 600;
  border: 1px dashed var(--c-border);
  align-self: flex-start;
}
.add-feat:hover { background: var(--grad-soft); border-color: var(--c-primary); }

/* ===== SWITCH ===== */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .slider {
  width: 38px; height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background .2s;
}
.switch .slider::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.switch input:checked + .slider { background: var(--c-success); }
.switch input:checked + .slider::after { transform: translateX(16px); }

/* ===== ALERT BOX ===== */
.alert-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-box.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-box.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-box.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-box strong { display: block; margin-bottom: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 80%; max-width: 290px; box-shadow: 30px 0 60px rgba(0,0,0,.3); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .btn-mini-menu { display: flex; }
  .topbar { padding: 0 18px; }
  .content { padding: 18px 16px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-card .num { font-size: 24px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .user-pill span { display: none; }
}

.scrim {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 40;
  display: none;
}
.scrim.show { display: block; }
