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

/* ── Brand Variables ── */
:root {
  --primary:       #21AAE1;
  --primary-dark:  #0088cd;
  --primary-light: rgba(33,170,225,0.10);
  --primary-glow:  rgba(33,170,225,0.25);
  --success:  #27ae60;
  --danger:   #e74c3c;
  --warning:  #f39c12;
  --gold:     #f39c12;
  --border:   #E4EDF1;
  --bg:       #f5f7fa;
  --text:     #111111;
  --text-muted: #555555;
  --text-dim:   #888888;
  /* Onboarding sidebar */
  --sb-bg:          #f7f9fc;
  --sb-border:      #e4edf5;
  --sb-text:        #6b7280;
  --sb-text-active: #111827;
  --sb-hover:       rgba(33,170,225,0.06);
  --sb-active:      rgba(33,170,225,0.10);
}

body { font-family: 'Figtree', sans-serif; background: var(--bg); }
a { text-decoration: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─────────────────────────────────────────────
   ADMIN SIDEBAR
───────────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; padding: 0 8px; }
.admin-nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 0 12px; margin-bottom: 6px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-muted);
  transition: all 0.2s; margin-bottom: 2px; text-decoration: none;
}
.admin-nav-item:hover { background: #f0f9ff; color: var(--primary-dark); }
.admin-nav-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 10px; min-width: 18px; text-align: center;
}

/* ─────────────────────────────────────────────
   ADMIN HEADER
───────────────────────────────────────────── */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  /* min-height, not height: a long title/subtitle grows the bar instead of spilling out the top.
     60px tall, held 6px below the top (margin + sticky top), so its bottom edge is at 66px —
     .mf-topbar (top: 66px) and .mf-sidebar (top: 128px) sit under it, keep them in step. */
  padding: 8px 32px; min-height: 60px;
  margin-top: 6px;
  background: #ffffff;
  border-bottom: 1px solid #e4edf5;
  /* first shadow paints the 6px gap above in the page colour, so content scrolling under the
     header doesn't show through it */
  box-shadow: 0 -6px 0 0 var(--bg), 0 1px 4px rgba(0,0,0,0.05);
  position: sticky; top: 6px; z-index: 1000;
}
/* margin: 0 overrides Bootstrap's h1/p bottom margins, which made the text block taller than the
   60px bar and pushed the title up out of it */
.admin-title    { font-size: 20px; font-weight: 700; color: #111827; margin: 0; line-height: 1.2; }
.admin-subtitle { font-size: 13px; color: #6b7280; margin: 0; line-height: 1.3; }
.admin-actions  { display: flex; gap: 10px; align-items: center; }

/* ─────────────────────────────────────────────
   TOP NAV (onboarding / user pages)
───────────────────────────────────────────── */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e4edf5;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #374151; font-weight: 500; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #21AAE1, #0068a8);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  box-shadow: 0 0 0 2px rgba(33,170,225,0.3);
  flex-shrink: 0;
}
.nav-user { position: relative; }
.nav-user-trigger {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 5px 10px 5px 6px; border-radius: 8px;
  transition: background 0.15s; user-select: none;
}
.nav-user-trigger:hover { background: #f0f4f8; }
.nav-chevron { color: #9ca3af; transition: transform 0.2s; flex-shrink: 0; }
.nav-user-trigger.open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown {
  position: fixed; top: 54px; right: 28px;
  background: #fff; border: 1px solid #e4edf5; border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 210px; z-index: 9999;
  opacity: 0; pointer-events: none;
  transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}
.nav-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-drop-header { padding: 14px 16px; background: #f7f9fc; }
.nav-drop-name  { font-size: 13px; font-weight: 600; color: #111; }
.nav-drop-email { font-size: 11px; color: #888; margin-top: 2px; }
.nav-drop-divider { height: 1px; background: #e4edf5; }
.nav-drop-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  font-size: 13px; color: #374151; cursor: pointer; text-decoration: none;
  border: none; background: none; width: 100%; text-align: left;
  font-family: 'Figtree', sans-serif; transition: background 0.13s, color 0.13s;
}
.nav-drop-item:hover { background: #f0f9ff; color: #0088cd; }
.nav-drop-logout { color: #e74c3c; }
.nav-drop-logout:hover { background: rgba(231,76,60,0.06); color: #c0392b; }
.nav-drop-icon { font-size: 15px; width: 18px; text-align: center; }

/* Support bell next to the profile menu (partials/support-bell), admin + user top bars. */
.support-bell { position: relative; }
.support-bell-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; color: #5b6b75; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.support-bell-btn:hover, .support-bell-btn.open { background: #f0f4f8; color: #0088cd; }
.support-bell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #e74c3c; color: #fff; border: 2px solid #fff;
  font-size: 10px; font-weight: 700; line-height: 13px; text-align: center;
}
.support-bell-menu {
  position: absolute; top: calc(100% + 8px); right: -6px; width: 320px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid #e4edf5; border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 9999; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.support-bell-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.support-bell-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid #e4edf5;
  font-size: 13px; font-weight: 700; color: #111;
}
.support-bell-sub { font-size: 11px; font-weight: 500; color: #888; }
.support-bell-item {
  display: block; padding: 10px 16px; border-bottom: 1px solid #f0f3f7;
  text-decoration: none; color: inherit; transition: background 0.13s;
}
.support-bell-item:hover { background: #f0f9ff; }
.support-bell-subject { font-size: 13px; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-bell-meta { font-size: 11px; color: #888; margin-top: 2px; }
.support-bell-empty { padding: 18px 16px; font-size: 12px; color: #888; text-align: center; }
.support-bell-all {
  display: block; padding: 11px 16px; font-size: 12px; font-weight: 600;
  color: #0088cd; text-decoration: none; text-align: center;
}
.support-bell-all:hover { background: #f0f9ff; }

@media (max-width: 480px) {
  .top-nav { padding: 0 16px; }
  .nav-user-trigger span { display: none; }
  .nav-dropdown { right: 12px; }
  .support-bell-menu { position: fixed; top: 58px; right: 12px; }
}

/* ─────────────────────────────────────────────
   USER SIDEBAR
───────────────────────────────────────────── */
.user-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  overflow-y: auto;
}
.user-profile-card {
  background: #f5f7fa; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 20px; text-align: center;
}
.user-avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  margin: 0 auto 10px; border: 2px solid var(--border);
}
.user-name  { font-size: 14px; font-weight: 600; color: #111; }
.user-email { font-size: 11px; color: #888; margin-top: 2px; }
.user-plan-badge {
  display: inline-block; margin-top: 8px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
}
.user-nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #888;
  padding: 0 12px; margin-bottom: 6px;
}
.user-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: #555;
  transition: all 0.2s; margin-bottom: 1px; text-decoration: none;
  background: none; border: none; width: 100%; text-align: left;
  cursor: pointer; font-family: 'Figtree', sans-serif;
}
.user-nav-item:hover { background: #f0f9ff; color: var(--primary-dark); }
.user-nav-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

/* Mobile sidebar toggle (hidden on desktop) */
.sidebar-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; margin-right: 10px; padding: 0;
  background: none; border: none; cursor: pointer; border-radius: 8px;
}
.sidebar-toggle:hover { background: #f0f4f8; }
.sidebar-toggle span { display: block; width: 18px; height: 2px; background: #374151; border-radius: 2px; }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .user-sidebar {
    position: fixed; top: 60px; left: 0; bottom: 0;
    width: 260px; max-width: 82vw; z-index: 1040;
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,0.1);
  }
  .user-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 60px 0 0 0;
    background: rgba(15,23,42,0.35); z-index: 1030;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
}

/* ─────────────────────────────────────────────
   SETTINGS TABS
───────────────────────────────────────────── */
.settings-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 32px 60px;
}
.settings-page-header {
  margin-bottom: 28px;
}
.settings-page-title {
  font-size: 22px; font-weight: 700; color: #111827;
}
.settings-page-sub {
  font-size: 13px; color: #6b7280; margin-top: 4px;
}
.settings-tab-bar {
  display: flex; gap: 0;
  border-bottom: 2px solid #e4edf5;
  margin-bottom: 32px;
}
.settings-tab-btn {
  padding: 10px 20px;
  font-size: 13px; font-weight: 600;
  color: #6b7280; background: none; border: none;
  cursor: pointer; position: relative; bottom: -2px;
  border-bottom: 2px solid transparent;
  font-family: 'Figtree', sans-serif;
  transition: color 0.15s, border-color 0.15s;
  display: flex; align-items: center; gap: 7px;
}
.settings-tab-btn:hover { color: #111827; }
.settings-tab-btn.active {
  color: #0088cd;
  border-bottom-color: #0088cd;
}
.settings-tab-icon { font-size: 14px; }
.settings-tab-pane { display: none; }
.settings-tab-pane.active {
  display: block;
  animation: stFadeIn 0.2s ease;
}
@keyframes stFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.settings-section-title {
  font-size: 15px; font-weight: 700; color: #111827;
  margin-bottom: 4px;
}
.settings-section-sub {
  font-size: 12px; color: #6b7280; margin-bottom: 24px;
}
.settings-card {
  background: #fff;
  border: 1px solid #e4edf5;
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 20px;
}
.settings-flash-ok {
  background: rgba(39,174,96,0.08); border: 1px solid rgba(39,174,96,0.25);
  color: #1d8348; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
}
.settings-flash-ok::before { content: '✓'; font-weight: 700; }
.settings-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.settings-info-item {}
.settings-info-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #9ca3af; margin-bottom: 5px;
}
.settings-info-value {
  font-size: 13px; font-weight: 600; color: #111827;
}
.settings-status-active   { color: #16a34a; }
.settings-status-suspended{ color: #dc2626; }
.settings-status-other    { color: #d97706; }
.settings-divider {
  height: 1px; background: #e4edf5; margin: 20px 0;
}
.settings-verify-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid #e4edf5;
  font-size: 12px; color: #6b7280;
}
.settings-verify-link {
  color: #0088cd; background: none; border: none; padding: 0;
  font-size: 12px; cursor: pointer; font-family: 'Figtree', sans-serif;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────
   ONBOARDING SHELL
───────────────────────────────────────────── */
.onboard-shell { min-height: calc(100vh - 60px); background: #eef1f5; justify-content: center; }

/* ─────────────────────────────────────────────
   ONBOARDING SIDEBAR
───────────────────────────────────────────── */
.onboard-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  border-left: 1px solid var(--sb-border);
  padding: 32px 20px; position: sticky; top: 60px;
  height: calc(100vh - 60px); overflow-y: auto;
}
.sidebar-head {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #9ca3af;
  margin-bottom: 24px; padding-left: 14px;
}
.step-nav-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 9px 14px; border-radius: 10px; cursor: pointer;
  margin-bottom: 2px; transition: all 0.2s; position: relative;
  text-decoration: none;
}
.step-nav-item:hover { background: var(--sb-hover); }
.step-nav-item.active { background: var(--sb-active); }
.step-nav-item.done .step-num { background: rgba(33,170,225,0.12); color: #21AAE1; border-color: rgba(33,170,225,0.35); }
.step-nav-item.active .step-num {
  background: linear-gradient(135deg, #21AAE1, #0068a8);
  color: #fff; border-color: transparent;
  box-shadow: 0 0 0 3px rgba(33,170,225,0.2), 0 2px 10px rgba(33,170,225,0.3);
}
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: #edf2f7; border: 1.5px solid #d1dbe6;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  transition: all 0.3s; color: var(--sb-text); margin-top: 1px;
}
.step-nav-label { font-size: 13px; color: var(--sb-text); line-height: 1.45; padding-top: 3px; }
.step-nav-item.active .step-nav-label { color: var(--sb-text-active); font-weight: 600; }
.step-nav-item.done .step-nav-label { color: #6b7280; }
.step-connector { position: absolute; left: 26px; top: 43px; width: 1.5px; height: 16px; background: #dde5ef; }
.step-nav-item.done .step-connector { background: rgba(33,170,225,0.4); }

/* ─────────────────────────────────────────────
   ONBOARDING MAIN CONTENT
───────────────────────────────────────────── */
.onboard-main { padding: 48px 56px; width: 820px; max-width: 100%; flex-grow: 0 !important; flex-shrink: 0; animation: fadeIn 0.35s ease; background: #fff; min-height: calc(100vh - 60px); box-shadow: 1px 0 0 0 #e4edf5; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.step-header { margin-bottom: 36px; }
.step-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary-dark);
  background: linear-gradient(135deg, rgba(33,170,225,0.1), rgba(0,136,205,0.06));
  padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
  border: 1px solid rgba(33,170,225,0.2);
}
.step-title    { font-weight: 800; font-size: 30px; line-height: 1.25; color: #0a0a0a; margin-bottom: 10px; letter-spacing: -0.4px; }
.step-subtitle { font-size: 15px; color: #666; line-height: 1.65; }
.btn-row       { display: flex; gap: 12px; align-items: center; margin-top: 36px; }

/* ─────────────────────────────────────────────
   ONBOARDING MOBILE PROGRESS HEADER (hidden on desktop)
───────────────────────────────────────────── */
.onboard-mobile-progress { display: none; }
.omp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.omp-step-label {
  font-size: 14px; font-weight: 700; color: #0a0a0a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.omp-step-count {
  font-size: 11px; font-weight: 700; color: var(--primary-dark);
  background: rgba(33,170,225,0.1); border: 1px solid rgba(33,170,225,0.18);
  padding: 4px 11px; border-radius: 20px; flex-shrink: 0;
  letter-spacing: 0.02em;
}
.omp-bar { height: 5px; background: #e7edf3; border-radius: 20px; overflow: hidden; }
.omp-bar-fill {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, #0068a8, #21AAE1);
  transition: width 0.4s ease;
}

/* ─────────────────────────────────────────────
   ONBOARDING RESPONSIVE (tablet / mobile)
───────────────────────────────────────────── */
@media (max-width: 992px) {
  .onboard-main { width: 100%; flex-grow: 1 !important; }
}
@media (max-width: 768px) {
  html, body { height: 100%; }
  .onboard-shell { flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .onboard-sidebar { display: none; }

  .onboard-mobile-progress {
    display: block;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--sb-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 14px 18px 15px;
    position: sticky; top: 60px; z-index: 500;
    flex-shrink: 0;
  }

  /* Fill the remaining viewport so short steps need no scrolling at all;
     taller steps overflow naturally and the page scrolls as a fallback. */
  .onboard-main {
    display: flex; flex-direction: column;
    width: 100%; box-shadow: none;
    padding: 16px 16px 14px;
    min-height: calc(100vh - 60px - 76px);
    min-height: calc(100dvh - 60px - 76px);
  }
  .step-header { margin-bottom: 14px; }
  .step-badge { font-size: 10px; padding: 3px 11px; margin-bottom: 8px; }
  .step-title { font-size: 19px; letter-spacing: -0.3px; margin-bottom: 5px; }
  .step-subtitle { font-size: 12.5px; line-height: 1.45; }

  /* Roomier tap targets + softer cards on touch screens */
  .select-card, .domain-card, .plan-card, .module-item {
    padding: 13px;
  }
  .select-card:active, .domain-card:active, .plan-card:active, .module-item:active {
    transform: scale(0.98);
  }

  /* Pinned to the bottom of the screen when content is short (margin-top:auto),
     and stays reachable via sticky positioning if content overflows and scrolls. */
  .btn-row {
    position: sticky; bottom: 0; left: 0; right: 0;
    margin: auto -16px -14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.94); backdrop-filter: blur(6px);
    border-top: 1px solid #e9eef3; box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
    flex-wrap: wrap;
  }
  .btn-row .btn,
  .btn-row button,
  .btn-row a.btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .onboard-mobile-progress { padding: 12px 14px 13px; }
  .omp-step-label { font-size: 13px; }
  .omp-step-count { font-size: 10px; padding: 3px 9px; }
  .onboard-main {
    min-height: calc(100vh - 60px - 68px);
    min-height: calc(100dvh - 60px - 68px);
  }
}

/* ─────────────────────────────────────────────
   STATUS BADGES (with dot indicator)
───────────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.status-active    { background: rgba(39,174,96,0.12);  color: var(--success); }
.status-active::before    { background: var(--success); }
.status-pending   { background: rgba(136,136,136,0.12); color: #888; }
.status-pending::before   { background: #888; }
.status-deploying { background: rgba(33,170,225,0.12); color: var(--primary-dark); }
.status-deploying::before { background: var(--primary); animation: pulse 1s ease-in-out infinite; }
.status-failed    { background: rgba(231,76,60,0.12);  color: var(--danger); }
.status-failed::before    { background: var(--danger); }
.status-review    { background: rgba(243,156,18,0.12); color: var(--warning); }
.status-review::before    { background: var(--warning); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ─────────────────────────────────────────────
   TABLE OVERRIDES
───────────────────────────────────────────── */
.table-wrap       { border-radius: 12px; overflow: hidden; }
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: #fafcfe;
}
.table-filters { display: flex; gap: 8px; }
.filter-btn {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  background: #fff; color: var(--text-muted); border: 1px solid var(--border);
}
.filter-btn:hover  { border-color: var(--primary); color: var(--primary-dark); }
.filter-btn.active { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; color: var(--text-muted);
}
.search-box input { background: transparent; border: none; outline: none; color: var(--text); font-family: 'Figtree', sans-serif; }
.search-box input::placeholder { color: #aaa; }
thead th { color: #fff !important; background: #39393b !important; }
.td-empty { text-align: center; color: var(--text-dim); padding: 40px !important; }
.cell-primary { font-weight: 600; }
.cell-domain  { font-size: 12px; color: var(--primary-dark); margin-top: 2px; }
.cell-sub     { font-size: 11px; color: var(--text-muted); }
.cell-muted   { font-size: 13px; color: var(--text-muted); }
.cell-num     { font-size: 12px; color: var(--text-dim); }
.cell-sm      { font-size: 12px; color: var(--text-muted); }
.dot-icon     { font-size: 16px; font-weight: 700; }
.dot-success  { color: var(--success); }
.dot-primary  { color: var(--primary-dark); }
.dot-danger   { color: var(--danger); }
.dot-muted    { color: var(--text-dim); }

/* ─────────────────────────────────────────────
   PIPELINE COMPONENT
───────────────────────────────────────────── */
.pipeline-wrap   { border-radius: 12px; }
.pipeline-steps  { display: flex; gap: 0; align-items: stretch; margin: 20px 0 0; }
.pipeline-step   { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 8px; }
.pipeline-step:not(:last-child)::after {
  content: ''; position: absolute; top: 20px;
  left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 2px; background: var(--border);
}
.pipeline-step.done::after    { background: var(--success); }
.pipeline-step.running::after { background: var(--primary); }
.pipeline-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 8px; position: relative; z-index: 1;
  border: 2px solid var(--border); background: #f5f7fa;
}
.pipeline-icon.done    { border-color: var(--success); background: rgba(39,174,96,0.1); color: var(--success); }
.pipeline-icon.running { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.pipeline-icon.failed  { border-color: var(--danger); background: rgba(231,76,60,0.1); color: var(--danger); }
.pipeline-name   { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 4px; }
.pipeline-status.done    { color: var(--success); }
.pipeline-status.running { color: var(--primary-dark); }
.pipeline-status.failed  { color: var(--danger); }
.pipeline-status.pending { color: var(--text-dim); }
.pipeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pipeline-title  { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pipeline-sub    { font-size: 12px; color: var(--text-dim); }
.progress-wrap   { display: flex; align-items: center; gap: 10px; }
.progress-bar    { width: 100px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill   { height: 100%; border-radius: 3px; transition: width .4s; }
.progress-label  { font-size: 12px; color: var(--text-muted); }
.pipeline-dot    { width: 8px; height: 8px; border-radius: 50%; }
.pipeline-dot.done    { background: var(--success); }
.pipeline-dot.running { background: var(--primary); animation: pulse 1s ease-in-out infinite; }
.pipeline-dot.failed  { background: var(--danger); }
.pipeline-dot.pending { background: #ddd; }

/* ─────────────────────────────────────────────
   TREE COMPONENT (store detail)
───────────────────────────────────────────── */
.tree-wrap         { border-radius: 12px; overflow: hidden; }
.tree-header       { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); background: #fafcfe; }
.tree-body         { padding: 16px 24px; }
.tree-node-parent  { margin-bottom: 4px; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
.tree-parent-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; background: #fafcfe; transition: background 0.15s; }
.tree-parent-header:hover { background: #f0f9ff; }
.tree-toggle       { font-size: 10px; color: var(--text-dim); transition: transform 0.2s; }
.tree-toggle.open  { transform: rotate(90deg); }
.tree-mod-name     { font-size: 14px; font-weight: 500; flex: 1; color: var(--text); }
.tree-badge        { font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; }
.tree-badge.selected { background: var(--primary-light); color: var(--primary-dark); }
.tree-badge.count    { background: #f0f0f0; color: var(--text-muted); }
.tree-children     { padding: 8px 14px 10px; border-top: 1px solid var(--border); display: none; background: #fafcfe; }
.tree-children.open { display: block; }
.tree-feat-row     { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; color: var(--text-muted); }
.tree-feat-row:last-child { border-bottom: none; }
.tree-feat-row::before { content: '◦'; color: var(--text-dim); }
.tree-empty        { padding: 32px; text-align: center; color: var(--text-dim); font-size: 13px; }
.tree-title        { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tree-sub          { font-size: 12px; color: var(--text-dim); }
.tree-header-actions { display: flex; gap: 10px; align-items: center; }
.tree-empty-icon   { font-size: 32px; margin-bottom: 8px; }
.feat-check-icon   { color: var(--primary-dark); margin-right: 6px; font-weight: 700; }
.feat-check-unselected { color: var(--text-dim); font-weight: 400; }
.tree-subsection-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin: 4px 0 6px; }
.feat-price        { margin-left: auto; font-size: 11px; }
.feat-price-free   { color: var(--success); font-weight: 600; }
.feat-price-paid   { color: var(--text-muted); }
.tree-feat-empty   { font-size: 12px; color: var(--text-dim); padding: 8px 0; }
.owner-avatar      { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--primary-dark); }

/* ─────────────────────────────────────────────
   USER CELLS / ROLE BADGES
───────────────────────────────────────────── */
.user-cell     { display: flex; align-items: center; gap: 10px; }
.user-initials {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-light); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--primary-dark); flex-shrink: 0;
}
.role-badge    { font-size: 12px; font-weight: 600; }
.role-danger   { color: var(--danger); }
.role-primary  { color: var(--primary-dark); }
.role-gold     { color: var(--gold); }
.role-muted    { color: var(--text-muted); }
.verified-yes  { color: var(--success); font-size: 12px; }
.verified-no   { color: var(--text-dim); font-size: 12px; }

/* ─────────────────────────────────────────────
   OWNER CARD
───────────────────────────────────────────── */
.owner-row   { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.owner-name  { font-size: 14px; font-weight: 600; color: var(--text); }
.owner-email { font-size: 12px; color: var(--primary-dark); margin-top: 2px; }

/* ─────────────────────────────────────────────
   TOGGLE SWITCH
───────────────────────────────────────────── */
.toggle        { position: relative; width: 36px; height: 20px; background: #ddd; border-radius: 20px; cursor: pointer; transition: background 0.2s; }
.toggle.on     { background: var(--primary-dark); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle.on::after { left: 19px; }
.toggle-wrap   { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.toggle-label  { font-size: 13px; color: #333; }
.toggle-switch { width: 44px; height: 24px; border-radius: 12px; background: #ddd; cursor: pointer; transition: all 0.2s; position: relative; margin-left: auto; }
.toggle-switch.active { background: var(--primary); }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch.active::after { left: 23px; }

/* ─────────────────────────────────────────────
   MODULE TREE (admin modules page)
───────────────────────────────────────────── */
.mod-tree     { margin: 16px 0; }
.mod-item     { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 4px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.mod-item:hover { background: #f0f9ff; }
.mod-item.active { background: var(--primary-light); color: var(--primary-dark); }
.mod-toggle   { font-size: 12px; color: var(--text-dim); width: 16px; }
.mod-name     { font-size: 14px; color: var(--text); }
.mod-children { margin-left: 24px; margin-top: 8px; }

/* ─────────────────────────────────────────────
   SELECT CARDS (onboarding)
───────────────────────────────────────────── */
.cards-grid   { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; }
.cards-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  .cards-grid, .cards-grid.two { grid-template-columns: 1fr; }
}
.select-card {
  background: #fff; border: 1.5px solid #e8eef4; border-radius: 14px; padding: 22px;
  cursor: pointer; transition: all 0.22s; position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}
.select-card:hover { border-color: #0088cd; background: #f8fcff; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,136,205,0.1); }
.select-card.selected { border-color: #0088cd; background: linear-gradient(135deg, #f0f9ff 0%, #e8f5fd 100%); box-shadow: 0 8px 24px rgba(0,136,205,0.14); }
.select-card.selected::after {
  content: '✓'; position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #0088cd, #21AAE1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,136,205,0.3);
}
.card-icon  { font-size: 28px; margin-bottom: 12px; }
.card-title { font-size: 14px; font-weight: 700; color: #0a0a0a; margin-bottom: 5px; }
.card-desc  { font-size: 12px; color: #777; line-height: 1.55; }

/* ─────────────────────────────────────────────
   MODULE ITEMS (onboarding)
───────────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 640px) { .module-grid { grid-template-columns: 1fr; } }
.module-item {
  background: #fff; border: 1.5px solid #e8eef4; border-radius: 12px; padding: 14px;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; transition: all 0.22s; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.module-item:hover    { border-color: #0088cd; background: #f8fcff; }
.module-item.selected { border-color: #0088cd; background: linear-gradient(135deg, #f0f9ff, #e8f5fd); }
.module-item.default  { border-color: #0088cd; background: #f0f9ff; cursor: default; }
.module-check {
  width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid #ddd;
  flex-shrink: 0; margin-top: 2px; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s;
}
.module-item.selected .module-check,
.module-item.default  .module-check  { background: var(--primary-dark); border-color: var(--primary-dark); }
.module-check-mark { font-size: 10px; color: #fff; font-weight: 700; display: none; }
.module-item.selected .module-check-mark,
.module-item.default  .module-check-mark { display: block; }
.module-info  { flex: 1; }
.module-name  { font-size: 13px; font-weight: 500; color: #000; }
.module-price { font-size: 11px; color: #888; margin-top: 2px; }
.module-price.free { color: var(--primary-dark); }
.module-badge      { font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.badge-default     { background: var(--primary-light); color: var(--primary-dark); }
.badge-paid        { background: rgba(243,156,18,0.15); color: var(--gold); }

/* ─────────────────────────────────────────────
   DOMAIN CARDS (onboarding)
───────────────────────────────────────────── */
.domain-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 640px) { .domain-options { grid-template-columns: 1fr; } }
.domain-card {
  background: #fff; border: 1.5px solid #e8eef4; border-radius: 14px; padding: 22px;
  cursor: pointer; transition: all 0.22s; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}
.domain-card:hover    { border-color: #0088cd; background: #f8fcff; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,136,205,0.1); }
.domain-card.selected { border-color: #0088cd; background: linear-gradient(135deg, #f0f9ff, #e8f5fd); box-shadow: 0 8px 24px rgba(0,136,205,0.14); }
.domain-type-icon  { font-size: 24px; margin-bottom: 12px; }
.domain-type-title { font-size: 14px; font-weight: 700; color: #0a0a0a; margin-bottom: 5px; }
.domain-type-desc  { font-size: 12px; color: #777; }

/* ─────────────────────────────────────────────
   PLAN CARDS (onboarding)
───────────────────────────────────────────── */
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 600px) { .plan-cards { grid-template-columns: 1fr; } }
.plan-card {
  background: #fff; border: 1.5px solid #e8eef4; border-radius: 16px; padding: 26px;
  cursor: pointer; transition: all 0.22s; position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}
.plan-card:hover    { border-color: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,136,205,0.12); }
.plan-card.selected { border-color: var(--primary-dark); background: linear-gradient(135deg, #f0f9ff, #e8f5fd); box-shadow: 0 8px 24px rgba(0,136,205,0.18); }
.plan-card.popular::before {
  content: 'Most Popular'; position: absolute; top: -1px; right: 20px;
  background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; padding: 4px 12px; border-radius: 0 0 10px 10px; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(243,156,18,0.3);
}
.plan-name     { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #999; margin-bottom: 8px; }
.plan-price    { font-weight: 800; font-size: 38px; color: #0a0a0a; letter-spacing: -0.5px; }
.plan-price sup { font-size: 18px; vertical-align: top; margin-top: 10px; font-weight: 600; }
.plan-price sub { font-size: 13px; color: #999; font-weight: 400; }
.plan-features { margin-top: 18px; }
.plan-feature  { font-size: 13px; color: #555; padding: 6px 0; display: flex; gap: 8px; align-items: center; border-top: 1px solid #f0f4f8; }
.plan-feature:first-child { border-top: none; }
.feat-check    { color: var(--primary-dark); font-size: 13px; font-weight: 700; }

/* ─────────────────────────────────────────────
   SPINUP STEPS (onboarding)
───────────────────────────────────────────── */
.spinup-steps { margin: 24px 0; }
.spinup-item {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border-radius: 12px; margin-bottom: 8px;
  border: 1.5px solid #e8eef4; background: #fff; transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.spinup-item.running { border-color: #0088cd; background: linear-gradient(135deg, #f0f9ff, #e8f5fd); box-shadow: 0 4px 16px rgba(0,136,205,0.1); }
.spinup-item.done    { border-color: rgba(39,174,96,0.3); background: rgba(39,174,96,0.04); }
.spinup-icon   { font-size: 20px; width: 38px; text-align: center; }
.spinup-label  { flex: 1; }
.spinup-name   { font-size: 14px; font-weight: 500; color: #0a0a0a; }
.spinup-status { font-size: 12px; margin-top: 2px; }
.spinup-status.running { color: #0088cd; font-weight: 500; }
.spinup-status.done    { color: var(--success); }
.spinup-status.pending { color: #aaa; }
.spin-anim { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
   OTP INPUT
───────────────────────────────────────────── */
.otp-grid  { display: flex; gap: 12px; }
.otp-input {
  width: 54px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
  background: #fff; border: 1.5px solid #e0e8f0; border-radius: 12px;
  color: #0a0a0a; outline: none; transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.otp-input:focus  { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(33,170,225,0.15), 0 1px 3px rgba(0,0,0,0.06); }
.otp-input.filled { border-color: var(--primary-dark); color: var(--primary-dark); background: #f8fcff; }
@media (max-width: 420px) {
  .otp-grid { gap: 8px; }
  .otp-input { width: 42px; height: 48px; font-size: 20px; }
}

/* ─────────────────────────────────────────────
   CHECKOUT
───────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.order-summary {
  background: linear-gradient(135deg, #f8fcff, #f0f9ff);
  border: 1.5px solid rgba(33,170,225,0.15); border-radius: 16px;
  padding: 26px; height: fit-content; position: sticky; top: 100px;
}
.summary-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: #0a0a0a; }
.summary-line  { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(33,170,225,0.1); font-size: 13px; color: #666; }
.summary-line:last-child { border-bottom: none; font-weight: 700; color: #0a0a0a; font-size: 15px; }

/* ─────────────────────────────────────────────
   STORE CARDS (user dashboard)
───────────────────────────────────────────── */
.stores-grid   { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.store-card    {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: all 0.25s; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.store-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(33,170,225,0.15); }
.store-card-header { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.store-icon    { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.store-icon.ecom { background: var(--primary-light); }
.store-icon.mkt  { background: rgba(240,165,0,0.12); }
.store-icon.rest { background: rgba(231,76,60,0.12); }
.store-icon.svc  { background: rgba(99,91,255,0.12); }
.store-icon.saas { background: var(--primary-light); }
.store-icon.blog { background: rgba(39,174,96,0.12); }
.store-card-name   { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 3px; }
.store-card-domain { font-size: 12px; color: var(--primary-dark); }
.store-card-body   { padding: 14px 18px; }
.store-meta-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store-meta-label  { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.store-meta-value  { font-size: 12px; color: #555; font-weight: 500; }
.store-card-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; }
.add-store-card {
  background: #fff; border: 1.5px dashed #ddd;
  border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px; cursor: pointer; transition: all 0.25s; min-height: 200px;
  text-decoration: none;
}
.add-store-card:hover { border-color: var(--primary); background: var(--primary-light); }
.add-store-icon  { font-size: 32px; margin-bottom: 10px; }
.add-store-label { font-size: 14px; font-weight: 500; color: #555; }
.add-store-sub   { font-size: 12px; color: #888; margin-top: 4px; }

/* ─────────────────────────────────────────────
   NOTIFICATIONS / INVOICES / TICKETS
───────────────────────────────────────────── */
.notif-item       { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-dot        { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-dot.unread { background: var(--primary); }
.notif-dot.read   { background: #ddd; }
.notif-text       { font-size: 13px; color: #333; line-height: 1.5; }
.notif-time       { font-size: 11px; color: #888; margin-top: 3px; }
.invoice-row      { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.invoice-row:last-child { border-bottom: none; }
.invoice-info     { flex: 1; }
.invoice-num      { font-size: 13px; font-weight: 500; color: var(--primary-dark); }
.invoice-date     { font-size: 11px; color: #888; }
.invoice-amount   { font-size: 14px; font-weight: 600; color: #111; }
.ticket-item      { background: #f5f7fa; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.ticket-subject   { font-size: 13px; font-weight: 500; color: #111; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ticket-meta      { font-size: 12px; color: #888; }

/* ─────────────────────────────────────────────
   ONBOARD PROMPT BANNER
───────────────────────────────────────────── */
.onboard-prompt {
  background: var(--primary-light);
  border: 1px solid rgba(33,170,225,0.30);
  border-radius: 12px; padding: 20px 24px;
  display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.onboard-prompt-icon  { font-size: 36px; flex-shrink: 0; }
.onboard-prompt-title { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 4px; }
.onboard-prompt-sub   { font-size: 13px; color: #555; }
@media (max-width: 480px) {
  .onboard-prompt { padding: 16px; gap: 12px; }
  .onboard-prompt > a.btn, .onboard-prompt > button.btn { margin-left: 0 !important; width: 100%; text-align: center; }
}

/* ─────────────────────────────────────────────
   PLAN INFO GRID / PAYMENT METHOD
───────────────────────────────────────────── */
.plan-info-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 20px; }
.plan-info-item  { background: #f5f7fa; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.plan-info-value { font-size: 14px; font-weight: 600; color: #111; margin-top: 4px; }
.payment-method  { display: flex; align-items: center; gap: 16px; }
.payment-icon    { font-size: 28px; }
.payment-name    { font-size: 14px; font-weight: 500; color: #111; }
.payment-expiry  { font-size: 12px; color: #888; }

/* ─────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────── */
.login-layout   { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f5f7fa; }
.login-card     { width: 420px; max-width: 100%; padding: 48px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
@media (max-width: 480px) {
  .login-card { padding: 28px 20px; }
}
.login-header   { text-align: center; margin-bottom: 32px; }
.login-title    { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: var(--text-muted); }
.forgot-link    { font-size: 14px; color: var(--primary-dark); }
.forgot-link:hover { text-decoration: underline; }
.back-link      { display: block; text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.back-link:hover { color: var(--primary-dark); }

/* ─────────────────────────────────────────────
   LINK / TEXT HELPERS
───────────────────────────────────────────── */
.verify-link   { color: var(--primary); font-weight: 600; text-decoration: underline; cursor: pointer; }
.verify-link:hover { color: var(--primary-dark); }
.link-primary  { color: var(--primary-dark); }
.link-primary:hover { text-decoration: underline; }
.text-primary  { color: var(--primary-dark) !important; }

/* ─────────────────────────────────────────────
   DATATABLES OVERRIDES
───────────────────────────────────────────── */
div.dataTables_wrapper { font-family: 'Figtree', sans-serif; }
table.dataTable thead th,
table.dataTable thead td { border-bottom: 1px solid #e8eef3; font-size: 12px; font-weight: 600; color: #555; padding: 10px 12px; }
table.dataTable thead .sorting_asc::after  { color: #21AAE1; opacity: 1; }
table.dataTable thead .sorting_desc::after { color: #21AAE1; opacity: 1; }
table.dataTable.no-footer { border-bottom: none; }
.dt-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 2px; flex-wrap: wrap; gap: 8px; }
.dataTables_info { font-size: 12px; color: #999; }
.dataTables_paginate { display: flex; gap: 4px; flex-wrap: wrap; }
.dataTables_paginate .paginate_button {
  padding: 5px 11px; border-radius: 7px; border: 1px solid #e8eef3;
  background: #fff; color: #333 !important; cursor: pointer;
  font-size: 12px; font-family: 'Figtree', sans-serif;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}
.dataTables_paginate .paginate_button:hover:not(.disabled) { background: #f0f9ff; color: #21AAE1 !important; border-color: #b8dff5; }
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover { background: #21AAE1; color: #fff !important; border-color: #21AAE1; font-weight: 600; }
.dataTables_paginate .paginate_button.disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ── Tooltip popover (admin layout) ── */
#tt-popover {
  position: fixed; width: 272px;
  background: #fff; border: 1px solid #dde6ef;
  border-radius: 12px; box-shadow: 0 10px 36px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.07);
  z-index: 99999; opacity: 0; pointer-events: none;
  transform: scale(0.96) translateY(4px); transition: opacity 0.17s ease, transform 0.17s ease;
  overflow: visible; --arr-x: 20px; --arr-y: 20px;
}
#tt-popover.tt-open { opacity: 1; pointer-events: auto; transform: scale(1) translateY(0); }
#tt-popover::before, #tt-popover::after { content: ''; position: absolute; width: 0; height: 0; pointer-events: none; }
#tt-popover.arr-top::before    { top:-9px; left:var(--arr-x); border:9px solid transparent; border-top:0; border-bottom-color:#dde6ef; }
#tt-popover.arr-top::after     { top:-8px; left:var(--arr-x); border:8px solid transparent; border-top:0; border-bottom-color:#fff; }
#tt-popover.arr-bottom::before { bottom:-9px; left:var(--arr-x); border:9px solid transparent; border-bottom:0; border-top-color:#dde6ef; }
#tt-popover.arr-bottom::after  { bottom:-8px; left:var(--arr-x); border:8px solid transparent; border-bottom:0; border-top-color:#fff; }
#tt-popover.arr-left::before   { left:-9px; top:var(--arr-y); border:9px solid transparent; border-left:0; border-right-color:#dde6ef; }
#tt-popover.arr-left::after    { left:-8px; top:var(--arr-y); border:8px solid transparent; border-left:0; border-right-color:#fff; }
#tt-popover.arr-right::before  { right:-9px; top:var(--arr-y); border:9px solid transparent; border-right:0; border-left-color:#dde6ef; }
#tt-popover.arr-right::after   { right:-8px; top:var(--arr-y); border:8px solid transparent; border-right:0; border-left-color:#fff; }
.tt-pop-header { display: flex; align-items: center; gap: 8px; padding: 11px 13px 10px; background: linear-gradient(135deg,#f2f9fd 0%,#fff 100%); border-bottom: 1px solid #eef2f5; border-radius: 12px 12px 0 0; }
.tt-pop-icon-wrap { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: #21AAE1; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; font-style: italic; }
.tt-pop-title { flex: 1; font-size: 13px; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-pop-close { width: 22px; height: 22px; flex-shrink: 0; border: none; background: none; cursor: pointer; color: #aaa; font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; transition: background 0.12s, color 0.12s; }
.tt-pop-close:hover { background: #f0f4f8; color: #333; }
.tt-pop-body { padding: 13px 14px 15px; font-size: 13px; color: #444; line-height: 1.65; }
.tt-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #21AAE1; color: #fff; font-size: 10px; font-weight: 800; font-style: italic; cursor: pointer; vertical-align: middle; margin-left: 5px; flex-shrink: 0; user-select: none; transition: opacity 0.12s, transform 0.12s; }
.tt-icon:empty::before { content: 'i'; }
.tt-icon:hover  { opacity: 0.82; transform: scale(1.12); }
.tt-icon.tt-active { background: #0088cd; box-shadow: 0 0 0 3px rgba(33,170,225,0.25); }

/* ─────────────────────────────────────────────
   DATATABLES FILTER / SEARCH INPUTS
───────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 6px 10px; font-family: 'Figtree', sans-serif; font-size: 13px; outline: none;
}
table.dataTable tbody tr { background: transparent !important; }
table.dataTable tbody tr:hover td { background: #f5f9ff !important; }
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd { background: transparent !important; }
table.dataTable thead th { background: #f7f9fc !important; color: #374151 !important; }
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label { color: #6b7280; font-size: 13px; }
div.dataTables_wrapper div.dataTables_filter { text-align: right; }
table.dataTable tbody td { font-size: 13px; padding: 12px 12px; color: #374151; vertical-align: middle; border-bottom: 1px solid #f0f4f8; }
table.dataTable tbody td:first-child,
table.dataTable thead th:first-child { padding-left: 20px; }
table.dataTable tbody td:last-child,
table.dataTable thead th:last-child  { padding-right: 20px; }

/* ─────────────────────────────────────────────
   TYPE BADGES (pages, modules, questions)
───────────────────────────────────────────── */
.type-badge    { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
/* page types */
.type-landing  { color: var(--primary); background: rgba(33,170,225,0.1); }
.type-info     { color: #6c757d; background: #f0f0f0; }
.type-legal    { color: #9c27b0; background: rgba(156,39,176,0.1); }
.type-custom   { color: var(--gold); background: rgba(255,193,7,0.1); }
.slug-cell     { font-family: monospace; font-size: 11px; color: var(--text-dim); }
/* module types */
.type-core     { color: var(--primary); }
.type-addon    { color: var(--gold); }
.type-premium  { color: #A05AFF; }
.price-paid    { font-size: 12px; color: var(--gold); }
.price-free    { font-size: 12px; color: var(--text-dim); }
.mod-icon-cell   { font-size: 18px; text-align: center; }
.mod-icon-cell i { font-size: 16px; color: var(--primary); }
/* question types */
.type-single   { background: rgba(33,170,225,0.12); color: var(--primary); }
.type-multi    { background: rgba(33,170,225,0.12); color: var(--primary); }
.type-dropdown { background: rgba(240,165,0,0.12);  color: var(--gold); }
.type-text     { background: #f0f0f0; color: var(--text-muted); }
.type-email    { background: #f0f0f0; color: var(--text-muted); }
.type-yes_no   { background: rgba(240,165,0,0.12);  color: var(--gold); }

/* ─────────────────────────────────────────────
   PAGES EDITOR TABS / SUMMERNOTE
───────────────────────────────────────────── */
.pb-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.pb-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.pb-tab:hover { color: var(--text); }
.pb-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary-dark); font-weight: 600; }
.pb-tab-pane { display: none; }
.pb-tab-pane.active { display: block; }
.pb-hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.code-area {
  font-family: monospace; font-size: 12px; line-height: 1.6;
  background: #1e1e2e; color: #cdd6f4; border-color: var(--border);
  border-radius: 8px; resize: vertical;
}
.note-editor.note-frame { border-radius: 8px !important; border-color: var(--border) !important; }
.note-editor .note-toolbar { border-radius: 8px 8px 0 0 !important; background: #f5f7fa !important; border-color: var(--border) !important; padding: 6px !important; }
.note-editor .note-editing-area .note-editable { min-height: 420px; font-size: 14px; line-height: 1.7; color: var(--text); }
.note-editor .note-statusbar { border-radius: 0 0 8px 8px !important; background: #f5f7fa !important; border-color: var(--border) !important; }

/* ─────────────────────────────────────────────
   PAGES EDITOR — layout + visual section builder
   (was accidentally written to public/css/admin.css, a file
   nothing links to — layouts/admin.blade.php loads custom.css)
───────────────────────────────────────────── */
.req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 11px; color: var(--text-dim); font-weight: 400; margin-left: 6px; }
.edit-back { margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-grid.full { grid-template-columns: 1fr; }

.pb-page-outer { max-width: 1440px; }
.pb-narrow { max-width: 680px; }

.pb-mode-switch { display: flex; gap: 8px; margin-bottom: 18px; }
.pb-mode-btn {
  background: #fff; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; font-family: 'Figtree', sans-serif;
}
.pb-mode-btn:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.pb-mode-btn.active { background: var(--primary-light); border-color: var(--primary-dark); color: var(--primary-dark); }

.pb-opt-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.pb-opt-bar-item { display: flex; align-items: center; gap: 8px; }
.pb-opt-bar-item .form-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.pb-opt-bar-item .form-select { width: auto; font-size: 13px; padding: 6px 30px 6px 10px; }
.pb-opt-check { font-size: 13px; color: #333; display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.pb-opt-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary-dark); cursor: pointer; }

.pb-builder { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.15fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .pb-builder { grid-template-columns: 1fr; } }

.pb-builder-toolbar { margin-bottom: 14px; }
.pb-builder-toolbar .btn { padding: 9px 20px; font-size: 13px; font-weight: 600; border-radius: 8px; }

.pb-palette-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.pb-palette {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 4px;
}
.pb-palette li {
  display: flex; align-items: center; gap: 6px; padding: 8px 13px; font-size: 12.5px; font-weight: 600;
  border-radius: 20px; cursor: grab; color: #333; background: #f2f6fa; border: 1px solid var(--border);
  transition: all 0.15s; user-select: none;
}
.pb-palette li:hover { background: #eaf4fb; color: var(--primary-dark); border-color: var(--primary-dark); }
.pb-palette li:active { cursor: grabbing; }
/* SortableJS default classes: the placeholder shown at the drop position,
   and the dragged element's own faded state while a drag is in progress. */
.pb-sections-list .sortable-ghost { opacity: 0.35; }
.pb-sections-list .sortable-chosen.pb-section-card { box-shadow: 0 0 0 2px var(--primary-dark); }

.pb-empty-hint { text-align: center; color: var(--text-dim); font-size: 13px; padding: 48px 24px; border: 1.5px dashed var(--border); border-radius: 12px; background: #fafcfe; }

.pb-sections-list { display: flex; flex-direction: column; gap: 12px; }
.pb-section-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: box-shadow 0.15s, opacity 0.15s;
}
.pb-section-card-header {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: #fafcfe; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
}
.pb-section-card:not(.open) .pb-section-card-header { border-bottom-color: transparent; }
.pb-section-drag-handle { cursor: grab; color: var(--text-dim); font-size: 16px; }
.pb-section-drag-handle:active { cursor: grabbing; }
.pb-section-icon { font-size: 18px; }
.pb-section-title { flex: 1; font-size: 13.5px; font-weight: 600; color: #222; }
.pb-section-actions { display: flex; align-items: center; gap: 2px; }
.pb-section-actions button {
  background: none; border: none; color: var(--text-dim); font-size: 13px; cursor: pointer;
  padding: 6px 8px; border-radius: 6px; line-height: 1;
}
.pb-section-actions button:hover { background: var(--border); color: #222; }
.pb-section-actions .pb-remove-btn:hover { background: rgba(231,76,60,0.12); color: var(--danger); }
.pb-section-body { padding: 18px 16px; display: none; }
.pb-section-card.open .pb-section-body { display: block; }
.pb-section-card.open .pb-section-chevron { transform: rotate(180deg); }
.pb-section-chevron { font-size: 10px; color: var(--text-dim); transition: transform 0.2s; margin-left: 4px; }

.pb-field-row { margin-bottom: 16px; }
.pb-field-row:last-child { margin-bottom: 0; }
.pb-field-row label { display: block; font-size: 12px; font-weight: 600; color: #333; margin-bottom: 6px; }
.pb-field-row input[type="text"],
.pb-field-row input[type="number"],
.pb-field-row select,
.pb-field-row textarea {
  width: 100%; background: #f8fafc; border: 1.5px solid #dde3ea; border-radius: 7px;
  padding: 9px 12px; font-size: 13px; color: #111; font-family: 'Figtree', sans-serif; transition: all 0.15s;
}
.pb-field-row input[type="text"]:focus,
.pb-field-row input[type="number"]:focus,
.pb-field-row select:focus,
.pb-field-row textarea:focus {
  outline: none; border-color: var(--primary-dark); background: #fff; box-shadow: 0 0 0 3px var(--primary-glow);
}
.pb-field-row textarea { resize: vertical; min-height: 60px; }
.pb-field-row textarea.pb-code { font-family: 'Consolas', monospace; font-size: 12px; min-height: 90px; }
.pb-field-row input[type="color"] { width: 44px; height: 32px; padding: 2px; border: 1.5px solid #dde3ea; border-radius: 7px; cursor: pointer; }
.pb-color-row { display: flex; align-items: center; gap: 10px; }
.pb-color-row input[type="text"] { flex: 1; }

.pb-image-field { display: flex; align-items: center; gap: 10px; }
.pb-image-field input[type="text"] { flex: 1; }
.pb-image-field .pb-image-thumb {
  width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid #dde3ea; background: #f8fafc;
}
.pb-image-field-sm .pb-image-thumb { width: 32px; height: 32px; }

.pb-items-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pb-item-row { display: flex; gap: 8px; align-items: flex-start; background: #fafcfe; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.pb-item-row-fields { flex: 1; display: grid; gap: 8px; }
.pb-item-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.pb-item-remove:hover { color: var(--danger); }
.pb-add-item-btn {
  background: #fff; border: 1.5px dashed var(--border); border-radius: 7px; padding: 7px 12px;
  font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; width: 100%;
}
.pb-add-item-btn:hover { border-color: var(--primary-dark); color: var(--primary-dark); }

.pb-builder-preview { position: sticky; top: 20px; }
.pb-preview-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.pb-preview-frame {
  display: block; width: 100%; height: 78vh; min-height: 520px; max-height: 900px;
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* ─────────────────────────────────────────────
   ONBOARDING QUESTION OPTIONS
───────────────────────────────────────────── */
.opt-row    { display: grid; grid-template-columns: 80px 1fr 2fr 36px; gap: 8px; align-items: start; margin-bottom: 8px; }
.opt-header { display: grid; grid-template-columns: 80px 1fr 2fr 36px; gap: 8px; margin-bottom: 8px; }
.opt-header span { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .05em; }
.opt-input {
  width: 100%; background: #f8fafc; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #111;
  outline: none; font-family: 'Figtree', sans-serif; transition: border-color .2s;
}
.opt-input:focus { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(33,170,225,0.2); }
.opt-input::placeholder { color: #aaa; }
.opt-input.fi { font-size: 20px; text-align: center; }
.rm-btn {
  width: 36px; height: 42px; background: rgba(231,76,60,.08); border: 1.5px solid rgba(231,76,60,.3);
  border-radius: 8px; color: #e74c3c; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s;
}
.rm-btn:hover { background: rgba(231,76,60,.15); border-color: #e74c3c; }
#options-wrap { display: none; }
#options-wrap.show { display: block; }
.opt-hint { font-size: 12px; color: #888; margin-bottom: 16px; }
/* Question list tabs */
.step-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: none; color: var(--text-muted); transition: all .2s; font-family: 'Figtree', sans-serif; }
.step-tab.active { background: rgba(33,170,225,0.1); border-color: rgba(33,170,225,0.3); color: var(--primary-dark); }
.step-tab:hover:not(.active) { background: #f5f7fa; color: var(--text); }
.q-group { margin-bottom: 28px; }
.q-group-header { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.option-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.option-pill  { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(33,170,225,0.1); color: var(--primary); }
.step-badge-sm { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: rgba(33,170,225,0.12); color: var(--primary); }

/* ─────────────────────────────────────────────
   ROLES / PERMISSIONS
───────────────────────────────────────────── */
.perm-group { margin-bottom: 20px; }
.perm-group-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #888; margin-bottom: 10px; padding: 8px 12px;
  background: #f5f7fa; border-radius: 6px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border: 1.5px solid var(--border);
  border-radius: 8px; transition: all 0.15s;
}
.perm-row:hover   { border-color: var(--primary-dark); background: #f0f9ff; }
.perm-row.checked { border-color: var(--primary-dark); background: #e8f5fd; }
.perm-name  { font-family: monospace; font-size: 12px; color: #888; }
.perm-label { font-size: 13px; color: #111; margin-bottom: 2px; font-weight: 500; }
.perm-toggle { width: 36px; height: 20px; border-radius: 10px; background: #ddd; cursor: pointer; transition: background 0.2s; position: relative; flex-shrink: 0; }
.perm-toggle.on { background: var(--primary-dark); }
.perm-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.perm-toggle.on::after { left: 19px; }
.perm-actions { display: flex; gap: 8px; }
.perm-action-btn { font-size: 11px; padding: 4px 12px; border-radius: 6px; cursor: pointer; font-family: 'Figtree', sans-serif; }
.perm-action-btn.select { border: 1px solid var(--primary-dark); background: #e8f5fd; color: var(--primary-dark); }
.perm-action-btn.clear  { border: 1px solid #ddd; background: #fff; color: #555; }

/* ─────────────────────────────────────────────
   STORE-TYPE MODULE PICKER (jstree)
───────────────────────────────────────────── */
.module-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 0; }
.module-tab-btn {
  padding: 10px 20px; font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; background: none; color: #555;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.2s; font-family: 'Figtree', sans-serif;
}
.module-tab-btn.active { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }
.module-tab-btn:hover:not(.active) { color: #111; }
.module-tab-panel { display: none; padding: 16px 0 0; }
.module-tab-panel.active { display: block; }
.jstree-wrap { background: #f8fafc; border: 1.5px solid #dde3ea; border-radius: 10px; padding: 12px; max-height: 360px; overflow-y: auto; }
.jstree-node { user-select: none; }
.jstree-parent > .jstree-row { font-weight: 600; }
.jstree-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; transition: background 0.15s; font-size: 13px; color: #555; }
.jstree-row:hover    { background: #f0f9ff; color: #111; }
.jstree-row.selected { background: #e8f5fd; color: #111; }
.jstree-toggle { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #888; flex-shrink: 0; cursor: pointer; border-radius: 4px; transition: background 0.15s; }
.jstree-toggle:hover { background: var(--border); }
.jstree-toggle.open { color: var(--primary-dark); }
.jstree-spacer { width: 18px; flex-shrink: 0; }
.jstree-checkbox { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; border: 1.5px solid #ddd; background: #fff; display: flex; align-items: center; justify-content: center; transition: all 0.15s; cursor: pointer; }
.jstree-checkbox.checked { background: var(--primary-dark); border-color: var(--primary-dark); }
.jstree-checkbox.checked::after { content: '✓'; font-size: 10px; color: #fff; font-weight: 700; }
.jstree-checkbox.partial { background: rgba(0,136,205,0.2); border-color: var(--primary-dark); }
.jstree-checkbox.partial::after { content: '−'; font-size: 12px; color: var(--primary-dark); font-weight: 700; }
.jstree-icon  { font-size: 16px; flex-shrink: 0; }
.jstree-label { flex: 1; color: #111; }
.jstree-badge { font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: 600; background: rgba(243,156,18,0.12); color: #f39c12; }
.jstree-badge.free { background: rgba(0,136,205,0.1); color: var(--primary-dark); }
.jstree-children { margin-left: 26px; border-left: 1px dashed var(--border); padding-left: 4px; }
.jstree-children.hidden { display: none; }
.selected-summary { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 10px 12px; background: #f5f7fa; border: 1px solid var(--border); border-radius: 8px; margin-top: 12px; }
.summary-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.summary-tag.base  { background: rgba(0,136,205,0.1); color: var(--primary-dark); }
.summary-tag.addon { background: rgba(243,156,18,0.12); color: #f39c12; }
.summary-tag .remove { cursor: pointer; opacity: 0.6; font-size: 11px; }
.summary-tag .remove:hover { opacity: 1; }
.tab-count { font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }
.tab-count.base  { background: rgba(0,136,205,0.1); color: var(--primary-dark); }
.tab-count.addon { background: rgba(243,156,18,0.12); color: #f39c12; }
.tab-hint { font-size: 12px; color: #888; margin-bottom: 10px; }

/* ─────────────────────────────────────────────
   SELECT2 + MODULE ICON / FLAGS
───────────────────────────────────────────── */
.select2-container .select2-selection--single { background: #fff; border: 1px solid var(--border); border-radius: 8px; height: 40px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 40px; padding-left: 12px; font-family: 'Figtree', sans-serif; font-size: 13px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--text-dim); }
.select2-dropdown { border: 1px solid var(--border); border-radius: 8px; }
.select2-results__option { color: var(--text); font-size: 13px; font-family: 'Figtree', sans-serif; }
.select2-results__option--highlighted { background: #f0f9ff; color: var(--primary-dark); }
.icon-preview { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #f5f7fa; border: 1px solid var(--border); border-radius: 8px; font-size: 20px; flex-shrink: 0; }
.icon-preview i { font-size: 18px; color: var(--primary); }
.flags-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flag-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f5f7fa; border-radius: 8px; }
.flag-row label { font-size: 13px; color: var(--text-muted); cursor: pointer; flex: 1; }
.flag-row .flag-desc { font-size: 11px; color: var(--text-dim); }
.img-thumb { height: 60px; border-radius: 6px; border: 1px solid var(--border); margin-bottom: 6px; display: block; }

/* ─────────────────────────────────────────────
   STORES INDEX — SSO DROPDOWN + CLIENT PICKER
───────────────────────────────────────────── */
.client-modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1000; align-items: center; justify-content: center;
}
.client-modal-backdrop.open { display: flex; }
.client-modal-box {
  background: #fff; border-radius: 14px; width: 540px;
  max-width: calc(100vw - 40px); max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10);
  animation: clientModalIn 0.18s ease;
}
@keyframes clientModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.client-modal-box .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid #e8eef3; }
.client-modal-box .modal-title    { font-size: 17px; font-weight: 700; color: #111; }
.client-modal-box .modal-subtitle { font-size: 13px; color: #888; margin-top: 2px; }
.client-modal-box .modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: #f0f4f8; cursor: pointer; color: #666; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s;
}
.client-modal-box .modal-close:hover { background: #e4edf3; color: #111; }
.modal-search { padding: 14px 20px; border-bottom: 1px solid #f0f4f8; }
.modal-search input {
  width: 100%; padding: 9px 14px; border: 1px solid #dde6ef; border-radius: 8px;
  font-size: 14px; font-family: 'Figtree', sans-serif; outline: none; color: #111; transition: border-color 0.15s;
}
.modal-search input:focus { border-color: var(--primary); }
.modal-list  { overflow-y: auto; flex: 1; padding: 8px 12px; }
.modal-empty { padding: 32px; text-align: center; color: #aaa; font-size: 14px; }
.client-modal-box .modal-footer {
  padding: 16px 24px; border-top: 1px solid #e8eef3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-selected-info { font-size: 13px; color: #555; }
.modal-selected-info strong { color: #111; }
.client-item {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border-radius: 10px; cursor: pointer; transition: background 0.13s; border: 2px solid transparent;
}
.client-item:hover { background: #f5f9ff; }
.client-item.selected { background: rgba(33,170,225,0.07); border-color: var(--primary); }
.client-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.client-info  { flex: 1; min-width: 0; }
.client-name  { font-size: 14px; font-weight: 600; color: #111; }
.client-email { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-stores-badge { font-size: 11px; font-weight: 600; background: #f0f4f8; color: #555; padding: 3px 8px; border-radius: 20px; flex-shrink: 0; }
.client-check { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; display: none; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.client-item.selected .client-check { display: flex; }

/* ─────────────────────────────────────────────
   ADMIN STORE DETAIL — SUBSCRIPTION & INVOICES
───────────────────────────────────────────── */
.sub-wrap { margin-bottom: 24px; }
.sub-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sub-section-title  { font-size: 15px; font-weight: 700; color: #111; letter-spacing: .02em; }
.sub-section-sub    { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.sub-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .sub-top-grid { grid-template-columns: 1fr; } }
.sub-stats-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-content: start; }
.sub-stat-card  { border-radius: 10px; padding: 14px 12px; text-align: center; border: 1px solid; }
.sub-stat-value { font-size: 22px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.sub-stat-label { font-size: 11px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.sub-stat-total       { border-color: rgba(148,163,184,.2);  background: rgba(148,163,184,.05); color: #111; }
.sub-stat-success     { border-color: rgba(34,197,94,.25);   background: rgba(34,197,94,.07);   color: #16a34a; }
.sub-stat-failed      { border-color: rgba(239,68,68,.25);   background: rgba(239,68,68,.07);   color: #dc2626; }
.sub-stat-open        { border-color: rgba(251,191,36,.25);  background: rgba(251,191,36,.07);  color: #d97706; }
.sub-stat-amount      { border-color: rgba(99,102,241,.25);  background: rgba(99,102,241,.07);  color: #4f46e5; }
.sub-stat-outstanding { border-color: rgba(239,68,68,.2);    background: rgba(239,68,68,.05);   color: #ef4444; }
.sub-empty      { text-align: center; padding: 28px 16px; color: var(--text-dim); font-size: 13px; }
.sub-empty-icon { font-size: 28px; margin-bottom: 8px; }
.inv-table-wrap    { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.inv-table-header  { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.inv-table-title   { font-size: 14px; font-weight: 700; color: #555; flex: 1; }
.inv-table-scroll  { overflow-x: auto; overflow-y: auto; max-height: 360px; min-height: 120px; }
.inv-table         { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table thead th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: #000; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.inv-table tbody tr.inv-row { transition: background .15s; }
.inv-table tbody tr.inv-row:hover { background: #f5f9ff; }
.inv-table tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f4f8; color: #111; white-space: nowrap; }
.inv-row-paid td { border-left: 3px solid #22c55e; }
.inv-row-open td { border-left: 3px solid #f59e0b; }
.inv-badge        { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.inv-badge-paid   { background: rgba(34,197,94,.15);   color: #16a34a; }
.inv-badge-open   { background: rgba(251,191,36,.15);  color: #d97706; }
.inv-badge-draft  { background: rgba(148,163,184,.12); color: #64748b; }
.inv-badge-void   { background: rgba(239,68,68,.12);   color: #dc2626; }
.inv-badge-failed { background: rgba(239,68,68,.15);   color: #dc2626; }
.inv-items-cell   { padding: 0 !important; background: #fafafa; }
.inv-items-table  { width: 100%; border-collapse: collapse; font-size: 12px; }
.inv-items-table th { padding: 8px 16px; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); }
.inv-items-table td { padding: 8px 16px; color: #111; border-top: 1px solid #f0f4f8; }
.item-type-badge    { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.item-type-plan     { background: rgba(99,102,241,.15);  color: #4f46e5; }
.item-type-module   { background: rgba(34,197,94,.15);   color: #16a34a; }
.item-type-addon    { background: rgba(251,191,36,.15);  color: #d97706; }
.item-type-fee      { background: rgba(239,68,68,.12);   color: #dc2626; }
.item-type-discount { background: rgba(34,197,94,.1);    color: #22c55e; }
.item-type-tax      { background: rgba(148,163,184,.1);  color: #64748b; }

/* ─────────────────────────────────────────────
   ONBOARDING — FORM LAYOUT
───────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.full { grid-template-columns: 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────
   ONBOARDING — FORM & BUTTON POLISH
───────────────────────────────────────────── */
.onboard-main .form-control,
.onboard-main .form-select {
  border: 1.5px solid #e0e8f0; border-radius: 10px;
  padding: 11px 14px; font-size: 14px; color: #111;
  background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Figtree', sans-serif;
}
.onboard-main .form-control:focus,
.onboard-main .form-select:focus {
  border-color: #0088cd;
  box-shadow: 0 0 0 3px rgba(33,170,225,0.12);
  outline: none;
}
.onboard-main .form-label {
  font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px;
}
.onboard-main .req { color: var(--danger); font-size: 13px; }
.onboard-main .btn-primary {
  background: linear-gradient(135deg, #071c3d, #0b2a5e);
  border: none; font-weight: 700;
  box-shadow: 0 4px 14px rgba(11,42,94,0.25);
  transition: all 0.22s; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; color: #fff;
}
.onboard-main .btn-primary:hover {
  background: linear-gradient(135deg, #051530, #0a2450);
  box-shadow: 0 6px 20px rgba(11,42,94,0.35);
  transform: translateY(-1px); color: #fff;
}
.onboard-main .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11,42,94,0.2);
}
.onboard-main .btn-outline-secondary {
  color: #666; border: 1.5px solid #e0e8f0; border-radius: 10px;
  font-weight: 500; padding: 12px 20px;
  font-size: 14px; background: transparent; transition: all 0.2s;
}
.onboard-main .btn-outline-secondary:hover {
  background: #f8fafc; border-color: #c0cdd8; color: #333;
}

/* ─────────────────────────────────────────────
   MODULE FORM (admin create / edit)
───────────────────────────────────────────── */
.mf          { max-width: 980px; }
.mf-topbar   { position: sticky; top: 66px; z-index: 50; background: var(--bg); }
/* Client layout: content sits in .user-main (overflow-y:auto), which sticky measures from, so
   the admin header offset above would only push the bar down. Owner set 4px. */
.user-main .mf-topbar { top: 4px; }
.mf-crumb-sep   { color: #c7d2da; font-size: 16px; }
.mf-crumb-title { font-size: 14px; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-layout   { display: grid; grid-template-columns: 1fr 252px; gap: 28px; align-items: start; }
.mf-sidebar  { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 12px; }
.mf-main     { border-color: var(--border) !important; border-radius: 10px !important; }
.mf-sec-hd   { font-size: 10px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; color: var(--text-dim); padding-bottom: 9px; margin-bottom: 16px; border-bottom: 1px solid #eef1f4; }
.mf-lbl      { font-size: 12.5px; color: #374151; }
.mf-hint     { font-size: 11px; font-weight: 400; }
.mf-scard-hd { font-size: 10px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
.icon-live   { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #fff; flex-shrink: 0; color: #374151; }
.img-zone    { border: 1.5px dashed #c7d5de; border-radius: 8px; padding: 18px 12px; text-align: center; background: #fff; position: relative; cursor: pointer; transition: border-color .15s, background .15s; }
.img-zone:hover { border-color: var(--primary); background: rgba(33,170,225,.04); }
.img-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.img-zone-thumb { max-height: 72px; border-radius: 6px; margin-bottom: 8px; display: block; margin-inline: auto; object-fit: contain; }
.img-zone-lbl   { font-size: 12px; color: #6b7280; }
.img-zone-lbl b { color: var(--primary); }
.img-zone-sub   { font-size: 10.5px; color: var(--text-dim); margin-top: 3px; }
.mf-tog-row  { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.mf-tog-row:first-of-type { padding-top: 0; }
.mf-tog-row:last-of-type  { border-bottom: none; padding-bottom: 0; }
.mf-tog-lbl  { font-size: 12.5px; font-weight: 500; color: #374151; line-height: 1.3; }
.mf-tog-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.sw          { position: relative; width: 36px; height: 20px; display: inline-block; flex-shrink: 0; margin-top: 1px; }
.sw input    { opacity: 0; width: 0; height: 0; position: absolute; }
.sw-track    { position: absolute; inset: 0; background: #d1d5db; border-radius: 20px; cursor: pointer; transition: background .18s; }
.sw-track::after { content: ''; position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + .sw-track { background: var(--primary); }
.sw input:checked + .sw-track::after { transform: translateX(16px); }
.mf-meta-lbl { font-size: 10px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 2px; }
.mf-uuid     { font-family: monospace; font-size: 9px; color: var(--text-dim); background: #f3f6f8; border-radius: 4px; padding: 4px 7px; word-break: break-all; display: block; letter-spacing: .02em; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════════
   PLAN CHANGE FLOW (customer billing page + admin store Billing tab)
   Price breakdown panel, confirmation dialog, thank-you window.
   partials/billing-change-script + partials/billing-receipt-modal.
   ═══════════════════════════════════════════════════════════════════ */
.bc-panel { border:1px solid #e5e7eb; border-radius:10px; padding:16px 18px; background:#fff; }
.bc-title { font-size:14px; font-weight:700; color:#0b2a5e; margin-bottom:10px; }
.bc-list { list-style:none; counter-reset:bc; margin:0; padding:0; }
.bc-step { counter-increment:bc; position:relative; padding:10px 0 10px 34px; border-top:1px dashed #e5e7eb; }
.bc-step:first-child { border-top:0; }
.bc-step::before { content:counter(bc); position:absolute; left:0; top:10px; width:22px; height:22px; border-radius:50%;
  background:#eef2f9; color:#0b2a5e; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.bc-head { display:flex; justify-content:space-between; gap:12px; font-size:13px; font-weight:600; color:#1a1a2e; }
.bc-amount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.bc-amount.neg { color:#15803d; }
.bc-detail { font-size:12px; color:#6b7280; margin-top:2px; }
.bc-lines { margin:6px 0 0; padding:0; list-style:none; font-size:12px; color:#4b5563; }
.bc-lines li { display:flex; justify-content:space-between; gap:12px; padding:2px 0; }
.bc-step.total .bc-head { font-size:15px; font-weight:800; color:#0b2a5e; }
.bc-step.total::before { background:#0b2a5e; color:#fff; }
.bc-next { margin-top:10px; padding-top:10px; border-top:1px solid #e5e7eb; font-size:13px; color:#1a1a2e;
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.bc-note { font-size:12px; color:#6b7280; margin-top:6px; }
.bc-loading { font-size:12px; color:#9ca3af; }

.bc-cf { text-align:left; font-size:13px; color:#1a1a2e; }
.bc-cf-row { display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-bottom:1px solid #f1f3f5; }
.bc-cf-row.total { font-size:15px; font-weight:800; color:#0b2a5e; border-bottom:0; }
.bc-cf-note { font-size:12px; color:#6b7280; margin-top:8px; }

.bc-rc-check { width:56px; height:56px; margin:0 auto; border-radius:50%; background:#dcfce7; color:#15803d;
  display:flex; align-items:center; justify-content:center; font-size:24px; }
.bc-rc-amount { display:flex; justify-content:space-between; align-items:center; background:#f4f7fc; border-radius:8px;
  padding:12px 14px; margin-bottom:12px; font-size:13px; color:#4b5563; }
.bc-rc-amount strong { font-size:20px; color:#0b2a5e; }
.bc-rc-table { width:100%; font-size:13px; }
.bc-rc-table th { font-weight:500; color:#6b7280; padding:4px 0; width:45%; }
.bc-rc-table td { text-align:right; color:#1a1a2e; padding:4px 0; word-break:break-all; }
.bc-rc-sub { font-size:12px; font-weight:700; color:#6b7280; text-transform:uppercase; letter-spacing:.04em; margin-top:12px; }
.bc-rc-lines { list-style:none; margin:4px 0 0; padding:0; font-size:12px; color:#4b5563; }
.bc-rc-lines li { display:flex; justify-content:space-between; gap:12px; padding:3px 0; }
.bc-rc-lines .neg { color:#15803d; }
.bc-rc-scheduled { margin-top:12px; font-size:12px; background:#fff7ed; color:#9a3412; border-radius:6px; padding:8px 10px; }
.bc-rc-next { margin-top:12px; padding-top:10px; border-top:1px solid #e5e7eb; display:flex; justify-content:space-between; gap:12px; font-size:13px; }

/* ═══════════════════════════════════════════════════════════════════
   CATALOG PICKER — Available (left) / Selected (right), top plan only.
   partials/catalog-picker + partials/catalog-picker-script, used by onboarding step 7 and the
   customer billing page. Colours fall back for layouts without landing.css.
   ═══════════════════════════════════════════════════════════════════ */
.catalog-picker-hd { margin-bottom:10px; }
.catalog-picker-title { font-size:15px; font-weight:800; color:#0a0a0a; margin-bottom:2px; }
.catalog-picker-sub { font-size:12px; color:#6b7280; }
.catalog-row .hidden-cb { display:none; }
.catalog-dual { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width: 720px) { .catalog-dual { grid-template-columns:1fr; } }
.catalog-pane {
  background:var(--bg-card, #fff); border:1.5px solid #E4EDF1; border-radius:10px;
  display:flex; flex-direction:column; min-width:0;
}
.catalog-pane-selected { border-color:var(--hero-navy-2, #0b2a5e); }
.catalog-pane-hd {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; border-bottom:1px solid #eef1f6;
  font-size:12px; font-weight:700; color:#0a0a0a; text-transform:uppercase; letter-spacing:.04em;
}
.catalog-pane-count {
  min-width:22px; padding:1px 8px; border-radius:20px; text-align:center;
  background:rgba(11,42,94,.08); color:var(--hero-navy-2, #0b2a5e); font-size:11px;
}
.catalog-pane-selected .catalog-pane-count { background:var(--hero-navy-2, #0b2a5e); color:#fff; }
.catalog-search-wrap { position:relative; padding:8px 14px; border-bottom:1px solid #eef1f6; }
/* The icon sits inside the input's 23px left padding (14px wrap padding + 6px), clear of the text. */
.catalog-search-wrap .fa-search { position:absolute; left:20px; top:50%; transform:translateY(-50%); color:#aab; font-size:12px; }
.catalog-search.form-control-sm { padding:10px 23px; font-size:12px; }
/* Both lists stop at the same height and scroll inside it, however many catalogs there are. */
.catalog-list { height:280px; max-height:280px; overflow-y:auto; }
@media (max-width: 720px) { .catalog-list { height:auto; max-height:240px; } }
.catalog-row { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #f2f4f8; }
.catalog-row:last-child { border-bottom:none; }
.catalog-row-body { flex:1; min-width:0; }
.catalog-row-title { font-size:13px; font-weight:700; color:#0a0a0a; }
.catalog-scope, .catalog-live {
  font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  color:var(--hero-navy-2, #0b2a5e); background:rgba(11,42,94,.08);
  padding:1px 7px; border-radius:20px; margin-left:4px; vertical-align:middle;
}
.catalog-live { color:#15803d; background:#dcfce7; }
.catalog-row-meta { font-size:11px; color:#888; margin-top:2px; overflow-wrap:anywhere; }
.catalog-move {
  flex-shrink:0; width:34px; height:30px; border-radius:8px;
  border:1.5px solid var(--hero-navy-2, #0b2a5e); background:#fff; color:var(--hero-navy-2, #0b2a5e);
  font-size:16px; font-weight:700; line-height:1; cursor:pointer; transition:all .15s;
}
.catalog-move:hover, .catalog-move:focus-visible { background:var(--hero-navy-2, #0b2a5e); color:#fff; }
.catalog-move:disabled { opacity:.4; cursor:not-allowed; }
.catalog-lock { flex-shrink:0; width:34px; text-align:center; color:#9ca3af; font-size:14px; }
.catalog-empty { padding:18px 14px; font-size:12px; color:var(--text-dim, #888); text-align:center; }
.catalog-error { color:var(--danger, #dc3545); font-size:13px; margin-top:8px; }

/* ═══════════════════════════════════════════════════════════════════
   PLAN CHANGE HISTORY — partials/plan-change-history (customer billing page + admin Billing tab)
   ═══════════════════════════════════════════════════════════════════ */
.pch { margin-top:28px; padding-top:20px; border-top:1px solid #eef1f6; }
.pch-title { font-size:15px; font-weight:800; color:#0a0a0a; margin-bottom:10px; }
.pch-empty { font-size:13px; color:#9ca3af; padding:8px 0; }
.pch-table { width:100%; font-size:12.5px; border-collapse:collapse; }
.pch-table th { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#9ca3af;
  padding:8px 10px; border-bottom:1px solid #eef1f6; white-space:nowrap; }
.pch-table td { padding:10px; border-bottom:1px solid #f3f4f6; vertical-align:top; color:#1a1a2e; }
.pch-date { white-space:nowrap; }
.pch-date span, .pch-by span, .pch-amount span { display:block; font-size:11px; color:#9ca3af; }
.pch-event { display:inline-block; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  padding:2px 8px; border-radius:20px; background:#eef2f9; color:#0b2a5e; }
.pch-event-scheduled { background:#fff7ed; color:#9a3412; }
.pch-event-scheduled_applied { background:#dcfce7; color:#15803d; }
.pch-event-schedule_withdrawn { background:#f3f4f6; color:#4b5563; }
.pch-event-invoiced { background:#ede9fe; color:#5b21b6; }
.pch-when { font-size:11px; color:#9a3412; margin-left:6px; }
.pch-lines { list-style:none; margin:6px 0 0; padding:0; color:#374151; }
.pch-lines li { padding:1px 0; }
.pch-amount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.pch-inv { white-space:nowrap; color:#6b7280; }
.pch-table thead th { background:#f8f9fb !important; color:#6b7280 !important; }

/* ═══════════════════════════════════════════════════════════════════
   PLAN CARDS — the same cards as onboarding step 7, for the customer billing page and the admin
   store Billing tab (partials/plan-card), scoped to .ob-plans. Those layouts don't load
   landing.css, so its colours are defined here, and the older shared .plan-card rules above are
   overridden the way onboarding overrides them.
   ═══════════════════════════════════════════════════════════════════ */
.ob-plans { --hero-navy-2:#0b2a5e; --land-orange:#ff6a12; --land-orange-2:#ff7f2a; }
.ob-plans .plan-cards { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; align-items:stretch; margin:18px 0 24px; }
@media (max-width: 900px) { .ob-plans .plan-cards { grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 600px) { .ob-plans .plan-cards { grid-template-columns:1fr; } }
.ob-plans .plan-card {
  display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:24px 20px 20px; position:relative; cursor:pointer; user-select:none;
}
.ob-plans .plan-card:hover { border-color:var(--hero-navy-2); box-shadow:0 8px 24px rgba(11,42,94,.12); }
.ob-plans .plan-card.selected {
  border-color:var(--hero-navy-2);
  background:linear-gradient(135deg, #f4f6fb, #eef1f8);
  box-shadow:0 8px 24px rgba(11,42,94,.18);
}
.ob-plans .plan-card.popular { border-color:var(--land-orange); background:linear-gradient(180deg, #fffaf5, #fff); }
.ob-plans .plan-card.popular.selected { border-color:var(--hero-navy-2); }
.ob-plans .plan-card.popular::before { content:none; }
.ob-plans .plan-popular-ribbon {
  position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  background:linear-gradient(90deg, var(--land-orange), var(--land-orange-2));
  color:#fff; padding:4px 15px; border-radius:7px;
  font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap;
}
.ob-plans .plan-current-tag {
  position:absolute; top:12px; left:12px;
  font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  background:rgba(11,42,94,.08); color:var(--hero-navy-2); border:1px solid rgba(11,42,94,.25);
  border-radius:20px; padding:2px 9px;
}
.ob-plans .plan-icon {
  width:48px; height:48px; border-radius:50%; background:#edf7ff; color:var(--hero-navy-2);
  display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:8px;
}
.ob-plans .plan-card.popular .plan-icon { background:#fff0df; color:var(--land-orange); }
.ob-plans .plan-name {
  font-size:18px !important; font-weight:800 !important; color:#0a0a0a !important;
  text-transform:none !important; letter-spacing:0 !important; margin-bottom:2px !important;
}
.ob-plans .plan-lead { font-size:13px; font-weight:600; color:#2782be; margin-bottom:8px; }
.ob-plans .plan-desc { font-size:12.5px; line-height:1.4; color:#5b667a; margin:0 0 14px; }
.ob-plans .plan-card-price-block { margin-bottom:4px; }
.ob-plans .plan-price-row { display:flex; align-items:baseline; justify-content:center; gap:6px; margin-bottom:2px; }
.ob-plans .plan-price {
  display:inline-flex; align-items:flex-start;
  font-weight:800; font-size:30px !important; color:#0a0a0a; letter-spacing:-1px; line-height:1;
}
.ob-plans .plan-price .price-currency { font-size:13px !important; font-weight:600; color:#555; margin:3px 1px 0 0; }
.ob-plans .plan-cycle-stack { display:flex; flex-direction:column; align-items:flex-start; gap:1px; }
.ob-plans .cycle-label { font-size:11px; color:#999; font-weight:500; }
.ob-plans .plan-mo-note { font-size:10px; color:#bbb; }
.ob-plans .plan-savings {
  display:inline-flex; align-items:center; gap:5px;
  font-size:10.5px; font-weight:700; color:#27ae60;
  background:rgba(39,174,96,.08); border:1px solid rgba(39,174,96,.18);
  border-radius:20px; padding:2px 9px; margin-bottom:10px;
}
.ob-plans .plan-divider { height:1px; background:#eef1f6; margin:10px 0; width:100%; }
.ob-plans .plan-features-row {
  list-style:none; padding:0; margin:0 0 18px; width:100%; text-align:left;
  display:flex; flex-direction:column; gap:8px; flex:1;
}
.ob-plans .plan-feature-inline { font-size:12.5px; color:#444; display:flex; align-items:flex-start; gap:8px; }
.ob-plans .feat-icon { color:#27ae60; font-size:13px; flex-shrink:0; margin-top:1px; }
.ob-plans .plan-feat-text { display:flex; flex-direction:column; min-width:0; }
.ob-plans .plan-feat-label { font-size:12.5px; color:#444; }
.ob-plans .plan-feat-desc {
  font-size:11px; color:#98a1b0; margin-top:1px;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.ob-plans .plan-choose {
  width:100%; height:42px; border:1px solid #8097b5; background:#fff; color:#17366b;
  font-weight:800; font-size:13px; border-radius:7px; cursor:pointer; margin-top:auto;
  display:flex; align-items:center; justify-content:center; gap:7px;
}
.ob-plans .plan-card.popular .plan-choose { background:#0d3974; color:#fff; border-color:#0d3974; }
.ob-plans .plan-card.selected .plan-choose { background:var(--hero-navy-2); color:#fff; border-color:var(--hero-navy-2); }
.ob-plans .choose-check, .ob-plans .choose-label-selected { display:none; }
.ob-plans .plan-card.selected .choose-check, .ob-plans .plan-card.selected .choose-label-selected { display:inline-flex; }
.ob-plans .plan-card.selected .choose-label-default { display:none; }

/* Title row, as onboarding's: title on the left, the billing switcher on the right */
.ob-title-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.ob-title { font-size:22px; font-weight:800; color:#0a0a0a; letter-spacing:-.3px; }
.ob-subtitle { font-size:13px; color:#6b7280; margin-top:4px; }

.pch-event-cancel_scheduled { background:#fee2e2; color:#b91c1c; }
.pch-event-cancel_withdrawn { background:#dcfce7; color:#15803d; }
.pch-event-canceled { background:#f3f4f6; color:#374151; }
.pch-note { color:#6b7280; font-size:12px; }
.sub-cancel-note { font-size:12px; font-weight:600; color:#b91c1c; }
.pch-event-card_updated { background:#dbeafe; color:#1d4ed8; }
.pch-event-payment_failed { background:#fee2e2; color:#b91c1c; }

.pch-event-card_updated { background:#dbeafe; color:#1d4ed8; }
.pch-event-payment_failed { background:#fee2e2; color:#b91c1c; }

/* ═══════════════════════════════════════════════════════════════════
   PAYMENT METHOD — partials/payment-method-card (customer billing page + admin Billing tab)
   ═══════════════════════════════════════════════════════════════════ */
.pm-card { display:flex; align-items:center; gap:14px; flex-wrap:wrap; border:1.5px solid #e5e7eb; border-radius:10px;
  padding:14px 16px; margin-bottom:1.5rem; background:#fff; }
.pm-card.pm-danger { border-color:#fca5a5; background:#fff7f7; }
.pm-card.pm-warning { border-color:#fcd34d; background:#fffbeb; }
.pm-icon { width:44px; height:44px; border-radius:10px; background:#eef2f9; color:#0b2a5e; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }
.pm-body { flex:1; min-width:200px; }
.pm-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#9ca3af; }
.pm-number { font-size:15px; font-weight:800; color:#0a0a0a; letter-spacing:.02em; }
.pm-exp { font-size:12px; color:#6b7280; }
.pm-problem { font-size:12px; color:#b91c1c; margin-top:4px; font-weight:600; }
.pm-warn { font-size:12px; color:#92400e; margin-top:4px; font-weight:600; }
.pm-badge { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; padding:3px 9px; border-radius:20px;
  background:#dcfce7; color:#15803d; }
.pm-danger .pm-badge { background:#fee2e2; color:#b91c1c; }
.pm-warning .pm-badge { background:#fef3c7; color:#92400e; }
.pm-muted .pm-badge { background:#f3f4f6; color:#6b7280; }
.pm-action { margin:0; }
.pm-admin-note { font-size:12px; color:#6b7280; }
