/* ============================================================
   Piccabee Design System
   ============================================================ */
:root {
  /* Neutrals */
  --bg-page: #ffffff;
  --bg-surface: #fafafa;
  --bg-soft: #f4f4f5;
  --bg-sunken: #efeff2;
  --ink-1: #0a0a0f;
  --ink-2: #18181b;
  --ink-3: #52525b;
  --ink-4: #a1a1aa;
  --ink-5: #d4d4d8;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  /* Primary honey→magenta */
  --accent-start: #f59e0b;
  --accent-mid: #f97316;
  --accent-end: #ec4899;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ec4899 100%);
  --accent-gradient-soft: linear-gradient(135deg, #fef3c7 0%, #fee2e2 50%, #fce7f3 100%);

  /* Secondary teal→indigo */
  --cool-start: #0d9488;
  --cool-end: #6366f1;
  --cool-gradient: linear-gradient(135deg, #0d9488 0%, #6366f1 100%);

  /* Solids */
  --accent-solid: #ec4899;
  --cool-solid: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Status soft */
  --success-soft: #d1fae5;
  --warning-soft: #fef3c7;
  --error-soft: #fee2e2;
  --info-soft: #dbeafe;

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(10, 10, 15, 0.04);
  --shadow-sm: 0 1px 3px rgba(10, 10, 15, 0.05), 0 1px 2px rgba(10, 10, 15, 0.03);
  --shadow-md: 0 1px 3px rgba(10, 10, 15, 0.05), 0 8px 24px rgba(244, 114, 182, 0.06);
  --shadow-lg: 0 4px 6px rgba(10, 10, 15, 0.05), 0 16px 40px rgba(244, 114, 182, 0.10);
  --shadow-xl: 0 8px 12px rgba(10, 10, 15, 0.06), 0 32px 64px rgba(244, 114, 182, 0.14);
  --shadow-focus: 0 0 0 3px rgba(236, 72, 153, 0.18);

  /* Type */
  --font-sans: "Inter", "Inter Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-tamil: "Noto Serif Tamil", serif;
  --font-deva: "Noto Serif Devanagari", serif;
}

* { box-sizing: border-box; }

/* ============================================================
   Defensive width reset — some host themes (Twenty Twenty-Four
   via theme.json, Elementor kit settings, Loobek's container
   widths, etc.) constrain `<body>` or the `wp-site-blocks`
   wrapper to a fixed max-width (~1080-1280px) without an auto
   margin. That makes the marketing SPA's centred 1200-px
   containers appear LEFT-anchored in wider viewports — content
   sits in the left half of the screen with empty space on the
   right. Force every layer of the mount chain back to full
   width so the SPA's own `margin: 0 auto` rules can take over.
   ============================================================ */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
body.asib-studio-blank,
body.asib-studio-page {
  display: block !important;
}
#piccabee-root,
.piccabee-root,
.piccabee-marketing-root {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink-2);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Utility classes used across the app */
.grad-text {
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.cool-text {
  background: var(--cool-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   App shell
   ============================================================ */
.app-root {
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--ink-2);
}

.layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.layout--collapsed { grid-template-columns: 72px 1fr; }
.layout--marketing { grid-template-columns: 1fr; }

.main-col { display: flex; flex-direction: column; min-width: 0; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  background: #0a0a0f;
  color: #d4d4d8;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 22px;
}
.sidebar__plan {
  margin: 8px 4px 16px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(236,72,153,0.18));
  border: 1px solid rgba(236,72,153,0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar__plan-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5d0e2;
}
.sidebar__plan-name { font-weight: 600; font-size: 15px; color: #fff; }
.sidebar__plan-meter {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: 2px;
}
.sidebar__plan-fill {
  height: 100%;
  background: var(--accent-gradient);
}
.sidebar__plan-text { font-size: 11px; color: #d4d4d8; }
.sidebar__plan-cta {
  margin-top: 4px;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sidebar__section {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
  padding: 16px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  color: #a1a1aa;
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms, color 120ms;
  position: relative;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.nav-item--active {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.nav-item--active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-gradient);
}
.nav-item svg { flex-shrink: 0; }
.nav-item__badge {
  margin-left: auto;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-full);
}

.sidebar__user {
  margin-top: auto;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}
.sidebar__user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--accent-gradient);
  display: grid; place-items: center;
  font-weight: 600; color: #fff; font-size: 13px;
}
.sidebar__user-meta { font-size: 13px; line-height: 1.25; min-width: 0; }
.sidebar__user-name { color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { color: #71717a; font-size: 11px; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  height: 64px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .topbar__menu { display: none; }
.topbar__title { font-weight: 600; font-size: 15px; }
.topbar__search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-3);
  transition: background 120ms, border-color 120ms;
}
.topbar__search:focus-within {
  background: var(--bg-page);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-focus);
}
.topbar__search input {
  flex: 1; border: none; outline: none; background: transparent;
  color: var(--ink-2);
}
.topbar__kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--ink-4);
}
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: background 120ms, color 120ms;
  position: relative;
}
.topbar__icon-btn:hover { background: var(--bg-soft); color: var(--ink-2); }
.topbar__notify-dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: var(--r-full);
  background: var(--accent-end);
  box-shadow: 0 0 0 2px var(--bg-page);
}

/* Spotlight search dropdown */
.topbar__spotlight {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(10,10,15,0.16);
  padding: 6px;
  z-index: 50;
  max-height: 360px; overflow-y: auto;
}
.topbar__spotlight-empty {
  padding: 14px; font-size: 13px; color: var(--ink-3); text-align: center;
}
.topbar__spotlight-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  cursor: pointer;
}
.topbar__spotlight-item:hover { background: var(--bg-soft); }

/* Notification dropdown */
.topbar__notif-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 320px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(10,10,15,0.16);
  padding: 6px;
  z-index: 50;
}
.topbar__notif-head {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 10px 6px;
}
.topbar__notif-empty {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 10px; font-size: 13px; color: var(--ink-3);
}
.topbar__notif-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-1);
  cursor: pointer;
}
.topbar__notif-item:hover { background: var(--bg-soft); }

/* ============================================================
   Content surface
   ============================================================ */
.page {
  padding: 28px 32px 64px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page__h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.page__sub { color: var(--ink-3); font-size: 14px; margin-top: 4px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 14px;
  transition: transform 80ms, box-shadow 120ms, background 120ms, color 120ms, border-color 120ms;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 12px rgba(236, 72, 153, 0.25);
}
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 18px rgba(236, 72, 153, 0.35); }
.btn--secondary {
  background: var(--ink-1); color: #fff;
}
.btn--secondary:hover { background: #1f1f24; }
.btn--ghost {
  background: transparent; color: var(--ink-2); border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-soft); }
.btn--soft {
  background: var(--bg-soft); color: var(--ink-2);
}
.btn--soft:hover { background: var(--bg-sunken); }
.btn--danger { background: var(--error); color: #fff; }
.btn--lg { padding: 12px 22px; font-size: 15px; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--icon { padding: 9px; width: 36px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.card--surface { background: var(--bg-surface); }
.card--padded { padding: 20px; }

/* ============================================================
   Badges & chips
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}
.badge--grad { background: var(--accent-gradient); color: #fff; }
.badge--cool { background: var(--cool-gradient); color: #fff; }
.badge--success { background: var(--success-soft); color: #065f46; }
.badge--warning { background: var(--warning-soft); color: #92400e; }
.badge--info { background: var(--info-soft); color: #1e40af; }
.badge--neutral { background: var(--bg-soft); color: var(--ink-3); }
.badge--outline { border: 1px solid var(--border); color: var(--ink-3); background: var(--bg-page); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-page);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.chip:hover { background: var(--bg-soft); }
.chip--active {
  background: var(--ink-1);
  color: #fff;
  border-color: var(--ink-1);
}
.chip--count {
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 10px;
  color: var(--ink-3);
}
.chip--active .chip--count { background: rgba(255,255,255,0.18); color: #fff; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field__hint { font-size: 12px; color: var(--ink-3); }
.input, .textarea, .select {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink-1);
  transition: border-color 120ms, box-shadow 120ms;
  outline: none;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent-end);
  box-shadow: var(--shadow-focus);
}
.input--lg { padding: 14px 16px; font-size: 15px; }

/* ============================================================
   Skeleton shimmer
   ============================================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg-sunken) 50%, var(--bg-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-md);
}

/* ============================================================
   Dashboard specific
   ============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  position: relative;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 18px 14px;
  overflow: hidden;
  isolation: isolate;
}
.stat__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat__value {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.stat__value--grad {
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat__delta {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.stat__delta--down { color: var(--error); }
.stat__sub { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.stat__spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin-top: 14px;
}
.stat__spark-bar {
  flex: 1;
  background: var(--bg-soft);
  border-radius: 2px;
  min-height: 4px;
  position: relative;
  overflow: hidden;
}
.stat__spark-bar--on::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.stat__ring {
  position: absolute;
  top: 16px;
  right: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 14px;
  gap: 12px;
}
.section-head__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-1);
}
.section-head__link { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.section-head__link:hover { color: var(--ink-1); }

.draft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.draft-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
}
.draft-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.draft-card__thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.draft-card__body { padding: 14px 16px; }
.draft-card__title { font-weight: 600; font-size: 14px; color: var(--ink-1); }
.draft-card__meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; justify-content: space-between; }

.split-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.activity {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.activity__item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity__item:last-child { border-bottom: none; }
.activity__icon {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--bg-soft);
  color: var(--ink-3);
}
.activity__icon--grad { background: var(--accent-gradient-soft); color: var(--accent-end); }
.activity__text { color: var(--ink-2); line-height: 1.4; }
.activity__text b { color: var(--ink-1); font-weight: 600; }
.activity__time { color: var(--ink-4); font-size: 11px; margin-top: 2px; }

/* ============================================================
   Templates
   ============================================================ */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tpl-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
  cursor: pointer;
}
.tpl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.tpl-card__thumb {
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}

/* Blurred-fill thumbnail: full design shown (contain) over a soft blurred
   backdrop, so no part of an invitation gets cropped regardless of its
   aspect ratio. Used by template cards + draft cards. */
.thumb-fill { position: absolute; inset: 0; overflow: hidden; }
.thumb-fill__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.9) saturate(1.1);
  transform: scale(1.15);
}
.thumb-fill__bg::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.18);
}
.thumb-fill__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.tpl-card__thumb-bg {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 22px;
  text-align: center;
}
.tpl-card__lang-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(10,10,15,0.85);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
  font-weight: 500;
}
.tpl-card__tier-badge {
  position: absolute; top: 10px; right: 10px;
}
.tpl-card__body { padding: 12px 14px; }
.tpl-card__title { font-weight: 600; font-size: 14px; color: var(--ink-1); }
.tpl-card__sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.tpl-card--metadata .tpl-card__thumb { aspect-ratio: 5 / 4; }
.tpl-card--metadata .tpl-card__body { padding: 14px; }
.tpl-card--metadata .tpl-card__meta-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}

/* ============================================================
   Designs table
   ============================================================ */
.table {
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-2);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-surface); }

/* ============================================================
   Settings tabs
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab--active {
  color: var(--ink-1);
  border-bottom-color: transparent;
  position: relative;
}
.tab--active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ============================================================
   Editor wrapper
   ============================================================ */
.editor-shell {
  display: grid;
  grid-template-rows: 56px 1fr;
  height: 100vh;
}
.editor-topbar {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.editor-topbar__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-3); font-weight: 500;
  padding: 6px 10px; border-radius: var(--r-md);
}
.editor-topbar__back:hover { background: var(--bg-soft); color: var(--ink-1); }
.editor-topbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.editor-topbar__title {
  font-size: 14px; font-weight: 600; color: var(--ink-1);
}
.editor-topbar__tenant {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--bg-soft);
  color: var(--ink-3);
  font-weight: 500;
}
.editor-topbar__tenant-dot {
  width: 6px; height: 6px; border-radius: var(--r-full);
  background: var(--accent-gradient);
}
.editor-topbar__actions { display: flex; gap: 8px; align-items: center; }
.editor-canvas {
  background: var(--bg-sunken);
  display: grid;
  grid-template-columns: 64px 280px 1fr 320px;
  min-height: 0;
  overflow: hidden;
}
.editor-rail {
  background: var(--bg-page);
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.editor-rail__btn {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.editor-rail__btn:hover { background: var(--bg-soft); color: var(--ink-1); }
.editor-rail__btn--active { background: var(--bg-soft); color: var(--ink-1); }
.editor-rail__btn--active::before {
  content: "";
  position: absolute;
  width: 3px; height: 24px;
  background: var(--accent-gradient);
  border-radius: 2px;
  margin-left: -12px;
}
.editor-panel {
  background: var(--bg-page);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
  overflow-y: auto;
}
.editor-stage {
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle at 12px 12px, var(--bg-sunken) 1px, transparent 1.5px),
    var(--bg-soft);
  background-size: 24px 24px;
}
.editor-props {
  background: var(--bg-page);
  border-left: 1px solid var(--border);
  padding: 18px 16px;
  overflow-y: auto;
}
.editor-card-preview {
  aspect-ratio: 2 / 3;
  width: min(420px, 100%);
  background: linear-gradient(160deg, #faf5ec 0%, #fdf0e2 50%, #fcedf3 100%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(10,10,15,0.06);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   Marketing
   ============================================================ */
.mk-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.mk-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.mk-nav__links { display: flex; gap: 22px; margin-left: 28px; }
.mk-nav__link { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.mk-nav__link:hover { color: var(--ink-1); }
.mk-nav__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.mk-section { padding: 80px 24px; }
.mk-section__inner { max-width: 1200px; margin: 0 auto; }

.hero {
  position: relative;
  padding: 88px 24px 80px;
  overflow: hidden;
}
.hero__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.hero__h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink-1);
}
.hero__sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--ink-3);
  max-width: 540px;
  line-height: 1.5;
}
.hero__ctas {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero__trust {
  margin-top: 36px;
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-2xl);
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-page));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.problem-card {
  padding: 28px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.problem-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.problem-card__h {
  font-size: 18px; font-weight: 600; color: var(--ink-1);
  letter-spacing: -0.01em;
}
.problem-card__p { font-size: 14px; color: var(--ink-3); margin-top: 8px; line-height: 1.55; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.price-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.price-card--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-page), var(--bg-page)) padding-box,
    var(--accent-gradient) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-lg);
}
.price-card__ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.price-card__name { font-size: 18px; font-weight: 600; color: var(--ink-1); }
.price-card__sub { font-size: 13px; color: var(--ink-3); }
.price-card__price {
  display: flex; align-items: baseline; gap: 6px;
}
.price-card__amount {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-1);
}
.price-card__per { font-size: 13px; color: var(--ink-3); }
.price-card__features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.price-card__features li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--ink-2); line-height: 1.45;
}
.price-card__features svg { flex-shrink: 0; color: var(--accent-end); margin-top: 2px; }

/* Pricing ribbon variants */
.price-card__ribbon--corner {
  top: 16px;
  left: auto;
  right: -8px;
  transform: rotate(0);
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.price-card__ribbon--dot {
  top: 24px;
  left: 24px;
  transform: none;
  padding: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  text-indent: -9999px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testimonial__quote { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--accent-gradient);
  display: grid; place-items: center;
  font-weight: 600; color: #fff; font-size: 13px;
}
.testimonial__name { font-size: 13px; font-weight: 600; color: var(--ink-1); }
.testimonial__role { font-size: 12px; color: var(--ink-3); }

.faq { max-width: 760px; margin: 0 auto; }
.faq__item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  cursor: pointer;
}
.faq__q {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  font-size: 16px; font-weight: 500; color: var(--ink-1);
}
.faq__a { font-size: 14px; color: var(--ink-3); margin-top: 10px; line-height: 1.55; }

footer.mk-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 56px 24px 28px;
}
.mk-footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}
.mk-footer__col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; margin-bottom: 12px; }
.mk-footer__col a { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.mk-footer__col a:hover { color: var(--accent-end); }
.mk-footer__bot {
  max-width: 1200px; margin: 36px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-4);
}

/* ============================================================
   Auth
   ============================================================ */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-form-side {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.auth-aside {
  background: var(--ink-1);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.step-pips { display: flex; gap: 8px; margin-bottom: 32px; }
.step-pip {
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--bg-soft);
}
.step-pip--active { background: var(--accent-gradient); }
.step-pip--done { background: var(--ink-2); }

/* ============================================================
   Toast + Empty
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink-1);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: toast-in 200ms ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
}
.empty__title { font-weight: 600; font-size: 16px; color: var(--ink-1); margin-top: 16px; }
.empty__sub { font-size: 14px; color: var(--ink-3); margin-top: 6px; max-width: 360px; margin-left: auto; margin-right: auto; }
.empty__actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   Subscription + Settings utility
   ============================================================ */
.meter {
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: 8px;
}
.meter__fill {
  height: 100%;
  background: var(--accent-gradient);
}

/* ============================================================
   Responsive
   ============================================================ */
/* Tablet landscape and below: sidebar becomes a drawer, hamburger appears */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 240ms ease;
    box-shadow: var(--shadow-xl);
  }
  .sidebar--open { transform: translateX(0); }
  .topbar .topbar__menu { display: grid; }
  .scrim {
    position: fixed; inset: 0;
    background: rgba(10,10,15,0.5);
    z-index: 55;
  }

  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .split-2 { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .pricing-grid, .problem-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .mk-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .draft-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-form-side { padding: 40px 24px; }
  .editor-canvas { grid-template-columns: 56px 1fr; }
  .editor-panel, .editor-props { display: none; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .topbar__search { display: none; }
  .page { padding: 18px 16px 64px; }
  .dash-grid { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .draft-grid { grid-template-columns: 1fr; }
  .page__h1 { font-size: 24px; }
  .mk-section { padding: 56px 20px; }
  .hero { padding: 48px 20px; }
  .mk-nav__links { display: none; }
  .editor-rail { display: none; }
  .editor-canvas { grid-template-columns: 1fr; }
  .editor-topbar__center { display: none; }
  .table th, .table td { padding: 10px 12px; font-size: 12px; }
}
