/* ══════════════════════════════════════════════
   THAI DATA GUY — Style Sheet
   Dark analytics theme, full-viewport pages
══════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #07091a;
  --surface:      #0d1128;
  --surface-2:    #131830;
  --border:       #1a2240;
  --border-light: #212d50;

  --accent:       #d4a017;
  --accent-dim:   rgba(212, 160, 23, 0.12);
  --accent2:      #00b4d8;
  --accent2-dim:  rgba(0, 180, 216, 0.12);

  --text:         #e4eaf7;
  --text-muted:   #5e7199;
  --text-mid:     #8da1c4;

  --topbar-h:     58px;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(7, 9, 26, 0.95);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 0;
  line-height: 1;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ══════════════════════════════════════════════
   PAGE SYSTEM
══════════════════════════════════════════════ */

.page {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.page.active {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════ */

#page-home {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.home-hero {
  flex: 0 0 auto;
  padding: 52px 60px 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(212,160,23,0.04) 0%, transparent 60%);
}

.home-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.home-headline {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.accent2 {
  color: var(--accent2);
}

.home-sub {
  font-size: 14px;
  color: var(--text-mid);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.home-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 24px;
  opacity: 0.6;
}

.home-stats-row {
  display: flex;
  gap: 48px;
}

.home-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-stat-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.home-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Sector Grid */

.home-sectors {
  flex: 1;
  padding: 28px 60px 24px;
  overflow: hidden;
}

.home-sectors-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  height: calc(100% - 32px);
}

.sector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.sector-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.sector-card:hover {
  border-color: var(--border-light);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.sector-card:hover::before {
  opacity: 1;
}

.sector-card-icon {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 10px;
}

.sector-card-body h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.sector-card-body p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.sector-card-arrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.sector-card:hover .sector-card-arrow {
  opacity: 1;
}

.sector-card-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ══════════════════════════════════════════════
   SECTOR PAGE LAYOUT (3 column)
══════════════════════════════════════════════ */

.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  height: 100%;
  overflow: hidden;
}

/* LEFT COLUMN */

.page-left {
  padding: 36px 24px 24px 32px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.page-header {
  flex: 0 0 auto;
}

.page-number {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  opacity: 0.7;
  display: block;
  margin-bottom: 10px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Metrics */

.metrics-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.metric-val.accent  { color: var(--accent); }
.metric-val.accent2 { color: var(--accent2); }

.metric-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mid);
  margin-top: 3px;
}

.metric-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* CENTER COLUMN */

.page-center {
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 26px;
  flex: 0 0 auto;
  overflow: hidden;
}

.insight-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.insight-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.insight-body {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 12px;
}

.insight-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.insight-data-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.insight-data-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.idata-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.idata-lbl {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   ARTICLES SECTION (center column)
══════════════════════════════════════════════ */

.articles-section {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.articles-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.articles-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.articles-list::-webkit-scrollbar {
  width: 3px;
}
.articles-list::-webkit-scrollbar-track {
  background: transparent;
}
.articles-list::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 2px;
}

.article-card {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
}

.article-card:last-child {
  border-bottom: none;
  padding-bottom: 16px;
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.article-card:hover .article-card-title {
  color: var(--accent);
}

.article-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 6px;
}

.article-card-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.15s;
}

.article-card:hover .article-card-link {
  opacity: 1;
}

/* Supply Chain Card */

.supply-chain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  flex: 0 0 auto;
}

.chain-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.chain-node {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.chain-node small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.chain-arrow {
  color: var(--accent);
  font-size: 16px;
  opacity: 0.7;
  flex: 0 0 auto;
}

/* RIGHT COLUMN — Opportunities */

.page-right {
  padding: 36px 24px 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

.page-right::-webkit-scrollbar {
  width: 4px;
}
.page-right::-webkit-scrollbar-track {
  background: transparent;
}
.page-right::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 2px;
}

.opportunities-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 4px 0 8px;
}

.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.opp-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.opp-item:last-child {
  border-bottom: none;
}

.opp-num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid rgba(212, 160, 23, 0.2);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  letter-spacing: 0.05em;
}

.opp-content h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.3;
}

.opp-content p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Desktop, tablet, mobile
══════════════════════════════════════════════ */

@media (max-width: 1280px) {
  .topbar {
    padding: 0 18px;
  }
  .home-hero,
  .home-sectors {
    padding-left: 28px;
    padding-right: 28px;
  }
  .home-stats-row {
    gap: 28px;
  }
  .page-layout {
    grid-template-columns: 240px minmax(0, 1fr) 260px;
  }
}

@media (max-width: 1024px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  .topbar {
    position: sticky;
    height: auto;
    min-height: var(--topbar-h);
    padding: 10px 14px;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .brand {
    min-width: 0;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    gap: 6px;
  }
  .nav::-webkit-scrollbar {
    height: 3px;
  }
  .nav-btn {
    font-size: 11px;
    padding: 6px 10px;
  }
  #topbar-auth {
    margin-left: auto;
  }

  .page {
    position: relative;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    min-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    display: none;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }
  .page.active {
    display: block;
  }

  #page-home {
    min-height: calc(100vh - var(--topbar-h));
  }
  .home-hero {
    padding: 34px 22px 24px;
  }
  .home-headline {
    font-size: 34px;
  }
  .home-sub {
    max-width: 100%;
  }
  .home-stats-row {
    flex-wrap: wrap;
    gap: 18px;
  }
  .home-sectors {
    padding: 20px 22px 26px;
    overflow: visible;
  }
  .sector-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .page-layout {
    height: auto;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
  }
  .page-left,
  .page-center,
  .page-right {
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .page-left {
    padding: 24px 20px;
    gap: 18px;
  }
  .metrics-stack {
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric-card {
    min-height: 104px;
  }
  .page-center {
    padding: 24px 20px;
  }
  .articles-section {
    padding-bottom: 10px;
  }
  .articles-list {
    overflow: visible;
  }
  .page-right {
    padding: 24px 20px 16px;
    overflow: visible;
    border-bottom: none;
  }
  .opportunities-label {
    position: static;
    padding: 0;
    margin-bottom: 10px;
  }
}

@media (max-width: 720px) {
  .brand-main {
    font-size: 13px;
    letter-spacing: 0.12em;
  }
  .brand-sub {
    font-size: 8px;
  }
  .auth-user-email {
    max-width: 110px;
  }
  .auth-btn {
    padding: 6px 10px;
  }

  .home-eyebrow {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
  .home-headline {
    font-size: 28px;
    line-height: 1.15;
  }
  .home-sub {
    font-size: 13px;
    line-height: 1.65;
  }
  .home-stat-val {
    font-size: 20px;
  }
  .home-stat-lbl {
    font-size: 10px;
  }
  .sector-grid {
    grid-template-columns: 1fr;
  }
  .sector-card {
    padding: 16px 16px;
  }
  .sector-card-body h3 {
    font-size: 14px;
  }
  .sector-card-body p {
    font-size: 11px;
  }
  .sector-card-arrow {
    opacity: 1;
  }
  .sector-card-tag {
    position: static;
    width: fit-content;
    margin-top: 10px;
  }

  .page-title {
    font-size: 22px;
  }
  .page-subtitle {
    font-size: 11px;
  }
  .metrics-stack {
    grid-template-columns: 1fr;
  }
  .metric-card {
    min-height: 0;
  }
  .metric-val {
    font-size: 20px;
  }
  .insight-card,
  .supply-chain-card,
  .articles-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .insight-headline {
    font-size: 18px;
  }
  .insight-body {
    font-size: 12px;
  }
  .insight-data-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .idata-val {
    font-size: 20px;
  }
  .article-card-title {
    font-size: 12.5px;
  }
  .article-card-desc {
    font-size: 11px;
  }
  .article-card-link {
    opacity: 1;
  }

  .chain-flow {
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: visible;
  }
  .chain-node {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
    white-space: normal;
  }
  .chain-arrow {
    display: none;
  }
}

/* ══════════════════════════════════════════════
   SCROLLBAR — global subtle style
══════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

/* ══════════════════════════════════════════════
   TRANSITIONS & UTILITIES
══════════════════════════════════════════════ */

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ══════════════════════════════════════════════
   AUTH — Topbar Area
══════════════════════════════════════════════ */

#topbar-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.auth-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border: none;
}

.auth-btn--outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-mid);
}
.auth-btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-btn--accent {
  background: var(--accent);
  color: #07091a;
  font-weight: 700;
}
.auth-btn--accent:hover {
  background: #e8b41c;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,160,23,0.25);
}

.auth-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.auth-btn--ghost:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.auth-user-email {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-member-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(212,160,23,0.3);
  padding: 3px 9px;
  border-radius: 20px;
}

/* ══════════════════════════════════════════════
   AUTH — Article Card Locked State
══════════════════════════════════════════════ */

.article-card--locked {
  cursor: pointer;
}

.article-lock-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(212,160,23,0.2);
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 5px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════════════ */

#auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 9, 26, 0.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#auth-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.65),
    0 0 0 1px rgba(212,160,23,0.08);
  scrollbar-width: none;
}
.modal-card::-webkit-scrollbar { display: none; }

.modal-top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #e8b41c, #f5c842);
  border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  transition: all 0.2s;
  z-index: 1;
}
.modal-close:hover {
  border-color: var(--border-light);
  color: var(--text);
}

/* ── Modal header ───────────────────────────── */

.modal-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 0;
}
.modal-brand {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.modal-brand-sub {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Pane system ────────────────────────────── */

.modal-pane  { display: none; }
.modal-pane.active { display: block; }

/* ── Subscription Pane ──────────────────────── */

.modal-sub-inner {
  padding: 24px 32px 36px;
}

.modal-sub-headline {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 8px;
}

.modal-sub-tagline {
  font-size: 13px;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 22px;
}

/* Features */
.modal-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.modal-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.4;
}
.modal-feature-dot {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Price */
.modal-price-block {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.modal-price-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #f5c842);
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}
.modal-price-val {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}
.modal-price-per {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}
.modal-price-note {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Subscribe CTA */
.modal-subscribe-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #07091a;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-bottom: 14px;
}
.modal-subscribe-btn:hover {
  background: #e8b41c;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212,160,23,0.3);
}

.modal-sub-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.modal-sub-footer button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}
.modal-sub-footer button:hover { text-decoration: underline; }

/* ── Sign In / Sign Up Pane ─────────────────── */

.modal-auth-inner {
  padding: 20px 32px 36px;
}

.modal-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.modal-auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.modal-auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.modal-auth-form { display: block; }

.modal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 10px;
  display: block;
}
.modal-input::placeholder { color: var(--text-muted); }
.modal-input:focus { border-color: var(--accent); }

.modal-error {
  font-size: 11px;
  color: #e05c5c;
  min-height: 16px;
  margin-bottom: 10px;
}

.modal-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.modal-submit-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #07091a;
}
.modal-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.modal-auth-footer button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.modal-auth-footer button:hover { text-decoration: underline; }
