:root {
  --bg: #0b0f14; --panel: #121821; --panel2: #18202b; --line: #243042; --text: #e6edf5; --muted: #8b9bb0;
  --green: #10b981; --amber: #f59e0b; --red: #ef4444; --blue: #60a5fa;
  --r: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { position: sticky; top: 0; z-index: 5; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 20px; background: rgba(11, 15, 20, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--green), #0ea5e9); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit; }
.tab:hover { color: var(--text); background: var(--panel); }
.tab.active { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--green); }
main { max-width: 1280px; margin: 0 auto; padding: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; }
.card.empty { text-align: center; padding: 40px; }
h3 { margin: 0 0 8px; font-size: 17px; }
h4 { margin: 12px 0 8px; font-size: 14px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card, .grid2 + .grid2 { margin-top: 16px; }
.toolbar, .formgrid, .row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row { align-items: center; margin-top: 10px; }
label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(16, 185, 129, .4); border-color: var(--green); }
textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.formgrid input { width: 130px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; align-items: center; }
.checks label { flex-direction: row; align-items: center; color: var(--text); font-size: 13px; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; font: inherit; display: inline-flex; align-items: center; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--green); border-color: var(--green); color: #04130d; font-weight: 600; }
.btn.tiny { padding: 3px 8px; font-size: 12px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
th.sorted { color: var(--green); }
table.mini th, table.mini td { padding: 5px 8px; font-size: 13px; }
table.mini input { width: 90px; padding: 4px 6px; }
.fx tr.fxrow { cursor: pointer; }
.fx tr.fxrow:hover { background: var(--panel2); }
.fx tr.open { background: var(--panel2); }
.fx tr.detail > td { background: #0f141b; padding: 14px; }
.nowrap { white-space: nowrap; }
.pcell { display: grid; grid-template-columns: 60px auto; gap: 2px 8px; align-items: center; min-width: 120px; }
.pcell small { grid-column: 2; color: var(--muted); }
.pcell .bar { grid-row: span 2; }
.bar { display: inline-block; width: 60px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }
.bar.hi i { background: var(--green); } .bar.md i { background: var(--amber); } .bar.lo i { background: var(--red); }
.pcell.hi b { color: var(--green); }
.detailgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.detailgrid .span2 { grid-column: span 2; }
.stats3 { display: flex; gap: 18px; }
.stats3 div { display: flex; flex-direction: column; }
.stats3 b { font-size: 18px; }
.statsline { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0; color: var(--muted); font-size: 12px; }
.statsline b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 12px; white-space: nowrap; }
.chip.ok, .chip.rG { border-color: rgba(16, 185, 129, .5); }
.chip.no, .chip.rM { border-color: rgba(239, 68, 68, .5); }
.chip.rB { border-color: rgba(245, 158, 11, .5); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.good { background: rgba(16, 185, 129, .15); color: var(--green); }
.tag.mid { background: rgba(245, 158, 11, .15); color: var(--amber); }
.tag.bad { background: rgba(239, 68, 68, .15); color: var(--red); }
.kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.kpis > div { flex: 1 1 150px; background: var(--panel2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.kpis b { font-size: 22px; }
.pos { color: var(--green); } .neg { color: var(--red); }
.hist { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.hist > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.hist span { width: 100%; background: linear-gradient(var(--blue), #3b82f6); border-radius: 4px 4px 0 0; min-height: 2px; }
.hist b { font-size: 11px; }
.hist small { color: var(--muted); }
.warn { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .4); color: #fcd34d; border-radius: 8px; padding: 8px 12px; margin: 10px 0; font-size: 13px; }
.progress { position: sticky; top: 61px; z-index: 4; background: var(--panel); border-bottom: 1px solid var(--line); padding: 6px 20px; font-size: 12px; color: var(--muted); }
.progress i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--green); transition: width .2s; }
footer { max-width: 1280px; margin: 20px auto 40px; padding: 16px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
footer p { margin: 0; }
.credit { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.credit:hover { color: var(--text); }
.cd { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 800; font-size: 11px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 80px); background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; transition: transform .25s; z-index: 10; }
#toast.show { transform: translate(-50%, 0); }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  header { position: static; padding: 10px 12px; }
  nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .tab { white-space: nowrap; }
  .progress { top: 0; }
  main { padding: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .detailgrid { grid-template-columns: 1fr; }
  .detailgrid .span2 { grid-column: auto; }
  .formgrid input { width: 110px; }
  .pcell { grid-template-columns: auto; min-width: 70px; }
  .pcell .bar { display: none; }
}

/* --- Maçlar / canlı --- */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; font: inherit; }
.seg button.on { background: var(--panel2); color: var(--text); }
label.inline { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }
.livebar { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
.tab .dot { width: 6px; height: 6px; vertical-align: middle; margin-left: 2px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.live { color: var(--red); font-weight: 700; font-size: 13px; animation: pulse 2s infinite; }
h4 .live { font-size: 11px; margin-left: 6px; }
tr.st-in { background: rgba(239, 68, 68, .04); }
tr.st-post { opacity: .6; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-width: 300px; }
.teams span:first-child { justify-self: end; text-align: right; }
.teams > span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 20px; height: 20px; object-fit: contain; }
.score { font-weight: 800; font-size: 16px; background: var(--bg); padding: 2px 10px; border-radius: 6px; white-space: nowrap; }
.score.in { color: var(--red); }
.vs { color: var(--muted); padding: 0 10px; }
.row.compact { margin: 0 0 8px; gap: 12px; }
.row.compact input { width: 90px; padding: 4px 8px; }
.grid2.tight { grid-template-columns: 1fr 1fr; gap: 16px; }
h5 { margin: 4px 0 6px; font-size: 13px; }
.xi { margin: 0; padding-left: 20px; columns: 2; font-size: 13px; }
.xi small { display: inline-block; width: 26px; }
table.stats td.r { text-align: right; width: 35%; }
table.stats td.c { text-align: center; }
.timeline { display: flex; flex-direction: column; gap: 4px; font-size: 13px; max-height: 260px; overflow: auto; }
.timeline b { display: inline-block; width: 46px; color: var(--muted); }
.news { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.news li { display: flex; flex-direction: column; border-left: 2px solid var(--line); padding-left: 10px; }
.news a { color: var(--text); text-decoration: none; }
.news a:hover { color: var(--green); }
@media (max-width: 760px) {
  .teams { min-width: 0; grid-template-columns: 1fr; gap: 2px; }
  .teams span:first-child { justify-self: start; text-align: left; }
  .teams .score, .teams .vs { justify-self: start; padding: 0 6px; font-size: 13px; }
  .fx th:nth-child(3), .fx tr.fxrow td:nth-child(3) { display: none; }
  .fx th, .fx td { padding: 6px 5px; }
  .fx td .muted { font-size: 10px; }
  .grid2.tight { grid-template-columns: 1fr; }
  .livebar { margin-left: 0; }
}
