:root {
  --bg: #0f1115;
  --stage: #181a20;
  --card: #1e2028;
  --line: #2b2f3a;
  --text: #eaecef;
  --mute: #848e9c;
  --up: #0ecb81;
  --down: #f6465d;
  --accent: #f0b90b;
  --side: #0c0e12;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { font: 13.5px/1.45 ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.app { display: flex; height: 100%; }
.side {
  width: 228px;
  flex: none;
  height: 100%;
  overflow-y: auto;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: .9rem .75rem 1.4rem;
}
.logo {
  display: block;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent);
  font-size: 1.15rem;
  padding: .15rem .45rem .75rem;
}
.side-k {
  margin: .85rem .45rem .25rem;
  color: var(--mute);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.side-a {
  display: block;
  padding: .38rem .5rem;
  border-radius: 8px;
  color: #c5cad3;
}
a.side-a:hover { background: #171b22; color: var(--text); }
.side-a.on { background: #1f1810; color: var(--accent); }
.side-a.soon, .soon { color: var(--mute); }
.stage { flex: 1; min-width: 0; height: 100%; overflow: auto; display: flex; flex-direction: column; background: var(--stage); }
.top {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--line);
  background: #121318;
  position: sticky;
  top: 0;
  z-index: 20;
}
.menu { display: none; }
.top-nav { display: flex; gap: .85rem; align-items: center; }
.top-nav a.on { color: var(--accent); font-weight: 650; }
.search { margin-left: auto; }
.search input {
  width: min(22rem, 36vw);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .45rem .65rem;
  font: inherit;
}
.clock { color: var(--mute); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.body { display: flex; flex: 1; min-height: 0; }
.main { flex: 1; min-width: 0; padding: 1rem 1.05rem 1.4rem; }
.rail {
  width: 300px;
  flex: none;
  padding: 1rem .85rem 1.4rem 0;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: .85rem;
}
.hero h1 { margin: 0 0 .2rem; font-size: 1.35rem; }
.hero p { margin: 0; color: var(--mute); }
.asof, .count, .note { color: var(--mute); font-size: 12.5px; }
.ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-bottom: .75rem;
}
.tick {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .65rem;
}
.tick.on { border-color: #5b4a20; }
.tick .code { font-weight: 700; font-family: ui-monospace, monospace; }
.tick .name { color: var(--mute); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick b { display: block; margin-top: .2rem; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem 0.9rem;
  margin-bottom: .75rem;
}
.panel h2 { margin: 0; font-size: 12px; color: var(--mute); letter-spacing: .04em; text-transform: uppercase; }
.panel-h { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-end; margin-bottom: .55rem; }
.ranges, .tabs, .chips, .pager { display: flex; flex-wrap: wrap; gap: .35rem; }
.ranges button, .tabs button, .chip, .pager button, .menu {
  border: 1px solid var(--line);
  background: #121318;
  color: var(--mute);
  border-radius: 8px;
  padding: .28rem .6rem;
  font: inherit;
  cursor: pointer;
}
.ranges button.on, .tabs button.on, .chip.on, .pager button.on {
  background: var(--accent);
  color: #121318;
  border-color: var(--accent);
}
.tabs .soon, .top-nav .soon { padding: .28rem .35rem; }
.split { display: grid; gap: .7rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split h3 { margin: 0 0 .35rem; font-size: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap.slim { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: .42rem .4rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--mute); font-weight: 650; cursor: pointer; position: sticky; top: 0; background: #1a1c24; }
th.sort { color: var(--accent); }
td.name, #table th:nth-child(2) { white-space: normal; min-width: 14rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace; }
tr.clickable { cursor: pointer; }
tr.clickable:hover, .pop:hover { background: #252833; }
.up { color: var(--up); }
.down { color: var(--down); }
.mute { color: var(--mute); }
.code { font-family: ui-monospace, monospace; font-weight: 700; }
.toolbar { display: flex; flex-direction: column; gap: .4rem; margin: .35rem 0 .65rem; }
.count { margin: 0 0 .4rem; }
.pager { margin: .4rem 0; }
.pager button:disabled { opacity: .4; cursor: default; }
.chart { height: 168px; }
.chart.tall { height: 220px; }
.chart svg { width: 100%; height: 100%; display: block; }
.pop {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: .4rem;
  align-items: center;
  padding: .42rem .15rem;
  border-bottom: 1px solid var(--line);
}
.pop .name { color: var(--mute); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note { margin: .45rem 0 0; }
.back { display: inline-block; margin-bottom: .7rem; color: var(--mute); }
.fund-head h1 { margin: 0 0 .2rem; font-size: 1.4rem; }
.fund-head p { margin: 0; color: var(--mute); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr));
  gap: .5rem;
  margin: .75rem 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .65rem;
}
.stat b { display: block; font-size: 1.02rem; }
.stat span { color: var(--mute); font-size: 11px; }
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; margin-bottom: .75rem; }
.flag {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: .55rem .65rem;
}
.flag b { display: block; font-size: 1rem; }
.flag span { color: var(--mute); font-size: 11px; }
.flag.yes { border-color: #14532d; }
.flag.no { border-color: #7f1d1d; }
.flag.wait { border-color: #5b4a20; }
.split-fund { display: grid; gap: .75rem; }
@media (min-width: 860px) { .split-fund { grid-template-columns: 1fr 1fr; } }
.ret, .bar-row, .info-item, .miss {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: .38rem 0;
  border-bottom: 1px solid var(--line);
}
.bar-row { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.bar-row .label { color: var(--mute); font-size: 12px; }
.track { height: 6px; background: #121318; border-radius: 99px; overflow: hidden; margin-top: .25rem; }
.track i { display: block; height: 100%; background: var(--accent); }
.info-grid { display: grid; gap: 0 .9rem; }
@media (min-width: 720px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-item span { color: var(--mute); }
.err { color: var(--down); }
footer { padding: 0 1.05rem 1.1rem; color: var(--mute); font-size: 12px; }
.account { display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.account button, .account a, .side-account a, .side-account button {
  font: inherit;
  color: var(--mute);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .28rem .55rem;
  cursor: pointer;
}
.account a.on, .account a[href="/ops"] { color: var(--accent); border-color: #5b4a20; }
.side-account { margin-top: auto; padding: .9rem .45rem 0; display: flex; flex-direction: column; gap: .4rem; }
.side { display: flex; flex-direction: column; }
.auth-box {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 14, .72);
  padding: 1.2rem;
}
.auth-box[hidden] { display: none !important; }
.auth-card {
  width: min(22rem, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1.15rem 1.25rem;
}
.auth-k { margin: 0; color: var(--accent); font-weight: 800; letter-spacing: .04em; }
.auth-card h2 { margin: .2rem 0 .35rem; font-size: 1.2rem; }
.auth-card label { display: flex; flex-direction: column; gap: .3rem; margin: .7rem 0; color: var(--mute); font-size: 12px; }
.auth-card input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .65rem;
}
.auth-actions { display: flex; gap: .5rem; }
.auth-actions button[type="submit"] {
  flex: 1;
  background: #2a2110;
  border: 1px solid #5b4a20;
  color: #fde68a;
  border-radius: 10px;
  padding: .5rem .7rem;
  font: inherit;
  cursor: pointer;
}
.auth-tabs { display: flex; gap: .4rem; margin: .55rem 0 .8rem; }
.auth-tabs button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  border-radius: 8px;
  padding: .35rem .5rem;
  font: inherit;
  cursor: pointer;
}
.auth-tabs button.on { color: var(--accent); border-color: #5b4a20; background: #1f1810; }
.fon-title { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.watch-btn {
  font: inherit;
  white-space: nowrap;
  background: #1f1810;
  border: 1px solid #5b4a20;
  color: #fde68a;
  border-radius: 10px;
  padding: .4rem .7rem;
  cursor: pointer;
}
.watch-btn.on { background: #0b2a22; border-color: #14532d; color: #6ee7b7; }
#hesap-form label, #hesap-pass label { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .7rem; color: var(--mute); font-size: 12px; }
#hesap-form input, #hesap-pass input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .65rem;
}
#hesap-form button, #hesap-pass button {
  font: inherit;
  background: #2a2110;
  border: 1px solid #5b4a20;
  color: #fde68a;
  border-radius: 10px;
  padding: .45rem .7rem;
  cursor: pointer;
}
.note.warn { color: #fde68a; }
.auth-actions .ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  border-radius: 10px;
  padding: .5rem .7rem;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 1180px) {
  .rail { display: none; }
  .ticks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  html, body { height: auto; overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .stage { height: auto; overflow: visible; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0 auto 0 0; height: 100%; z-index: 30; }
  .menu { display: inline-flex; }
  .search { width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .top { flex-wrap: wrap; }
  .clock { display: none; }
  th:nth-child(3), td:nth-child(3),
  th:nth-child(6), td:nth-child(6),
  th:nth-child(8), td:nth-child(8),
  th:nth-child(9), td:nth-child(9) { display: none; }
  td.name, #table th:nth-child(2) { min-width: 8.5rem; }
}
