/* ===== CSS VARIABLES ===== */
:root {
  --bg:         #f7f5f2;
  --bg-2:       #efecea;
  --bg-3:       #e8e4e0;
  --surface:    #ffffff;
  --surface-2:  #faf9f7;
  --border:     #e2ddd8;
  --border-2:   #d4cec8;

  --text-1:     #2a2520;
  --text-2:     #6b6360;
  --text-3:     #9e9894;

  --up:         #2d7a5f;
  --up-bg:      #e8f5f0;
  --up-bright:  #1a9e6e;   /* vivid accent */
  --down:       #c0392b;
  --down-bg:    #fdecea;
  --down-bright:#e74c3c;   /* vivid accent */

  --accent:     #8b7355;
  --accent-2:   #a08060;

  /* Pastel section colours */
  --pastel-blue:  #dde8f5;
  --pastel-green: #ddf0e8;
  --pastel-rose:  #f5dde8;
  --pastel-lemon: #f5f0dd;
  --pastel-lilac: #ecddf5;

  --radius:   12px;
  --radius-sm: 8px;
  --shadow:   0 2px 12px rgba(42,37,32,.07);
  --shadow-lg:0 8px 32px rgba(42,37,32,.10);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ===== LAYOUT ===== */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: -4px;
  padding: 2px 4px;
  outline: none;
}
.logo:hover { background: var(--bg); }
.logo:focus-visible { box-shadow: 0 0 0 2px rgba(26,158,110,.22); }
.logo-img {
  display: block;
  width: 136px;
  max-width: 28vw;
  height: 34px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  transition: all .18s;
  text-align: left;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
  width: max-content;
  max-width: none;
  overflow: visible;
}
.nav-btn .nav-icon { font-size: 14px; }
.nav-btn > span { flex: 0 0 auto; white-space: nowrap; }
.nav-btn { position: relative; }
.nav-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: max-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8a020, #d88810);
  color: #fff !important;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .3px;
}
.nav-btn:hover { background: var(--bg); color: var(--text-1); }
.nav-btn.active {
  background: var(--bg-2);
  color: var(--text-1);
  font-weight: 400;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.sidebar-footer { margin-top: auto; }
.update-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--up-bright);
  flex-shrink: 0;
}
.dot.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ===== MAIN CONTENT ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 36px 40px;
  min-width: 0;
}
.content.home-landing {
  padding: 0;
}
.content.home-landing #panel-home {
  display: block;
}

/* ===== PANELS ===== */
.panel { display: none; }
.panel.active { display: block; }

/* ===== HOME ===== */
.home-hero {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(247,245,242,.78)),
    radial-gradient(circle at 74% 18%, rgba(26,158,110,.14), transparent 34%),
    linear-gradient(180deg, var(--surface), var(--bg));
  box-shadow: var(--shadow);
}
.content.home-landing .home-hero {
  min-height: calc(100vh - 60px);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.home-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: clamp(34px, 7vw, 82px);
}
.home-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(26,158,110,.24);
  border-radius: 999px;
  background: rgba(232,245,240,.78);
  color: #1a6f54;
  font-size: 12px;
  font-weight: 600;
}
.home-hero h1 {
  margin-top: 18px;
  font-size: clamp(46px, 8vw, 84px);
  line-height: .95;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-1);
}
.home-lead {
  max-width: 580px;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.55;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.home-primary,
.home-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  white-space: nowrap;
}
.home-primary {
  background: var(--text-1);
  color: #fff;
}
.home-secondary {
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.72);
  color: var(--text-1);
}
.home-market-strip {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 36px);
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, max-content));
  gap: 8px;
}
.home-click-card {
  cursor: pointer;
  outline: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.home-click-card:hover {
  transform: translateY(-2px);
  border-color: rgba(26,158,110,.32);
  box-shadow: 0 20px 50px rgba(40, 34, 28, .12);
}
.home-click-card:focus-visible {
  border-color: rgba(26,158,110,.42);
  box-shadow: 0 0 0 3px rgba(26,158,110,.22), 0 18px 42px rgba(40, 34, 28, .09);
}
.home-metric {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(226,221,216,.88);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
}
.home-metric span,
.home-metric em {
  display: block;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-style: normal;
}
.home-metric strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--text-1);
  font-size: 16px;
  white-space: nowrap;
}
.home-metric em.gain { color: var(--up); }
.home-metric em.loss { color: var(--down); }

.home-news-pulse,
.home-sim-pulse {
  position: absolute;
  z-index: 3;
  width: min(320px, calc(100vw - 48px));
  border: 1px solid rgba(226,221,216,.88);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 42px rgba(40, 34, 28, .09);
}
.home-news-pulse {
  top: clamp(18px, 4vw, 34px);
  right: clamp(18px, 4vw, 42px);
  padding: 12px 14px;
  animation: homeFloatIn .45s ease both;
}
.home-sim-pulse {
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(112px, 15vw, 132px);
  padding: 14px;
}
.home-pulse-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.home-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(26,158,110,.35);
  animation: homePulseDot 1.8s ease-out infinite;
}
.home-news-pulse strong {
  display: block;
  margin-top: 8px;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.35;
}
.home-news-pulse small,
.home-sim-pulse small {
  display: block;
  margin-top: 8px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}
.home-news-pulse.is-changing,
.home-sim-list.is-changing {
  animation: homePulseSwap .28s ease both;
}
.home-sim-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226,221,216,.78);
}
.home-sim-total span {
  color: var(--text-3);
  font-size: 12px;
}
.home-sim-total strong {
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-size: 18px;
}
.home-sim-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.home-sim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.home-sim-row span {
  min-width: 0;
  color: var(--text-2);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-sim-row strong {
  flex: 0 0 auto;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}
.home-sim-row strong.gain { color: var(--up); }
.home-sim-row strong.loss { color: var(--down); }

@keyframes homePulseDot {
  0% { box-shadow: 0 0 0 0 rgba(26,158,110,.38); }
  70% { box-shadow: 0 0 0 8px rgba(26,158,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,158,110,0); }
}
@keyframes homePulseSwap {
  0% { opacity: .2; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes homeFloatIn {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}
.panel-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: #1f1a16;
}
.subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
  letter-spacing: .3px;
}
.header-controls { display: flex; gap: 8px; align-items: center; }
.refresh-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.refresh-btn:hover { background: var(--bg-2); color: var(--text-1); }
.refresh-btn.spinning { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MARKET SECTIONS ===== */
.markets-grid { display: flex; flex-direction: column; gap: 32px; }
.market-section {}
.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #3b342f;
  margin-bottom: 12px;
  font-family: 'DM Mono', monospace;
}
.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== MARKET CARD ===== */
.market-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 160px;
  flex: 1;
  max-width: 220px;
  transition: box-shadow .18s, transform .18s;
  position: relative;
  overflow: hidden;
}
.market-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity .2s;
}
.market-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.market-card:hover::before { opacity: 1; }
.market-card.up::before { background: var(--up-bright); }
.market-card.down::before { background: var(--down-bright); }

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.card-symbol {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-3);
}

.card-source {
  flex: 0 0 auto;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
}

.card-source.live {
  color: var(--up);
  background: var(--up-bg);
}

.card-source.fallback {
  color: var(--text-3);
  background: var(--bg-2);
}

.card-source.synthetic {
  color: #6b4a00;
  background: #fff2bd;
}
.card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-price {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.card-change {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
}
.card-change.up {
  color: var(--up);
  background: var(--up-bg);
}
.card-change.down {
  color: var(--down);
  background: var(--down-bg);
}

.bank-product-card .card-change {
  white-space: normal;
  line-height: 1.35;
}

.bank-products-paged {
  display: block;
}

.bank-products-carousel {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.bank-products-window {
  min-width: 0;
  overflow: hidden;
}

.bank-products-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.bank-products-track .market-card {
  min-width: 0;
  max-width: none;
  width: 100%;
}

.bank-products-nav {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.bank-products-nav:hover:not(:disabled) {
  background: var(--bg-2);
  color: var(--text-1);
  border-color: var(--text-3);
}

.bank-products-nav:disabled {
  cursor: default;
  opacity: .38;
}

.bank-products-count {
  margin-top: 7px;
  text-align: right;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-3);
}

/* Flash animation on update */
@keyframes flashUp {
  0% { background: var(--up-bg); }
  100% { background: var(--surface); }
}
@keyframes flashDown {
  0% { background: var(--down-bg); }
  100% { background: var(--surface); }
}
.market-card.flash-up { animation: flashUp .6s ease-out; }
.market-card.flash-down { animation: flashDown .6s ease-out; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SIMULATION PANEL ===== */
.sim-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.sim-config {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.config-group { display: flex; flex-direction: column; gap: 10px; }
.config-group label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}

.input-row {
  display: flex;
  gap: 8px;
}
.input-row select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  flex-shrink: 0;
}
.input-row input[type="number"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  font-family: 'DM Mono', monospace;
  outline: none;
  transition: border-color .18s;
}
.input-row input:focus { border-color: var(--accent); }

.period-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.period-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.period-display {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -.5px;
}
.period-hint {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}
input[type="range"]#period-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
  outline: none;
  cursor: pointer;
}
input[type="range"]#period-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-1);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--border-2);
  transition: box-shadow .15s;
}
input[type="range"]#period-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 2px var(--accent);
}
input[type="range"]#period-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-1);
  cursor: pointer;
  border: 3px solid var(--surface);
}
.period-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: .3px;
}

.risk-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.risk-btn {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all .15s;
}
.risk-btn:hover { border-color: var(--border-2); }
.risk-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  display: block;
}
.risk-desc {
  font-size: 11px;
  color: var(--text-3);
  display: block;
}
.risk-btn.active[data-risk="1"] { background: var(--pastel-blue); border-color: #b8cfe8; }
.risk-btn.active[data-risk="2"] { background: var(--pastel-green); border-color: #a8d8c0; }
.risk-btn.active[data-risk="3"] { background: var(--pastel-lemon); border-color: #d8ce98; }
.risk-btn.active[data-risk="4"] { background: var(--pastel-rose); border-color: #d8a8b8; }

.run-btn {
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--text-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3px;
  transition: opacity .18s;
}
.run-btn:hover { opacity: .85; }

/* ===== SIM RESULTS ===== */
.sim-results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.results-placeholder {
  margin: auto;
  text-align: center;
  color: var(--text-3);
}
.placeholder-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: var(--border-2);
}
.placeholder-mark {
  display: block;
  margin: 0 auto 14px;
}
.results-placeholder p { font-size: 14px; }

/* Result content */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.result-summary h3 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 6px;
}
.result-total {
  font-family: 'DM Mono', monospace;
  font-size: 30px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -1px;
}
.result-total.gain { color: var(--up-bright); }
.result-total.loss { color: var(--down-bright); }

.result-meta {
  text-align: right;
}
.result-pct {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}
.result-pct.gain { color: var(--up); background: var(--up-bg); }
.result-pct.loss { color: var(--down); background: var(--down-bg); }

.result-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
}

/* Allocation bars */
.allocation-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 14px;
}
.allocation-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.alloc-item {}
.alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.alloc-name { font-size: 13px; color: var(--text-1); }
.alloc-pct-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
}
.alloc-bar-track {
  height: 5px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
}
.alloc-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

/* Scenarios */
.scenarios-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 14px;
}
.scenarios-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.scenario-card {
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}
.scenario-card.pessimist { background: var(--down-bg); border-color: #f0c0b8; }
.scenario-card.base     { background: var(--pastel-lemon); border-color: #ddd0a0; }
.scenario-card.optimist { background: var(--up-bg); border-color: #a8d8b8; }
.scenario-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
  font-family: 'DM Mono', monospace;
  display: block;
}
.scenario-value {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  display: block;
}
.scenario-card.pessimist .scenario-value { color: var(--down); }
.scenario-card.base .scenario-value { color: var(--accent); }
.scenario-card.optimist .scenario-value { color: var(--up); }

.scenario-chg {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}

/* Risk warning */
.risk-warning {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--pastel-lemon);
  border: 1px solid #ddd0a0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.risk-warning strong { color: var(--down-bright); }

.simulation-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 20px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 200, 80, .42);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  background: rgba(255, 249, 224, .72);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}
.simulation-notice::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #2a2520;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}
.simulation-notice strong {
  color: var(--text-1);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .sim-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar { gap: 12px; padding: 0 14px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-btn { padding: 8px 12px; }
  .update-info span:last-child { display: none; }
  .content { padding: 24px 16px; }
  .content.home-landing { padding: 0; }
  .home-hero,
  .content.home-landing .home-hero {
    min-height: calc(100vh - 112px);
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
  }
  .home-hero-content { padding: 32px 22px 8px; }
  .home-lead { font-size: 16px; }
  .home-news-pulse,
  .home-sim-pulse {
    position: relative;
    inset: auto;
    width: calc(100% - 32px);
    margin: 0 16px;
  }
  .home-market-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 32px);
    margin: 0 16px;
    grid-template-columns: 1fr;
  }
  .home-metric { min-width: 0; }
  .result-header { flex-direction: column; gap: 12px; }
  .result-meta { text-align: left; }
  .sim-method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-playback-head,
  .sim-playback-bottom { flex-direction: column; align-items: stretch; }
  .sim-playback-value { text-align: left; min-width: 0; }
  .sim-playback-controls { justify-content: flex-start; flex-wrap: wrap; }
  .alloc-metrics { grid-template-columns: 1fr; }
  .scenarios-row { grid-template-columns: 1fr; }
}

/* ===== LOGIN SCREEN ===== */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .45;
}
.login-orb-1 {
  width: 420px; height: 420px;
  background: #dde8f5;
  top: -120px; left: -100px;
  animation: orb-drift 12s ease-in-out infinite alternate;
}
.login-orb-2 {
  width: 320px; height: 320px;
  background: #ddf0e8;
  bottom: -80px; right: -80px;
  animation: orb-drift 9s ease-in-out infinite alternate-reverse;
}
.login-orb-3 {
  width: 240px; height: 240px;
  background: #f5dde8;
  bottom: 10%; left: 30%;
  animation: orb-drift 15s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  from { transform: translate(0,0); }
  to   { transform: translate(30px, 20px); }
}

.login-card {
  position: relative;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 48px rgba(42,37,32,.10);
  animation: card-in .4s cubic-bezier(.22,1,.36,1) both;
}
@keyframes card-in {
  from { opacity:0; transform: translateY(18px) scale(.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-logo-img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
}
.login-logo-mark { flex-shrink: 0; display: block; }
.login-logo-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text-1);
}
.login-logo-ai { color: #1a9e6e; }

.login-tagline {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
  line-height: 1.5;
}
.login-divider-top {
  height: 1px;
  background: var(--border);
  margin-bottom: 22px;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-google:hover {
  background: var(--bg);
  box-shadow: var(--shadow);
}

/* OR divider */
.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.login-or-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-or-text {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: .5px;
}

/* Form fields */
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 5px; }
.login-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: .3px;
}
.login-field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}
.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,115,85,.12);
}

.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 40px; }
.pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
}
.pwd-toggle:hover { color: var(--text-2); }

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}

.sales-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}
.sales-summary-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--bg-card);
  min-width: 120px;
}
.sales-summary-item span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}
.sales-summary-item strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  color: var(--text-1);
}
.admin-cost-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 0 0 12px;
}
.admin-cost-filter label {
  display: grid;
  gap: 4px;
  color: var(--text-2);
  font-size: 12px;
}
.admin-cost-filter input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-1);
  padding: 0 10px;
}
.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.login-remember input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}
.login-forgot {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  font-family: 'DM Sans', sans-serif;
}
.login-forgot:hover { text-decoration: underline; }

.reset-form {
  width: 100%;
}

.reset-form input[readonly] {
  color: var(--text-2);
  background: var(--bg-2);
  cursor: default;
}

.login-error {
  font-size: 12px;
  color: var(--down);
  background: var(--down-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #f0c0b8;
}

.btn-login {
  padding: 11px;
  border-radius: var(--radius-sm);
  background: var(--text-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
  font-family: 'DM Sans', sans-serif;
  margin-top: 2px;
}
.btn-login:hover { opacity: .85; }

.btn-register {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s;
  font-family: 'DM Sans', sans-serif;
}
.btn-register:hover { background: var(--bg); }

.login-footer {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
}
.login-footer a { color: var(--accent); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* Register mode label change — handled in JS */

/* ===== USER INFO IN SIDEBAR ===== */
.user-info {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pastel-lemon);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  display: block;
}
.logout-btn {
  font-size: 11px;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Mono', monospace;
  letter-spacing: .2px;
}
.logout-btn:hover { color: var(--down); }

/* Hide transition */
#login-screen.hide {
  animation: screen-out .35s ease-in forwards;
}
@keyframes screen-out {
  to { opacity: 0; transform: scale(1.02); pointer-events: none; }
}

/* ===== ADMIN BADGE (sidebar) ===== */
.admin-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f0c0b8;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
}

/* Admin nav button accent */
.admin-nav.active {
  background: #fdecea !important;
  color: #c0392b !important;
}
.admin-nav:hover { color: #c0392b !important; }

/* ===== ADMIN PANEL ===== */
#panel-admin.admin-panel {
  background: #f0ede9;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 22px;
}

#panel-admin.admin-panel .panel-header {
  color: var(--text-1);
}

#panel-admin.admin-panel .subtitle,
#panel-admin.admin-panel .table-user-email,
#panel-admin.admin-panel .td-date,
#panel-admin.admin-panel .admin-table-count,
#panel-admin.admin-panel .admin-pagination,
#panel-admin.admin-panel .member-count {
  color: #5f5854;
}

#panel-admin.admin-panel .admin-section {
  background: #f7f5f2;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 16px;
}

#panel-admin.admin-panel .admin-section-title {
  color: #2f2925;
  font-weight: 700;
}

#panel-admin.admin-panel .admin-tabs {
  border-bottom-color: var(--border-2);
}

#panel-admin.admin-panel .admin-tab,
#panel-admin.admin-panel .admin-table-search,
#panel-admin.admin-panel .admin-pagination button,
#panel-admin.admin-panel .btn-refresh-subs,
#panel-admin.admin-panel .member-count {
  background: #faf9f7;
  border-color: var(--border-2);
}

#panel-admin.admin-panel .admin-table-wrap {
  background: #faf9f7;
  border-color: var(--border-2);
  box-shadow: 0 1px 0 rgba(42,37,32,.04);
}

#panel-admin.admin-panel .admin-table thead tr {
  background: #e7e2dd;
  border-bottom-color: #cbc3bd;
}

#panel-admin.admin-panel .admin-table th {
  color: #5a514c;
  font-weight: 600;
}

#panel-admin.admin-panel .admin-table td {
  border-bottom-color: #ddd6cf;
  color: var(--text-1);
}

#panel-admin.admin-panel .admin-table tbody tr:hover {
  background: #f0ebe5;
}

#panel-admin.admin-panel .admin-table tbody tr.admin-row {
  background: #fff4ed;
}

#panel-admin.admin-panel .admin-table tbody tr.admin-row:hover {
  background: #ffece1;
}

.member-count {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-2);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table thead tr {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-1);
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover { background: var(--bg); }
.admin-table tbody tr.admin-row { background: #fffaf7; }
.admin-table tbody tr.admin-row:hover { background: #fff5ef; }

.td-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  width: 36px;
}

.td-user { min-width: 220px; }
.td-date {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.table-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pastel-lemon);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.td-user { display: flex; align-items: center; gap: 10px; }
.table-user-info { display: flex; flex-direction: column; gap: 1px; }
.table-user-name { font-size: 13px; font-weight: 500; color: var(--text-1); }
.table-user-email {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  overflow-wrap: anywhere;
}

.admin-user-focus-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  margin: -2px -4px;
}

.admin-user-focus-btn:hover .table-user-name,
.admin-user-focus-btn:focus-visible .table-user-name {
  color: #c0392b;
  text-decoration: underline;
}

.admin-user-focus-btn:focus-visible {
  outline: 2px solid rgba(192,57,43,.28);
  outline-offset: 2px;
}

#panel-admin.admin-panel .admin-table tbody tr.row-highlight,
#panel-admin.admin-panel .admin-table tbody tr.row-highlight:hover {
  animation: admin-row-highlight 2.2s ease-out;
}

@keyframes admin-row-highlight {
  0% { background: #fdecea; box-shadow: inset 4px 0 0 #c0392b; }
  55% { background: #fff4d8; box-shadow: inset 4px 0 0 #c0392b; }
  100% { background: transparent; box-shadow: inset 4px 0 0 rgba(192,57,43,0); }
}

.type-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

.role-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .7px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
}
.admin-role {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f0c0b8;
}
.user-role {
  background: var(--pastel-blue);
  color: #4a6fa5;
  border: 1px solid #b8cfe8;
}

/* ===== SIMULATION EXPLANATION BLOCKS ===== */
.explain-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.explain-step-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-3);
  border-radius: 5px;
  padding: 3px 7px;
  flex-shrink: 0;
  letter-spacing: 1px;
  margin-top: 2px;
}
.explain-step-body { display: flex; flex-direction: column; gap: 5px; }
.explain-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
}
.explain-step-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.65;
}
.explain-step-text strong { color: var(--text-1); }

/* ===== ALLOCATION CARDS ===== */
.alloc-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.alloc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: box-shadow .15s;
}
.alloc-card:hover { box-shadow: var(--shadow); }

.alloc-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.alloc-color-bar {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}
.alloc-card-title-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.alloc-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
}
.alloc-card-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.alloc-invested-amt {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}
.alloc-pct-chip {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

.alloc-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.alloc-metrics span {
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 7px;
  font-family: 'DM Mono', monospace;
  line-height: 1.35;
}

.alloc-metrics strong {
  display: block;
  color: var(--text-1);
  font-size: 11px;
  margin-top: 2px;
}

.alloc-why-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.alloc-ev-trail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.alloc-ev-step {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid;
  border-radius: 6px;
  padding: 4px 8px;
  opacity: .85;
}

.alloc-ev-num {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}

.alloc-ev-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  flex: 1;
}

.alloc-ev-val {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: var(--text-1);
  font-weight: 600;
  white-space: nowrap;
}

.alloc-bar-track {
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.alloc-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .6s ease;
}

.alloc-forecast-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}
.alloc-forecast-label {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  letter-spacing: .3px;
}
.alloc-forecast-val {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
}
.alloc-forecast-val em {
  font-style: normal;
  font-size: 11px;
  opacity: .85;
}
.alloc-forecast-val.gain { color: var(--up); }
.alloc-forecast-val.loss { color: var(--down); }

/* ===== RISK TAGS ===== */
.risk-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  width: fit-content;
}
.tag-very-low  { background: #e0f0e8; color: #2d7a5f; border: 1px solid #b8d8c8; }
.tag-low-mid   { background: var(--pastel-lemon); color: #8b7020; border: 1px solid #d8c888; }
.tag-mid       { background: #dde8f5; color: #3a5a8a; border: 1px solid #b8cfe8; }
.tag-mid-high  { background: var(--pastel-lemon); color: #a06020; border: 1px solid #d8b888; }
.tag-high      { background: #fdecea; color: #c0392b; border: 1px solid #f0c0b8; }
.tag-very-high { background: #fce8e8; color: #a00020; border: 1px solid #e8a8a8; font-weight: 600; }

/* ===== CANLΙ TAKİP BUTONU ===== */
.btn-live {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1a9e6e 0%, #2d7a5f 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .4px;
  border: none;
  cursor: pointer;
  transition: opacity .18s, transform .12s;
  font-family: 'DM Sans', sans-serif;
}
.btn-live:hover  { opacity: .9; transform: translateY(-1px); }
.btn-live:active { transform: translateY(0); }
.btn-live:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-live.btn-done { background: var(--bg-3); color: var(--text-2); }

/* ===== CANLI TAKİP PANELİ ===== */
#live-tracking-panel {
  background: var(--surface);
  border: 1.5px solid #b8d8c8;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(29,158,110,.08);
}

.server-live-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.server-live-chart-card,
.server-assets-section {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5ded6);
  border-radius: 10px;
  padding: 14px;
}

.server-live-chart-title {
  font-size: 11px;
  opacity: .55;
  margin-bottom: 8px;
  font-family: 'DM Mono', monospace;
  letter-spacing: .04em;
}

.server-live-chart-frame {
  height: 240px;
  position: relative;
}

.server-live-chart-frame canvas,
.server-asset-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.server-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
}

.server-asset-card {
  min-height: 174px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-asset-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.server-asset-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.server-asset-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-asset-pct {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

.server-asset-chart-wrap {
  height: 78px;
  min-height: 78px;
  position: relative;
}

.server-asset-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}

.server-asset-price {
  font-size: 10px;
  color: var(--text-3);
  min-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: #f4faf7;
}
.live-header-left { display: flex; flex-direction: column; gap: 4px; }
.live-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #1a9e6e;
  font-family: 'DM Mono', monospace;
  animation: live-blink 1.4s infinite;
}
@keyframes live-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}
.live-total-val {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -1px;
}
.live-total-val.gain { color: var(--up-bright); }
.live-total-val.loss { color: var(--down-bright); }
.live-total-sub { font-size: 12px; color: var(--text-3); font-family: 'DM Mono', monospace; }
.live-total-sub.gain { color: var(--up); }
.live-total-sub.loss { color: var(--down); }

.live-compare-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  margin: 16px 0 18px;
}
.live-compare-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 12px;
}
.live-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.live-compare-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px;
  min-width: 0;
}
.live-compare-item span,
.live-compare-item em {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  font-style: normal;
}
.live-compare-item strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.live-compare-value.gain,
.live-compare-sub.gain {
  color: var(--up);
}
.live-compare-value.loss,
.live-compare-sub.loss {
  color: var(--down);
}

@media (max-width: 720px) {
  .live-compare-grid {
    grid-template-columns: 1fr;
  }
}

.live-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.live-dev-box {
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  text-align: right;
}
.live-dev-box .gain { color: var(--up); font-weight: 600; }
.live-dev-box .loss { color: var(--down); font-weight: 600; }
.dev-sub { color: var(--text-3); font-size: 11px; display: block; margin-top: 2px; }

.live-speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sim-method-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.sim-method-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sim-method-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-3);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
  padding: 3px 7px;
}

.sim-method-card p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: 12px;
}

.sim-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sim-method-grid div {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

.sim-method-grid span {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 4px;
}

.sim-method-grid strong {
  font-size: 12px;
  color: var(--text-1);
}

.sim-method-grid strong.gain { color: var(--up); }
.sim-method-grid strong.loss { color: var(--down); }

.sim-playback-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.sim-playback-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.sim-playback-title strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  color: var(--text-1);
}

.sim-playback-title p {
  margin-top: 6px;
  max-width: 560px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
}

.sim-playback-value {
  min-width: 170px;
  text-align: right;
  font-family: 'DM Mono', monospace;
}

.sim-playback-value span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 5px;
}

.sim-playback-value strong {
  display: block;
  font-size: 24px;
  color: var(--text-1);
}

.sim-playback-value strong.gain,
.sim-playback-value em.gain { color: var(--up); }
.sim-playback-value strong.loss,
.sim-playback-value em.loss { color: var(--down); }

.sim-playback-value em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
}

.sim-playback-chart {
  height: 230px;
  background: var(--bg);
  padding: 12px 14px 8px;
  position: relative;
}

.sim-playback-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.sim-playback-feed {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 18px 12px;
}

.sim-playback-feed-empty {
  font-size: 12px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}

.sim-playback-note {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  animation: simDetailsIn .22s ease-out;
}

.sim-playback-note:last-child {
  border-bottom: 0;
}

.sim-playback-note strong {
  display: block;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 3px;
}

.sim-playback-note p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}

.sim-playback-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.sim-playback-progress {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}

.sim-playback-fill {
  height: 100%;
  background: var(--text-1);
  border-radius: inherit;
  transition: width .18s linear;
}

.sim-playback-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sim-playback-speed,
.sim-playback-toggle {
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
}

.sim-playback-speed {
  min-width: 34px;
}

.sim-playback-toggle {
  min-width: 78px;
  padding: 0 12px;
}

.sim-playback-speed.active {
  color: #fff;
  background: var(--text-1);
  border-color: var(--text-1);
}

.sim-playback-toggle:disabled {
  cursor: default;
  color: var(--up);
  background: rgba(26,158,110,.10);
  border-color: rgba(26,158,110,.25);
}

.sim-playback-details {
  animation: simDetailsIn .28s ease-out;
}

.sim-portfolio-editor {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.sim-portfolio-editor[hidden] {
  display: none;
}

.sim-portfolio-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.sim-portfolio-editor-head label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
}

.sim-portfolio-editor-head p {
  max-width: 360px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-3);
}

.sim-portfolio-editor-head span {
  flex: 0 0 auto;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 7px;
}

.sim-portfolio-rows {
  display: grid;
  gap: 8px;
}

.sim-portfolio-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) minmax(96px, 124px) minmax(72px, 86px);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.sim-portfolio-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.sim-portfolio-name {
  min-width: 0;
}

.sim-portfolio-name strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-1);
}

.sim-portfolio-name span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--text-3);
}

.sim-portfolio-input span {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
}

.sim-portfolio-input input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 0 7px;
}

.sim-portfolio-pct span {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
}

.sim-portfolio-pct strong {
  display: flex;
  align-items: center;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 0 7px;
}

.sim-editor-live-btn {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .sim-portfolio-editor-head {
    flex-direction: column;
  }
  .sim-portfolio-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }
  .sim-portfolio-input {
    grid-column: 2;
  }
  .sim-portfolio-pct {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .sim-config,
  .sim-results,
  .sim-playback-card,
  .sim-portfolio-editor {
    min-width: 0;
  }

  .sim-method-grid {
    grid-template-columns: 1fr;
  }

  .sim-playback-chart {
    min-height: 220px;
  }

  .sim-playback-controls {
    width: 100%;
  }

  .sim-playback-speed,
  .sim-playback-toggle {
    flex: 1 1 92px;
    min-width: 0;
  }
}

.sim-final-events {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-final-event {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border-left-width: 3px;
}

.sim-final-event-num {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.sim-final-event strong {
  display: block;
  color: var(--text-1);
  font-size: 13px;
  margin-bottom: 4px;
}

.sim-final-event p {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 6px;
}

.ev-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
}

.ev-chip-up   { background: rgba(26,158,110,.12); color: #1a9e6e; }
.ev-chip-down { background: rgba(192,57,43,.12);  color: #c0392b; }
.ev-chip-flat { background: rgba(100,100,100,.10); color: var(--text-2); }

.ev-chip-signal {
  opacity: .65;
  font-weight: 400;
}

@keyframes simDetailsIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-speed-btn {
  min-width: 34px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
}

.live-speed-btn.active {
  color: #fff;
  background: var(--text-1);
  border-color: var(--text-1);
}

.live-stop-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #f0c0b8;
  background: #fdecea;
  color: #c0392b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: background .15s;
}
.live-stop-btn:hover { background: #fadbd8; }

/* Progress bar */
.live-progress-wrap {
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.live-progress-track {
  flex: 1;
  height: 5px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.live-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a9e6e, #2dd4a0);
  border-radius: 3px;
  transition: width .5s ease;
}
.live-progress-label {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  white-space: nowrap;
  min-width: 120px;
  text-align: right;
}

/* Asset table */
.live-assets-header {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(2, minmax(92px, 1fr)) 80px minmax(120px, 1fr);
  gap: 8px;
  padding: 8px 22px 8px 34px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.live-assets-list { padding: 0 22px; }
.live-asset-row {
  display: grid;
  grid-template-columns: 4px minmax(150px, 1.2fr) repeat(2, minmax(92px, 1fr)) 80px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.live-asset-row:last-child { border-bottom: none; }
.lar-color {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}
.lar-name  { font-weight: 500; color: var(--text-1); font-size: 12px; }
.lar-invested { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-2); }
.lar-value { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; transition: color .3s; }
.lar-value.gain { color: var(--up); }
.lar-value.loss { color: var(--down); }
.lar-change { font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 600; }
.lar-change.gain { color: var(--up); }
.lar-change.loss { color: var(--down); }
.lar-sim-target { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text-3); }

/* Log */
.live-log-title {
  padding: 14px 22px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  border-top: 1px solid var(--border);
}
.live-log {
  padding: 0 22px 18px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  animation: log-slide-in .25s ease;
}
@keyframes log-slide-in {
  from { opacity:0; transform: translateX(-8px); }
  to   { opacity:1; transform: translateX(0); }
}
.log-entry.log-final {
  background: #f4faf7;
  border-color: #b8d8c8;
  font-weight: 500;
  color: var(--text-1);
}
.log-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.log-text { flex: 1; }
.log-empty { font-size: 12px; color: var(--text-3); font-family: 'DM Mono', monospace; padding: 8px 0; }

/* ===== CANLI TAKİP nav butonu ===== */
#live-nav-btn { color: #1a9e6e; }
#live-nav-btn.active { background: #e8f5f0 !important; color: #1a9e6e !important; }
#live-nav-btn:hover  { color: #1a9e6e !important; }

/* ===== PLAN BADGE (sidebar) ===== */
.plan-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'DM Mono', monospace;
}
.plan-free {
  background: var(--bg-3);
  color: var(--text-3);
  border: 1px solid var(--border-2);
}
.plan-pro {
  background: #fdf5e8;
  color: #8b6020;
  border: 1px solid #e8c870;
}

/* ===== ADMIN SELECT DROPDOWNS ===== */
.admin-select {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 24px 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  letter-spacing: .3px;
  transition: all .15s;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.admin-select:hover { border-color: var(--text-3); }
.admin-select:focus { outline: none; border-color: #1a9e6e; box-shadow: 0 0 0 2px rgba(26,158,110,.15); }

/* ===== PAYWALL ===== */
.paywall-wrap {
  padding: 8px 0 24px;
}
.paywall-header {
  text-align: center;
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.paywall-lock {
  font-size: 32px;
  margin-bottom: 12px;
  filter: grayscale(.3);
}
.paywall-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.paywall-sub {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Plans grid */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 4px;
  margin-bottom: 20px;
}
@media (max-width: 680px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.plan-pro-card {
  border: 2px solid #e8c870;
  background: #fffcf5;
}
.plan-badge-top {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  background: #e8c870;
  color: #5a3e00;
  padding: 3px 12px;
  border-radius: 0 0 8px 8px;
  white-space: nowrap;
}

.plan-card-header {
  margin-bottom: 16px;
  padding-top: 10px;
}
.plan-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  display: inline-block;
  margin-bottom: 10px;
}
.chip-free {
  background: var(--bg-2);
  color: var(--text-3);
  border: 1px solid var(--border-2);
}
.chip-pro {
  background: #fdf5e8;
  color: #8b6020;
  border: 1px solid #e8c870;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
.plan-price-val {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -1px;
}
.plan-price-per {
  font-size: 13px;
  color: var(--text-3);
}
.plan-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  flex: 1;
}
.plan-features li {
  font-size: 12px;
  line-height: 1.4;
  padding: 3px 0;
}
.feat-ok { color: var(--text-2); }
.feat-no { color: var(--text-3); }
.pro-feat { color: var(--text-1); font-weight: 500; }

.plan-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.plan-current-label {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  display: block;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.btn-upgrade-monthly {
  padding: 11px;
  border-radius: var(--radius-sm);
  background: #e8c870;
  color: #3a2800;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  font-family: 'DM Sans', sans-serif;
}
.btn-upgrade-monthly:hover { opacity: .88; }
.btn-upgrade-yearly {
  padding: 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid #e8c870;
  color: #8b6020;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  transition: background .15s;
}
.btn-upgrade-yearly:hover { background: #fdf5e8; }
.yearly-badge {
  font-size: 10px;
  background: #2d7a5f;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.paywall-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  padding: 0 24px;
}

/* ===== ADMIN SECTIONS ===== */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.admin-tab:hover,
.admin-tab.active {
  background: #fdecea;
  border-color: #f0c0b8;
  color: #c0392b;
}

.admin-section {
  margin-bottom: 32px;
}
.admin-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #3b342f;
  font-family: 'DM Mono', monospace;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-refresh-subs {
  font-size: 13px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  cursor: pointer;
  color: var(--text-2);
}
.btn-refresh-subs:hover { background: var(--bg-2); }

.admin-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-table-search {
  width: min(360px, 100%);
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  padding: 0 12px;
  font-size: 13px;
}

.admin-table-search:focus {
  outline: none;
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192,57,43,.12);
}

.admin-table-count {
  flex: 0 0 auto;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
}

.admin-pagination button {
  width: 32px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.admin-pagination button:hover:not(:disabled) {
  background: var(--bg-2);
  color: var(--text-1);
}

.admin-pagination button:disabled {
  opacity: .4;
  cursor: default;
}

/* ===== STRIPE CONFIG GRID ===== */
.stripe-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 900px) { .stripe-config-grid { grid-template-columns: 1fr; } }

.stripe-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stripe-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.field-hint {
  font-size: 10px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  margin-left: 4px;
}
.stripe-input-row {
  display: flex;
  gap: 6px;
}
.stripe-input-row input { flex: 1; }
.stripe-field input, .stripe-field select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.stripe-field input:focus { border-color: var(--accent); }
.cfg-eye-btn {
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.stripe-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.btn-save-cfg {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--text-1);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.btn-save-cfg:hover { opacity: .85; }
.btn-test-cfg {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
}
.btn-test-cfg:hover { background: var(--bg-3); }
.cfg-status { font-size: 12px; font-family: 'DM Mono', monospace; }
.cfg-ok  { color: var(--up); }
.cfg-err { color: var(--down); }

.stripe-setup-note {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
  padding: 12px 16px;
  background: var(--pastel-lemon);
  border: 1px solid #d8ce90;
  border-radius: var(--radius-sm);
}
.stripe-setup-note strong { color: var(--text-1); }
.stripe-setup-note a { color: var(--accent); text-decoration: none; }
.stripe-setup-note a:hover { text-decoration: underline; }
.stripe-setup-note code {
  font-family: 'DM Mono', monospace;
  background: var(--bg-3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

/* ===== STRIPE SUBS TABLE ===== */
.subs-empty { font-size: 13px; color: var(--text-3); padding: 12px 0; font-family: 'DM Mono', monospace; }

.bank-import-help {
  padding-top: 0;
}

.bank-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.bank-file-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-2);
}

.bank-file-field input,
.bank-import-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-1);
  font: inherit;
}

.bank-file-field input {
  padding: 10px;
}

.bank-import-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bank-import-textarea {
  min-height: 130px;
  padding: 12px;
  resize: vertical;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
}

.bank-columns-note {
  margin-top: 10px;
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .bank-import-grid {
    grid-template-columns: 1fr;
  }

  .bank-import-actions,
  .bank-import-actions .prefs-save-btn,
  .bank-import-actions .btn-test-cfg {
    width: 100%;
  }
}
.subs-err   { color: var(--down); }
.sub-status-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
}
.sub-active   { background: var(--up-bg); color: var(--up); }
.sub-paid     { background: var(--up-bg); color: var(--up); }
.sub-canceled { background: var(--down-bg); color: var(--down); }
.sub-refunded { background: var(--down-bg); color: var(--down); }
.sub-partial_refund { background: var(--pastel-lemon); color: #8b6020; }
.sub-past_due { background: var(--pastel-lemon); color: #8b6020; }

/* ===== MANUEL SEÇİM: MOD TOGGLE ===== */
.mode-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.mode-btn {
  flex: 1;
  padding: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .15s;
}
.mode-btn.active {
  background: var(--text-1);
  color: var(--bg);
}

.manual-options {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: manual-in .25s ease;
}
@keyframes manual-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Region buttons */
.region-btns {
  display: flex;
  gap: 6px;
}
.region-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.region-btn:hover { border-color: var(--border-2); }
.region-btn.active {
  background: var(--pastel-blue);
  border-color: #b8cfe8;
  color: #3a5a8a;
  font-weight: 500;
}

.cat-hint {
  font-size: 10px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Category checkboxes */
.cat-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all .15s;
}
.cat-check:hover { border-color: var(--border-2); background: var(--surface); }
.cat-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.cat-check span {
  font-size: 13px;
  color: var(--text-1);
}
.cat-check:has(input:checked) {
  background: var(--surface);
  border-color: var(--accent-2);
}

/* ===== FILTER SUMMARY (sonuçlarda) ===== */
.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.fs-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
}
.fs-mode {
  background: var(--pastel-lemon);
  color: #8b6020;
  border-color: #d8ce90;
  font-weight: 500;
}

/* ===== LIVE FILTER BAR ===== */
.live-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

/* ===== LOGIN DİL SEÇİCİ ===== */
.login-lang-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin: 14px 0 4px;
  flex-wrap: wrap;
}
.login-lang-btn {
  font-size: 18px;
  width: 34px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  opacity: .55;
  padding: 0;
}
.login-lang-btn:hover { opacity: .85; border-color: var(--border-2); }
.login-lang-btn.active {
  opacity: 1;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(139,115,85,.12);
}

/* ===== HOŞGELDİN MODALI ===== */
#welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42,37,32,.45);
  backdrop-filter: blur(4px);
}
.welcome-card {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 30px 26px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(42,37,32,.18);
  animation: card-in .35s cubic-bezier(.22,1,.36,1) both;
  margin: 16px;
}
.welcome-icon { font-size: 40px; margin-bottom: 10px; }
.welcome-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}
.welcome-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 22px;
}
.welcome-field {
  text-align: left;
  margin-bottom: 14px;
}
.welcome-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 5px;
}
.welcome-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.welcome-field select:focus { border-color: var(--accent); }
.welcome-detect-note {
  font-size: 12px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin: 4px 0 18px;
  min-height: 16px;
}
.welcome-detect-note.detected-ok { color: var(--up); }
.welcome-confirm-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--text-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  font-family: 'DM Sans', sans-serif;
}
.welcome-confirm-btn:hover { opacity: .85; }

/* ===== TERCİHLER PANELİ ===== */
.prefs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.prefs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prefs-field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--text-2);
}
.prefs-field select {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.prefs-field select:focus { border-color: var(--accent); }
.prefs-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.prefs-help {
  margin-top: -6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
}
.prefs-save-btn {
  padding: 11px;
  border-radius: var(--radius-sm);
  background: var(--text-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  font-family: 'DM Sans', sans-serif;
  margin-top: 4px;
}
.prefs-save-btn:hover { opacity: .85; }
.prefs-status {
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  text-align: center;
}
.prefs-ok { color: var(--up); }

/* ===== FREE ÜYE: CANLI TAKİP GLOW (satış teşviki) ===== */
/* ===== PROFIL PANELI ===== */
.profile-refresh-btn {
  width: auto;
  min-width: 92px;
  padding-inline: 18px;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
  max-width: 100%;
}
.profile-wide {
  grid-column: span 2;
}
.profile-identity-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  min-width: 0;
}
.profile-avatar-large {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--text-1);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-identity-head h2,
.profile-card-head h2 {
  margin: 0;
  color: #1f1a16;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.profile-identity-head p {
  margin: 4px 0 10px;
  color: var(--text-3);
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  overflow-wrap: anywhere;
}
.profile-badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.profile-form {
  display: grid;
  gap: 12px;
}
.profile-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.profile-form input,
.profile-form textarea {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  min-width: 0;
  max-width: 100%;
}
.profile-form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}
.profile-form input:focus,
.profile-form textarea:focus {
  border-color: var(--accent);
}
.profile-form input[type="file"] {
  padding: 9px 10px;
  cursor: pointer;
}
.profile-form input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-1);
  padding: 7px 12px;
  margin-right: 10px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.profile-remove-photo {
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  text-align: left;
  padding: 0;
  cursor: pointer;
  width: fit-content;
}
.profile-remove-photo:hover {
  color: var(--text-1);
}
.support-form {
  min-width: 0;
}
.support-form .prefs-save-btn,
.support-form textarea {
  width: 100%;
}
.support-status {
  display: block;
  text-align: left;
}
.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
}
.profile-card-head span {
  color: var(--text-3);
  font-size: 12px;
  font-family: 'DM Mono', monospace;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-stats div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
  min-width: 0;
}
.profile-stats span {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  margin-bottom: 5px;
}
.profile-stats strong {
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.profile-list {
  display: grid;
  gap: 8px;
}
.profile-list-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  color: inherit;
  font-family: 'DM Sans', sans-serif;
  min-width: 0;
}
button.profile-list-item {
  cursor: pointer;
}
button.profile-list-item:hover {
  border-color: var(--accent);
}
.profile-list-item strong {
  display: block;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-list-item span {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.profile-list-value {
  min-width: 120px;
  text-align: right;
  flex-shrink: 0;
}
.profile-list-value em {
  display: block;
  font-style: normal;
  font-size: 12px;
  margin-top: 3px;
}
.profile-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--text-3);
  font-size: 13px;
  background: var(--bg);
}

@media (max-width: 860px) {
  .profile-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .profile-wide {
    grid-column: span 1;
  }
  .profile-stats {
    grid-template-columns: 1fr;
  }
  .profile-actions,
  .profile-list-item {
    flex-direction: column;
  }
  .profile-list-value {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .admin-section-title {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .admin-table-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-table-search {
    width: 100%;
  }

  .admin-cost-filter {
    align-items: stretch;
  }

  .admin-cost-filter label,
  .admin-cost-filter .btn-refresh-subs {
    width: 100%;
  }

  .admin-table-count,
  .admin-pagination {
    justify-content: flex-start;
    text-align: left;
  }

  .admin-table {
    min-width: 640px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }

  .bank-products-carousel {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .bank-products-track {
    grid-template-columns: 1fr;
  }

  .td-user {
    min-width: 190px;
  }

  .live-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .live-header-right {
    align-items: stretch;
  }

  .live-speed-controls {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .live-assets-header {
    display: none;
  }

  .live-assets-list {
    padding: 10px 14px;
  }

  .live-asset-row {
    grid-template-columns: 4px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 10px;
    align-items: start;
    padding: 12px 0;
  }

  .lar-color {
    grid-row: 1 / span 3;
    height: 100%;
    min-height: 58px;
  }

  .lar-name {
    grid-column: 2 / 4;
    overflow-wrap: anywhere;
  }

  .lar-invested,
  .lar-value,
  .lar-change,
  .lar-sim-target {
    font-size: 11px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .profile-identity-head,
  .profile-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-card {
    padding: 16px;
  }

  .profile-actions {
    align-items: stretch;
  }

  .profile-actions .welcome-plan-btn,
  .profile-refresh-btn,
  .profile-form .prefs-save-btn {
    width: 100%;
  }

  .profile-form input[type="file"]::file-selector-button {
    width: 100%;
    margin: 0 0 8px;
  }
}

.nav-btn.locked-glow {
  position: relative;
  background: linear-gradient(135deg, #fff8e8, #fef0d8);
  border: 1px solid #f0d890;
  color: #8b6020 !important;
  overflow: visible;
  animation: navGlow 2.2s ease-in-out infinite;
}
.nav-btn.locked-glow .nav-icon,
.nav-btn.locked-glow span { color: #8b6020 !important; }
.nav-btn.locked-glow .nav-pro-badge { color: #fff !important; }

@keyframes navGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232,160,32,.0), 0 0 8px 1px rgba(240,200,100,.35);
    border-color: #f0d890;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(232,160,32,.18), 0 0 16px 3px rgba(240,180,60,.55);
    border-color: #e8a020;
  }
}

/* Glow buton hover */
.nav-btn.locked-glow:hover {
  background: linear-gradient(135deg, #fef0d8, #fde8c8);
  border-color: #e8a020;
}

/* ===== CANLI TAKİP: GRAFİK ===== */
.live-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 10px;
  margin: 18px 0;
}
.live-chart-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 10px;
}
.live-chart-wrap {
  width: 100%;
  height: 220px;
  position: relative;
}
.live-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== CANLI TAKİP: YATIRIM GEREKÇELERİ ===== */
.live-why-section {
  margin: 22px 0;
}
.live-why-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}
.live-why-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 14px;
}
.live-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.live-why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.live-why-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}
.live-why-dot {
  width: 9px; height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}
.live-why-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  flex: 1;
}
.live-why-pct {
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-2);
  padding: 1px 7px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
}
.live-why-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ===== CANLI TAKİP: YENİDEN DENGELEME LOG ROZETİ ===== */
.log-entry.log-rebalance {
  background: #fff8e8;
  border-color: #f0d890;
}
.log-rebal-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .4px;
  color: #fff;
  background: linear-gradient(135deg, #e8a020, #d88810);
  padding: 2px 7px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.log-ai-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #17406b;
  background: #dcecff;
  padding: 2px 6px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ===== HOŞGELDİN MODALI: ADIM ROZETİ & PLAN SEÇİMİ ===== */
.welcome-step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  color: var(--accent);
  background: var(--bg-2);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.welcome-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 14px;
}
.welcome-plan {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px 14px;
  text-align: left;
  background: var(--surface);
  transition: all .18s;
}
.welcome-plan-pro {
  border: 2px solid #b8cfe8;
}
.welcome-plan-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 14px;
}
.welcome-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.welcome-plan-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 5px;
}
.welcome-plan-chip.chip-free { background: var(--bg-2); color: var(--text-2); }
.welcome-plan-chip.chip-pro  { background: #e8f5f0; color: #1a9e6e; }
.welcome-plan-price {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
}
.welcome-plan-per {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
}
.welcome-plan-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 34px;
}
.welcome-plan-limits {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.welcome-plan-limits li {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-2);
  padding-left: 12px;
  position: relative;
}
.welcome-plan-limits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1a9e6e;
}
.welcome-plan-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}
.welcome-plan-btn:hover { opacity: .88; }
.welcome-plan-btn-free {
  background: var(--bg-2);
  color: var(--text-1);
  border: 1px solid var(--border);
}
.welcome-plan-btn-pro {
  background: #1a9e6e;
  color: #fff;
}
.welcome-later-btn {
  width: 100%;
  padding: 9px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.welcome-later-btn:hover { color: var(--text-2); }

.upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upgrade-modal-overlay {
  border: 0;
  padding: 0;
  cursor: pointer;
}
.upgrade-modal-card {
  max-width: 430px;
  text-align: left;
}
.upgrade-modal-card .welcome-title,
.upgrade-modal-card .welcome-desc {
  text-align: center;
}
.upgrade-modal-chip {
  display: inline-flex;
  margin: 0 auto 12px;
}
.upgrade-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.upgrade-modal-close:hover {
  color: var(--text-1);
  background: var(--surface);
}
.upgrade-modal-benefits {
  display: grid;
  gap: 8px;
  margin: 18px 0 18px;
  padding: 0;
  list-style: none;
}
.upgrade-modal-benefits li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.upgrade-modal-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #1a9e6e;
  font-weight: 700;
}
.upgrade-modal-error {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--down-bright);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* ===== HOŞGELDİN MODALI: SATIŞ ODAKLI ÖĞELER ===== */
.welcome-urgency {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c4b3;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  animation: urgencyPulse 2s ease-in-out infinite;
}
@keyframes urgencyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
  50% { box-shadow: 0 0 0 4px rgba(192,57,43,.10); }
}
.welcome-social {
  font-size: 12px;
  color: #8b6020;
  background: #f5f0dd;
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 16px;
  font-weight: 500;
}
.welcome-benefits {
  list-style: none;
  text-align: left;
  margin: 4px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.welcome-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.4;
}
.wb-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #e8f5f0;
  color: #1a9e6e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}
.welcome-cta-big {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(26,158,110,.35);
  animation: ctaGlow 2.4s ease-in-out infinite;
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(26,158,110,.30); }
  50% { box-shadow: 0 4px 22px rgba(26,158,110,.55); }
}
.welcome-value {
  font-size: 11px;
  color: var(--text-3);
  margin: 10px 0 14px;
}
/* Pro kartı satış modunda buton içermez, vurguyu artır */
.welcome-plan-pro {
  background: linear-gradient(160deg, #ffffff, #f4faf7);
}

/* Paywall satış öğeleri */
.paywall-urgency {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c4b3;
  padding: 6px 14px;
  border-radius: 20px;
  margin: 14px 0 8px;
  animation: urgencyPulse 2s ease-in-out infinite;
}
.paywall-social {
  font-size: 12px;
  color: #8b6020;
  font-weight: 500;
}

/* ===== HABERLER PANELİ ===== */
/* Canli Takip paywall karti */
.live-paywall-card {
  max-width: 720px;
  margin: 32px auto 40px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: var(--bg-card, #fff);
  box-shadow: 0 4px 24px rgba(38, 32, 24, .06), 0 1px 3px rgba(38, 32, 24, .04);
  overflow: hidden;
}
.live-paywall-hero {
  padding: 36px 32px 28px;
  text-align: center;
  background: linear-gradient(170deg, #f0faf5 0%, #fafaf8 100%);
  border-bottom: 1px solid rgba(26, 158, 110, .10);
}
.live-paywall-card .welcome-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-1);
  letter-spacing: -.02em;
}
.live-paywall-card .welcome-desc {
  margin: 0 auto 14px;
  max-width: 440px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.live-paywall-card .welcome-urgency {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(26, 158, 110, .08);
  color: #15805a;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .01em;
}
.live-paywall-card .welcome-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0;
  padding: 4px 14px;
  border-radius: 20px;
  border: none;
  background: rgba(139, 96, 32, .06);
  font-size: 12.5px;
  color: var(--text-2);
}
.live-paywall-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 24px 28px 0;
}
.live-paywall-card .welcome-plan {
  border-radius: 14px;
  padding: 22px 20px;
  min-height: 0;
  border: 1.5px solid var(--border, #e5ded6);
  transition: border-color .2s, box-shadow .2s;
}
.live-paywall-card .welcome-plan:hover {
  border-color: rgba(26, 158, 110, .3);
}
.live-paywall-card .welcome-plan-pro {
  border-color: #1a9e6e;
  background: linear-gradient(170deg, #f4fbf8, #fff 70%);
  box-shadow: 0 0 0 1px rgba(26,158,110,.06), 0 8px 24px rgba(26,158,110,.08);
  position: relative;
}
.live-paywall-card .welcome-plan-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  width: auto;
  height: auto;
  padding: 3px 10px 4px;
  border-radius: 0 0 8px 8px;
  background: #1a9e6e;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.live-paywall-card .welcome-plan-price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-1);
}
.live-paywall-card .welcome-plan-per {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
}
.live-paywall-card .welcome-plan-desc {
  min-height: 0;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.live-paywall-card .welcome-plan-btn-free {
  background: var(--bg-3, #f0ede8);
  color: var(--text-2);
  border: none;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.live-paywall-card .welcome-plan-btn-free:hover {
  background: var(--border, #e5ded6);
}
.live-paywall-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 28px 28px;
}
.live-paywall-action .welcome-benefits {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}
.live-paywall-action .welcome-benefits li {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}
.live-paywall-action .welcome-benefits .wb-check {
  color: #1a9e6e;
  font-weight: 600;
  margin-right: 4px;
}
.live-paywall-action .welcome-cta-big {
  width: 100%;
  max-width: 360px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  background: #1a9e6e;
  color: #fff;
  cursor: pointer;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(26, 158, 110, .25);
}
.live-paywall-action .welcome-cta-big:hover {
  background: #158c5f;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 158, 110, .3);
}
.live-paywall-action .welcome-cta-big:active {
  transform: translateY(0);
}
.live-paywall-action .welcome-value {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-3, #a09888);
}

@media (max-width: 760px) {
  .live-paywall-card {
    margin: 20px auto 28px;
    border-radius: 16px;
  }
  .live-paywall-hero {
    padding: 28px 20px 22px;
  }
  .live-paywall-card .welcome-title {
    font-size: 20px;
  }
  .live-paywall-plans {
    grid-template-columns: 1fr;
    padding: 18px 18px 0;
  }
  .live-paywall-action {
    padding: 18px 18px 24px;
  }
  .live-paywall-action .welcome-benefits {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .live-paywall-action .welcome-value {
    grid-column: 1;
  }
}

.news-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.news-filter {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.news-filter:hover { border-color: var(--border-2); }
.news-filter.active {
  background: var(--text-1);
  color: var(--bg);
  border-color: var(--text-1);
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 14px;
}
.news-src-tag {
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 500;
}
.news-src-tag.live   { background: var(--up-bg); color: var(--up); }
.news-src-tag.sample { background: var(--bg-2); color: var(--text-2); }

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}
.news-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-3);
  font-size: 14px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: 0 6px 20px rgba(42,37,32,.08);
  transform: translateY(-2px);
}
.news-card-body { padding: 16px 18px; display: flex; flex-direction: column; height: 100%; }
.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.news-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
}
.news-cat-economy { background: #dde8f5; color: #3a5a8a; }
.news-cat-markets { background: var(--up-bg); color: var(--up); }
.news-cat-crypto  { background: #f5e8d8; color: #a06a20; }
.news-time { font-size: 11px; color: var(--text-3); font-family: 'DM Mono', monospace; }
.news-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
  margin-bottom: 8px;
}
.news-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.news-source { font-size: 11px; color: var(--text-3); }
.news-readmore {
  font-size: 12px;
  font-weight: 500;
  color: var(--up-bright);
  text-decoration: none;
  white-space: nowrap;
}
.news-readmore:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .news-filters {
    gap: 6px;
  }

  .news-filter {
    flex: 1 1 calc(50% - 6px);
    padding-inline: 10px;
    text-align: center;
  }

  .news-card-body {
    padding: 14px;
  }

  .news-card-top,
  .news-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-readmore {
    white-space: normal;
  }
}

/* Full-precision money values — prevent overflow */
.result-total,
.scenario-value,
.alloc-invested-amt,
.alloc-forecast-val,
.live-total-val,
.live-total-sub,
.live-compare-value,
.server-asset-foot strong,
.profile-list-value strong,
#sim-playback-total,
.sim-method-grid strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
