/* Teamwars hub: bütün sayfaların ortak tasarımı (yazı tipleri, renkler, gezinme çubuğu, kartlar, düğmeler, pencereler). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
             src: url(/static/fonts/inter-latin-wght-normal.woff2) format("woff2");
             unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
             src: url(/static/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
             unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
             src: url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
             unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
             src: url(/static/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2");
             unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #08090b; --panel: #101216; --panel2: #16191e; --panel3: #1d2127; --sunken: #0b0c0f;
  --line: #1f2329; --line2: #2b3038; --hover: rgba(255,255,255,.035);
  --text: #eceef1; --muted: #9399a4; --dim: #5d636d;
  --accent: #36d6ae; --accent-ink: #04170f; --accent-soft: rgba(54,214,174,.12); --accent-line: rgba(54,214,174,.45);
  --accent2: var(--accent-soft);
  --ct: #5b9bf3; --t: #efa63f; --ok: #45d07c; --warn: #f2bd4b; --bad: #f2645c;
  --ok-soft: rgba(69,208,124,.13); --warn-soft: rgba(242,189,75,.14); --bad-soft: rgba(242,100,92,.14);
  --ok-ink: #8fe8b0; --warn-ink: #f7d488; --bad-ink: #ffa49e;
  --sc-harita: #22d3ee; --sc-ortak: #a78bfa; --sc-deneyim: #fb923c;
  --navbg: rgba(8,9,11,.82);
  --radius: 12px; --radius-sm: 8px; --nav-h: 56px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 30px rgba(0,0,0,.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12px; background: var(--panel2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* --- gezinme çubuğu --- */
.tw-nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 6px;
          padding: 0 20px; background: var(--navbg); backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--line); }
.tw-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: var(--text);
            margin-right: 18px; white-space: nowrap; }
.tw-brand:hover { text-decoration: none; }
.tw-brand svg { width: 24px; height: 24px; }
.tw-brand span { color: var(--dim); font-weight: 500; }
.tw-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tw-links a { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--muted);
              font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.tw-links a:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.tw-links a.on { color: var(--text); background: var(--panel2); }
.tw-links a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent); }
.tw-links svg { width: 16px; height: 16px; opacity: .8; }
.tw-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tw-hub { display: flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.tw-user { display: flex; align-items: center; gap: 6px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.tw-user:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.tw-user svg { width: 15px; height: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; flex: 0 0 auto; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.off { background: var(--dim); }
@media (max-width: 760px) { .tw-brand span, .tw-extra, #tw-username { display: none; } .tw-nav { padding: 0 12px; } .tw-links a { padding: 7px 9px; } }
@media (max-width: 520px) { .tw-brand { margin-right: 6px; font-size: 0; gap: 0; } .tw-links a { font-size: 13px; gap: 5px; padding: 7px 7px; }
  #tw-hubtxt { display: none; } }

/* --- düzen --- */
.page { padding: 20px; max-width: 1680px; margin: 0 auto; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.card h2 small, .card h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--dim); margin-left: 6px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 48px 12px; text-align: center; }

/* --- form öğeleri --- */
input, select, button, textarea { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line2);
                        border-radius: var(--radius-sm); padding: 7px 11px; min-width: 0; }
input::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
button { cursor: pointer; white-space: nowrap; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
button:hover { background: var(--panel3); border-color: #3a414b; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover { background: #4fe3bd; border-color: #4fe3bd; }
button.danger { color: var(--bad-ink); }
button.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
button.on { background: var(--ok-soft); border-color: rgba(69,208,124,.5); color: var(--ok-ink); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
button.sm { padding: 4px 10px; font-size: 13px; }
button.icon { padding: 5px 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
button.icon svg, button svg { width: 16px; height: 16px; flex: 0 0 auto; }
button:has(svg) { display: inline-flex; align-items: center; gap: 7px; }
.group { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; background: var(--panel); border: 1px solid var(--line);
         border-radius: 10px; }
.group > .lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; font-weight: 600; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.on { background: var(--panel3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* --- rozetler, çipler, çubuklar --- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
         background: var(--panel3); color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.badge.CT { background: rgba(91,155,243,.16); color: #9cc3fb; box-shadow: inset 0 0 0 1px rgba(91,155,243,.35); }
.badge.T { background: rgba(239,166,63,.15); color: #f6c87f; box-shadow: inset 0 0 0 1px rgba(239,166,63,.35); }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); } .badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad-ink); } .badge.acc { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line);
        border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--muted); }
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip[hidden] { display: none; }
.chip.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pbar { height: 6px; background: var(--panel3); border-radius: 4px; overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .6s; }
.pbar.green > i { background: var(--ok); }
.pbar.warn > i { background: var(--warn); } .pbar.bad > i { background: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.kv .k { color: var(--muted); white-space: nowrap; }
.kv .v { min-width: 0; overflow-wrap: anywhere; }

/* --- tablo --- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: var(--panel); position: sticky; top: 0; }
.tbl tr.grp td { background: var(--panel2); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.tbl tr:hover td { background: var(--hover); }
.scroll-x { overflow-x: auto; }

/* --- pencere (dialog) --- */
dialog { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line2);
         border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(3,4,6,.72); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.dlg-head .sp { flex: 1; }
.dlg-body { padding: 18px; display: grid; gap: 12px; }

/* --- açılır menü --- */
.menu { position: fixed; z-index: 120; min-width: 220px; padding: 6px; background: var(--panel2); border: 1px solid var(--line2);
        border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.55); display: grid; gap: 1px; }
.menu[hidden] { display: none; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0;
               padding: 8px 10px; border-radius: 7px; color: var(--text); font-weight: 450; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--bad-ink); } .menu button.danger:hover { background: var(--bad-soft); }
.menu button svg { color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .mh { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px 4px; font-weight: 600; }

/* --- günlük (log) --- */
.logbox { background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
          font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; overflow: auto; }
.logbox .cs2 { color: var(--dim); } .logbox .err { color: var(--bad-ink); } .logbox .warn { color: var(--warn-ink); }

/* --- bildirim --- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--ok); border-radius: 10px; padding: 10px 14px; font-size: 13px;
         box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: toastin .2s ease-out; }
.toast.bad { border-left-color: var(--bad); }
@keyframes toastin { from { transform: translateY(6px); opacity: 0; } }
