:root {
  color-scheme: dark;
  --bg: #0e1116;
  --bg2: #141920;
  --panel: #1a1f27;
  --card: #212833;
  --card2: #283141;
  --line: #2e3744;
  --line2: #3d4858;
  --text: #e8ecf1;
  --text2: #b7c0cc;
  --muted: #8a94a3;
  --accent: #f5b301;
  --accent2: #ffcc4d;
  --accent-ink: #1d1600;
  --good: #3fb950;
  --good-bg: rgba(63, 185, 80, .14);
  --bad: #f2564d;
  --bad-bg: rgba(242, 86, 77, .14);
  --warn: #e3a008;
  --warn-bg: rgba(227, 160, 8, .15);
  --info: #58a6ff;
  --info-bg: rgba(88, 166, 255, .14);
  --s1: #3987e5;
  --s2: #d95926;
  --grid: #2c2f33;
  --axis: #3c4048;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--text2); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.acc { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
b, strong { font-weight: 650; }

/* ---------- Yerleşim ---------- */
#app {
  display: grid;
  height: 100vh;
  grid-template-columns: 78px minmax(0, 1fr) minmax(440px, 36vw);
  grid-template-rows: 60px minmax(0, 1fr) 30px;
  grid-template-areas: "top top top" "rail map panel" "tick tick tick";
}
#app.panel-closed { grid-template-columns: 78px minmax(0, 1fr) 0; }
#app.panel-closed #panel { display: none; }
#top { grid-area: top; }
#rail { grid-area: rail; }
#mapwrap { grid-area: map; position: relative; min-width: 0; }
#panel { grid-area: panel; min-width: 0; }
#ticker { grid-area: tick; }

/* ---------- Üst bar ---------- */
#top {
  display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: linear-gradient(180deg, #171d26, #12161d); border-bottom: 1px solid var(--line);
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; max-width: 240px; }
.brand .logo { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(245, 179, 1, .35)); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.datebox { min-width: 170px; line-height: 1.25; }
#date { font-weight: 650; white-space: nowrap; }
#weather { font-size: 12px; white-space: nowrap; }
.timectl { display: flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tbtn { background: transparent; border: 0; border-radius: 7px; height: 32px; min-width: 34px; padding: 0 8px; cursor: pointer; color: var(--text2); font-size: 15px; }
.tbtn.txt { font-size: 12.5px; font-weight: 600; }
.tbtn:hover { background: var(--card2); color: var(--text); }
.tbtn.on { background: var(--accent); color: var(--accent-ink); }
.timectl .sep { width: 1px; height: 22px; background: var(--line2); margin: 0 3px; }
.kpis { display: flex; gap: 6px; margin-left: auto; min-width: 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 4px 10px; cursor: pointer; min-width: 74px; }
.kpi:hover { border-color: var(--line2); }
.kpi label { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.kpi b { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top-actions { display: flex; gap: 6px; }
.ibtn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 17px; }
.ibtn:hover { background: var(--card2); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- Sol menü ---------- */
#rail { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; overflow-y: auto; }
.rail-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.rail-btn .ri { font-size: 20px; line-height: 1; }
.rail-btn .rl { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.rail-btn:hover { background: var(--card); color: var(--text); }
.rail-btn.on { background: var(--card2); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rail-btn .badge { top: 3px; right: 6px; }
.rail-btn .badge.y { background: var(--accent); color: var(--accent-ink); }

/* ---------- Harita ---------- */
#map { position: absolute; inset: 0; background: #0b1016; }
.leaflet-container { background: #0b1016; font: inherit; }
.leaflet-control-attribution { font-size: 10px; background: rgba(14, 17, 22, .75) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--text2) !important; }
.leaflet-bar a { background: var(--card) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-layers { background: var(--card) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: 10px !important; }
.leaflet-tooltip.mtip { background: rgba(20, 25, 32, .96); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); padding: 6px 9px; font-size: 12.5px; }
.leaflet-tooltip.mtip::before { display: none; }
.mk-wrap { background: transparent; border: 0; }
.mk {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1;
  background: #1c232d; border: 2px solid #6b7686; box-shadow: 0 3px 8px rgba(0, 0, 0, .55); cursor: pointer; transition: transform .12s;
}
.mk:hover { transform: scale(1.18); }
.mk.t-ok { border-color: var(--good); }
.mk.t-no { opacity: .72; }
.mk.t-bid { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 179, 1, .35), 0 3px 8px rgba(0, 0, 0, .55); }
.mk.t-won { border-color: var(--accent); animation: pulse 1.2s infinite; }
.mk.t-for { border-color: #b892ff; }
.mk.l-sat { border-radius: 7px; border-color: #2bb5a0; }
.mk.l-kk { border-radius: 7px; border-color: #58a6ff; }
.mk.l-don { border-radius: 7px; border-color: #d2a8ff; }
.mk.l-own { border-radius: 7px; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 179, 1, .3); }
.mk.p-act { width: 36px; height: 36px; font-size: 16px; border: 0; padding: 3px; }
.mk.p-act .pin { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: #1c232d; }
.mk.p-done { width: 22px; height: 22px; font-size: 11px; border-color: #4b5563; opacity: .8; }
.mk.hq { width: 38px; height: 38px; font-size: 19px; border-radius: 10px; border: 2px solid var(--accent); background: #2a2208; }
.mk.br { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; border: 2px solid #c9a227; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 179, 1, .6); } 70% { box-shadow: 0 0 0 12px rgba(245, 179, 1, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 179, 1, 0); } }
#map-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 500; background: rgba(20, 25, 32, .92); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 24px); box-shadow: var(--shadow); font-size: 12.5px;
}
#map-legend label { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text2); white-space: nowrap; }
#map-legend input { accent-color: var(--accent); }
#panel-toggle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 600; width: 22px; height: 56px; border-radius: 8px 0 0 8px;
  border: 1px solid var(--line); border-right: 0; background: var(--card); cursor: pointer; color: var(--text2);
}
.map-fallback { position: absolute; inset: 0; overflow: hidden; }
.map-fallback svg { width: 100%; height: 100%; }
.map-fallback .note { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--warn-bg); border: 1px solid var(--warn); color: var(--text); padding: 6px 12px; border-radius: 8px; font-size: 12.5px; z-index: 2; }

/* ---------- Panel ---------- */
#panel { background: var(--panel); border-left: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
#panel-inner { overflow-y: auto; overflow-x: hidden; padding: 14px 16px 30px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ph { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ph h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.ph .sp { flex: 1; }
.back { border: 1px solid var(--line); background: var(--card); border-radius: 8px; height: 30px; padding: 0 10px; cursor: pointer; color: var(--text2); }
.back:hover { color: var(--text); background: var(--card2); }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
h3:first-child { margin-top: 0; }
.subtabs { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.subtabs button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 6px 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.subtabs button.on { background: var(--card2); color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.filters select, .filters input[type=text] { background: var(--card); border: 1px solid var(--line); border-radius: 8px; height: 30px; padding: 0 8px; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text2); font-size: 13px; }
.chk input { accent-color: var(--accent); }

/* Kartlar ve listeler */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.card.click { cursor: pointer; transition: border-color .12s, background .12s; }
.card.click:hover { border-color: var(--line2); background: #252d39; }
.card.hl { border-color: var(--accent); }
.card.alert { border-color: rgba(242, 86, 77, .5); background: linear-gradient(0deg, var(--bad-bg), var(--bad-bg)), var(--card); }
.card.ok { border-color: rgba(63, 185, 80, .45); }
.row { display: flex; align-items: center; gap: 10px; }
.row.top { align-items: flex-start; }
.row .grow { flex: 1; min-width: 0; }
.ttl { font-weight: 650; font-size: 14.5px; line-height: 1.3; }
.sub { color: var(--muted); font-size: 12.5px; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: var(--card2); flex: none; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--text2); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--card2); color: var(--text2); border: 1px solid var(--line); white-space: nowrap; }
.chip.g { background: var(--good-bg); color: #7ee28a; border-color: rgba(63, 185, 80, .35); }
.chip.r { background: var(--bad-bg); color: #ff8f88; border-color: rgba(242, 86, 77, .35); }
.chip.y { background: var(--warn-bg); color: #ffd25e; border-color: rgba(227, 160, 8, .4); }
.chip.b { background: var(--info-bg); color: #8cc4ff; border-color: rgba(88, 166, 255, .35); }
.chip.p { background: rgba(210, 168, 255, .13); color: #dcc2ff; border-color: rgba(210, 168, 255, .35); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.stat label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat b { display: block; font-size: 17px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { color: var(--muted); font-size: 11.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13px; }
.kv > :nth-child(odd) { color: var(--muted); }
.kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; border: 1px dashed var(--line2); border-radius: var(--radius); }
.empty .big { font-size: 32px; display: block; margin-bottom: 6px; }
.note { background: var(--info-bg); border: 1px solid rgba(88, 166, 255, .35); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; color: var(--text2); margin: 8px 0; }
.note.warn { background: var(--warn-bg); border-color: rgba(227, 160, 8, .45); }
.note.bad { background: var(--bad-bg); border-color: rgba(242, 86, 77, .45); }
.note.good { background: var(--good-bg); border-color: rgba(63, 185, 80, .4); }

/* Tablolar */
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 6px; border-bottom: 1px solid var(--line); }
table.t td { padding: 6px 6px; border-bottom: 1px solid #262e3a; vertical-align: middle; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.me td { background: rgba(245, 179, 1, .1); }
table.t tr.out td { color: var(--muted); text-decoration: line-through; }
table.t tr.sdline td { border-bottom: 2px dashed var(--bad); }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #252d39; }
.tablewrap { overflow-x: auto; }

/* İlerleme çubukları */
.bar { height: 7px; border-radius: 6px; background: #2a3240; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.bar.g > i { background: var(--good); }
.bar.r > i { background: var(--bad); }
.bar.b > i { background: var(--s1); }
.bar.thin { height: 5px; }
.phase { display: grid; grid-template-columns: 18px 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.phase .pn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase.cur .pn { color: var(--accent); font-weight: 650; }
.phase.done .pn { color: var(--muted); }

/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { background: #313b4c; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.pri:hover { background: var(--accent2); }
.btn.danger { background: transparent; border-color: rgba(242, 86, 77, .55); color: #ff8f88; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.xs { height: 24px; padding: 0 7px; font-size: 11.5px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 3px; }
.stepper .val { min-width: 46px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input[type=text], .field input[type=number], .field select { height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 10px; }
.field input:focus, .field select:focus, .filters select:focus { outline: 2px solid rgba(245, 179, 1, .5); outline-offset: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.radio { display: flex; flex-direction: column; gap: 6px; }
.radio label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: var(--bg2); }
.radio label:has(input:checked) { border-color: var(--accent); background: rgba(245, 179, 1, .07); }
.radio input { accent-color: var(--accent); margin-top: 3px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--bg2); padding: 6px 12px; cursor: pointer; color: var(--text2); font-weight: 600; font-size: 12.5px; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* Moral / yetenek göstergeleri */
.meter { display: inline-block; width: 54px; height: 6px; border-radius: 4px; background: #2a3240; vertical-align: middle; overflow: hidden; }
.meter > i { display: block; height: 100%; }

/* ---------- Haber bandı ---------- */
#ticker { display: flex; align-items: center; background: #0b0e12; border-top: 1px solid var(--line); overflow: hidden; font-size: 12.5px; }
.tk-label { flex: none; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 11px; letter-spacing: .08em; padding: 0 10px; height: 100%; display: flex; align-items: center; }
#ticker-view { overflow: hidden; flex: 1; height: 100%; position: relative; }
#ticker-track { position: absolute; white-space: nowrap; top: 50%; transform: translateY(-50%); left: 0; animation: tick 90s linear infinite; color: var(--text2); }
#ticker-track span { margin-right: 46px; }
#ticker-track span b { color: var(--muted); font-weight: 600; margin-right: 6px; }
#ticker-track span.good::before { content: "▲ "; color: var(--good); }
#ticker-track span.bad::before { content: "▼ "; color: var(--bad); }
#ticker-track span.eco::before { content: "● "; color: var(--info); }
@keyframes tick { from { transform: translate(40vw, -50%); } to { transform: translate(-100%, -50%); } }
#ticker:hover #ticker-track { animation-play-state: paused; }

/* ---------- Bildirimler ---------- */
#toasts { position: fixed; right: 16px; top: 72px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; background: #1d2430; border: 1px solid var(--line2); border-left: 4px solid var(--info); border-radius: 10px; padding: 10px 12px;
  box-shadow: var(--shadow); font-size: 13px; animation: tin .22s ease-out; cursor: pointer; color: var(--text);
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
.toast.imp { box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.toast.out { animation: tout .25s ease-in forwards; }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateX(30px); } }
.notes-list .n { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #262e3a; font-size: 13px; cursor: pointer; }
.notes-list .n:hover { background: var(--card); }
.notes-list .n .d { color: var(--muted); font-size: 11.5px; white-space: nowrap; min-width: 66px; }
.notes-list .n.unread { font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--info); }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }

/* ---------- Modallar ---------- */
#modal-root .ov { position: fixed; inset: 0; background: rgba(4, 6, 9, .72); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fin .15s; }
@keyframes fin { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: min(860px, 100%); }
.modal.full { width: min(1500px, 100%); height: calc(100vh - 32px); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal .mh h2 { margin: 0; font-size: 17px; flex: 1; min-width: 0; }
.modal .mb { padding: 14px 16px; overflow-y: auto; flex: 1; }
.modal .mf { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; color: var(--text2); flex: none; }
.x:hover { color: var(--text); }
.bigval { font-size: 26px; font-weight: 750; letter-spacing: -.01em; }

/* Yeni oyun ekranı */
.welcome { width: min(720px, 100%); }
.welcome .hero { padding: 26px 22px 16px; background: radial-gradient(1200px 300px at 0% 0%, rgba(245, 179, 1, .18), transparent), linear-gradient(180deg, #1d2430, var(--panel)); border-bottom: 1px solid var(--line); }
.welcome .hero h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.welcome .hero p { margin: 6px 0 0; color: var(--text2); }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.feat div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px; font-size: 12.5px; color: var(--text2); }
.feat div b { display: block; color: var(--text); margin-bottom: 2px; }

/* ---------- Grafikler ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: rgba(20, 25, 32, .97); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, -110%); display: none; z-index: 5; }
.chart .tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text2); margin: 2px 0 6px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.legend i.sq { height: 10px; width: 10px; border-radius: 2px; }

/* ---------- Kat planı editörü ---------- */
.planner { display: grid; grid-template-columns: 270px minmax(0, 1fr) 300px; gap: 0; height: 100%; min-height: 0; }
.planner > div { min-height: 0; overflow-y: auto; }
.pl-left, .pl-right { padding: 14px; background: var(--bg2); }
.pl-left { border-right: 1px solid var(--line); }
.pl-right { border-left: 1px solid var(--line); }
.pl-center { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pl-tools { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tool { border: 1px solid var(--line2); background: var(--card); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-weight: 650; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.tool i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tool.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245, 179, 1, .35); }
.floor-tabs { display: flex; gap: 4px; }
.floor-tabs button { border: 1px solid var(--line); background: var(--card); color: var(--text2); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-weight: 650; font-size: 12.5px; }
.floor-tabs button.on { background: var(--card2); color: var(--text); border-color: var(--line2); }
.plan-svg-wrap { background: #f3efe6; border-radius: 12px; padding: 10px; display: flex; justify-content: center; align-items: center; flex: 1; min-height: 300px; border: 1px solid var(--line2); }
.plan-svg-wrap svg { max-width: 100%; max-height: 62vh; user-select: none; touch-action: none; }
.facade-wrap { background: linear-gradient(180deg, #2b3c55 0%, #4d6a8f 70%, #6b8bb2 100%); border-radius: 12px; border: 1px solid var(--line2); padding: 6px; }
.facade-wrap svg { width: 100%; height: auto; display: block; }
.issue-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: #ff9b94; }
.issue-list li { margin: 3px 0; }
.mini-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.mini-step .stepper .val { min-width: 40px; }
.gauge-row { margin: 6px 0 10px; }
.gauge-row .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 3px; }

/* Bina cephesi (proje detayı) */
.bld { background: linear-gradient(180deg, #24344b, #3f5878); border-radius: 12px; border: 1px solid var(--line2); padding: 6px; margin: 6px 0 10px; }
.bld svg { width: 100%; height: auto; display: block; }

/* Başarımlar */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ach { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px; text-align: center; font-size: 12px; }
.ach .ai { font-size: 24px; display: block; }
.ach b { display: block; font-size: 12.5px; margin: 3px 0 1px; }
.ach.lock { opacity: .38; filter: grayscale(1); }

/* Kredi notu göstergesi */
.score-bar { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #d03b3b 0%, #ec835a 35%, #fab219 55%, #0ca30c 80%); margin: 8px 0 4px; }
.score-bar i { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px #000; transform: translateX(-2px); }

.booting #panel-inner, .booting #rail { visibility: hidden; }

@media (max-width: 1250px) {
  .kpi:nth-child(5), .kpi:nth-child(4) { display: none; }
  #app { grid-template-columns: 70px minmax(0, 1fr) minmax(400px, 42vw); }
  .planner { grid-template-columns: 240px minmax(0, 1fr) 260px; }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 42vh auto 30px; grid-template-areas: "top" "rail" "map" "panel" "tick"; }
  #app.panel-closed { grid-template-columns: minmax(0, 1fr); }
  #app.panel-closed #panel { display: flex; }
  #top { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .kpis { margin-left: 0; width: 100%; overflow-x: auto; }
  .kpi:nth-child(5), .kpi:nth-child(4) { display: block; }
  #rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-btn { min-width: 64px; }
  #panel { border-left: 0; }
  #panel-inner { overflow: visible; }
  #panel-toggle { display: none; }
  .planner { grid-template-columns: 1fr; height: auto; }
  .modal.full { height: auto; }
  .feat { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .timectl .txt { padding: 0 5px; font-size: 11.5px; }
  .datebox { min-width: 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
