/* ============================================================
   Simulacrum — main.css
   Design tokens (match landing.html SIM-PRD-HOME-001):
     --navy        #0D1B3E   headings / dark text
     --teal        #0F7B72   primary accent / links
     --gold        #C9952A   secondary CTAs / highlights
     --off-white   #FAFBFC   page background
     --dark        #1A1A2E   body text
     --muted       #6B7B8D   secondary text
     --border      rgba(0,0,0,0.07)   card borders
   Typography: DM Sans (body), Playfair Display (headings)
   ============================================================ */

/* ── Custom Properties ────────────────────────────────────── */
:root {
  --navy:       #0D1B3E;
  --navy-mid:   #152A54;
  --teal:       #0F7B72;
  --teal-light: #13A89E;
  --gold:       #C9952A;
  --off-white:  #FAFBFC;
  --dark:       #1A1A2E;
  --muted:      #6B7B8D;
  --border:     rgba(0,0,0,0.07);
  --card-bg:    #FFFFFF;
  --coral:      #E85D4A;
  --accent:     #0F7B72;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--off-white);
  color: var(--dark);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--teal-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy);
}

ul {
  list-style: disc;
  padding-left: 1.25rem;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 252, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 300ms;
}

.navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--teal);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: #fff;
  border-radius: 8px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
}

.logo-text {
  color: inherit;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.nav-link:hover {
  color: var(--navy);
  background: rgba(0, 0, 0, 0.04);
}

.nav-user {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  padding: 0 0.5rem;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: 0.25rem;
  padding-left: 0.75rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.18s, color 0.18s, transform 0.1s, box-shadow 0.18s;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 123, 114, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: #0c6860;
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 123, 114, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gold);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: #b8851f;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--navy);
  border-color: rgba(0, 0, 0, 0.22);
}

.btn-danger {
  background: transparent;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
}

/* ── Flash Messages ───────────────────────────────────────── */
.flash-container {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid;
}

.flash-success {
  background: rgba(34, 197, 94, 0.09);
  border-color: #22c55e;
  color: #15803d;
}

.flash-error, .flash-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  color: #b91c1c;
}

.flash-info {
  background: rgba(59, 130, 246, 0.09);
  border-color: #3b82f6;
  color: #1d4ed8;
}

.flash-warning {
  background: rgba(201, 149, 42, 0.1);
  border-color: var(--gold);
  color: #92400e;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  border-top: none;
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'DM Sans', sans-serif;
}

.footer a {
  color: rgba(255, 255, 255, 0.5);
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.footer-tagline {
  font-style: italic;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Page Container (shared) ──────────────────────────────── */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.page-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  font-family: 'DM Sans', sans-serif;
}

.section-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.hero-inner {
  flex: 1;
  min-width: 280px;
}

.hero-badge {
  display: inline-block;
  background: rgba(15, 123, 114, 0.1);
  color: var(--teal);
  border: 1px solid rgba(15, 123, 114, 0.25);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-family: 'DM Sans', sans-serif;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--navy);
}

.hero-title .accent {
  color: var(--teal);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-family: 'DM Sans', sans-serif;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Hero Pyramid (Landing) ───────────────────────────────── */
.hero-pyramid {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  align-items: stretch;
}

.pyramid-layer {
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  cursor: default;
  letter-spacing: 0.01em;
  transition: transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.pyramid-layer:hover {
  transform: scaleX(1.02);
}

.l1 { background: var(--teal); }
.l2 { background: #0c6860; width: 88%; margin: 0 auto; }
.l3 { background: var(--navy-mid); width: 76%; margin: 0 auto; }
.l4 { background: var(--navy); width: 64%; margin: 0 auto; }
.l5 { background: #0a1628; width: 52%; margin: 0 auto; }

/* ── Features Section ─────────────────────────────────────── */
.features {
  background: #F3F4F6;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 5rem 1.5rem;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(15, 123, 114, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.feature-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 3rem 1.5rem;
}

.auth-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.auth-card.text-center {
  text-align: center;
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.auth-title {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: var(--navy);
}

.auth-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  font-family: 'DM Sans', sans-serif;
}

.auth-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  font-family: 'DM Sans', sans-serif;
}

.auth-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.25rem;
  font-family: 'DM Sans', sans-serif;
}

.auth-footer a {
  color: var(--teal);
  font-weight: 600;
}

/* ── Form Elements ────────────────────────────────────────── */
.auth-form,
.form-group {
  display: flex;
  flex-direction: column;
}

.auth-form {
  gap: 1.1rem;
}

.form-group {
  gap: 0.4rem;
  position: relative;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'DM Sans', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea,
.input-text,
.input-textarea,
.input-select {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  color: var(--dark);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-text:focus,
.input-textarea:focus,
.input-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 123, 114, 0.12);
}

.form-group input::placeholder,
.input-text::placeholder,
.input-textarea::placeholder {
  color: #9CA3AF;
}

.form-group select option,
.input-select option {
  background: #fff;
  color: var(--dark);
}

.form-error {
  color: #b91c1c;
  font-size: 0.82rem;
  padding: 0.6rem 0.85rem;
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 6px;
  margin-top: 0.25rem;
  font-family: 'DM Sans', sans-serif;
}

.form-hint-link {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  margin-top: 0.25rem;
  align-self: flex-end;
  font-family: 'DM Sans', sans-serif;
}

.form-hint-link:hover {
  color: var(--teal);
}

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.dashboard-header h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.dashboard-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.35rem;
  font-family: 'DM Sans', sans-serif;
}

.dashboard-section {
  margin-bottom: 2.75rem;
}

/* ── Simulation Grid (Dashboard) ──────────────────────────── */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.sim-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sim-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.sim-card.status-complete {
  border-left: 3px solid #22c55e;
}

.sim-card.status-processing,
.sim-card.status-streaming {
  border-left: 3px solid var(--gold);
}

.sim-card.status-pending {
  border-left: 3px solid #9CA3AF;
}

.sim-card.status-failed {
  border-left: 3px solid #dc2626;
}

.sim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.sim-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  font-family: 'DM Sans', sans-serif;
}

.sim-zone {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}

.sim-meta {
  font-size: 0.78rem;
  color: #9CA3AF;
  font-family: 'DM Sans', sans-serif;
}

.sim-actions {
  margin-top: 0.5rem;
}

/* ── Status Badges ────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

.status-badge.status-complete   { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.status-badge.status-processing,
.status-badge.status-streaming  { background: rgba(201, 149, 42, 0.12); color: #92400e; }
.status-badge.status-pending    { background: rgba(107, 114, 128, 0.1); color: var(--muted); }
.status-badge.status-failed     { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.status-badge.status-refunded   { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }
.status-badge.status-active     { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.status-badge.status-suspended  { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.status-badge.status-inactive   { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

/* ── Source List ──────────────────────────────────────────── */
.source-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.source-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.source-item:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.source-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.source-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.source-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

.source-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}

.source-actions {
  flex-shrink: 0;
}

/* ── Source Upload Grid ───────────────────────────────────── */
.source-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.upload-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-icon {
  font-size: 2.5rem;
}

.upload-card h3 {
  font-size: 1.1rem;
}

.upload-card p {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
}

.file-drop-zone {
  border: 2px dashed rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}

.file-drop-zone:hover {
  border-color: rgba(15, 123, 114, 0.4);
  background: rgba(15, 123, 114, 0.04);
}

.file-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-label {
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
}

/* ── Resume Detail ────────────────────────────────────────── */
.resume-editor-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.resume-editor-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  background: rgba(15, 123, 114, 0.1);
  color: var(--teal);
  border: 1px solid rgba(15, 123, 114, 0.25);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  font-family: 'DM Sans', sans-serif;
}

.resume-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: var(--dark);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 0.75rem;
}

.resume-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 123, 114, 0.1);
}

/* ── Expertise Zones ──────────────────────────────────────── */
.zones-section {
  margin-bottom: 2rem;
}

.zones-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.zone-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.zone-card:hover {
  border-color: rgba(15, 123, 114, 0.3);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.zone-header h3 {
  font-size: 1rem;
  color: var(--navy);
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}

.zone-potential {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}

.potential-high     { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.potential-very.high,
.potential-very_high { background: rgba(34, 197, 94, 0.18); color: #166534; }
.potential-medium   { background: rgba(201, 149, 42, 0.12); color: #92400e; }
.potential-low      { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

.zone-summary {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  font-family: 'DM Sans', sans-serif;
}

.zone-rate {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal);
  font-family: 'DM Sans', sans-serif;
}

/* ── Simulation Detail ────────────────────────────────────── */
.sim-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.sim-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.sim-detail-header h1 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.sim-detail-zone {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.3rem;
  font-family: 'DM Sans', sans-serif;
}

.sim-detail-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}

/* ── Stream Status Bar ────────────────────────────────────── */
.stream-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(15, 123, 114, 0.07);
  border: 1px solid rgba(15, 123, 114, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 0.88rem;
  color: var(--teal);
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}

.stream-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(15, 123, 114, 0.25);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stream-error {
  color: #b91c1c;
}

/* ── Pyramid Container ────────────────────────────────────── */
.pyramid-container {
  margin-top: 0.5rem;
}

.pyramid-header {
  margin-bottom: 1.25rem;
}

.pyramid-header h2 {
  font-size: 1.25rem;
}

.pyramid-header p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-family: 'DM Sans', sans-serif;
}

.layers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Layer Cards ──────────────────────────────────────────── */
.layer-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.layer-card:hover {
  border-color: rgba(0, 0, 0, 0.13);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.layer-card.layer-1 { border-left: 4px solid var(--teal); }
.layer-card.layer-2 { border-left: 4px solid #0c8a81; }
.layer-card.layer-3 { border-left: 4px solid var(--gold); }
.layer-card.layer-4 { border-left: 4px solid #a87a1c; }
.layer-card.layer-5 { border-left: 4px solid var(--navy-mid); }

.layer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.layer-card-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.layer-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.layer-num-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15, 123, 114, 0.1);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}

.layer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
}

.layer-toggle {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.layer-num {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

.layer-card-body {
  padding: 0 1.35rem 1.35rem;
  transition: max-height 0.3s ease;
}

.layer-card-body.collapsed {
  display: none;
}

.layer-narrative {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 123, 114, 0.04);
  border-radius: 8px;
  border-left: 2px solid rgba(15, 123, 114, 0.25);
  font-family: 'DM Sans', sans-serif;
}

/* ── Layer Appear Animation ───────────────────────────────── */
@keyframes layerAppear {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.layer-appear {
  animation: layerAppear 0.4s ease both;
}

/* ── Layer Skeleton ───────────────────────────────────────── */
.layer-skeleton {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  overflow: hidden;
}

.layer-skeleton-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
}

.skeleton-text {
  color: #9CA3AF;
  font-size: 0.88rem;
  font-style: italic;
  animation: pulse 1.8s ease-in-out infinite;
  font-family: 'DM Sans', sans-serif;
}

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

/* ── Income Streams ───────────────────────────────────────── */
.income-streams {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stream-card {
  background: #F8F9FA;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.stream-card:hover {
  border-color: rgba(0, 0, 0, 0.13);
}

.stream-header {
  padding: 1rem 1.1rem;
  cursor: pointer;
  user-select: none;
}

.stream-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.stream-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
}

.stream-range {
  font-size: 0.82rem;
  font-weight: 700;
  color: #15803d;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}

.stream-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0.4rem;
  font-family: 'DM Sans', sans-serif;
}

.stream-platform {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'DM Sans', sans-serif;
}

.stream-reasoning {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1rem 1.1rem;
  background: rgba(15, 123, 114, 0.03);
}

.reasoning-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}

.reasoning-text {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.65;
  font-family: 'DM Sans', sans-serif;
}

.deliverable-refs {
  margin-top: 0.85rem;
  font-size: 0.8rem;
}

.deliverable-refs strong {
  color: var(--navy);
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.35rem;
  font-family: 'DM Sans', sans-serif;
}

.deliverable-refs ul {
  padding-left: 1.1rem;
}

.deliverable-refs li {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.2rem;
  font-family: 'DM Sans', sans-serif;
}

.stream-meta-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  font-family: 'DM Sans', sans-serif;
}

/* ── Layer Refine ─────────────────────────────────────────── */
.layer-refine {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* ── Modals ───────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.hidden {
  display: none !important;
}

.modal-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.15);
}

.modal-card h2 {
  font-size: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.sim-zone-label {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.card-fields { display: flex; flex-direction: column; gap: 0.75rem; }
.card-field-split { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.card-field-row { display: flex; flex-direction: column; gap: 0.3rem; }
.card-field-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-family: 'DM Sans', sans-serif; }
.stripe-field { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.12); border-radius: 8px; padding: 0.65rem 0.875rem; }
.stripe-field-input { color: var(--dark); font-size: 0.95rem; font-family: 'DM Sans', sans-serif; outline: none; width: 100%; box-sizing: border-box; background: transparent; border: none; }
.stripe-field-input::placeholder { color: #9CA3AF; }

/* ── Collab Invites ───────────────────────────────────────── */
.collab-invites {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.invite-card {
  background: rgba(15, 123, 114, 0.05);
  border: 1px solid rgba(15, 123, 114, 0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--navy);
  flex-wrap: wrap;
  font-family: 'DM Sans', sans-serif;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  background: #fff;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  font-family: 'DM Sans', sans-serif;
}

.empty-state a {
  color: var(--teal);
  font-weight: 600;
}

/* ── Admin ────────────────────────────────────────────────── */
.admin-section {
  margin-bottom: 2.75rem;
}

.admin-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Settings grid */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.setting-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.setting-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: 'DM Sans', sans-serif;
}

.setting-info p {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--teal);
}

.toggle-switch input:checked + .toggle-slider::before {
  background: #fff;
  transform: translateX(20px);
}

/* Revenue Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.02em;
  font-family: 'Playfair Display', serif;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'DM Sans', sans-serif;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
}

.admin-table thead tr {
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.admin-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.75rem 0.85rem;
  color: var(--dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    min-height: auto;
    padding: 3rem 1.25rem;
    gap: 3rem;
  }

  .hero-pyramid {
    flex: none;
    width: 100%;
    max-width: 400px;
  }

  .hero-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 680px) {
  .nav-inner {
    padding: 0 1rem;
  }

  .nav-links .nav-link {
    display: none;
  }

  .dashboard-header,
  .page-header,
  .sim-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .auth-card {
    padding: 2rem 1.25rem;
  }

  .modal-card {
    padding: 1.5rem 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .setting-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .source-upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  .l5 { width: 60%; }
  .l4 { width: 70%; }
  .l3 { width: 80%; }
  .l2 { width: 90%; }
  .l1 { width: 100%; }
}

/* ── Utility ──────────────────────────────────────────────── */
.accent { color: var(--teal); }

.input-text + .input-text,
.input-text + .input-textarea,
.input-textarea + .input-text {
  margin-top: 0.75rem;
}

/* ── Agent Workspace ──────────────────────────────────────── */
.agent-workspace {
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 1rem;
}

.agent-workspace-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  border-radius: 0 0 8px 8px;
  transition: background 0.15s;
}
.agent-workspace-header:hover { background: rgba(0,0,0,0.03); }

.agent-workspace-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.03em;
  font-family: 'DM Sans', sans-serif;
}
.agent-workspace-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
  font-family: 'DM Sans', sans-serif;
}
.agent-toggle { color: #9CA3AF; font-size: 0.8rem; }

.agent-workspace-body {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.agent-workspace-body.hidden { display: none; }

.agent-loading { font-size: 0.78rem; color: var(--muted); font-family: 'DM Sans', sans-serif; }

.agent-action-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent-type-btn {
  font-size: 0.78rem !important;
  padding: 0.3rem 0.7rem !important;
}

/* action form */
.agent-action-form {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.form-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
  font-family: 'DM Sans', sans-serif;
}
.agent-action-form .form-group label {
  color: var(--muted);
}
.agent-action-form .form-group input,
.agent-action-form .form-group select,
.agent-action-form .form-group textarea,
.agent-action-form .input-text,
.agent-action-form .input-select {
  background: #F8F9FA;
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--dark);
}
.agent-action-form .form-group input::placeholder,
.agent-action-form .input-text::placeholder,
.agent-action-form textarea::placeholder {
  color: #9CA3AF;
}
.agent-action-form .agent-disclaimer {
  color: var(--muted);
}
.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}
.btn-xs {
  font-size: 0.72rem !important;
  padding: 0.2rem 0.5rem !important;
}

/* actions log */
.actions-log-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9CA3AF;
  margin-bottom: 0.4rem;
  font-family: 'DM Sans', sans-serif;
}

.agent-action-card {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.action-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.action-type-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #15803d;
  flex: 1;
  text-transform: capitalize;
  font-family: 'DM Sans', sans-serif;
}
.action-card-btns {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.agent-artifact {
  margin-top: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
}
.agent-artifact pre {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--dark);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: inherit;
}

/* ── Priority badges ──────────────────────────────────────── */
.priority-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
}
.priority-high  { background: rgba(15,123,114,0.12); color: var(--teal); }
.priority-mid   { background: rgba(0,0,0,0.06); color: var(--muted); }
.priority-low   { background: rgba(0,0,0,0.04); color: #9CA3AF; }

/* ── Collaboration audit log ──────────────────────────────── */
.collab-audit-section {
  margin-top: 2rem;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.collab-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  background: rgba(0,0,0,0.02);
}
.collab-audit-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
}
.collab-audit-log {
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.collab-audit-log.hidden { display: none; }
.audit-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.78rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-family: 'DM Sans', sans-serif;
}
.audit-type    { font-weight: 600; color: var(--navy); text-transform: capitalize; }
.audit-layer   { color: var(--teal); font-size: 0.72rem; }
.audit-content { flex: 1; color: var(--muted); font-style: italic; }
.audit-time    { color: #9CA3AF; font-size: 0.72rem; margin-left: auto; }
.audit-empty   { font-size: 0.78rem; color: #9CA3AF; padding: 0.5rem 0; }

/* ── Agent action disclaimer ──────────────────────────────── */
.agent-disclaimer {
  margin: 0.5rem 0 0.25rem;
  padding: 0.5rem 0.75rem;
  background: rgba(201,149,42,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  font-family: 'DM Sans', sans-serif;
}

/* ── Action result Copy/Download buttons ─────────────────── */
.btn-xs {
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 4px;
}

/* ── Price history table (admin) ──────────────────────────── */
.price-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
}
.price-history-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.price-history-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--dark);
}
.price-history-empty {
  font-size: 0.8rem;
  color: #9CA3AF;
  padding: 0.5rem 0;
  font-family: 'DM Sans', sans-serif;
}

/* ── Dashboard sim notices ────────────────────────────────── */
.sim-notice {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}
.sim-notice-error { color: #b91c1c; }

/* ── Admin subnav ─────────────────────────────────────────── */
.admin-subnav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.subnav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.subnav-link:hover { color: var(--navy); }
.subnav-link.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* ── Partner status badges ────────────────────────────────── */
.status-badge.status-active   { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.status-badge.status-suspended { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.status-badge.status-inactive  { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

/* ── Admin table action cell ──────────────────────────────── */
.action-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Legal pages (ToS / Privacy Policy) ─────────────────── */
.legal-page { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.legal-header { margin-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 1.25rem; }
.legal-header h1 { font-size: 2rem; color: var(--navy); margin: 0 0 0.4rem; }
.legal-meta { font-size: 0.82rem; color: var(--muted); margin: 0; font-family: 'DM Sans', sans-serif; }
.legal-body h2 { font-size: 1.15rem; color: var(--navy); margin: 2rem 0 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.07); padding-bottom: 0.35rem; }
.legal-body h3 { font-size: 0.95rem; color: var(--dark); margin: 1.25rem 0 0.35rem; font-family: 'DM Sans', sans-serif; }
.legal-body p  { color: var(--muted); font-size: 0.88rem; line-height: 1.7; margin: 0 0 0.75rem; font-family: 'DM Sans', sans-serif; }
.legal-body ul, .legal-body ol { color: var(--muted); font-size: 0.88rem; line-height: 1.7; padding-left: 1.4rem; margin-bottom: 0.75rem; font-family: 'DM Sans', sans-serif; }
.legal-body li { margin-bottom: 0.3rem; }
.legal-body a  { color: var(--teal); }
.legal-body a:hover { text-decoration: underline; }
.legal-notice { background: rgba(201,149,42,0.07); border: 1px solid rgba(201,149,42,0.25); border-radius: 8px; padding: 0.85rem 1rem; margin-top: 2.5rem; font-size: 0.82rem; color: #92400e; font-family: 'DM Sans', sans-serif; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin: 0.75rem 0 1.25rem; }
.legal-table th { background: #F3F4F6; color: var(--navy); padding: 0.55rem 0.75rem; text-align: left; font-weight: 600; font-family: 'DM Sans', sans-serif; }
.legal-table td { border-bottom: 1px solid rgba(0,0,0,0.07); padding: 0.55rem 0.75rem; color: var(--muted); vertical-align: top; font-family: 'DM Sans', sans-serif; }

/* ── Consent gate modal ───────────────────────────────────── */
.consent-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.consent-modal-overlay.show { display: flex; }
.consent-modal {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 1.75rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}
.consent-modal-header { margin-bottom: 1.25rem; }
.consent-modal-header h2 { font-size: 1.15rem; color: var(--navy); margin: 0 0 0.35rem; }
.consent-modal-header p { font-size: 0.82rem; color: var(--muted); margin: 0; font-family: 'DM Sans', sans-serif; }
.consent-summary {
  background: #F8F9FA;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}
.consent-summary-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}
.consent-summary-row:last-child { margin-bottom: 0; }
.consent-summary-icon { color: var(--teal); flex-shrink: 0; margin-top: 0.05rem; }
.consent-checkboxes { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
.consent-check-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--dark);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.consent-check-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--teal);
  cursor: pointer;
}
.consent-check-row a { color: var(--teal); }
.consent-modal-footer { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
.consent-upload-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.consent-upload-btn:not(:disabled):hover { background: var(--navy-mid); }
.consent-upload-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.consent-upload-btn.active { background: var(--teal); }
.consent-cancel-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  padding: 0.25rem;
  font-family: 'DM Sans', sans-serif;
}

/* ── Partner shortcut card ────────────────────────────────── */
.partner-shortcut-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.partner-shortcut-info { display: flex; flex-direction: column; gap: 0.25rem; }
.partner-shortcut-label { font-size: 0.82rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.04em; font-family: 'DM Sans', sans-serif; }
.partner-shortcut-stats { font-size: 0.82rem; color: var(--muted); display: flex; gap: 0.5rem; align-items: center; font-family: 'DM Sans', sans-serif; }
