@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --font-base: "Source Sans 3", sans-serif;
  --page-pad: clamp(16px, 3vw, 64px);
  --sidebar-width: clamp(220px, 22vw, 280px);
  --page-bg: #0a0a0a;
  --ink: #f2f2f2;
  --ink-muted: #a3a3a3;
  --sea: #1e3a8a;
  --sun: #1e3a8a;
  --accent-surface: rgba(30, 58, 138, 0.16);
  --accent-surface-strong: rgba(30, 58, 138, 0.24);
  --sand: #0b0b0b;
  --cloud: #090909;
  --card: rgba(15, 15, 15, 0.92);
  --card-soft: rgba(20, 20, 20, 0.78);
  --card-strong: rgba(12, 12, 12, 0.96);
  --input-bg: rgba(14, 14, 14, 0.9);
  --stroke: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
  --sidebar-surface: rgba(14, 14, 14, 0.92);
  --sidebar-surface-hover: rgba(20, 20, 20, 0.96);
  --sidebar-surface-open: rgba(22, 22, 22, 0.96);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-title-bg: rgba(16, 16, 16, 0.9);
  --sidebar-title-border: rgba(255, 255, 255, 0.06);
  --sidebar-link-bg: rgba(20, 20, 20, 0.9);
  --sidebar-link-sub-bg: rgba(16, 16, 16, 0.85);
  --sidebar-link-hover-bg: rgba(26, 26, 26, 0.98);
  --sidebar-search-bg: rgba(14, 14, 14, 0.92);
  --sidebar-input-bg: rgba(16, 16, 16, 0.9);
  --mode-switch-bg: rgba(22, 22, 22, 0.8);
  --subtle-surface: rgba(255, 255, 255, 0.06);
  --accent-ink: #dbeafe;
  --accent-ink-muted: #bfdbfe;
  --accent-ink-soft: #93c5fd;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--ink);
  overflow-x: hidden;
  color-scheme: dark;
  background: var(--page-bg);
  min-height: 100vh;
}

body::before,
body::after {
  content: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: 0 var(--page-pad) 80px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border: 1px solid var(--stroke);
  border-radius: 0 0 24px 24px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 2;
  flex-wrap: wrap;
  width: calc(100% + (var(--page-pad) * 2));
  margin-left: calc(-1 * var(--page-pad));
  margin-right: calc(-1 * var(--page-pad));
}

.logo {
  font-family: var(--font-base);
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-weight: 500;
  flex-wrap: wrap;
}

.auth-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  list-style: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.profile-label {
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 27, 43, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-ui .site-header {
  justify-content: space-between;
}


.user-ui .avatar {
  border-radius: 50%;
}

.avatar.large {
  width: 36px;
  height: 36px;
}

.profile-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.profile-menu[open] .profile-chevron {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  z-index: 5;
}

.profile-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(11, 27, 43, 0.08);
}

.profile-summary p {
  margin: 2px 0 0;
}

.menu-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 27, 43, 0.06);
  font-weight: 600;
}

.menu-item:hover {
  background: rgba(11, 27, 43, 0.12);
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-toggle-label {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.8);
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-icon-close {
  display: none;
}

.nav-toggle:checked + .nav-toggle-label .nav-icon-open {
  display: none;
}

.nav-toggle:checked + .nav-toggle-label .nav-icon-close {
  display: block;
}

.user-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 27, 43, 0.08);
  font-size: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(11, 27, 43, 0.12);
}

.button.primary {
  background: var(--sea);
  color: #fff;
}

.button.ghost {
  background: transparent;
  border-color: var(--stroke);
}

.button.google {
  background: var(--card-soft);
  border-color: var(--stroke);
  color: var(--ink);
  gap: 10px;
}

.google-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--subtle-surface);
  font-weight: 700;
}

.button.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: clamp(50px, 7vw, 90px) 0 50px;
}

.hero-copy h1 {
  font-family: var(--font-base);
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  margin: 12px 0 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sea);
}

.lead {
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}

.stat-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
}

.stat-number {
  font-weight: 700;
  font-size: 1.2rem;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.hero-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 6px 0 0;
}

.chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  height: 80px;
  align-items: end;
}

.chart-bar {
  background: var(--sea);
  border-radius: 10px 10px 0 0;
  height: 40%;
  animation: pulse 2.4s ease-in-out infinite;
}

.chart-bar:nth-child(2) {
  height: 60%;
  animation-delay: 0.2s;
}

.chart-bar:nth-child(3) {
  height: 75%;
  animation-delay: 0.4s;
}

.chart-bar:nth-child(4) {
  height: 52%;
  animation-delay: 0.6s;
}

.chart-bar:nth-child(5) {
  height: 82%;
  animation-delay: 0.8s;
}

.chart-bar:nth-child(6) {
  height: 68%;
  animation-delay: 1s;
}

.section {
  padding: clamp(40px, 6vw, 90px) 0;
}

section[id],
.panel[id] {
  scroll-margin-top: 120px;
}

.anchor-target {
  scroll-margin-top: 120px;
}

.section-header {
  max-width: none;
  width: 100%;
  margin-bottom: 30px;
}

.section h2 {
  font-family: var(--font-base);
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  margin: 0 0 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.core-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.builder-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  padding: 22px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.card-badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(243, 178, 76, 0.18);
  color: var(--accent-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  display: grid;
  gap: 8px;
}

.card-list li {
  line-height: 1.4;
}

.builder-pack {
  margin-top: 24px;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.pack-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.phase-card {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.phase-card h3 {
  margin: 4px 0 0;
}

.phase-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 27, 43, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.phase-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-muted);
  display: grid;
  gap: 6px;
}

.launch-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.decision-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.decision-card {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse > * {
  direction: ltr;
}

.split-panel .panel-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(11, 27, 43, 0.08);
}

.panel-row:last-child {
  border-bottom: none;
}

.feature-list {
  margin: 18px 0 0;
  padding-left: 20px;
}

.cta {
  margin-top: 40px;
  padding: 32px;
  border-radius: 24px;
  background: var(--accent-surface-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border: 1px solid var(--stroke);
}

.site-footer {
  margin-top: 60px;
  padding: 32px 0 0;
  border-top: 1px solid rgba(11, 27, 43, 0.1);
}

.site-footer.footer-split {
  display: grid;
  gap: 24px;
  align-items: start;
}

.site-footer.footer-workspace {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.site-footer.footer-landing {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
}

.footer-left,
.footer-right {
  display: grid;
  gap: 10px;
}

.footer-right {
  padding-left: 24px;
  border-left: 1px solid rgba(11, 27, 43, 0.1);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-page {
  padding: 60px 0;
  display: flex;
  justify-content: center;
}

.admin-shell {
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 24px;
}

.admin-sidebar {
  position: sticky;
  top: 120px;
  align-self: start;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  height: calc(100vh - 160px);
  overflow-y: auto;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: var(--card-strong);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-link-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tab-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

.tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  font-weight: 600;
}

.tab.active {
  background: var(--accent-surface);
  color: var(--accent-ink);
  border-color: rgba(30, 58, 138, 0.4);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.filter-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  display: grid;
  gap: 6px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}
.accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-card {
  position: relative;
  width: min(420px, 92vw);
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--card-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  z-index: 1;
  display: grid;
  gap: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.admin-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.admin-chart-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  display: grid;
  gap: 12px;
}

.admin-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-items: end;
  height: 60px;
}

.admin-line span {
  display: block;
  height: 40%;
  border-radius: 8px 8px 0 0;
  background: var(--sea);
  animation: pulse 2.4s ease-in-out infinite;
}

.admin-line span:nth-child(2) {
  height: 55%;
  animation-delay: 0.2s;
}

.admin-line span:nth-child(3) {
  height: 70%;
  animation-delay: 0.4s;
}

.admin-line span:nth-child(4) {
  height: 48%;
  animation-delay: 0.6s;
}

.admin-line span:nth-child(5) {
  height: 80%;
  animation-delay: 0.8s;
}

.admin-line span:nth-child(6) {
  height: 62%;
  animation-delay: 1s;
}

.admin-line.alt span {
  background: rgba(243, 178, 76, 0.5);
}

.panel.danger {
  border-color: rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.08);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--input-bg);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }
}
.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(11, 27, 43, 0.12);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.form.compact {
  margin-top: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--input-bg);
  color: var(--ink);
  font-family: inherit;
}

.input::placeholder {
  color: var(--ink-muted);
}

textarea.input {
  resize: vertical;
}

.dashboard-hero {
  padding: 36px 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: center;
}

.dashboard-intro h1 {
  margin: 10px 0 16px;
  font-family: var(--font-base);
  font-size: clamp(2rem, 2.8vw, 2.8rem);
}

.dashboard-intro {
  max-width: 560px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.dashboard-hero-card {
  padding: 26px;
  border-radius: 26px;
  background: var(--accent-surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pulse-tile {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 27, 43, 0.1);
  display: grid;
  gap: 8px;
}

.pulse-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
  margin: 0;
}

.pulse-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pulse-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.pulse-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(243, 178, 76, 0.16);
  color: var(--accent-ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.pulse-stream {
  display: grid;
  gap: 12px;
}

.pulse-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(11, 27, 43, 0.08);
}

.pulse-row strong {
  display: block;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 0 6px rgba(243, 178, 76, 0.12);
}

.pulse-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 30px;
}

.dashboard-main {
  display: grid;
  gap: 24px;
}

.dashboard-aside {
  display: grid;
  gap: 24px;
  align-content: start;
}

.panel {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.panel.accent {
  background: var(--accent-surface);
}

.ai-spotlight {
  border-color: rgba(243, 178, 76, 0.28);
}

.ai-spotlight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ai-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(243, 178, 76, 0.35);
  background: rgba(243, 178, 76, 0.22);
  display: grid;
  gap: 6px;
}

.ai-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-ink-muted);
}

.panel-header {
  display: grid;
  gap: 6px;
}

.panel-header h2 {
  margin: 0;
  font-family: var(--font-base);
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.workspace-sidebar {
  position: fixed;
  top: 120px;
  left: var(--page-pad);
  width: var(--sidebar-width);
  align-self: start;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  height: calc(100vh - 160px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.workspace-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-brand h2 {
  margin: 6px 0;
  font-family: var(--font-base);
}

.sidebar-nav {
  display: grid;
  gap: 14px;
}

.sidebar-group {
  border-radius: 18px;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-surface);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.sidebar-group summary {
  list-style: none;
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--sidebar-title-border);
  background: var(--sidebar-title-bg);
}

.sidebar-title::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.sidebar-title-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
  color: var(--ink-muted);
}

.sidebar-group[open] .sidebar-title::after {
  transform: rotate(-135deg);
}

.sidebar-links {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 2px 6px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-link-bg);
  font-weight: 600;
}

.sidebar-link.active {
  border-color: rgba(243, 178, 76, 0.45);
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink);
}

.sidebar-link.sidebar-sub.active {
  border-color: rgba(243, 178, 76, 0.3);
  background: rgba(243, 178, 76, 0.16);
  color: var(--accent-ink);
}

.sidebar-link.sidebar-sub {
  margin-left: 0;
  padding-left: 16px;
  font-weight: 500;
  background: var(--sidebar-link-sub-bg);
}

.sidebar-link.sidebar-sub.secondary {
  margin-left: 0;
  padding-left: 22px;
  font-size: 0.8rem;
}

.sidebar-link.is-hidden {
  display: none;
}

.sidebar-link.ai {
  border-color: rgba(243, 178, 76, 0.35);
  background: rgba(243, 178, 76, 0.18);
  color: var(--accent-ink);
}

.sidebar-link.ai.active {
  border-color: rgba(243, 178, 76, 0.5);
  background: rgba(243, 178, 76, 0.24);
  color: var(--accent-ink);
}

.ai-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 27, 43, 0.08);
  font-size: 0.65rem;
  font-weight: 600;
  margin-left: 6px;
}

.mode-toggle {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.header-mode-toggle,
.header-theme-toggle {
  display: flex;
  align-items: center;
}

.mode-toggle.header-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.mode-toggle.header-mode .mode-label {
  margin: 0;
}

.mode-toggle.header-mode .mode-switch {
  padding: 4px;
}

.mode-toggle.header-mode .mode-option {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.sidebar-search {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-search-bg);
}

.sidebar-search-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.sidebar-search-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--sidebar-border);
  background: var(--sidebar-input-bg);
  color: var(--ink);
  -webkit-appearance: none;
}

.sidebar-search-input:focus {
  outline: none;
  border-color: rgba(243, 178, 76, 0.6);
  box-shadow: 0 0 0 2px rgba(243, 178, 76, 0.2);
}

.mode-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(11, 27, 43, 0.06);
}

.mode-option {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.mode-option.active {
  background: var(--sea);
  color: #fff;
}

.workspace-main {
  display: grid;
  gap: 24px;
  grid-column: 2 / -1;
  min-width: 0;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.workspace-top h1 {
  margin: 8px 0 12px;
  font-family: var(--font-base);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.quick-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(11, 18, 32, 0.12);
}

.quick-card strong {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.dash-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.dash-chart {
  grid-column: span 2;
}

.spark-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  height: 40px;
  align-items: end;
}

.spark-bars span {
  height: 60%;
  border-radius: 6px;
  background: var(--sea);
  animation: pulse 2.2s ease-in-out infinite;
}

.spark-bars span:nth-child(2) {
  height: 70%;
  animation-delay: 0.2s;
}

.spark-bars span:nth-child(3) {
  height: 50%;
  animation-delay: 0.4s;
}

.spark-bars span:nth-child(4) {
  height: 80%;
  animation-delay: 0.6s;
}

.spark-bars span:nth-child(5) {
  height: 65%;
  animation-delay: 0.8s;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.account-grid,
.strategy-grid,
.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.account-card,
.strategy-card,
.alert-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.account-cta {
  background: rgba(243, 178, 76, 0.12);
}

.strategy-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.strategy-card strong,
.activity-item strong {
  display: block;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.plan-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.limit-list {
  margin: 16px 0;
  display: grid;
  gap: 10px;
}

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(11, 27, 43, 0.08);
}

.list-item > div {
  min-width: 0;
}

.list-item p {
  word-break: break-word;
}

.checklist-progress {
  display: grid;
  gap: 16px;
}

.progress-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 27, 43, 0.08);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.progress-count {
  min-width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(11, 27, 43, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(11, 27, 43, 0.08);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sea);
}

.progress-fill.fill-low {
  width: 30%;
}

.progress-fill.fill-mid {
  width: 55%;
}

.progress-fill.fill-high {
  width: 80%;
}

.queue {
  display: grid;
  gap: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(11, 27, 43, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.queue-item > div {
  min-width: 0;
}

.queue-item p {
  word-break: break-word;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: rgba(11, 27, 43, 0.08);
}

.pill.public {
  background: rgba(243, 178, 76, 0.15);
  color: var(--accent-ink-muted);
}

.pill.private {
  background: rgba(243, 178, 76, 0.2);
  color: #8a4b21;
}

.flash-stack {
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(243, 178, 76, 0.2);
  border: 1px solid rgba(243, 178, 76, 0.4);
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.85rem;
}

.empty-state {
  margin: 0;
  color: var(--ink-muted);
}

.fade-up {
  animation: fadeUp 0.8s ease both;
}

.delay-1 {
  animation-delay: 0.15s;
}

.delay-2 {
  animation-delay: 0.3s;
}

.delay-3 {
  animation-delay: 0.45s;
}

.delay-4 {
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(16px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .auth-links {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-card {
    order: -1;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .site-footer.footer-split {
    grid-template-columns: 1fr;
  }

  .footer-right {
    padding-left: 0;
    border-left: none;
  }

  .workspace-sidebar {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .workspace-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-main {
    grid-column: 1 / -1;
  }

  .dash-chart {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  :root {
    --page-pad: 16px;
  }

  html {
    scroll-padding-top: 90px;
  }

  section[id],
  .panel[id] {
    scroll-margin-top: 90px;
  }

  .anchor-target {
    scroll-margin-top: 90px;
  }

  .page {
    padding: 0 var(--page-pad) 60px;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px;
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.98);
  }

  .logo {
    grid-column: 1 / 2;
  }

  .nav-toggle-label {
    grid-column: 2 / 3;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.85);
    grid-column: 1 / -1;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(11, 27, 43, 0.06);
  }

  .site-nav-auth a {
    width: 100%;
    text-align: center;
    background: rgba(243, 178, 76, 0.12);
    border: 1px solid rgba(243, 178, 76, 0.25);
  }

  .nav-toggle-label {
    display: inline-flex;
    justify-self: end;
  }

  .auth-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.85);
    grid-column: 1 / -1;
  }

  .auth-links .button {
    width: 100%;
    text-align: center;
  }

  .profile-menu {
    width: 100%;
  }

  .profile-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .profile-dropdown {
    position: static;
    min-width: 100%;
    box-shadow: none;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .nav-toggle:checked ~ .auth-links {
    display: flex;
  }

  .user-ui .site-nav {
    display: none;
  }

  .user-ui .auth-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    width: auto;
    background: transparent;
    border: none;
    padding: 0;
  }

  .user-ui .profile-menu {
    width: auto;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-card,
  .card,
  .panel,
  .auth-card,
  .dashboard-hero-card,
  .workspace-sidebar,
  .workspace-top {
    padding: 20px;
    border-radius: 18px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split.reverse {
    direction: ltr;
  }

  .cta {
    padding: 24px;
  }

  .auth-page {
    padding: 40px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 28px 0 20px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .pulse-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .pulse-meta {
    justify-self: start;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .site-header {
    position: static;
  }

  .site-nav,
  .auth-links {
    width: 100%;
  }

  .auth-links {
    justify-content: flex-start;
  }

  .stat-row {
    flex-direction: column;
  }

  .list-item {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .queue-item {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .panel-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .limit-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-item,
  .strategy-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .builder-actions {
    flex-direction: column;
  }

  .ai-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    flex-direction: column;
  }
}
.site-nav-auth a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  color: var(--ink);
  font-size: 0.92rem;
}

/* Trading theme overrides */
.site-header,
.profile-dropdown,
.workspace-sidebar,
.workspace-top {
  background: var(--card-strong);
  border-color: var(--stroke);
}

.panel,
.card,
.hero-card,
.phase-card,
.decision-card,
.dashboard-hero-card,
.auth-card,
.site-footer,
.mode-toggle,
.sidebar-group {
  background: var(--card);
  border-color: var(--stroke);
}

.quick-card,
.dash-card,
.activity-item,
.account-card,
.strategy-card,
.alert-card,
.list-item,
.queue-item,
.progress-item,
.pulse-row,
.pulse-tile,
.pack-item,
.stat,
.plan-card,
.limit-row,
.profile-trigger,
.menu-item,
.nav-toggle-label,
.user-pill,
.kpi-card {
  background: var(--card-soft);
  border-color: var(--stroke);
}

.panel.accent,
.dashboard-hero-card,
.ai-spotlight {
  background: var(--accent-surface);
}

.cta {
  background: var(--accent-surface-strong);
}

.site-footer {
  border-top: 1px solid var(--stroke);
}

.menu-item:hover {
  background: rgba(243, 178, 76, 0.16);
}

.sidebar-link {
  background: var(--sidebar-link-bg);
  border-color: var(--sidebar-border);
}

.sidebar-link.sidebar-sub {
  background: var(--sidebar-link-sub-bg);
}

.sidebar-link.active {
  border-color: rgba(243, 178, 76, 0.45);
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink);
}

.sidebar-link.sidebar-sub.active {
  border-color: rgba(243, 178, 76, 0.3);
  background: rgba(243, 178, 76, 0.16);
  color: var(--accent-ink);
}

.sidebar-group {
  background: var(--sidebar-surface);
  border-color: var(--sidebar-border);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-group:hover {
  border-color: rgba(243, 178, 76, 0.35);
  background: var(--sidebar-surface-hover);
  box-shadow: 0 16px 26px rgba(3, 6, 12, 0.35);
}

.sidebar-group[open] {
  border-color: rgba(243, 178, 76, 0.45);
  background: var(--sidebar-surface-open);
}

.sidebar-title {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sidebar-title-bg);
  border: 1px solid var(--sidebar-title-border);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-group:hover .sidebar-title,
.sidebar-group[open] .sidebar-title {
  background: rgba(243, 178, 76, 0.18);
  border-color: rgba(243, 178, 76, 0.5);
  color: var(--accent-ink);
}

.sidebar-group:hover .sidebar-title::after,
.sidebar-group[open] .sidebar-title::after {
  border-right-color: var(--accent-ink);
  border-bottom-color: var(--accent-ink);
}

.sidebar-group:hover .sidebar-icon,
.sidebar-group[open] .sidebar-icon {
  color: var(--accent-ink);
}

.sidebar-group[open] .sidebar-links {
  animation: sidebarDrop 0.2s ease;
}

.sidebar-link {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 999px;
  background: rgba(243, 178, 76, 0);
  transition: background 0.2s ease;
}

.sidebar-link:hover {
  transform: translateX(2px);
  border-color: rgba(243, 178, 76, 0.4);
  background: var(--sidebar-link-hover-bg);
  box-shadow: 0 12px 18px rgba(3, 6, 12, 0.45);
}

.sidebar-link:hover::before {
  background: rgba(243, 178, 76, 0.7);
}

.sidebar-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(243, 178, 76, 0.35);
  border-color: rgba(243, 178, 76, 0.65);
}

.sidebar-link.active::before {
  background: rgba(243, 178, 76, 0.9);
}

.sidebar-link.sidebar-sub {
  padding-left: 16px;
}

.sidebar-link.sidebar-sub::before {
  left: 4px;
}

.mode-toggle {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mode-toggle:hover {
  border-color: rgba(243, 178, 76, 0.35);
  box-shadow: 0 12px 20px rgba(3, 6, 12, 0.4);
}

.mode-switch {
  background: var(--mode-switch-bg);
}

.mode-option {
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mode-option:hover {
  transform: translateY(-1px);
  background: rgba(243, 178, 76, 0.16);
  color: var(--accent-ink);
}

.mode-option.active {
  box-shadow: inset 0 0 0 1px rgba(243, 178, 76, 0.45);
}

@keyframes sidebarDrop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-badge {
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink-muted);
}

.pill {
  background: var(--subtle-surface);
  color: var(--ink-muted);
}

.pill.public {
  background: rgba(243, 178, 76, 0.18);
  color: var(--accent-ink-muted);
}

.pill.private {
  background: rgba(243, 178, 76, 0.2);
  color: var(--accent-ink-soft);
}

.ai-badge,
.ai-pill {
  background: rgba(243, 178, 76, 0.22);
  color: var(--accent-ink-muted);
}

.pulse-chip {
  background: rgba(243, 178, 76, 0.18);
  color: var(--accent-ink-muted);
}

.avatar {
  background: var(--subtle-surface);
}

.flash {
  background: rgba(243, 178, 76, 0.16);
  border-color: rgba(243, 178, 76, 0.35);
}

.profile-summary {
  border-bottom-color: var(--stroke);
}

.panel-row {
  border-bottom-color: var(--stroke);
}

.auth-divider::before,
.auth-divider::after {
  background: var(--stroke);
}

.progress-count,
.progress-bar {
  background: var(--subtle-surface);
}

@media (max-width: 720px) {
  .site-nav,
  .auth-links {
    background: var(--card-strong);
    border-color: var(--stroke);
  }

  .site-nav a {
    background: var(--card-soft);
  }

  .site-nav-auth a {
    background: var(--accent-surface);
    border-color: rgba(243, 178, 76, 0.4);
    color: var(--accent-ink);
  }

  .workspace-sidebar {
    display: none;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .header-mode-toggle,
  .header-theme-toggle {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

  .nav-toggle:checked ~ .header-mode-toggle,
  .nav-toggle:checked ~ .header-theme-toggle {
    display: flex;
  }

  .mode-toggle.header-mode {
    width: 100%;
    justify-content: space-between;
  }

  .auth-header .site-nav {
    display: none;
  }

  .auth-header .auth-links {
    display: flex;
  }

  .auth-header .site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.auth-header .site-nav.is-hidden {
  display: none;
}

.auth-header .site-header {
  flex-wrap: nowrap;
}

html[data-theme="light"] {
  --ink: #0b1220;
  --ink-muted: #4a5b70;
  --page-bg: #f5f2ec;
  --sand: #f7f2ea;
  --cloud: #ecf2f5;
  --card: rgba(255, 255, 255, 0.92);
  --card-soft: rgba(255, 255, 255, 0.82);
  --card-strong: rgba(255, 255, 255, 0.98);
  --accent-surface: rgba(30, 58, 138, 0.14);
  --accent-surface-strong: rgba(30, 58, 138, 0.18);
  --input-bg: rgba(255, 255, 255, 0.98);
  --stroke: rgba(11, 18, 32, 0.12);
  --shadow: 0 24px 50px rgba(11, 18, 32, 0.14);
  --sidebar-surface: rgba(255, 255, 255, 0.92);
  --sidebar-surface-hover: rgba(255, 255, 255, 0.98);
  --sidebar-surface-open: rgba(255, 255, 255, 0.98);
  --sidebar-border: rgba(11, 18, 32, 0.12);
  --sidebar-title-bg: rgba(248, 250, 252, 0.98);
  --sidebar-title-border: rgba(11, 18, 32, 0.08);
  --sidebar-link-bg: rgba(255, 255, 255, 0.96);
  --sidebar-link-sub-bg: rgba(247, 249, 252, 0.96);
  --sidebar-link-hover-bg: rgba(255, 255, 255, 1);
  --sidebar-search-bg: rgba(255, 255, 255, 0.96);
  --sidebar-input-bg: rgba(255, 255, 255, 1);
  --mode-switch-bg: rgba(11, 18, 32, 0.08);
  --subtle-surface: rgba(0, 0, 0, 0.06);
  --accent-ink: #1e3a8a;
  --accent-ink-muted: #1d4ed8;
  --accent-ink-soft: #1e40af;
}

html[data-theme="light"] body {
  color-scheme: light;
  background: var(--page-bg);
}

html[data-theme="light"] .sidebar-link:hover {
  box-shadow: 0 12px 18px rgba(11, 18, 32, 0.12);
}


:root {
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
}

/* User UI: reduce rounded corners for a sharper look */
.user-ui .site-header,
.user-ui .profile-dropdown,
.user-ui .profile-trigger,
.user-ui .nav-toggle-label,
.user-ui .site-nav a,
.user-ui .auth-links .button,
.user-ui .panel,
.user-ui .card,
.user-ui .hero-card,
.user-ui .phase-card,
.user-ui .decision-card,
.user-ui .dashboard-hero-card,
.user-ui .auth-card,
.user-ui .workspace-sidebar,
.user-ui .workspace-top,
.user-ui .quick-card,
.user-ui .dash-card,
.user-ui .activity-item,
.user-ui .account-card,
.user-ui .strategy-card,
.user-ui .alert-card,
.user-ui .list-item,
.user-ui .queue-item,
.user-ui .progress-item,
.user-ui .pulse-row,
.user-ui .pulse-tile,
.user-ui .pack-item,
.user-ui .stat,
.user-ui .plan-card,
.user-ui .limit-row,
.user-ui .input,
.user-ui .button,
.user-ui .pill {
  border-radius: var(--radius-sm);
}

.user-ui .site-header {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Mobile app-style bottom bar */
.mobile-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px 14px;
  background: var(--card-strong);
  border-top: 1px solid var(--stroke);
  box-shadow: 0 -16px 30px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.mobile-tabbar .tab-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
}

.mobile-tabbar .tab-item.active {
  color: var(--ink);
  background: var(--accent-surface);
}

.mobile-tabbar .tab-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.mobile-tabbar svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .page {
    padding-bottom: 100px;
  }
}

@media (max-width: 720px) {
  .mobile-tabbar {
    display: grid;
  }
}

@media (max-width: 720px) {
  .user-ui .page {
    padding-left: 0;
    padding-right: 0;
  }

  .user-ui main {
    width: 100%;
  }

  .user-ui .site-header {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .user-ui .panel,
  .user-ui .card,
  .user-ui .workspace-top,
  .user-ui .dashboard-hero-card,
  .user-ui .auth-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 720px) {
  .user-ui .site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .user-ui .logo {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    align-items: center;
    justify-content: space-between;
  }

  .site-nav {
    width: 100%;
  }

  .auth-links {
    width: auto;
  }
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 200px;
  }

  .workspace-sidebar {
    padding: 16px;
  }

  .sidebar-title {
    font-size: 0.68rem;
  }

  .sidebar-link {
    font-size: 0.9rem;
    padding: 8px 10px;
  }
}

.sidebar-toggle {
  display: none;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--card-soft);
  color: inherit;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .workspace-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .workspace-shell.sidebar-collapsed .workspace-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .accounts-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .accounts-header .button {
    width: 100%;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: 92vw;
  }
}
