/* Číselný font: FreeMono (self-hosted) – prázdná nula (bez lomítka/tečky),
   jasně odlišená od osmičky. Subset latinka+čeština+interpunkce, formát woff. */
@font-face {
  font-family: "FreeMono";
  src: url("fonts/FreeMono.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "FreeMono";
  src: url("fonts/FreeMonoBold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* =========================================================================
   styles.css — Vzhled obchodního deníku
   -------------------------------------------------------------------------
   Tmavý/světlý režim řízený atributem data-theme na <html>. Přepínání jen
   přes CSS proměnné. Akcent: tlumená zlatá (peníze) — záměrně oddělená od
   zelené/červené, které jsou rezervované pro zisk/ztrátu.
   ========================================================================= */

/* ------------------------------- Témata --------------------------------- */
:root[data-theme="dark"] {
  --bg:        #0e1014;
  --bg-2:      #14171d;
  --surface:   #181c24;
  --surface-2: #1f2530;
  --border:    #262c38;
  --grid:      #232a36;
  --text:      #e8eaef;
  --text-dim:  #95a0b3;
  --accent:    #d7a94b;
  --accent-dim:#3a2f17;
  --pos:       #3fb868;
  --neg:       #ff4d5a;
  --shadow:    0 10px 30px rgba(0,0,0,.45);
}
:root[data-theme="light"] {
  --bg:        #f4f1ea;
  --bg-2:      #ece7dc;
  --surface:   #fffdf8;
  --surface-2: #f6f2e9;
  --border:    #e0d9c9;
  --grid:      #e6e0d2;
  --text:      #20242c;
  --text-dim:  #6b7280;
  --accent:    #b07c1f;
  --accent-dim:#f0e4c6;
  --pos:       #1f9d57;
  --neg:       #d61c2b;
  --shadow:    0 8px 24px rgba(60,50,30,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  transition: background .25s ease, color .25s ease;
}
.num, .tile-value, td.num, .mono { font-family: "FreeMono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.zero, .muted { color: var(--text-dim); }
.hidden { display: none !important; }

/* ----------------------------- Načítací pruh ---------------------------- */
#loading-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: var(--accent); transition: width .3s ease, opacity .3s; opacity: 0;
}
#loading-bar.active { width: 90%; opacity: 1; transition: width 8s ease; }

/* -------------------------------- Hlavička ------------------------------ */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; background: var(--bg-2);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8a6312);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-family: "Sora";
}
#app-title { font-size: 17px; margin: 0; }
header .ctrl {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px; cursor: pointer; font-size: 13px;
  transition: border-color .2s, background .2s;
}
header .ctrl:hover { border-color: var(--accent); }
#portfolio-select { min-width: 160px; }
#theme-toggle { font-size: 15px; line-height: 1; }
.icon-only { width: 38px; text-align: center; padding: 8px 0; }

/* ------------------------------ Demo banner ----------------------------- */
#demo-banner {
  background: var(--accent-dim); color: var(--text);
  border-bottom: 1px solid var(--accent);
  padding: 8px 18px; font-size: 12.5px; text-align: center;
}

/* -------------------------------- Layout -------------------------------- */
.layout { display: grid; grid-template-columns: 190px 1fr; align-items: start; }
#sidebar {
  position: sticky; top: 56px; align-self: start;
  height: calc(100vh - 56px); overflow-y: auto;
  border-right: 1px solid var(--border); background: var(--bg-2);
  padding: 16px 14px;
}
main { padding: 18px 20px 60px; min-width: 0; }
.section { margin-bottom: 26px; }
.section > h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-dim); margin: 0 0 12px;
}

/* -------------------------------- Filtry -------------------------------- */
.filter-group { margin-bottom: 16px; }
.filter-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #15110a; font-weight: 600; }
.filter-date {
  width: 100%; max-width: 158px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 7px 9px; font-size: 12.5px;
}
.radios { display: flex; flex-direction: column; gap: 5px; }
.radio { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 9px 14px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--accent); }
.btn-accent { background: var(--accent); color: #15110a; border-color: var(--accent); font-weight: 600; }
.btn-accent:hover { filter: brightness(1.06); }
.btn.disabled { opacity: .4; pointer-events: none; }
.full { width: 100%; }

/* Hlavička sekce filtrů: nadpis vlevo, malé „Zrušit filtry" vpravo. */
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.filters-head > h2 { margin: 0; }
/* Kompaktní varianta tlačítka „Zrušit filtry" (užší než plné .btn). */
.btn-reset { padding: 5px 9px; font-size: 11.5px; white-space: nowrap; }

/* ------------------------------ Dashboard ------------------------------- */
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#fx-rate { font-size: 12.5px; color: var(--text-dim); font-family: "FreeMono"; }
#dashboard-grid, #open-positions-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 15px; position: relative;
  animation: rise .45s ease both;
}
.tile::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent); opacity: .5;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-label { font-size: 11.5px; color: var(--text-dim); line-height: 1.2; }
.tile-value { font-size: 22px; font-weight: 600; margin-top: 8px; }
.tile-sub { font-size: 13px; margin-top: 4px; font-family: "FreeMono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* Tooltip ⓘ */
.info { position: relative; cursor: help; }
.info-dot { color: var(--text-dim); font-size: 12px; }
.info:hover .info-dot { color: var(--accent); }
.tooltip {
  position: absolute; right: 0; top: 22px; z-index: 80; width: 230px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; font-size: 12px; line-height: 1.4;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .15s, transform .15s; font-family: "IBM Plex Sans";
}
.info:hover .tooltip, .info:focus-within .tooltip { opacity: 1; transform: none; pointer-events: auto; }

/* -------------------------------- Grafy --------------------------------- */
.charts-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
.chart-card h3 { font-size: 13px; margin: 0 0 10px; color: var(--text-dim); font-weight: 500; }
.chart-box { position: relative; height: 240px; }

/* -------------------------------- Taby ---------------------------------- */
.tabs-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 9px; padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 500;
}
.tab.active { background: var(--accent-dim); color: var(--text); border-color: var(--accent); }
.tabs-bar .spacer { margin-left: auto; }

/* ------------------------------- Tabulky -------------------------------- */
.table-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-dim);
  text-align: left; padding: 9px 11px; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
}
thead th.num { text-align: right; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text); }
thead th.sort-asc::after { content: " ▲"; color: var(--accent); font-size: 9px; }
thead th.sort-desc::after { content: " ▼"; color: var(--accent); font-size: 9px; }
tbody td { padding: 8px 11px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td.num { text-align: right; font-weight: 700; }  /* tučné hodnoty čísel ve všech kartách (FreeMonoBold) */
tbody tr:hover { background: var(--surface-2); }
/* Tabulka Obchody: klik = výběr/zrušení řádku, dvojklik = úprava */
#trades-body tr { cursor: pointer; }
#trades-body tr.selected td,
#trades-body tr.selected:hover td { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
#trades-body tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.totals-row td {
  position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); font-weight: 700;
  border-top: 2px solid var(--accent); border-bottom: none; white-space: nowrap;
  padding: 8px 11px; /* stejné jako tbody td, aby čísla lícovala se sloupci */
}
.totals-row td.num { text-align: right; }
td.empty { text-align: center; color: var(--text-dim); padding: 28px; }

/* Otevřené pozice */
#open-positions-grid .tile-info::before { opacity: .25; }
#open-positions-grid .tile-info .tile-value { font-size: 16px; font-weight: 600; }
.open-row { background: linear-gradient(90deg, var(--accent-dim) 0%, transparent 60%); }
.open-row:hover { background: var(--surface-2); }
.badge-open {
  display: inline-block; margin-left: 4px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  background: var(--accent); color: #15110a; border-radius: 5px; padding: 1px 6px; font-family: "IBM Plex Sans";
}
.pulse { animation: pulse .7s ease; }
@keyframes pulse { 0% { background: var(--accent); color: #15110a; } 100% { background: transparent; } }

/* Dashboard – přetahování dlaždic (změna pořadí) */
#dashboard-grid .tile[draggable="true"] { cursor: grab; }
#dashboard-grid .tile[draggable="true"]:active { cursor: grabbing; }
#dashboard-grid .tile.dragging { opacity: .45; cursor: grabbing; }
#dashboard-grid .tile .info { cursor: help; } /* tooltip ⓘ má vlastní kurzor */

/* Otevřené opce – strike barvená dle rizika přiřazení (.pos/.neg) */
#open-positions-grid [data-opt="strike"] { font-weight: 600; }

/* Karta Týdny – kompaktní layout: pořadí u levého kraje, zisk hned vedle období */
#panel-weekly .table-scroll { display: inline-block; max-width: 100%; }
#panel-weekly table { width: auto; min-width: 340px; }
#panel-weekly th:first-child, #panel-weekly td:first-child { padding-left: 14px; }

/* Karta Měsíce – stejný kompaktní layout jako Týdny */
#panel-monthly .table-scroll { display: inline-block; max-width: 100%; }
#panel-monthly table { width: auto; min-width: 360px; }
#panel-monthly th:first-child, #panel-monthly td:first-child { padding-left: 14px; }

/* Součtový řádek zůstává přilepený dole i u kompaktních tabulek
   (sticky z .totals-row). Sticky hlavička na týchž tabulkách funguje, takže
   patička se chová stejně. */

/* Graf uvnitř karty: vedle tabulky (Týdny) nebo pod ní (Obchody) */
.panel-flex { display: flex; gap: 14px; align-items: stretch; }
.panel-flex > .table-scroll { flex: 0 1 auto; }
.card-chart {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
.panel-flex > .card-chart { flex: 1 1 0; min-width: 260px; }
.card-chart.below { margin-top: 14px; }
.card-chart .chart-box { position: relative; height: 100%; min-height: 320px; }
.card-chart.below .chart-box { height: 300px; min-height: 0; }
@media (max-width: 1100px) {
  .panel-flex { flex-direction: column; }
  .panel-flex > .table-scroll, .panel-flex > .card-chart { width: 100%; }
  .card-chart .chart-box { height: 300px; min-height: 0; }
}

.row-actions { white-space: nowrap; }
.icon-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 7px; width: 28px; height: 28px; cursor: pointer; margin-left: 4px; font-size: 13px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.danger:hover { border-color: var(--neg); color: var(--neg); }

/* ------------------------- Import / Export / Set ------------------------ */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.panel h3 { margin: 0 0 4px; font-size: 14px; }
.muted { color: var(--text-dim); font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
input[type="file"] { color: var(--text-dim); font-size: 12.5px; }
.subhead { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin: 14px 0 8px; }
.import-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.imp-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; }
.imp-val { font-family: "FreeMono"; font-size: 18px; font-weight: 600; }
.imp-label { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.rec-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-pill { border-radius: 999px; padding: 5px 12px; font-size: 12.5px; border: 1px solid var(--border); }
.rec-pill.ok { color: var(--pos); border-color: var(--pos); }
.rec-pill.warn { color: var(--accent); border-color: var(--accent); }
.rec-pill.muted { color: var(--text-dim); }
.mini-table { font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 11.5px; color: var(--text-dim); }
.field input {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-family: "FreeMono"; font-size: 13px;
}

/* -------------------------------- Modál --------------------------------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 150; display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: min(720px, 100%); box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px; }
#trade-form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.form-back { margin-bottom: 12px; }
/* Volba typu obchodu (Akcie / Opce) – 1. krok přidání. */
.type-chooser { display: flex; flex-direction: column; gap: 14px; padding: 8px 2px 4px; }
.type-chooser-q { font-size: 14px; color: var(--text-dim); }
.type-chooser-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.type-pick { flex: 1 1 140px; padding: 22px 14px; font-size: 15px; font-weight: 600; }
.form-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.form-field-full { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 9px; font-size: 13px;
}
.form-field textarea { min-height: 84px; resize: vertical; font-family: inherit; line-height: 1.45; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }

/* -------------------------------- Toast --------------------------------- */
#prices-updated { font-size: 11.5px; color: var(--text-dim); font-family: "FreeMono"; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 18px; font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 300; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { border-color: var(--pos); }
.toast-error { border-color: var(--neg); }

/* ----------------------------- Skrytí panelu --------------------------- */
/* ☰ je vidět vždy (mobil i desktop). Na desktopu sbalí postranní panel. */
#filter-toggle { display: inline-flex; align-items: center; justify-content: center; }
.layout.sidebar-collapsed { grid-template-columns: 1fr; }
.layout.sidebar-collapsed > #sidebar { display: none; }

/* ------------------------------ Responzivita ---------------------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 120;
    height: 100vh; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  #sidebar.open { transform: none; }
  #filter-toggle { display: inline-block; }
  .charts-row { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  #app-title { font-size: 15px; }
}

/* ------------------- Přesouvání sloupců (drag&drop hlaviček) ------------ */
thead th[data-col-key] { cursor: grab; }
thead th[data-col-key]:active { cursor: grabbing; }
thead th.col-dragging { opacity: .5; background: var(--accent-dim); }

/* ------------------------------- Karta Vklady --------------------------- */
/* Stejný kompaktní layout jako Týdny/Měsíce: tabulka dle obsahu, graf vedle. */
#panel-deposits .table-scroll { display: inline-block; max-width: 100%; }
#panel-deposits table { width: auto; min-width: 480px; }
#panel-deposits th:first-child, #panel-deposits td:first-child { padding-left: 14px; }

/* ----------------------- Správa viditelnosti dlaždic -------------------- */
.tiles-list { display: flex; flex-direction: column; gap: 2px; max-height: 56vh; overflow: auto; }
.tile-toggle-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.tile-toggle-row:hover { background: var(--surface-2); }
.tile-toggle-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
#tiles-modal-hint { margin: 0 0 10px; }

/* -------- Výrazné „Zrušit filtry" v hlavičce (jen při aktivním filtru) --- */
/* Silnější selektor, ať přebije header .ctrl (jinak se styl neprojeví). */
header .ctrl.btn-clear-filters {
  background: var(--neg);
  color: #fff;
  border-color: var(--neg);
  font-weight: 600;
  white-space: nowrap;
}
header .ctrl.btn-clear-filters:hover {
  background: var(--neg);
  border-color: var(--neg);
  filter: brightness(1.08);
}

/* --------------- Čistý celkový zisk v hlavičce (vedle názvu) ------------- */
.header-pnl {
  font-family: "FreeMono", monospace;
  font-weight: 600;
  font-size: 14px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.header-pnl.pos { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 45%, var(--border)); }
.header-pnl.neg { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 45%, var(--border)); }
@media (max-width: 640px) { .header-pnl { display: none; } }

/* ------------------------------ Záloha .xlsm ---------------------------- */
#backup-list { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.backup-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
.backup-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.backup-slot { font-weight: 600; font-size: 12px; color: var(--accent); }
.backup-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-when { font-size: 12px; }
.backup-dl { white-space: nowrap; text-decoration: none; text-align: center; }

/* ----------------------- Odpočet NYSE (střed hlavičky) ------------------ */
.nyse-countdown {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: "FreeMono", monospace; white-space: nowrap;
  pointer-events: none;  /* ať nepřekáží ovládacím prvkům v hlavičce */
}
.nyse-countdown .nyse-label { color: var(--text-dim); font-size: 12px; }
.nyse-countdown .nyse-time { font-weight: 700; font-size: 15px; }
.nyse-countdown .nyse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.nyse-countdown.open .nyse-dot { background: var(--pos); }
.nyse-countdown.open .nyse-time { color: var(--pos); }
@media (max-width: 820px) { .nyse-countdown { display: none; } }

/* ----------------------------- Přihlášení ------------------------------- */
/* Celostránkový overlay; po ověření tokenu se schová třídou .hidden. */
.auth-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--bg);
}
.auth-card {
  width: min(360px, 100%);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 30px 26px; text-align: center;
}
.auth-logo {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #15110a;
  background: linear-gradient(135deg, var(--accent), #8a6312);
}
.auth-card h2 { margin: 0 0 4px; font-size: 19px; }
.auth-sub { margin: 0 0 20px; color: var(--text-dim); font-size: 13px; }
.auth-input {
  width: 100%; box-sizing: border-box; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 14px;
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-btn { width: 100%; padding: 11px; font-size: 14px; margin-top: 4px; }
.auth-error { color: var(--neg); font-size: 12.5px; min-height: 18px; margin: 2px 0 8px; }
#account-modal .form-field label { font-size: 12px; color: var(--text-dim); }
