/* Akcijų prognozė – tamsi tema */
:root {
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --border: rgba(255, 255, 255, 0.10);
  --grid: #2c2c2a;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --accent: #3987e5;
  --accent-soft: rgba(57, 135, 229, 0.15);
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --up: #0ca30c;
  --down: #e66767;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.5rem; color: var(--ink); margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 1.02rem; color: var(--ink); margin: 0 0 12px; font-weight: 600; }
h3.sub-head { font-size: 0.9rem; color: var(--ink-2); margin: 20px 0 8px; font-weight: 600; }

.mono { font-variant-numeric: tabular-nums; }
.small { font-size: 0.82rem; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warning); }

/* --- išdėstymas --- */
.container { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; }

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-link { color: var(--ink-2); }

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 32px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumb { margin: 0 0 6px; font-size: 0.85rem; }
.head-name { font-size: 1rem; font-weight: 400; }

/* --- kortelės --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card-head h2 { margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat { margin-bottom: 0; padding: 14px 16px; }
.stat-label { color: var(--muted); font-size: 0.8rem; margin-bottom: 4px; }
.stat-value { color: var(--ink); font-size: 1.35rem; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.stack-col { display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* --- formos --- */
input, select {
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: var(--font);
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; font-size: 0.88rem; color: var(--ink-2); }
label input, label select { margin-top: 5px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: inline-flex; align-items: center; gap: 10px; margin: 0; }

.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-block { width: 100%; }

.add-form { display: flex; gap: 8px; }
.add-form input { width: 200px; text-transform: uppercase; }
.alert-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.alert-form select { width: auto; flex: 1; min-width: 150px; }
.alert-form input { width: 110px; }

/* --- lentelės --- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .num, .table th.num { text-align: right; }
.table-plain td { padding: 8px 2px; }
.total-row td { border-top: 1px solid var(--border); }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.ticker { color: var(--ink); font-weight: 650; }

/* --- ženkliukai / signalai --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-lg { font-size: 0.95rem; padding: 6px 16px; }
.sig-strong-buy { background: rgba(12, 163, 12, 0.18); color: #35c435; border-color: rgba(12, 163, 12, 0.5); }
.sig-buy { background: rgba(12, 163, 12, 0.10); color: #2fae2f; border-color: rgba(12, 163, 12, 0.3); }
.sig-hold { background: rgba(137, 135, 129, 0.15); color: var(--ink-2); border-color: rgba(137, 135, 129, 0.35); }
.sig-sell { background: rgba(236, 131, 90, 0.12); color: var(--serious); border-color: rgba(236, 131, 90, 0.35); }
.sig-strong-sell { background: rgba(208, 59, 59, 0.16); color: #e66767; border-color: rgba(208, 59, 59, 0.5); }
.sig-nodata { background: rgba(137, 135, 129, 0.10); color: var(--muted); border-color: rgba(137, 135, 129, 0.25); }

.score-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.score-bar {
  width: 90px;
  height: 4px;
  background: var(--grid);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.score-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--muted);
}
.score-fill { height: 100%; border-radius: 2px; }
.score-fill.pos { background: var(--good); }
.score-fill.neg { background: var(--critical); }

.chips, .filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font);
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip-active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot-green { background: var(--good); }
.dot-gray { background: var(--muted); }

/* --- pranešimai --- */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  border: 1px solid;
}
.alert-error { background: rgba(208, 59, 59, 0.12); border-color: rgba(208, 59, 59, 0.4); color: #e66767; }
.alert-info { background: var(--accent-soft); border-color: rgba(57, 135, 229, 0.4); color: var(--ink); }
.alert-warn { background: rgba(250, 178, 25, 0.10); border-color: rgba(250, 178, 25, 0.35); color: var(--ink-2); }

/* --- loterijos radaras --- */
.lottery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.lot-card { display: flex; flex-direction: column; margin-bottom: 0; }
.lot-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lot-head .ticker { font-size: 1.1rem; margin-right: 6px; }
.lot-score { text-align: center; flex-shrink: 0; }
.lot-score-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--warning);
  line-height: 1.1;
}
.lot-section { margin-top: 12px; }
.lot-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 650;
}
.lot-list { margin: 0; padding-left: 18px; font-size: 0.88rem; }
.lot-list li { margin-bottom: 4px; }
.lot-ai {
  border-top: 1px solid var(--grid);
  padding-top: 10px;
}
.lot-ai p { margin: 0 0 8px; font-size: 0.9rem; }
.lot-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- rekomendacijos --- */
.advice-card { border-color: rgba(250, 178, 25, 0.3); }
.advice-box {
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0 12px;
  border: 1px solid;
}
.advice-box p { margin: 6px 0 0; font-size: 0.92rem; }
.advice-action { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.advice-pct { font-weight: 700; }
.advice-buy { background: rgba(12, 163, 12, 0.10); border-color: rgba(12, 163, 12, 0.4); }
.advice-buy .advice-action { color: #35c435; }
.advice-sell { background: rgba(208, 59, 59, 0.10); border-color: rgba(208, 59, 59, 0.4); }
.advice-sell .advice-action { color: #e66767; }
.advice-hold { background: rgba(137, 135, 129, 0.08); border-color: rgba(137, 135, 129, 0.3); }
.advice-hold .advice-action { color: var(--ink-2); }
.advice-warn { background: rgba(250, 178, 25, 0.10); border-color: rgba(250, 178, 25, 0.45); }
.advice-warn .advice-action { color: var(--warning); }
.advice-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  border: 1px solid;
  white-space: nowrap;
}
.advice-chip.advice-buy { color: #35c435; border-color: rgba(12, 163, 12, 0.4); background: rgba(12, 163, 12, 0.10); }
.advice-chip.advice-sell { color: #e66767; border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.10); }
.advice-chip.advice-hold { color: var(--ink-2); border-color: rgba(137, 135, 129, 0.3); background: rgba(137, 135, 129, 0.08); }
.advice-chip.advice-warn { color: var(--warning); border-color: rgba(250, 178, 25, 0.45); background: rgba(250, 178, 25, 0.10); }
.pos-line { margin: 0 0 10px; font-size: 0.9rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pos-form summary { cursor: pointer; color: var(--accent); font-size: 0.88rem; }

/* --- prisijungimas --- */
.auth-wrap { display: flex; justify-content: center; padding-top: 8vh; }
.auth-card { width: 100%; max-width: 380px; text-align: center; padding: 30px; }
.auth-logo { font-size: 2.4rem; margin-bottom: 6px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card p { margin-top: 0; }
.auth-card form { text-align: left; margin-top: 18px; }

/* --- akcijos puslapis --- */
.big-price { font-size: 1.5rem; color: var(--ink); font-weight: 650; }
.price-line { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 0; flex-wrap: wrap; }
.signal-box { text-align: right; }

.levels { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.level-label { color: var(--muted); font-size: 0.78rem; }
.level-value { font-size: 1.05rem; color: var(--ink); }

.ai-card { border-color: rgba(57, 135, 229, 0.35); }
.ai-card p { margin: 0 0 8px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--grid);
  align-items: flex-start;
}
.news-list li:last-child { border-bottom: none; }
.news-list a { color: var(--ink); }
.news-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.nd-pos { background: var(--good); }
.nd-neg { background: var(--critical); }
.nd-neu { background: var(--muted); }

.danger-zone { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.footer-note { margin-top: 4px; }
.sched-status { font-size: 0.8rem; }

/* --- grafikai --- */
.chart { width: 100%; min-height: 300px; position: relative; }
.chart-sm { min-height: 120px; }
.chart svg { display: block; width: 100%; }
.legend { display: flex; gap: 16px; font-size: 0.78rem; color: var(--muted); margin: 4px 0 8px; }
.legend i.lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.lg-price { background: #3987e5; }
.lg-sma20 { background: #d95926; }
.lg-sma50 { background: #199e70; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--ink-2);
  display: none;
  z-index: 10;
  white-space: nowrap;
}
.chart-tooltip .tt-date { color: var(--ink); font-weight: 600; margin-bottom: 3px; }
