/* Boss Music Productions — design system.
   Tokens and components per BossMusic_Claude_UI_Design_Prompt: premium, flat, light, Apple-inspired. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-app: #F6F7F9;
  --bg-surface: #FFFFFF;
  --bg-cream: #F1EEE8;
  --bg-subtle: #F0F2F5;
  --text-primary: #111111;
  --text-secondary: #6B6F76;
  --border: #E7E9ED;
  --brand-primary: #D4AF37;
  --brand-primary-soft: rgba(212, 175, 55, 0.14);
  --brand-primary-dark: #B8942A;
  --success: #2E7D5B;
  --success-soft: rgba(46, 125, 91, 0.1);
  --warning: #B7791F;
  --warning-soft: rgba(183, 121, 31, 0.1);
  --danger: #C84C4C;
  --danger-soft: rgba(200, 76, 76, 0.1);
  --info: #3468C0;
  --info-soft: rgba(52, 104, 192, 0.1);
  --violet: #6E56CF;
  --violet-soft: rgba(110, 86, 207, 0.1);
  --shell-dark: #14161A;
  --shell-dark-surface: #1B1E24;
  --shell-dark-hover: #23262D;
  --shell-dark-border: rgba(255,255,255,0.07);
  --shell-dark-text: rgba(255, 255, 255, 0.62);
  --shell-dark-text-strong: rgba(255, 255, 255, 0.92);
  --radius-card: 14px;
  --radius-control: 8px;
  --shadow-card: 0 1px 2px rgba(17, 17, 17, 0.04), 0 1px 8px rgba(17, 17, 17, 0.03);
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 80px;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

.page-title { font-size: 31px; font-weight: 600; letter-spacing: -0.015em; }
.section-heading { font-size: 19px; font-weight: 600; }
.text-body { font-size: 15px; }
.text-meta { font-size: 12.5px; color: var(--text-secondary); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn .bm-icon { width: 16px; height: 16px; }
.btn:hover { opacity: 0.92; }
.btn-primary { background: var(--shell-dark); color: #fff; }
.btn-brand { background: var(--brand-primary); color: #111111; font-weight: 700; }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-secondary); opacity: 1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px;
  min-width: 0;
}
.surface-cream {
  background: var(--bg-cream);
  border-radius: var(--radius-card);
  padding: 20px;
}

/* ---------- Inputs ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-primary);
}
.form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-soft);
}
.form-text-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-neutral { background: var(--bg-cream); color: var(--text-secondary); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-brand { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-control); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(200,76,76,0.25); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(46,125,91,0.25); }

/* ---------- Public / auth layout ---------- */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
}
.brand-mark { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark span { color: var(--brand-primary); }
.public-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 26px; }
.auth-footer-link { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-secondary); }
.auth-footer-link a { color: var(--text-primary); font-weight: 600; }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--text-primary); font-weight: 600; cursor: pointer; }

.hero {
  max-width: 640px;
  text-align: center;
}
.hero h1 { font-size: 42px; margin-bottom: 16px; }
.hero p { color: var(--text-secondary); font-size: 16px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Authenticated area shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--shell-dark);
  color: var(--shell-dark-text);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  transition: width 0.18s ease, transform 0.22s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 22px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-brand-mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-primary);
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.sidebar-brand span { color: var(--brand-primary); }
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--shell-dark-text);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: var(--shell-dark-hover); color: #fff; }
.sidebar-collapse-btn .bm-icon { width: 16px; height: 16px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 14px; flex: 1; overflow-y: auto; }
.sidebar-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.32);
  padding: 0 12px;
  margin-bottom: 2px;
  white-space: nowrap;
}
.sidebar-group { display: flex; flex-direction: column; gap: 1px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.8px;
  font-weight: 500;
  color: var(--shell-dark-text);
  position: relative;
  white-space: nowrap;
}
.sidebar-link .bm-icon { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--shell-dark-hover); color: #fff; }
.sidebar-link.active { background: var(--shell-dark-hover); color: #fff; }
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--brand-primary);
  border-radius: 3px;
}
.sidebar-link .badge-soon {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 5px;
}
.sidebar-footer {
  border-top: 1px solid var(--shell-dark-border);
  padding-top: 12px;
  margin-top: 12px;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 13px; }
.sidebar-user-avatar {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
}
.sidebar-user .meta { overflow: hidden; white-space: nowrap; }
.sidebar-user .name { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .role { color: var(--shell-dark-text); font-size: 11.5px; }
.sidebar-signout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-top: 4px; padding: 9px 8px;
  border: none; background: none; cursor: pointer;
  color: var(--shell-dark-text); font-size: 13.5px; font-weight: 500; font-family: inherit;
  border-radius: 8px; text-align: left;
}
.sidebar-signout:hover { background: var(--shell-dark-hover); color: #fff; }
.sidebar-signout .bm-icon { width: 17px; height: 17px; }

/* Collapsed (desktop icon-rail) mode */
body:has(#sidebar-collapse-toggle:checked) .app-sidebar { width: var(--sidebar-width-collapsed); }
body:has(#sidebar-collapse-toggle:checked) .sidebar-brand-text,
body:has(#sidebar-collapse-toggle:checked) .sidebar-group-label,
body:has(#sidebar-collapse-toggle:checked) .sidebar-link-label,
body:has(#sidebar-collapse-toggle:checked) .sidebar-link .badge-soon,
body:has(#sidebar-collapse-toggle:checked) .sidebar-user .meta,
body:has(#sidebar-collapse-toggle:checked) .sidebar-signout-label { display: none; }
body:has(#sidebar-collapse-toggle:checked) .sidebar-link,
body:has(#sidebar-collapse-toggle:checked) .sidebar-signout { justify-content: center; padding: 10px; }
body:has(#sidebar-collapse-toggle:checked) .sidebar-user { justify-content: center; }
body:has(#sidebar-collapse-toggle:checked) .sidebar-collapse-btn .bm-icon { transform: rotate(180deg); }

.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-app);
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.app-main { flex: 1; padding: 28px; }

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); overflow: hidden; white-space: nowrap; }
.breadcrumb a { display: flex; color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .bm-icon { width: 15px; height: 15px; }
.breadcrumb-sep { color: var(--border); font-size: 12px; }
.breadcrumb-current { color: var(--text-primary); font-weight: 600; }

.notif-bell { position: relative; }
.notif-bell > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bg-cream);
  font-size: 16px;
  position: relative;
}
.notif-bell > summary::-webkit-details-marker { display: none; }
.notif-bell .notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #111111;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  z-index: 40;
  padding: 10px;
}
.notif-item { display: block; padding: 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.notif-item:hover { background: var(--bg-cream); }
.notif-item.unread { background: var(--brand-primary-soft); }
.notif-item .notif-title { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.notif-item .notif-body { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.notif-panel-footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px 4px; border-top: 1px solid var(--border); margin-top: 4px; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 30px; margin-bottom: 10px; }

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  overflow-x: auto;
}
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table td {
  padding: 16px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--bg-cream); }
.table-actions { display: flex; gap: 8px; justify-content: flex-end; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* ---------- KPI cards ---------- */
.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.kpi-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi-icon .bm-icon { width: 21px; height: 21px; }
.benefit-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--brand-primary); margin-top: 2px; }
.kpi-icon-violet { background: var(--violet-soft); color: var(--violet); }
.kpi-icon-warning { background: var(--warning-soft); color: var(--warning); }
.kpi-icon-success { background: var(--success-soft); color: var(--success); }
.kpi-icon-info { background: var(--info-soft); color: var(--info); }
.kpi-icon-brand { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }
.kpi-icon-danger { background: var(--danger-soft); color: var(--danger); }
.kpi-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.kpi-sublabel { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  flex-wrap: wrap;
}
.filter-field { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 180px; }
.filter-field label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.filter-field-narrow { flex: 0 0 200px; min-width: 160px; }
.input-with-icon { position: relative; }
.input-with-icon .bm-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-secondary); pointer-events: none;
}
.input-with-icon .form-control { padding-left: 40px; }

/* ---------- Filter chips ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand-primary); }
.chip.active { background: var(--brand-primary); border-color: var(--brand-primary); color: #111111; font-weight: 600; }
.chip .bm-icon { width: 15px; height: 15px; }

/* ---------- Avatars ---------- */
.avatar-initials {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.avatar-bg-0 { background: #6E56CF; }
.avatar-bg-1 { background: #3468C0; }
.avatar-bg-2 { background: #2E7D5B; }
.avatar-bg-3 { background: #C2760C; }
.avatar-bg-4 { background: #C84C4C; }
.avatar-bg-5 { background: #0E8074; }
.avatar-cell { display: flex; align-items: center; gap: 12px; }
.avatar-cell .name { font-weight: 600; color: var(--text-primary); }
.avatar-cell .handle { font-size: 12.5px; color: var(--text-secondary); margin-top: 1px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 4px;
  border-radius: 7px; font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary); border: 1px solid transparent;
}
.pagination a:hover { background: var(--bg-cream); color: var(--text-primary); }
.pagination a.active { background: var(--shell-dark); color: #fff; }
.pagination a.disabled { opacity: 0.35; pointer-events: none; }
.pagination .bm-icon { width: 16px; height: 16px; }

/* ---------- Kebab / row actions ---------- */
.row-menu { position: relative; }
.row-menu > summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; cursor: pointer; color: var(--text-secondary); }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary:hover { background: var(--bg-cream); }
.row-menu .bm-icon { width: 17px; height: 17px; }
.row-menu-panel {
  position: absolute; right: 0; top: 38px; z-index: 30;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12); min-width: 160px; padding: 6px;
}
.row-menu-panel a, .row-menu-panel button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500;
  color: var(--text-primary); background: none; border: none; text-align: left; cursor: pointer; font-family: inherit;
}
.row-menu-panel a:hover, .row-menu-panel button:hover { background: var(--bg-cream); }
.row-menu-panel .bm-icon { width: 15px; height: 15px; color: var(--text-secondary); }

/* ---------- Package builder rows ---------- */
.service-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  margin-bottom: 8px;
}
.service-select-row .qty-input { width: 70px; height: 34px; padding: 0 10px; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .sidebar-collapse-btn { display: none; }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    width: min(280px, 84vw) !important;
    transform: translateX(-100%);
    box-shadow: 0 0 0 1px var(--shell-dark-border);
  }
  body:has(#sidebar-mobile-toggle:checked) .app-sidebar { transform: translateX(0); }
  body:has(#sidebar-mobile-toggle:checked) .sidebar-overlay { display: block; }
  body:has(#sidebar-mobile-toggle:checked) { overflow: hidden; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.45);
    z-index: 45;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 8px;
    color: var(--text-primary);
    flex-shrink: 0;
    cursor: pointer;
  }
  .mobile-menu-btn:hover { background: var(--bg-cream); }
  .mobile-menu-btn .bm-icon { width: 20px; height: 20px; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-field, .filter-field-narrow { width: 100%; min-width: 0; }
  .table-wrap { overflow-x: auto; }
  table.data-table { min-width: 640px; }
}
@media (min-width: 901px) {
  #sidebar-mobile-toggle, .sidebar-overlay { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .app-main { padding: 16px; }
  .app-topbar { padding: 0 16px; }
  .public-header { padding: 18px 20px; }
  .kpi-card { padding: 16px; }
}

/* ================================================================
   Premium auth screens (Sign In / Create Account) — Black + White +
   Gold identity, deliberately isolated from the app's own purple
   design system above. Every rule here is scoped under .auth-shell
   so it can never leak into (or be leaked into by) the rest of the
   site — .auth-card/.form-control/.btn-brand etc. are reused by name
   for consistency with the rest of this stylesheet, but redefined
   only as descendants of .auth-shell.
   ================================================================ */
.auth-shell {
  --gold: #D4AF37;
  --gold-light: #E8D6A3;
  --auth-border: rgba(212, 175, 55, 0.24);
  --auth-text-secondary: rgba(255, 255, 255, 0.55);
  --auth-card-bg: linear-gradient(180deg, #101010, #060606);
  --auth-input-bg: #0E0E0E;
  --auth-text-primary: #F5F2EA;
  position: relative;
  min-height: 100vh;
  background: #050505;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
}
/* Extremely subtle decorative gold waveforms near the edges — kept low-opacity and behind everything so they
   never compete with the form itself, per the brief's "must remain secondary" requirement. */
.auth-shell-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(ellipse 900px 500px at -10% 100%, rgba(212, 175, 55, 0.16), transparent 60%),
    radial-gradient(ellipse 900px 500px at 110% 0%, rgba(212, 175, 55, 0.12), transparent 60%);
}
.auth-back-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
  margin: 28px 32px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s ease;
}
.auth-back-link:hover { color: var(--gold-light); }
.auth-shell-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 56px;
}

.auth-shell .auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card-bg);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.08), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 44px rgba(212, 175, 55, 0.1);
  padding: 40px 36px;
}
.auth-shell .auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}
.auth-shell .auth-logo-img {
  width: 168px;
  height: auto;
}
.auth-shell .auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
}
.auth-shell .auth-eyebrow::before,
.auth-shell .auth-eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5));
}
.auth-shell .auth-eyebrow::after { background: linear-gradient(90deg, rgba(212, 175, 55, 0.5), transparent); }
.auth-shell .auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 8px 0 8px;
  color: var(--auth-text-primary);
}
.auth-shell .auth-card .subtitle {
  text-align: center;
  color: var(--auth-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.auth-shell .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text-primary);
  margin-bottom: 7px;
}
.auth-shell .form-control {
  height: 48px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding-left: 14px;
  font-size: 14.5px;
  color: var(--auth-text-primary);
}
.auth-shell .form-control::placeholder { color: rgba(255, 255, 255, 0.32); }
.auth-shell .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.auth-shell .form-text-error { color: #C84C4C; }
.auth-shell .form-check { color: var(--auth-text-secondary); font-size: 13.5px; }
.auth-shell .alert-error {
  background: rgba(224, 90, 90, 0.1);
  color: #F0A5A5;
  border: 1px solid rgba(224, 90, 90, 0.28);
}
.auth-shell .alert-success {
  background: rgba(74, 176, 137, 0.1);
  color: #8FD6B8;
  border: 1px solid rgba(74, 176, 137, 0.28);
}

/* Input wrapper for the leading icon (email/lock) — icon absolutely positioned inside a relatively-positioned
   .form-group so no JS is needed and the input itself stays a plain, fully native <input>. */
.auth-shell .input-icon-group { position: relative; }
.auth-shell .input-icon-group .form-control { padding-left: 42px; }
.auth-shell .input-icon-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
}
.auth-shell .input-icon-group .input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: var(--auth-text-secondary);
  cursor: pointer;
  line-height: 0;
}
.auth-shell .input-icon-group .input-toggle:hover { color: var(--gold-light); }

.auth-shell .row-between { display: flex; align-items: center; justify-content: space-between; margin: -6px 0 22px; }
.auth-shell .auth-gold-link { color: var(--gold); font-weight: 600; font-size: 13.5px; }
.auth-shell .auth-gold-link:hover { color: var(--gold-light); }

.auth-shell .btn-primary {
  height: 48px;
  border-radius: 10px;
  background: #0C0C0C;
  border: 1px solid var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.22);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-shell .btn-primary:hover { opacity: 0.92; }
.auth-shell .btn-primary .btn-arrow { color: var(--gold); }

.auth-shell .auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 18px;
  color: var(--auth-text-secondary);
  font-size: 12.5px;
}
.auth-shell .auth-divider::before,
.auth-shell .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-shell .btn-outline-gold {
  height: 48px;
  width: 100%;
  border-radius: 10px;
  background: var(--auth-input-bg);
  border: 1px solid var(--gold);
  color: var(--auth-text-primary);
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.auth-shell .btn-outline-gold:hover { background: rgba(212, 175, 55, 0.06); }
.auth-shell .btn-outline-gold + .btn-outline-gold { margin-top: 10px; }
.auth-shell .btn-outline-gold .role-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-shell .auth-trust-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 12px;
}
.auth-shell .auth-trust-divider::before,
.auth-shell .auth-trust-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}
.auth-shell .auth-trust-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.auth-shell .auth-trust-text {
  text-align: center;
  font-size: 12.5px;
  color: var(--auth-text-secondary);
  margin: 0 0 20px;
}
.auth-shell .auth-social-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.auth-shell .auth-social-row a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.auth-shell .auth-social-row a:hover { transform: translateY(-2px); }
.auth-shell .social-sep { width: 1px; height: 18px; background: rgba(212, 175, 55, 0.3); }

.auth-shell .auth-footer-link {
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--auth-text-secondary);
}
.auth-shell .auth-footer-link a,
.auth-shell .link-button { color: var(--gold); font-weight: 600; }

.auth-shell .auth-site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 18px;
  margin-top: 4px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.auth-shell .auth-site-footer .copyright { display: block; letter-spacing: 0.015em; }
.auth-shell .auth-site-footer .footer-links { display: block; margin-top: 10px; }
.auth-shell .auth-site-footer a {
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}
.auth-shell .auth-site-footer a:hover { color: var(--gold-light); }
.auth-shell .auth-site-footer .sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 12px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: middle;
  opacity: 0.7;
}

/* Role-picker cards (Create Account screen) */
.auth-shell .role-card-list { display: flex; flex-direction: column; gap: 14px; }
.auth-shell .role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.auth-shell .role-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.14);
  transform: translateY(-1px);
}
.auth-shell .role-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-shell .role-card-body { flex: 1; min-width: 0; }
.auth-shell .role-card-title { display: block; font-size: 16px; font-weight: 700; color: var(--auth-text-primary); }
.auth-shell .role-card-desc { display: block; font-size: 13.5px; color: var(--auth-text-secondary); margin-top: 3px; line-height: 1.4; }
.auth-shell .role-card-arrow { color: var(--gold); flex-shrink: 0; }

/* role-card is also used as a <button type="submit"> on SelectCategory -- reset button-only defaults so it
   matches the <a> version pixel-for-pixel. */
button.auth-shell-role-card-btn {
  width: 100%;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.auth-shell .category-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.auth-shell .category-card {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-shell .category-card:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(212, 175, 55, 0.12); }
.auth-shell .category-card-title { display: block; font-size: 14px; font-weight: 700; color: var(--auth-text-primary); }
.auth-shell .category-card-desc { display: block; font-size: 12px; color: var(--auth-text-secondary); margin-top: 3px; line-height: 1.35; }
.auth-shell .category-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--auth-text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-shell .category-divider::before,
.auth-shell .category-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }

@media (min-width: 561px) {
  .auth-shell .auth-card.auth-card-wide { max-width: 460px; }
}
@media (max-width: 560px) {
  .auth-shell-bg { display: none; }
  .auth-back-link { margin: 20px 20px 0 0; }
  .auth-shell-main { padding: 16px 20px 40px; }
  .auth-shell .auth-card {
    max-width: 100%;
    padding: 30px 20px;
    box-shadow: none;
    border-radius: 16px;
  }
  .auth-shell .role-card { padding: 14px; gap: 12px; }
  .auth-shell .category-card-grid { grid-template-columns: 1fr; }
}
