/* BrandDealz design system — ported from the brandealz-funnel app.
   All colors are HSL, matching the funnel's index.css tokens. */
:root {
  --background: hsl(210 25% 97%);
  --foreground: hsl(220 40% 15%);
  --navy: hsl(220 40% 15%);
  --card: hsl(0 0% 100%);
  --primary: hsl(202 55% 45%);
  --primary-fg: hsl(0 0% 100%);
  --accent: hsl(202 60% 50%);
  --muted: hsl(210 20% 92%);
  --muted-fg: hsl(220 30% 35%);
  --muted-fg-soft: hsl(220 20% 55%);
  --destructive: hsl(0 84% 60%);
  --border: hsl(214 32% 91%);
  --ring: hsl(202 55% 45%);
  --green: hsl(160 84% 39%);
  --amber: hsl(38 92% 50%);
  --red: hsl(0 84% 60%);
  --purple: hsl(271 91% 65%);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px hsl(220 40% 15% / 0.05);
  --shadow: 0 1px 3px hsl(220 40% 15% / 0.07), 0 4px 12px hsl(220 40% 15% / 0.05);
  --shadow-lg: 0 8px 30px hsl(220 40% 15% / 0.12);
  --glow-primary: 0 8px 24px hsl(202 55% 45% / 0.25);
  --sidebar-w: 256px;
  --ease: 0.2s ease;
}

* { box-sizing: border-box; }

a, button, input, select, textarea, .chip, .card, .metric-card, tbody tr, .nav-item, .kanban-card {
  transition: background var(--ease), color var(--ease), border-color var(--ease),
              box-shadow var(--ease), transform var(--ease), opacity var(--ease);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-weight: 700; }

/* ---------- App shell: sidebar + main ---------- */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: hsl(0 0% 100% / 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid hsl(214 32% 91% / 0.6);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid hsl(214 32% 91% / 0.6);
  text-decoration: none;
  color: var(--foreground);
}
.sidebar-logo img { height: 44px; width: auto; display: block; }
.sidebar-logo .crm-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted-fg-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.nav-group { margin-bottom: 22px; }
.nav-group-title {
  padding: 0 12px;
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: hsl(220 20% 55% / 0.8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-fg);
  text-decoration: none;
  margin-bottom: 2px;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: hsl(210 20% 92% / 0.8); color: var(--foreground); }
.nav-item:hover svg { transform: scale(1.1); }
.nav-item.active {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--glow-primary);
}

.sidebar-user {
  border-top: 1px solid hsl(214 32% 91% / 0.6);
  background: hsl(210 20% 92% / 0.3);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: hsl(202 55% 45% / 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px hsl(214 32% 91% / 0.6);
  flex-shrink: 0;
}
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .who p { margin: 0; font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .who small { color: var(--muted-fg-soft); font-size: 0.72rem; }
.sidebar-user .logout {
  color: var(--muted-fg-soft);
  display: flex;
  padding: 7px;
  border-radius: 9px;
}
.sidebar-user .logout:hover { color: var(--destructive); background: hsl(0 84% 60% / 0.1); }
.sidebar-user .logout svg { width: 16px; height: 16px; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: hsl(0 0% 100% / 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(214 32% 91% / 0.6);
}

.global-search { position: relative; flex: 1; max-width: 420px; }
.global-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted-fg-soft);
}
.global-search input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 0.9rem;
  color: var(--foreground);
}
.global-search input:focus { outline: 2px solid var(--ring); outline-offset: -1px; border-color: transparent; }

.container { padding: 24px 32px 48px; max-width: 1340px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 1.45rem; margin: 0; letter-spacing: -0.02em; }
.page-head .count { color: var(--muted-fg-soft); font-weight: 400; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid hsl(214 32% 91% / 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card:hover { border-color: var(--border); box-shadow: var(--shadow); }

/* Premium metric cards (dashboard) */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid hsl(214 32% 91% / 0.7);
  border-radius: 1.1rem;
  padding: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.metric-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border); }
.metric-card .m-title { font-size: 0.85rem; font-weight: 500; color: var(--muted-fg-soft); margin: 0 0 6px; }
.metric-card .m-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.metric-card .m-sub { font-size: 0.76rem; color: var(--muted-fg-soft); margin: 8px 0 0; }
.metric-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg { width: 22px; height: 22px; }
.metric-card:hover .metric-icon { transform: scale(1.1); }
.metric-icon.primary { background: hsl(202 55% 45% / 0.1); color: var(--primary); }
.metric-icon.green { background: hsl(160 84% 39% / 0.1); color: var(--green); }
.metric-icon.amber { background: hsl(38 92% 50% / 0.1); color: var(--amber); }
.metric-icon.red { background: hsl(0 84% 60% / 0.1); color: var(--red); }
.metric-icon.purple { background: hsl(271 91% 65% / 0.1); color: var(--purple); }

.m-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  margin-top: 8px;
}
.m-trend.up { background: hsl(160 84% 39% / 0.1); color: var(--green); }
.m-trend.down { background: hsl(0 84% 60% / 0.1); color: var(--red); }
.m-trend.neutral { background: var(--muted); color: var(--muted-fg-soft); }

/* ---------- Flash messages ---------- */

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: hsl(160 84% 39% / 0.08);
  border: 1px solid hsl(160 84% 39% / 0.25);
  color: hsl(160 84% 22%);
  font-size: 0.92rem;
}
.flash.error { background: hsl(0 84% 60% / 0.07); border-color: hsl(0 84% 60% / 0.25); color: hsl(0 74% 38%); }

/* ---------- Filter chips ---------- */

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--glow-primary); }

/* ---------- Toolbar / search ---------- */

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  min-width: 240px;
  background: var(--card);
}
.search:focus { outline: 2px solid var(--ring); outline-offset: -1px; border-color: transparent; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); box-shadow: var(--glow-primary); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn.secondary { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--muted-fg-soft); background: var(--muted); filter: none; box-shadow: var(--shadow-sm); }

.btn.danger { background: var(--card); color: var(--destructive); border-color: hsl(0 84% 60% / 0.3); }
.btn.danger:hover { background: hsl(0 84% 60% / 0.07); filter: none; box-shadow: none; }

.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { filter: brightness(1.25); box-shadow: var(--shadow-lg); }

.btn.small { padding: 5px 11px; font-size: 0.8rem; border-radius: 9px; }

/* ---------- Table ---------- */

.table-wrap {
  background: var(--card);
  border: 1px solid hsl(214 32% 91% / 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

table { border-collapse: collapse; width: 100%; }

th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-fg-soft);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: hsl(210 25% 98%);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid hsl(214 32% 94%);
  font-size: 0.9rem;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: hsl(202 55% 45% / 0.04); }

td.muted, .muted { color: var(--muted-fg-soft); }
td a { color: var(--primary); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { padding: 56px; text-align: center; color: var(--muted-fg-soft); }

/* ---------- Status badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge.not_contacted { background: hsl(220 15% 92%); color: hsl(220 20% 45%); }
.badge.sent { background: hsl(202 55% 45% / 0.12); color: hsl(202 60% 38%); }
.badge.replied { background: hsl(271 91% 65% / 0.12); color: hsl(271 70% 45%); }
.badge.interested { background: hsl(38 92% 50% / 0.15); color: hsl(30 85% 38%); }
.badge.verbally_agreed { background: hsl(160 84% 39% / 0.12); color: hsl(160 84% 27%); }
.badge.declined { background: hsl(0 84% 60% / 0.1); color: hsl(0 72% 42%); }
.badge.signed { background: hsl(174 80% 40% / 0.13); color: hsl(174 80% 26%); }
.badge.cold { background: hsl(215 20% 90%); color: hsl(215 20% 45%); }

/* Lead score badge */
.score {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.score.hot { background: hsl(0 84% 60% / 0.12); color: hsl(8 78% 45%); }
.score.warm { background: hsl(38 92% 50% / 0.15); color: hsl(30 85% 38%); }
.score.cool { background: hsl(202 55% 45% / 0.1); color: hsl(202 60% 38%); }

/* ---------- Forms ---------- */

label { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 6px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--card);
  color: var(--foreground);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ring);
  outline-offset: -1px;
  border-color: transparent;
}

.field { margin-bottom: 18px; }
.hint { font-size: 0.81rem; color: var(--muted-fg-soft); margin-top: 5px; }
.hint code { background: hsl(202 55% 45% / 0.09); color: var(--primary); padding: 1px 6px; border-radius: 6px; font-size: 0.79rem; }

select.status-select { width: auto; padding: 5px 9px; font-size: 0.82rem; border-radius: 9px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }

/* ---------- Login / setup pages ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
  background: var(--background);
}
.login-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
}
.login-blob-1, .login-blob-2 { position: absolute; border-radius: 999px; opacity: 0.1; }
.login-blob-1 { top: 80px; left: 80px; width: 256px; height: 256px; background: var(--primary); filter: blur(64px); }
.login-blob-2 { bottom: 80px; right: 80px; width: 192px; height: 192px; background: var(--accent); filter: blur(48px); }

.login-logo { position: relative; z-index: 10; margin-bottom: 28px; }
.login-logo img { height: 150px; width: auto; display: block; filter: drop-shadow(0 6px 14px hsl(220 40% 15% / 0.18)); }

.login-card {
  position: relative;
  z-index: 10;
  background: hsl(0 0% 100% / 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid hsl(214 32% 91% / 0.6);
  border-radius: 1.1rem;
  box-shadow: 0 20px 60px hsl(220 40% 15% / 0.15);
  padding: 34px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-card h1 { font-size: 1.35rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.login-card .sub { color: var(--muted-fg-soft); font-size: 0.92rem; margin: 0 0 26px; }
.login-card form { text-align: left; }
.login-card .btn { width: 100%; padding: 13px; border-radius: 13px; font-size: 0.95rem; }
.login-card .restricted { font-size: 0.75rem; color: var(--muted-fg-soft); margin: 22px 0 0; }
.login-footer { position: relative; z-index: 10; font-size: 0.74rem; color: hsl(220 20% 55% / 0.6); margin-top: 30px; }
.error-text { color: var(--destructive); font-size: 0.88rem; margin-bottom: 16px; }

/* ---------- Dashboard bars ---------- */

.bar-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.bar-label { width: 130px; font-size: 0.85rem; color: var(--muted-fg-soft); text-align: right; }
.bar-track { flex: 1; background: var(--muted); border-radius: 999px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--primary); min-width: 2px; }
.bar-fill.not_contacted { background: hsl(220 15% 78%); }
.bar-fill.sent { background: var(--accent); }
.bar-fill.replied { background: var(--purple); }
.bar-fill.interested { background: var(--amber); }
.bar-fill.verbally_agreed { background: var(--green); }
.bar-fill.declined { background: var(--red); }
.bar-fill.signed { background: hsl(174 80% 36%); }
.bar-fill.cold { background: hsl(215 16% 65%); }
.bar-count { width: 44px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.88rem; }

/* ---------- Compose / preview ---------- */

.preview {
  background: hsl(210 25% 98%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  white-space: pre-wrap;
  font-size: 0.92rem;
}
.preview .subject { font-weight: 700; margin-bottom: 10px; }

.merge-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.merge-tags code {
  background: hsl(202 55% 45% / 0.09);
  color: var(--primary);
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---------- Pager ---------- */

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }

/* ---------- Contact timeline ---------- */

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 10px 0 14px;
  border-left: 2px solid var(--border);
  margin-left: 7px;
  padding-left: 16px;
  position: relative;
  font-size: 0.92rem;
}
.timeline-dot {
  position: absolute;
  left: -7px; top: 16px;
  width: 12px; height: 12px;
  border-radius: 999px;
  background: var(--border);
  border: 2px solid var(--card);
}
.timeline-item.sent .timeline-dot { background: var(--accent); }
.timeline-item.reply .timeline-dot { background: var(--green); }
.timeline-item.failed .timeline-dot { background: var(--destructive); }
.timeline-item.followup .timeline-dot { background: var(--amber); }
.timeline-item.added .timeline-dot { background: var(--primary); }

/* ---------- Pipeline (Kanban) ---------- */

.kanban {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 250px;
  background: hsl(210 20% 94% / 0.6);
  border: 1px solid hsl(214 32% 91% / 0.7);
  border-radius: var(--radius-lg);
  padding: 12px;
  max-height: calc(100vh - 210px);
  display: flex;
  flex-direction: column;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}
.kanban-col-head .badge { font-size: 0.72rem; }
.kanban-col-head .col-count {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted-fg-soft);
  background: var(--card);
  border-radius: 999px;
  padding: 1px 9px;
  border: 1px solid var(--border);
}
.kanban-cards { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.kanban-card {
  background: var(--card);
  border: 1px solid hsl(214 32% 91% / 0.8);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  display: block;
  text-decoration: none;
  color: var(--foreground);
}
.kanban-card:hover { box-shadow: var(--shadow); border-color: var(--primary); transform: translateY(-1px); }
.kanban-card .k-name { font-weight: 600; font-size: 0.88rem; margin: 0 0 2px; }
.kanban-card .k-meta { font-size: 0.76rem; color: var(--muted-fg-soft); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card .k-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 6px; }
.kanban-card .k-foot form { margin: 0; }
.kanban-card select { font-size: 0.72rem; padding: 2px 5px; border-radius: 7px; width: auto; }

/* ---------- Campaign analytics ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  text-align: center;
}
.kpi { padding: 6px 10px; border-right: 1px solid hsl(214 32% 93%); }
.kpi:last-child { border-right: none; }
.kpi-value { font-size: 1.45rem; font-weight: 700; color: var(--primary); margin: 0; }
.kpi-value .kpi-pct { color: var(--foreground); font-size: 1.05rem; font-weight: 600; }
.kpi-label { margin: 3px 0 0; font-size: 0.82rem; color: var(--muted-fg-soft); }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted-fg); }
.tt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: hsl(0 0% 100% / 0.97);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1.6;
  z-index: 5;
  min-width: 120px;
}
.chart-tooltip div { display: flex; align-items: center; gap: 6px; }

/* ---------- Search results ---------- */

.result-group { margin-bottom: 28px; }
.result-group h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-fg-soft);
  margin: 0 0 10px;
}
.result-item {
  display: block;
  background: var(--card);
  border: 1px solid hsl(214 32% 91% / 0.7);
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--foreground);
}
.result-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.result-item .r-title { font-weight: 600; font-size: 0.92rem; }
.result-item .r-sub { font-size: 0.8rem; color: var(--muted-fg-soft); margin-top: 1px; }

/* ---------- Responsive ---------- */

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .container { padding: 18px 16px 40px; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: var(--foreground);
  }
  .menu-toggle svg { width: 18px; height: 18px; }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: hsl(220 40% 15% / 0.4);
    backdrop-filter: blur(2px);
    z-index: 40;
  }
  .sidebar-backdrop.open { display: block; }
}
