/* Abs Box paneli — tasarım sistemi (v3: A + B).
   Yön B "Açık saha": Inter, #f7f8fa zemin, beyaz yüzey, turuncu vurgu; tüm ekranların varsayılanı.
   Yön A "Kontrol odası": koyu yüzey; izleme merkezi ve tam ekran duvar her zaman bununla çizilir (.scope-dark).
   Kullanıcı koyu temayı seçerse (data-theme="dark") tüm ekranlar koyu olur. Görünüm yalnız bu blokla değişir.
   Renk kuralı: turuncu yalnız vurgu ve birincil eylem; kırmızı/sarı/yeşil yalnız durum bildirir.
   v4: renk sistemi aşağıdaki değişkenlerde; kart, ikon rozeti ve açılır kart bileşenleri app-v4.css içindedir. */
:root {
  --bg: #f3f5fa; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #eaeef5;
  --line: #e1e6ef; --line-2: #c3cbd8;
  --fg: #131c2b; --fg-2: #38445a; --muted: #536074;
  --nav: #ffffff; --nav-2: #fff3e8; --nav-fg: #445066; --nav-hi: #131c2b; --nav-mute: #667286; --nav-line: #e1e6ef;
  --accent: #ea6a1a; --accent-2: #f59f0a; --accent-ink: #16202b; --accent-text: #ad4a0b; --accent-soft: #fff3e8;
  --link: #2f4fd0; --focus: #2f4fd0;
  --crit: #c5301c; --crit-soft: #fdebe8; --warn: #8f5400; --warn-soft: #fdf1d3; --ok: #12704a; --ok-soft: #e2f5ec;
  --off: #566376; --off-soft: #eaeef5;
  /* v4 renk sistemi. Her kural ailesinin kendi rengi vardır: İSG/KKD turuncu-amber, Güvenlik çivit mavisi, Paketleme
     deniz yeşili. Üçlü kalıp: --x metin ve ikon (AA kontrast), --x-2 dolgu ve gradyan, --x-soft açık zemin.
     Mor, gök, gül ve arduvaz yardımcı tonlardır (menü bölümleri, özet kartları); durum renkleri değildir. */
  --isg: #b24d0c; --isg-2: #e8650f; --isg-soft: #fff1e4;
  --sec: #3847c9; --sec-2: #5b6cf0; --sec-soft: #eceefd;
  --pack: #0a766c; --pack-2: #12998b; --pack-soft: #def5f1;
  --vio: #6d3fc8; --vio-2: #8b5cf6; --vio-soft: #f1eafd;
  --sky: #0a6aa6; --sky-2: #0b93d5; --sky-soft: #e2f3fc;
  --rose: #b82a55; --rose-2: #e84a78; --rose-soft: #fdeaf0;
  --slate: #47546a; --slate-2: #64748b; --slate-soft: #edf0f5;
  --inv: #131c2b; --inv-fg: #ffffff;
  --shadow-1: 0 1px 2px rgba(19,28,43,.05), 0 2px 10px rgba(19,28,43,.05);
  --shadow-2: 0 2px 4px rgba(19,28,43,.06), 0 10px 26px rgba(19,28,43,.11);
  --wall: #0c1118; --wall-2: #151c27; --wall-line: #263041; --wall-fg: #e7ecf3; --wall-mute: #93a0b3;
  --f-display: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px; --r-sm: 6px; --r-lg: 16px; --r-pill: 18px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --shadow: 0 1px 2px rgba(22,32,43,.05), 0 10px 28px rgba(22,32,43,.14);
  --ctl-h: 38px; color-scheme: light;
}
:root[data-theme="dark"], .scope-dark {
  --bg: #0b111a; --surface: #131b27; --surface-2: #182231; --surface-3: #222d3e;
  --line: #263245; --line-2: #3a4860; --fg: #e9edf4; --fg-2: #c5cdd9; --muted: #98a4b6;
  --nav: #090e15; --nav-2: #2a1c12; --nav-fg: #aeb8c8; --nav-hi: #ffffff; --nav-mute: #7a8698; --nav-line: rgba(255,255,255,.08);
  --accent: #f07a30; --accent-2: #f5a623; --accent-ink: #16202b; --accent-text: #ff9d5c; --accent-soft: #33200f; --link: #9db4ff; --focus: #ff9d5c;
  --crit: #ff7361; --crit-soft: #3b1b18; --warn: #f0a92e; --warn-soft: #3a2a10; --ok: #4cc491; --ok-soft: #12301f;
  --off: #8491a5; --off-soft: #222a37;
  --isg: #ffa466; --isg-2: #e8650f; --isg-soft: #36210f;
  --sec: #a3b0ff; --sec-2: #5b6cf0; --sec-soft: #1c2249;
  --pack: #52d6c6; --pack-2: #12998b; --pack-soft: #0e302c;
  --vio: #c0a2ff; --vio-2: #8b5cf6; --vio-soft: #281b48;
  --sky: #6cc6f5; --sky-2: #0b93d5; --sky-soft: #0f2b3e;
  --rose: #ff8fb0; --rose-2: #e84a78; --rose-soft: #3b1526;
  --slate: #aab6c8; --slate-2: #64748b; --slate-soft: #222c3b;
  --inv: #e9edf4; --inv-fg: #16202b;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35), 0 2px 10px rgba(0,0,0,.22);
  --shadow-2: 0 2px 4px rgba(0,0,0,.4), 0 12px 28px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--f-body); overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.mon :focus-visible, .codebox :focus-visible { outline-color: #ff9d5c; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.boot { padding: 40px; color: var(--muted); }
.stack { display: grid; gap: var(--s3); align-content: start; }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------------------------------------------------------------- iskelet */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; }
.nav { background: var(--nav); color: var(--nav-fg); display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; border-right: 1px solid var(--nav-line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 8px; color: var(--nav-hi); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; background: #e8681c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='6.5' y='8' width='13' height='10' rx='2' fill='none' stroke='%2316202b' stroke-width='2'/%3E%3Ccircle cx='13' cy='13' r='2.2' fill='%2316202b'/%3E%3C/svg%3E") center / 100% no-repeat; }
.brand b { font-family: var(--f-display); font-size: 21px; letter-spacing: .02em; line-height: 1.1; display: block; }
.brand small { display: block; font-size: 10.5px; color: var(--nav-mute); letter-spacing: .1em; text-transform: uppercase; }
.nav-sec { margin-top: 8px; padding: 4px 10px 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--nav-mute); font-weight: 600; }
.nav a.item { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: var(--r); color: var(--nav-fg); text-decoration: none; font-weight: 500; min-height: 32px; }
.nav a.item:hover { background: color-mix(in srgb, var(--nav-fg) 9%, transparent); color: var(--nav-hi); }
.nav a.item[aria-current="page"] { background: var(--nav-2); color: var(--accent-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav a.item svg { width: 18px; height: 18px; }
.nav .badge { margin-left: auto; background: #d23c2a; color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; font-family: var(--f-mono); line-height: 18px; }
.nav-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--nav-line); font-size: 12px; display: grid; gap: 4px; }
.nav-foot .tenant { color: var(--nav-hi); font-weight: 600; }
.nav-foot a { color: var(--nav-fg); }
.nav-foot .row { margin-top: 6px; }
.nav-btn { background: transparent; border: 1px solid var(--line-2); color: var(--nav-fg); border-radius: var(--r); padding: 4px 8px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; min-height: 28px; }
.nav-btn:hover { color: var(--nav-hi); border-color: var(--nav-fg); }
.nav-btn svg { width: 14px; height: 14px; }
.topbar { display: none; }
.scrim { display: none; }
.main { min-width: 0; padding: 24px max(24px, env(safe-area-inset-right, 0px)) 56px max(24px, env(safe-area-inset-left, 0px)); display: grid; gap: 20px; align-content: start; }
.main > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--muted); max-width: 78ch; }
.crumb { font-size: 13px; display: inline-block; margin-bottom: 4px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r); font-size: 13px; border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.banner.demo { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.banner.info { background: color-mix(in srgb, var(--sec) 10%, var(--surface)); border-color: color-mix(in srgb, var(--sec) 35%, var(--line)); }
.banner svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--nav); color: var(--nav-hi); border-bottom: 1px solid var(--nav-line); padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); padding-top: max(8px, env(safe-area-inset-top, 0px)); min-height: 52px; }
  .topbar .brand { padding: 0; }
  .topbar .brand-mark { width: 26px; height: 26px; }
  .topbar .brand b { font-size: 18px; }
  .topbar .here { margin-left: auto; font-size: 13px; color: var(--nav-fg); }
  .icon-btn.menu { color: var(--nav-hi); border-color: var(--line-2); background: transparent; }
  .nav { position: fixed; z-index: 50; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .18s ease; box-shadow: var(--shadow); }
  .app.nav-open .nav { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,12,18,.55); z-index: 40; border: 0; width: 100%; }
  .main { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); gap: 16px; }
  h1 { font-size: 24px; }
}

/* ---------------------------------------------------------------- bileşenler */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 52px; }
.panel-h p { color: var(--muted); font-size: 13px; }
.panel-b { padding: 16px; }
.panel-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px; min-height: var(--ctl-h); border-radius: var(--r); font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.05); background: var(--accent); }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--crit); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { width: var(--ctl-h); height: var(--ctl-h); display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); padding: 0; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.sm svg { width: 15px; height: 15px; }
.field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea, .inp { width: 100%; min-height: var(--ctl-h); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); min-width: 0; }
.field input:hover, .field select:hover, .inp:hover { border-color: var(--muted); }
.field input[disabled], .inp[disabled] { background: var(--surface-3); color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; line-height: 20px; color: var(--fg-2); }
.chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted); }
.chip.isg i { background: var(--isg); } .chip.guvenlik i { background: var(--sec); } .chip.paketleme i { background: var(--pack); }
.chip svg { width: 14px; height: 14px; }
.chip.miss { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); background: var(--crit-soft); color: var(--crit); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; line-height: 16px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 11px; white-space: nowrap; line-height: 20px; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok, .st.active { color: var(--ok); background: var(--ok-soft); }
.st.alarm, .st.suspended, .st.canceled, .st.expired, .st.err { color: var(--crit); background: var(--crit-soft); }
.st.warn, .st.past_due { color: var(--warn); background: var(--warn-soft); }
.st.offline, .st.idle { color: var(--off); background: var(--off-soft); }
.st.trialing, .st.run { color: var(--sec); background: color-mix(in srgb, var(--sec) 14%, transparent); }
.sev { width: 4px; align-self: stretch; border-radius: 2px; flex: none; min-height: 28px; }
.sev.high { background: var(--crit); } .sev.medium { background: var(--warn); } .sev.low { background: var(--off); }
.sevtxt { font-size: 12px; font-weight: 600; white-space: nowrap; }
.sevtxt.high { color: var(--crit); } .sevtxt.medium { color: var(--warn); } .sevtxt.low { color: var(--off); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.on { background: var(--ok); } .dot.off { background: var(--crit); } .dot.idle { background: var(--off); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-pill); padding: 0 14px; min-height: 34px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.filters button:hover { border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--inv); color: var(--inv-fg); border-color: var(--inv); }
.seg { display: inline-flex; justify-self: start; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0 12px; min-height: 34px; font-size: 13px; border-left: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--inv); color: var(--inv-fg); }
.seg button svg { width: 15px; height: 15px; }
.toolbar { display: flex; gap: 8px 12px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { min-width: 150px; flex: 0 1 190px; }
.toolbar .field > label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.toolbar .sp { flex: 1; }
.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: #16202b; color: #fff; padding: 10px 16px; border-radius: var(--r); z-index: 200; max-width: calc(100% - 32px); box-shadow: var(--shadow); border: 1px solid #333d4f; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty b { color: var(--fg); font-family: var(--f-display); font-size: 17px; font-weight: 600; }
.codebox { background: #141b26; color: #e6eaf1; padding: 12px; border-radius: var(--r); font-family: var(--f-mono); font-size: 12.5px; overflow-x: auto; white-space: pre; max-width: 100%; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 34px; height: 20px; margin: 0; cursor: pointer; }
.switch i { width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; transition: background .12s; flex: none; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .12s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.progress b { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s linear; }

/* ---------------------------------------------------------------- KKD ikonları */
.ppe-ic { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.ppe-set { display: inline-flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.ppe-set .ppe-b { width: 26px; height: 26px; border-radius: 5px; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--fg-2); }
.ppe-set .ppe-b svg { width: 17px; height: 17px; }
.ppe-set.miss .ppe-b { background: var(--crit-soft); color: var(--crit); }

/* ---------------------------------------------------------------- özet kartları */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px 14px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.kpi .v { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 19px; color: var(--muted); font-weight: 500; }
.kpi.alert { box-shadow: inset 3px 0 0 var(--crit); }
.kpi.alert .v { color: var(--crit); }
.kpi .s { font-size: 12px; color: var(--muted); }
.meter { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter b { display: block; height: 100%; background: var(--fg-2); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpi .v { font-size: 28px; } .kpi { padding: 10px 12px 12px; } }
.dash { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.dash.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dash, .dash.even { grid-template-columns: minmax(0, 1fr); } }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.rulebars { display: grid; gap: 10px; }
.rulebar { display: grid; grid-template-columns: minmax(0, 170px) minmax(40px, 1fr) 30px; gap: 10px; align-items: center; font-size: 13px; }
.rulebar > span:first-child { display: flex; gap: 8px; align-items: center; min-width: 0; }
.rulebar .track { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.rulebar .track b { display: block; height: 100%; border-radius: 4px; }
.rulebar svg { width: 18px; height: 18px; color: var(--fg-2); }
@media (max-width: 500px) { .rulebar { grid-template-columns: minmax(0, 130px) minmax(30px, 1fr) 26px; } }
.list-rows > * { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.list-rows > *:last-child { border-bottom: 0; }
a.rowlink { color: inherit; text-decoration: none; }
a.rowlink:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- olaylar */
.ev-list { display: grid; }
.ev { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: center; min-width: 0; }
.ev:last-child { border-bottom: 0; }
.ev .shot { width: 112px; aspect-ratio: 16/9; border-radius: 4px; flex: none; background: var(--surface-3); object-fit: cover; display: block; padding: 0; border: 0; overflow: hidden; }
.ev .shot canvas, .ev .shot img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ev .body { min-width: 0; flex: 1; display: grid; gap: 3px; }
.ev .title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev .msg { color: var(--fg-2); overflow-wrap: anywhere; }
.ev .meta { font-size: 12px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.ev.acked .shot, .ev.acked .title, .ev.acked .msg { opacity: .62; }
.ev-compact .shot { width: 80px; }
.ev .act { flex: none; }
@media (max-width: 560px) {
  .ev { flex-wrap: wrap; padding: 10px 12px; }
  .ev .shot { width: 84px; }
  .ev .body { flex-basis: calc(100% - 120px); }
  .ev .act { margin-left: 16px; }
}

/* ---------------------------------------------------------------- kameralar */
.group-h { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group-h h2 { font-size: 18px; }
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.cam { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; align-content: start; min-width: 0; }
.cam .view { position: relative; background: var(--wall); }
.cam canvas, .cam img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; }
.cam .live { position: absolute; left: 8px; top: 8px; background: rgba(10,14,20,.72); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 3px; display: flex; gap: 6px; align-items: center; font-family: var(--f-mono); }
.cam .info { padding: 10px 12px 12px; display: grid; gap: 8px; }
.cam .rules { display: flex; gap: 4px; flex-wrap: wrap; }
.cam .url { font-size: 11.5px; overflow-wrap: anywhere; color: var(--muted); }

/* ---------------------------------------------------------------- sihirbaz */
.steps { display: flex; gap: 6px 4px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding-right: 6px; }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: 12px; font-weight: 500; background: var(--surface); }
.step.on { color: var(--fg); font-weight: 600; } .step.on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.done b { background: var(--ok); border-color: var(--ok); color: #fff; }
.step + .step::before { content: ""; width: 22px; height: 1px; background: var(--line-2); margin-right: 6px; }
@media (max-width: 640px) { .step span { display: none; } .step.on span { display: inline; } .step + .step::before { width: 10px; } }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.pick { text-align: left; border: 1px solid var(--line-2); background: var(--surface); padding: 12px; border-radius: var(--r); display: grid; gap: 4px; align-content: start; min-width: 0; position: relative; }
.pick:hover { border-color: var(--muted); }
.pick[aria-pressed="true"], .pick[aria-checked="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; background: var(--surface-2); }
.pick b { font-weight: 600; } .pick small { color: var(--muted); font-size: 12px; }
.found-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px; }
.found { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); min-width: 0; }
.found.sel { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.found.wide { grid-column: 1 / -1; }
.found-h { display: flex; gap: 10px; padding: 10px 12px; align-items: flex-start; cursor: pointer; }
.found-h .body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.found-h .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.dev-ic { width: 34px; height: 34px; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; color: var(--fg-2); flex: none; }
.dev-ic svg { width: 20px; height: 20px; }
.ch-box { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.ch { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); min-height: 34px; font-family: var(--f-mono); font-size: 12.5px; padding: 0 4px; }
.ch[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.url-preview { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 8px 12px; font-family: var(--f-mono); font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.test-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) auto; gap: 8px 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.test-row:last-child { border-bottom: 0; }
@media (max-width: 700px) { .test-row { grid-template-columns: minmax(0, 1fr) auto; } .test-row .res { grid-column: 1 / -1; grid-row: 2; } }
.name-row { display: grid; grid-template-columns: 64px minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.name-row:last-child { border-bottom: 0; }
.name-row .src { grid-column: 1; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .name-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; } }
.preset { text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.preset:hover { border-color: var(--muted); }
.preset[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; background: var(--surface-2); }
.preset b { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.wz-foot { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- bölge editörü */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
@media (max-width: 1100px) { .editor { grid-template-columns: minmax(0, 1fr); } }
.stage canvas { width: 100%; height: auto; display: block; border-radius: var(--r); cursor: crosshair; touch-action: none; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tools button { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 0 10px; min-height: 32px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tools button i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.tools button[disabled] { opacity: .45; cursor: not-allowed; }
.tools button[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.shapes { display: grid; gap: 8px; }
.shape { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; background: var(--surface-2); }
.shape .top { display: flex; gap: 8px; align-items: center; }
.shape .top input { flex: 1; min-width: 0; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); min-height: 30px; }
.shape .opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.shape .opts input, .shape .opts select { padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); min-height: 28px; }
.shape .opts input[type="time"] { width: 100px; }
.hintbar { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- paketler */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: start; }
.plan.current { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.plan .price { font-family: var(--f-display); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.plan .price small { font-size: 14px; color: var(--muted); font-family: var(--f-body); font-weight: 400; }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--fg-2); font-size: 13px; }
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 800px) { .lines { grid-template-columns: minmax(0, 1fr); } }
.line { text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 12px 16px; display: grid; gap: 4px; }
.line.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.line-h { font-family: var(--f-display); font-size: 18px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.incl { display: flex; gap: 8px 20px; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--r); padding: 10px 14px; font-size: 13px; }

/* ---------------------------------------------------------------- tablolar */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr[data-href] { cursor: pointer; } .tbl tr[data-href]:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tbl.free { min-width: 0; }
.imp-bar { background: var(--sec); color: #fff; padding: 8px 12px; border-radius: var(--r); display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions select, .actions input { min-height: var(--ctl-h); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }

/* ---------------------------------------------------------------- lokasyonlar */
.sites { display: grid; gap: 12px; }
.site { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) auto; gap: 12px 24px; padding: 14px 16px; align-items: center; }
.site.alarm { box-shadow: inset 3px 0 0 var(--crit); }
.site.offline { box-shadow: inset 3px 0 0 var(--off); }
.site h3 { font-size: 18px; }
.site .who { display: grid; gap: 4px; min-width: 0; }
.site .sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.site .nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.num-b { display: grid; gap: 0; }
.num-b .n { font-family: var(--f-display); font-size: 24px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.num-b .n small { font-size: 15px; color: var(--muted); font-weight: 500; }
.num-b.bad .n { color: var(--crit); }
.site .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1000px) { .site { grid-template-columns: minmax(0, 1fr); } .site .acts { justify-content: flex-start; } }

/* ---------------------------------------------------------------- izleme merkezi */
.main.mon-main { padding: 0; gap: 0; display: block; background: var(--wall); }
.mon { background: var(--wall); color: var(--wall-fg); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.mon:fullscreen { overflow: auto; }
.mon-bar { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--wall-line); background: var(--wall-2); position: sticky; top: 0; z-index: 5; }
.mon-bar h1 { font-size: 21px; color: #fff; }
.mon-stats { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--wall-mute); }
.mon-stats b { color: #fff; font-family: var(--f-mono); font-weight: 500; }
.mon-stats .al b { color: #ff7361; }
.mon-clock { font-family: var(--f-mono); font-size: 15px; color: #fff; letter-spacing: .02em; }
.mon-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.mon select, .mon .w-btn { background: #0c1118; color: var(--wall-fg); border: 1px solid #36425a; border-radius: var(--r); min-height: 34px; padding: 0 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.mon .w-btn:hover, .mon select:hover { border-color: #5a6a86; }
.mon .w-btn[aria-pressed="true"] { background: #e7ecf3; color: #0c1118; border-color: #e7ecf3; }
.mon .w-btn svg { width: 16px; height: 16px; }
.mon-refresh { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--wall-mute); font-family: var(--f-mono); }
.mon-refresh i { width: 44px; height: 3px; background: #263041; border-radius: 2px; overflow: hidden; display: inline-block; }
.mon-refresh i b { display: block; height: 100%; background: #93a0b3; width: 100%; transform-origin: left; animation: countdown 10s linear infinite; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.mon-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
.mon-wall { padding: 12px 16px 24px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.mon-site { display: grid; gap: 8px; }
.mon-site-h { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--wall-mute); }
.mon-site-h b { font-family: var(--f-display); font-size: 17px; font-weight: 600; color: #fff; letter-spacing: .01em; }
.mon .st.ok { color: #4cc491; background: #12301f; } .mon .st.alarm { color: #ff7361; background: #3b1b18; } .mon .st.offline { color: #93a0b3; background: #222a37; }
.mon .tag { border-color: #36425a; color: var(--wall-mute); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile, 250px), 100%), 1fr)); gap: 8px; }
.tile { position: relative; border: 1px solid var(--wall-line); border-radius: 4px; overflow: hidden; background: #05080c; padding: 0; display: block; text-align: left; color: #fff; aspect-ratio: 16/9; min-width: 0; }
.tile canvas, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:hover { border-color: #5a6a86; }
.tile .t-top, .tile .t-bot { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; font-size: 11px; pointer-events: none; }
.tile .t-top { top: 0; background: linear-gradient(rgba(5,8,12,.75), transparent); font-family: var(--f-mono); }
.tile .t-bot { bottom: 0; background: linear-gradient(transparent, rgba(5,8,12,.88)); align-items: flex-end; padding-top: 22px; }
.tile .t-name { display: grid; min-width: 0; }
.tile .t-name b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-name small { color: #b8c2d1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .live { display: inline-flex; gap: 5px; align-items: center; }
.tile .open-n { background: #d23c2a; color: #fff; border-radius: 10px; padding: 0 7px; font-family: var(--f-mono); font-size: 11px; line-height: 18px; flex: none; }
.tile.alarm { border-color: #ff5a45; box-shadow: 0 0 0 1px #ff5a45; }
.tile.alarm.fresh { animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 0%, 100% { box-shadow: 0 0 0 1px #ff5a45; } 50% { box-shadow: 0 0 0 4px rgba(255,90,69,.55); } }
.tile .t-alarm { position: absolute; left: 8px; right: 8px; top: 30px; display: flex; pointer-events: none; }
.tile .t-alarm span { background: #d23c2a; color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: inline-flex; gap: 6px; align-items: center; }
.tile .t-alarm svg { width: 13px; height: 13px; }
.tile.offline canvas, .tile.offline img { filter: grayscale(1) brightness(.35); }
.tile .t-off { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; color: #b8c2d1; font-size: 12px; pointer-events: none; text-align: center; }
.tile .t-off b { font-family: var(--f-display); font-size: 16px; color: #fff; letter-spacing: .04em; }
.mon-feed { border-left: 1px solid var(--wall-line); background: var(--wall-2); display: flex; flex-direction: column; min-width: 0; position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); max-height: calc(100dvh - 57px); }
.mon-feed-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--wall-line); }
.mon-feed-h h2 { font-size: 16px; color: #fff; }
.feed { overflow-y: auto; display: grid; align-content: start; scrollbar-width: thin; scrollbar-color: #36425a transparent; }
.feed-i { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 12px 9px 10px; border-bottom: 1px solid var(--wall-line); text-align: left; background: transparent; border-left: 0; border-right: 0; border-top: 0; color: inherit; width: 100%; }
.feed-i:hover { background: #1b2432; }
.feed-i .sev { grid-row: 1 / span 3; }
.feed-i .sev.low { background: #6b7483; } .feed-i .sev.high { background: #ff5a45; } .feed-i .sev.medium { background: #f0a92e; }
.feed-i .f-t { font-weight: 600; font-size: 13px; color: #fff; }
.feed-i .f-time { font-family: var(--f-mono); font-size: 11.5px; color: var(--wall-mute); white-space: nowrap; }
.feed-i .f-s { grid-column: 2 / -1; font-size: 12px; color: var(--wall-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-i .f-p { grid-column: 2 / -1; display: flex; gap: 4px; flex-wrap: wrap; }
.feed-i.acked { opacity: .5; }
.mon .chip.miss { background: #3b1b18; border-color: #7a2f26; color: #ff9d90; }
.feed-empty { padding: 24px 14px; color: var(--wall-mute); font-size: 13px; text-align: center; }
@media (max-width: 1100px) {
  .mon-body { grid-template-columns: minmax(0, 1fr); }
  .mon-feed { position: static; border-left: 0; border-top: 1px solid var(--wall-line); max-height: none; }
  .feed { max-height: 420px; }
}
@media (max-width: 900px) { .mon-bar { position: static; padding: 10px 12px; } .mon-wall { padding: 12px; } .mon { min-height: calc(100dvh - 52px); } .mon-ctl { margin-left: 0; width: 100%; } .mon-ctl select { flex: 1 1 100%; min-width: 0; order: -1; } .mon-refresh { margin-left: auto; order: 9; } }

/* ---------------------------------------------------------------- pencere / çekmece / açılır bilgi */
.overlay { position: fixed; inset: 0; background: rgba(8,12,18,.6); z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-lg); width: min(560px, 100%); box-shadow: var(--shadow); display: grid; max-height: calc(100dvh - 32px); grid-template-rows: auto minmax(0, 1fr) auto; }
.modal.lg { width: min(960px, 100%); }
.modal-h { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 16px; overflow-y: auto; display: grid; gap: 14px; align-content: start; }
.modal-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.overlay.side { place-items: stretch end; padding: 0; }
.drawer { background: var(--surface); color: var(--fg); border-left: 1px solid var(--line); width: min(520px, 100%); height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; box-shadow: var(--shadow); }
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.detail .big { border-radius: var(--r); overflow: hidden; background: var(--wall); align-self: start; }
.detail .big canvas, .detail .big img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; }
@media (max-width: 760px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.pop { position: absolute; z-index: 150; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; font-size: 13px; }
.pop h3 { display: flex; gap: 8px; align-items: center; }
.pop .refs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pop .refs li { border-left: 2px solid var(--line-2); padding-left: 10px; display: grid; gap: 2px; }
.pop .refs b { font-size: 12px; }

/* ---------------------------------------------------------------- KKD matrisi */
.mx { --mx-cols: minmax(190px, 1.6fr) repeat(8, minmax(52px, 1fr)) 140px; }
.mx-head, .mx-row { display: grid; grid-template-columns: 28px var(--mx-cols); align-items: center; gap: 0 4px; padding: 0 12px; }
.mx-head { position: sticky; top: 0; z-index: 4; background: var(--surface-2); border-bottom: 1px solid var(--line); padding-top: 8px; padding-bottom: 8px; border-radius: var(--r) var(--r) 0 0; }
.mx-col { display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; padding: 4px 2px; border-radius: var(--r); font-size: 11px; font-weight: 600; color: var(--fg-2); line-height: 1.2; text-align: center; min-width: 0; }
.mx-col:hover { background: var(--surface-3); }
.mx-col svg { width: 24px; height: 24px; }
.mx-col span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mx-group { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.mx-group b { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.mx-row { border-bottom: 1px solid var(--line); min-height: 52px; }
.mx-row:last-child { border-bottom: 0; }
.mx-row.dirty { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.mx-name { display: grid; min-width: 0; padding: 6px 0; }
.mx-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-name small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-cell { display: grid; place-items: center; }
.tg { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--muted); position: relative; padding: 0; }
.tg svg { width: 22px; height: 22px; opacity: .45; }
.tg:hover { border-color: var(--muted); }
.tg[aria-pressed="true"] { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 75%, #000); color: var(--accent-ink); }
.tg[aria-pressed="true"] svg { opacity: 1; }
.tg .zdot { position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--sec); box-shadow: 0 0 0 1.5px var(--surface); }
.tg .tg-l { display: none; }
.mx-act { display: flex; gap: 8px; justify-content: flex-end; align-items: center; white-space: nowrap; }
.mx-note { padding: 10px 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.mx-legend { display: none; }
@media (max-width: 860px) {
  .mx-head { display: none; }
  .mx-legend { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .mx-legend button { flex: none; }
  .mx-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px; align-items: start; }
  .mx-cells { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mx-cell { display: block; }
  .tg { width: 100%; height: auto; min-height: 58px; grid-template-rows: auto auto; align-content: center; gap: 2px; padding: 6px 2px; }
  .tg .tg-l { display: block; font-size: 10.5px; font-weight: 600; line-height: 1.15; }
  .tg[aria-pressed="false"] .tg-l { color: var(--muted); }
}
@media (min-width: 861px) { .mx-cells { display: contents; } }
.savebar { position: sticky; bottom: 12px; z-index: 20; background: #16202b; color: #fff; border-radius: var(--r-lg); padding: 10px 12px 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow); border: 1px solid #333d4f; }
.savebar .btn.ghost { color: #fff; } .savebar .btn.ghost:hover { background: rgba(255,255,255,.1); }
.rule-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); display: grid; gap: 12px; padding: 12px; }
.rule-card.off { opacity: .7; }
.rule-card .top { display: flex; gap: 8px; align-items: center; }
.ppe-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ppe-pick .tg { width: 100%; height: auto; min-height: 56px; grid-template-rows: auto auto; align-content: center; gap: 2px; padding: 6px 2px; }
.ppe-pick .tg .tg-l { display: block; font-size: 10.5px; font-weight: 600; line-height: 1.15; }
.rng { display: flex; gap: 8px; align-items: center; }
.rng input[type="range"] { flex: 1; min-width: 0; padding: 0; border: 0; accent-color: var(--accent); min-height: 28px; }
.hours { display: flex; gap: 6px; align-items: center; }
.hours input { min-width: 0; flex: 1 1 0; width: 0; max-width: 120px; padding-left: 6px; padding-right: 4px; }

/* ---------------------------------------------------------------- mevzuat */
.reg { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.reg-toc { position: sticky; top: 16px; display: grid; gap: 2px; }
.reg-toc button { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 6px 8px; border-radius: var(--r); text-align: left; font-weight: 500; min-height: 34px; }
.reg-toc button:hover { background: var(--surface-3); }
.reg-toc svg { width: 20px; height: 20px; color: var(--fg-2); }
.reg-list { display: grid; gap: 12px; min-width: 0; }
.reg-item .head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.reg-item .ic { width: 44px; height: 44px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.reg-item .ic svg { width: 28px; height: 28px; }
.refs { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.refs li { border-left: 3px solid var(--line-2); padding: 2px 0 2px 12px; display: grid; gap: 2px; }
.refs .src { font-size: 12px; font-weight: 600; color: var(--fg-2); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.refs .art { font-family: var(--f-mono); font-weight: 500; background: var(--surface-3); border-radius: 3px; padding: 0 6px; }
@media (max-width: 900px) { .reg { grid-template-columns: minmax(0, 1fr); } .reg-toc { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; } .reg-toc button { flex: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 0 12px 0 8px; } }

/* ---------------------------------------------------------------- entegrasyonlar */
.hook { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.hook:last-child { border-bottom: 0; }
.hook .u { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 8px 12px; }
.checks label { display: flex; gap: 8px; align-items: center; min-height: 28px; }

/* ---------------------------------------------------------------- giriş */
.auth { min-height: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--nav); color: var(--nav-fg); padding: 48px max(32px, env(safe-area-inset-left, 0px)); display: grid; align-content: center; gap: 18px; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--accent); }
.auth-side h1 { color: #fff; font-size: 38px; max-width: 16ch; }
.auth-side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.auth-side li { display: flex; gap: 10px; }
.auth-side li b { color: #ff9d5c; font-family: var(--f-mono); font-weight: 500; }
.auth-side .brand { padding: 0; }
.auth-form { display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.auth-form form { width: min(380px, 100%); display: grid; gap: 14px; }
.err { color: var(--crit); font-size: 13px; }
@media (max-width: 800px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { padding: 32px 20px 40px; } .auth-side h1 { font-size: 28px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } *:not(.auth-art *) { animation: none !important; } }  /* giriş görseli hariç: app-giris.css */
@media print { .nav, .topbar, .toast, .savebar { display: none !important; } .app { display: block; } }

/* ---------------------------------------------------------------- kural aileleri, güvenlik, paketleme */
.seg.fam { align-self: start; justify-self: start; max-width: 100%; overflow-x: auto; }
.seg.fam a { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 38px; text-decoration: none; color: var(--fg); font-weight: 500; border-left: 1px solid var(--line); white-space: nowrap; }
.seg.fam a:first-child { border-left: 0; }
.seg.fam a svg { width: 17px; height: 17px; }
.seg.fam a .mono { font-size: 11.5px; color: var(--muted); }
.seg.fam a.on { background: var(--fg); color: var(--bg); } .seg.fam a.on .mono { color: inherit; opacity: .75; }
.checks.fam3 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: start; gap: 16px; }
.mon-fam { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--wall-line); flex-wrap: wrap; flex: none; }
.mon-fam .w-btn { min-height: 28px; padding: 0 7px; font-size: 12px; flex: none; gap: 5px; }
.mon-fam .w-btn .mono { opacity: .7; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } }
.stage.ro canvas { cursor: default; }
.learn { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.prm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.prm:last-child { border-bottom: 0; }
.prm .ln { width: 22px; height: 0; border-top: 3px dashed var(--sec); }
.prm .pt { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); margin: 0 5px; box-shadow: 0 0 0 3px var(--ok-soft); }
.prm small { color: var(--muted); font-size: 12px; }
.conf { font-family: var(--f-mono); font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.pk-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pk { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 4px; display: grid; gap: 2px; justify-items: center; background: var(--surface); text-align: center; min-width: 0; }
.pk b { font-family: var(--f-display); font-size: 20px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pk small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pk.bad { border-color: var(--crit); background: var(--crit-soft); } .pk.bad b { color: var(--crit); }
.pk.ok b { color: var(--ok); }
@media (max-width: 480px) { .pk-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.wall .nav, body.wall .topbar { display: none; }
body.wall .app { grid-template-columns: minmax(0, 1fr); }

/* v2.1 entegrasyon: 24 saat biçimli saat alanı, pakette olmayan kurallar */
.inp.hm, input.hm { font-family: var(--mono, "IBM Plex Mono", monospace); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
label.locked { color: var(--muted); }
label.locked .tag { margin-left: 6px; }

/* ================================================================ v3 — olay yönetimi
   Olay yaşam döngüsü, geçmiş, talimat, aksiyonlar, kullanıcılar, bildirim yönlendirme, raporlar, ısı haritası, paylaşım. */
.nav a.item { font-size: 13.5px; }
.demo-role { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.demo-role select { flex: 1; min-width: 0; min-height: 28px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); font-size: 12px; padding: 2px 6px; }
.inp.sm, select.inp.sm { min-height: 28px; padding: 2px 8px; font-size: 13px; width: auto; max-width: 100%; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--fg); }
.toolbar .field.grow2 { flex: 1 1 240px; }
.lnk { border: 0; background: none; padding: 0; text-align: left; color: var(--fg); display: inline-flex; gap: 4px; align-items: center; }
.lnk:hover b, .lnk.sm:hover { text-decoration: underline; }
.lnk.sm { font-size: 12px; color: var(--link); } .lnk.sm svg { width: 13px; height: 13px; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--fg-2); font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; flex: none; letter-spacing: 0; border: 1px solid var(--line); }
.who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--fg-2); max-width: 100%; }
.who.lg { gap: 10px; font-size: 14px; color: var(--fg); } .who.lg .av { width: 32px; height: 32px; font-size: 12px; }
.vd { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 11px; line-height: 20px; white-space: nowrap; color: var(--fg-2); background: var(--surface-3); }
.vd.yanlis_alarm { color: var(--warn); background: var(--warn-soft); } .vd.dogru { color: var(--ok); background: var(--ok-soft); }
.ev-sel { width: 18px; height: 18px; flex: none; }
.bulk { position: sticky; top: 8px; z-index: 15; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--inv); color: var(--inv-fg); border-radius: var(--r-lg); padding: 8px 10px 8px 16px; box-shadow: var(--shadow); }
.bulk .btn.ghost { color: var(--inv-fg); }
/* olay penceresi */
.modal.xl { width: min(1120px, 100%); }
.detail.evd { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.evd .side { gap: 16px; }
.life { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--line-2); }
.life.alarm { box-shadow: inset 3px 0 0 var(--crit); } .life.run { box-shadow: inset 3px 0 0 var(--sec); } .life.idle { box-shadow: inset 3px 0 0 var(--ok); }
.close-box { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.verdicts { display: grid; gap: 6px; } .verdicts .pick { padding: 8px 12px; }
.pick[aria-checked="true"]::after, .pick[aria-pressed="true"]::after { content: ""; position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.field textarea, textarea { font: inherit; resize: vertical; color: var(--fg); }
.sec { display: grid; gap: 8px; align-content: start; }
.sop { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
.sop li label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; }
.sop li label:hover { background: var(--surface-2); }
.sop input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.sop li.done .t { color: var(--muted); text-decoration: line-through; } .sop small { display: block; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.sop li.done small { text-decoration: none; }
.btn.call { justify-self: start; height: auto; min-height: 34px; white-space: normal; text-align: left; color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.mini { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 6px 8px; min-width: 0; font-size: 13px; }
.mini:hover { border-color: var(--muted); }
.share-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface-2); }
.share-i { display: grid; gap: 6px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-i { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; position: relative; }
.tl-i i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-left: 3px; position: relative; top: -1px; }
.tl-i::before { content: ""; position: absolute; left: 6.5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-i:first-child::before { top: 12px; } .tl-i:last-child::before { bottom: calc(100% - 12px); }
.tl-i.ok i { background: var(--ok); } .tl-i.alarm i { background: var(--crit); } .tl-i.note i, .tl-i.claimed i, .tl-i.assigned i { background: var(--sec); }
.tl-i time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tl-i.viewed, .tl-i.notified { color: var(--fg-2); }
.tl-note { display: block; margin-top: 3px; padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-err { display: block; color: var(--crit); font-size: 12px; }
.note-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.note-box textarea { min-height: var(--ctl-h); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); width: 100%; }
.src-ev { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.src-ev .sev { align-self: stretch; }
.sugs, .roles { display: grid; gap: 6px; } .roles { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.sugs .pick, .roles .pick { padding: 8px 26px 8px 12px; }
/* tablolar */
.acts-tbl { min-width: 820px; width: 100%; border-collapse: collapse; } .users-tbl { min-width: 860px; width: 100%; border-collapse: collapse; } .roles-tbl { min-width: 640px; width: 100%; border-collapse: collapse; }
.acts-tbl .a-t { display: grid; gap: 2px; max-width: 420px; } .acts-tbl tr.done .a-t b { color: var(--muted); font-weight: 500; }
.acts-tbl .late { color: var(--crit); font-weight: 600; } .acts-tbl td small { display: block; font-size: 11px; font-family: var(--f-body); }
.users-tbl .scope { max-width: 260px; color: var(--fg-2); font-size: 13px; }
.yes svg { width: 18px; height: 18px; color: var(--ok); }
.tag.role-yonetici { border-color: var(--accent); color: var(--accent-text); }
/* talimatlar */
.sop-list { display: grid; } .sop-row { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .sop-row:last-child { border-bottom: 0; }
.chip.as-btn { cursor: pointer; } .chip.as-btn:hover { border-color: var(--muted); }
.sop-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .sop-edit li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; } .sop-edit .mono { color: var(--muted); font-size: 12px; text-align: right; }
/* bildirim */
.switch small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.field.ind { margin-left: 42px; max-width: 320px; }
.ranges { display: grid; gap: 6px; } .ranges .hours { max-width: 300px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days button { min-width: 42px; min-height: 34px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); font-size: 13px; font-weight: 600; color: var(--fg-2); }
.days button[aria-pressed="true"] { background: var(--inv); color: var(--inv-fg); border-color: var(--inv); }
.savebar.static { position: sticky; }
.ntf-sum { font-size: 14px; }
/* risk ve yanlış alarm */
.risk-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.gauge { display: grid; gap: 4px; justify-items: start; padding: 4px 16px 4px 0; border-right: 1px solid var(--line); min-width: 96px; }
.gauge .v { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.gauge.alarm .v { color: var(--crit); } .gauge.warn .v { color: var(--warn); } .gauge.ok .v { color: var(--ok); }
.risk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px 24px; }
.rk { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; font-size: 13px; min-height: 26px; }
.rulebar.sh { grid-template-columns: minmax(0, 110px) minmax(30px, 1fr) 26px auto; }
.trend { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; } .trend.good { color: var(--ok); } .trend.bad { color: var(--crit); }
.fa { display: grid; gap: 6px; }
.fa-r { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(40px, 1fr) 40px 44px auto; gap: 10px; align-items: center; font-size: 13px; }
.fa-r .track { height: 8px; background: var(--surface-3); border-radius: 4px; position: relative; overflow: hidden; }
.fa-r .track b { display: block; height: 100%; background: var(--fg-2); border-radius: 4px; } .fa-r.review .track b { background: var(--warn); }
.fa-r .track i { position: absolute; left: 30%; top: 0; bottom: 0; width: 1px; background: var(--crit); }
.fa-r a.st { text-decoration: none; }
a.kpi.klink { text-decoration: none; color: inherit; } a.kpi.klink:hover { border-color: var(--muted); }
.mail-wrap { background: var(--surface-3); padding: 12px; border-radius: 0 0 var(--r) var(--r); }
iframe.mail { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--r); background: #f7f8fa; display: block; }
/* ısı haritası */
.heat-wrap { position: relative; } .heat-wrap canvas.heat { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; pointer-events: none; }
.heat-bar .seg { max-width: 100%; overflow-x: auto; } .heat-bar .seg button { white-space: nowrap; }
.heat-leg { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.heat-leg i { width: 70px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #fac846, #f07a30, #dc301e); display: inline-block; }
.devlog > div { align-items: baseline; flex-wrap: wrap; } .devlog .st { flex: none; }
/* giriş gerektirmeyen sayfalar */
.pub { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 20px; padding: 20px 16px 28px; background: var(--bg); }
.pub header { width: min(760px, 100%); } .pub .brand { display: inline-flex; gap: 10px; align-items: center; } .pub .brand b { font-size: 19px; }
.pub .brand-mark { width: 30px; height: 30px; }
.pub-card { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; align-content: start; align-self: start; box-shadow: var(--shadow); }
.pub-card .big { border-radius: var(--r); overflow: hidden; background: var(--wall); } .pub-card .big canvas, .pub-card .big img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; }
.pub-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; } .pub-h h1 { font-size: 22px; margin-top: 2px; }
.pub footer { font-size: 12px; color: var(--muted); text-align: center; max-width: 60ch; }
@media (max-width: 760px) {
  .detail.evd { grid-template-columns: minmax(0, 1fr); }
  .fa-r { grid-template-columns: minmax(0, 1fr) 40px 44px; } .fa-r .track { display: none; } .fa-r a.st, .fa-r > span:last-child { grid-column: 1 / -1; justify-self: start; } .fa-r > span:last-child:empty { display: none; }
  .rk { grid-template-columns: minmax(0, 1fr) auto auto; } .rk .trend, .rk > .muted:last-child { display: none; }
  .rulebar.sh { grid-template-columns: minmax(0, 96px) minmax(30px, 1fr) 26px; } .rulebar.sh .trend, .rulebar.sh > .muted { display: none; }
  .gauge { border-right: 0; } .field.ind { margin-left: 0; } iframe.mail { height: 520px; }
  .note-box { grid-template-columns: minmax(0, 1fr); } .bulk { top: 60px; }
  .ev-sel { display: none; }
}
.savebar .muted { color: #c5ccd6; }

/* ---------------------------------------------------------------- Kameralar: birleşik ızgara ve satır içi panel
   Karo, izleme merkezindeki .tile ile aynı yapıdadır; burada aydınlık yüzeyde, adı görüntünün altında durur.
   Panel tıklanan karonun satırının altına, ızgaranın tüm genişliğine yerleşir (dense akış boşluk bırakmaz). */
.camx { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; grid-auto-flow: row dense; }
.tile.lt { aspect-ratio: auto; display: grid; grid-template-rows: auto auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); font: inherit; scroll-margin-top: 12px; }
.tile.lt:hover { border-color: var(--muted); }
.tile.lt .t-img { position: relative; display: block; aspect-ratio: 16/9; background: var(--wall); color: #fff; overflow: hidden; }
.tile.lt .t-cap { display: flex; gap: 8px; align-items: center; padding: 8px 10px; min-width: 0; }
.tile.lt .t-name { flex: 1; }
.tile.lt .t-name b { font-size: 14px; }
.tile.lt .t-name small { color: var(--muted); font-size: 12px; }
.tile.lt .t-chev { display: inline-grid; color: var(--muted); }
.tile.lt .t-chev svg { width: 16px; height: 16px; transition: transform .15s; }
.tile.lt[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tile.lt[aria-expanded="true"] .t-chev svg { transform: rotate(180deg); }
.camx-p { grid-column: 1 / -1; position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); min-width: 0; display: grid; }
.camx-caret { position: absolute; top: -7px; left: var(--cx, 40px); width: 12px; height: 12px; margin-left: -6px; background: var(--surface); border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); transform: rotate(45deg); }
.camx-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; padding: 14px 16px 10px; }
.camx-h h3 { font-size: 17px; }
.camx-rules { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; padding: 0 16px 12px; }
.camx-rules .label { margin-right: 4px; }
.camx-tabs { display: flex; gap: 4px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.camx-tabs button { border: 0; background: transparent; padding: 0 12px; min-height: 44px; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; flex: none; }
.camx-tabs button:hover { color: var(--fg); }
.camx-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.camx-tabs button svg { width: 17px; height: 17px; }
.camx-tabs button .mono { font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-3); border-radius: 9px; padding: 0 6px; line-height: 18px; }
.camx-tabs button:focus-visible { outline-offset: -2px; }
.dirty-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.camx-b { padding: 16px; display: grid; gap: 16px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); min-width: 0; }
.camx-b > * { min-width: 0; }
.cx-rules { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); align-items: start; }
.cx-rules .rule-card { background: var(--surface); }
.camx-save { justify-content: flex-end; }
.camx-sub { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 4px; }
.camx-sub h3 { display: flex; gap: 8px; align-items: center; } .camx-sub h3 svg { width: 18px; height: 18px; color: var(--pack); }
.camx-add { display: flex; justify-content: space-between; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 13px; }
.lg { display: grid; gap: 6px; font-size: 13px; }
.lg > b { display: flex; gap: 6px; align-items: center; } .lg > b svg { width: 18px; height: 18px; }
.lg .refs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lg .refs li { border-left: 2px solid var(--line-2); padding-left: 10px; display: grid; gap: 2px; }
.lo-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto; gap: 8px; align-items: end; }
.lo-row .icon-btn { margin-bottom: 5px; }
.shape .uses { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; font-size: 12px; }
/* "Bölge nedir?" açıklaması */
.zh { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--sec) 30%, var(--line)); background: color-mix(in srgb, var(--sec) 7%, var(--surface)); border-radius: var(--r); }
.zh-ic { color: var(--sec); display: inline-grid; padding-top: 1px; } .zh-ic svg { width: 20px; height: 20px; }
.zh-t { display: grid; gap: 6px; min-width: 0; } .zh-t p { max-width: 92ch; }
.zh-b { border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; justify-self: start; text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.zh ul { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.zh ul[hidden] { display: none; }
.zh li { display: flex; gap: 4px 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 900px) { .tile.lt { scroll-margin-top: 64px; } .camx-b { padding: 12px; } .camx-h { padding: 12px 12px 8px; } .camx-rules { padding: 0 12px 10px; } .camx-tabs { padding: 0 4px; } }
@media (max-width: 480px) { .camx { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .tile.lt .t-cap { padding: 6px 8px; gap: 6px; } .tile.lt .t-name b { font-size: 13px; } .tile.lt .t-top { font-size: 9.5px; padding: 4px 6px; } .camx-tabs button { padding: 0 9px; } }

/* ---------------------------------------------------------------- Canlı izleme: 3×3 duvar ve büyük görünüm (her zaman koyu) */
.mon a.w-btn, .mon span.w-btn, .lz a.w-btn { text-decoration: none; }
.mon .w-btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.lw { height: 100vh; height: 100dvh; min-height: 0; }
.lw .mon-bar { position: static; }
.lw-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.tile.lv { aspect-ratio: auto; width: 100%; height: 100%; font: inherit; cursor: zoom-in; }
.lv-m { position: absolute; inset: 0; display: block; }
.tile.lv .lv-m > *, .lz-pan > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; }
img.lv-f { opacity: 0; } img.lv-f.on { opacity: 1; }
[data-live-cam]:not(.wait):not(.offline) .lv-snap { visibility: hidden; }
.lv-wait { display: none; background: rgba(5,8,12,.72); padding: 1px 6px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wait .lv-wait { display: inline-block; } .wait .lv-ok { display: none; }
.lz { position: fixed; inset: 0; z-index: 120; background: #05080c; color: #e7ecf3; display: flex; flex-direction: column; }
.lz :focus-visible { outline-color: #ff9d5c; }
.lz-h { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top, 0px)); background: #151c27; border-bottom: 1px solid #263041; }
.lz-t { min-width: 0; flex: 1 1 160px; display: grid; }
.lz-t h2 { color: #fff; font-size: 17px; } .lz-t span { color: #93a0b3; font-size: 12px; }
.lz-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lz-ctl .mono { font-size: 12px; color: #b8c2d1; min-width: 44px; text-align: center; }
.lz .w-btn { background: #0c1118; color: #e7ecf3; border: 1px solid #36425a; border-radius: var(--r); min-height: 34px; min-width: 34px; padding: 0 10px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.lz .w-btn:hover { border-color: #5a6a86; } .lz .w-btn svg { width: 16px; height: 16px; }
.lz-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.lz-stage.zoomed { cursor: grab; }
.lz-pan { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.lz-stage.offline .lz-pan { filter: grayscale(1) brightness(.35); }
.lz-st { position: absolute; left: 10px; top: 10px; font: 11px var(--f-mono); pointer-events: none; display: inline-flex; }
.lz-st .live { display: inline-flex; gap: 5px; align-items: center; background: rgba(5,8,12,.72); padding: 2px 8px; border-radius: 3px; }
.lz-st .lv-wait { padding: 2px 8px; }
.lz-hint { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); font-size: 12px; color: #b8c2d1; background: rgba(5,8,12,.72); padding: 3px 12px; border-radius: 12px; pointer-events: none; width: max-content; max-width: calc(100% - 24px); text-align: center; }
.lz-stage.zoomed .lz-hint { display: none; }
.lz .t-off { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; color: #b8c2d1; font-size: 12px; pointer-events: none; text-align: center; }
.lz .t-off b { font-family: var(--f-display); font-size: 16px; color: #fff; letter-spacing: .04em; }
@media (max-width: 640px) { .lw-grid { gap: 2px; padding: 2px; } .tile.lv .t-name small { display: none; } .tile.lv .t-name b { font-size: 11px; } .tile.lv .t-top, .tile.lv .t-bot { font-size: 9.5px; padding: 3px 4px; } .tile.lv .t-bot { padding-top: 14px; } .tile.lv .t-off span { display: none; } .tile.lv .t-off b { font-size: 11px; } }

/* === Kurulum asistanı === (app-asistan.js; yalnız mevcut renk belirteçleri kullanılır) */
.as-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.as-pct { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.as-pct b { font-family: var(--f-display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.as-prog .progress { height: 8px; border-radius: 4px; }
.as-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.as-steps li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.as-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: var(--surface); }
.as-steps li.done .as-tick { background: var(--ok); border-color: var(--ok); }
.as-tick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.as-step-t { display: grid; flex: 1; min-width: 0; font-size: 13px; }
.as-step-t b { font-size: 14px; font-weight: 600; }
.as-steps li.done .as-step-t b { font-weight: 500; }
.as-seen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.as-seen > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.as-seen b { font-size: 22px; font-weight: 600; line-height: 1.15; }
.as-wait { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--sec) 30%, var(--line)); background: color-mix(in srgb, var(--sec) 7%, var(--surface)); font-weight: 500; }
.as-wait svg { width: 18px; height: 18px; color: var(--sec); margin-top: 1px; }
.as-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 12px; }
.as-list.one { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.as-card { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; align-items: start; }
.as-card.compact { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.as-thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; background: var(--wall); border: 1px solid var(--line); }
.as-thumb canvas, .as-thumb img, .as-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.as-thumb polygon { fill: color-mix(in srgb, var(--accent) 28%, transparent); stroke: var(--accent); vector-effect: non-scaling-stroke; stroke-width: 2px; stroke-dasharray: 6 4; }
.as-cam-n { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11.5px; font-weight: 600; color: var(--wall-fg); background: linear-gradient(transparent, color-mix(in srgb, var(--wall) 88%, transparent)); }
.as-body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.as-body h3 { font-size: 15px; line-height: 1.3; }
.as-body p { font-size: 13px; color: var(--fg-2); max-width: 78ch; }
.as-tags { gap: 6px 10px; }
.as-basis { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--muted); }
.as-basis.obs { color: var(--ok); font-weight: 600; }
.as-basis svg { width: 14px; height: 14px; }
.as-note { display: flex; gap: 6px; align-items: flex-start; color: var(--warn) !important; }
.as-note svg { width: 15px; height: 15px; margin-top: 2px; }
.as-acts { margin-top: 4px; gap: 6px; }
.as-acts .btn { min-height: 34px; }
.as-skipped { font-size: 13px; }
.as-strip { display: grid; grid-template-columns: auto minmax(120px, 200px) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--r); color: var(--fg); text-decoration: none; min-width: 0; }
.as-strip:hover { border-color: var(--accent); }
.as-strip-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.as-strip-ic svg { width: 20px; height: 20px; }
.as-strip-t { display: grid; gap: 5px; min-width: 0; }
.as-strip-t b { font-family: var(--f-display); font-size: 17px; line-height: 1.1; }
.as-strip-s { display: grid; min-width: 0; font-size: 13px; }
.as-cam { margin: 0 16px 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); border-radius: var(--r); display: grid; gap: 10px; min-width: 0; font-size: 13px; }
.as-cam > .as-wait { border: 0; background: transparent; padding: 0; }
.as-cam-h { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.as-cam-h svg { width: 18px; height: 18px; color: var(--accent-text); }
.as-cam-h .mono { font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; line-height: 18px; }
.as-draft { background: var(--surface); }
.as-draft span { flex: 1; min-width: 200px; }
@media (max-width: 900px) { .as-top { grid-template-columns: minmax(0, 1fr); } .as-cam { margin: 0 12px 10px; } }
@media (max-width: 640px) {
  .as-card { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .as-thumb { max-width: 240px; }
  .as-strip { grid-template-columns: auto minmax(0, 1fr); } .as-strip-s, .as-strip > .btn { grid-column: 1 / -1; }
  .as-acts .btn { flex: 1 1 auto; }
  .as-pct b { font-size: 34px; }
}

/* Kural denetimi (app-kural.js): bölge aç/kapa, bölgeye özel alarm ayarları, KKD "beklemede" durumu */
.shape .top .switch { flex: none; }
.shape .top .switch input { flex: none; min-height: 0; padding: 0; border: 0; }
.shape.off { border-style: dashed; background: transparent; }
.shape.off .top > input, .shape.off .opts, .shape.off .zs, .shape.off .dot { opacity: .55; }
.zs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.zs-f { display: grid; gap: 3px; min-width: 0; align-content: start; }
.zs-f > span:first-child { font-size: 12px; font-weight: 600; color: var(--fg-2, var(--muted)); }
.zs-f select, .zs-f input { padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); color: inherit; min-height: 30px; min-width: 0; font: inherit; font-size: 13px; }
.zs-f select { width: 100%; }
.zs-u { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.zs-u input[type="number"] { width: 76px; }
.zs-u input.hm { width: 64px; }
.zs-u small { color: var(--muted); font-size: 12px; }
.zs-off { font-size: 12px; color: var(--warn); }
.chip.wait { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); color: var(--warn); white-space: normal; line-height: 1.35; padding-block: 3px; }
.chip.wait svg { flex: none; }
.kr-wait { display: flex; }
.banner.ppe-wait b { color: var(--warn); }
.shapes { grid-template-columns: minmax(0, 1fr); }
.shape > * { min-width: 0; }
.shape .uses .chip { white-space: normal; }
/* Kayıt cihazı bağlantı sınırı, paket sınırı ve Abs Box kaydı (app-kayit.js) */
.banner.crit { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.banner.crit b:first-child { color: var(--crit); }
.banner > span { flex: 1 1 240px; min-width: 0; }
.banner.camx-note { margin: 0 16px 12px; align-items: flex-start; line-height: 1.45; }
.banner.camx-note svg { margin-top: 2px; flex: none; }
.tile .t-flag { position: absolute; left: 6px; right: 6px; bottom: 6px; display: grid; gap: 0; padding: 4px 8px; border-radius: 6px; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1.3; text-align: left; pointer-events: none; color: #fff; }
.tile .t-flag small { font-family: var(--f-body, inherit); font-weight: 500; letter-spacing: 0; font-size: 11px; opacity: .95; }
.tile .t-flag.crit { background: rgba(166, 32, 18, .94); }
.tile .t-flag.warn { background: rgba(122, 72, 0, .94); }
.camx-rec { display: grid; gap: 10px; padding-top: 6px; max-width: 640px; }
.camx-rec .switch { align-items: flex-start; }
.camx-rec .switch i { margin-top: 1px; }
.rtsp-rows { display: grid; }
.rtsp-row { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.rtsp-row:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 900px) { .banner.camx-note { margin: 0 12px 10px; } }
@media (max-width: 480px) { .tile .t-flag { left: 4px; right: 4px; bottom: 4px; padding: 3px 6px; font-size: 10px; } .tile .t-flag small { font-size: 10px; } }
.camx-stream { min-width: 0; padding: 0 16px; } .camx-stream .mono { overflow-wrap: anywhere; } .camx-stream .field .row { min-width: 0; } .camx-stream .field .inp { min-width: 0; flex: 1 1 0; }
.camx-rec .switch > span { min-width: 0; }
.rtsp-row > .grow { flex: 1 1 200px; } .rtsp-row .st { white-space: normal; border-radius: 8px; line-height: 1.35; padding-block: 2px; }

/* ---------------------------------------------------------------- Canlı duvar v2: güvenlik monitörü düzeni
   Izgara görünür alanın tamamını doldurur (2 px aralık, dış boşluk yok). Ad ve durum köşede küçük bir etikettir.
   Tam ekranda (.fs) araç çubuğu görüntünün üstüne biner ve hareketsizlikte (.idle) gizlenir. */
.lw { position: relative; background: #000; overflow: hidden; --fit: contain; }
.lw.cover { --fit: cover; }
.lw-bar { display: flex; gap: 6px; align-items: center; padding: 5px 8px; background: var(--wall-2); border-bottom: 1px solid var(--wall-line); overflow-x: auto; scrollbar-width: none; flex: none; white-space: nowrap; }
.lw-bar > * { flex: none; }
.lw-bar > .grow { flex: 1 1 0; min-width: 0; }
.lw-bar h1 { font-size: 15px; color: #fff; margin: 0 4px; }
.lw-bar .w-btn, .lw-bar select { min-height: 32px; }
.lw-bar .mono { font-size: 12px; color: #b8c2d1; min-width: 40px; text-align: center; }
.lw-lbl { font-size: 11px; color: var(--wall-mute); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.lw-seg { display: inline-flex; border: 1px solid #36425a; border-radius: var(--r); overflow: hidden; }
.mon .lw-seg .w-btn { border: 0; border-radius: 0; border-left: 1px solid #36425a; min-width: 36px; justify-content: center; }
.mon .lw-seg .w-btn:first-child { border-left: 0; }
.lw .lw-grid { flex: 1; min-height: 0; display: grid; gap: 2px; padding: 0; grid-auto-flow: dense; background: #000; grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr)); }
.lw .lw-grid.l1 { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.lw .lw-grid.l4 { grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); }
.lw .lw-grid.l8, .lw .lw-grid.l16 { grid-template: repeat(4, minmax(0, 1fr)) / repeat(4, minmax(0, 1fr)); }
.lw-grid.l6 .big { grid-area: 1 / 1 / span 2 / span 2; }
.lw-grid.l8 .big { grid-area: 1 / 1 / span 3 / span 3; }
.lwt { position: relative; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; padding: 0; margin: 0; background: #05080c; color: #fff; overflow: hidden; font: inherit; text-align: left; cursor: pointer; }
.lwt .lv-m > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--fit); display: block; pointer-events: none; -webkit-user-drag: none; }
.lwt.sel::after { content: ""; position: absolute; inset: 0; border: 2px solid #ff9d5c; pointer-events: none; }
.lwt:focus-visible { outline: 2px solid #ff9d5c; outline-offset: -2px; border-radius: 0; }
.lw-tag { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); display: inline-flex; gap: 6px; align-items: center; background: rgba(5,8,12,.68); padding: 2px 8px; border-radius: 4px; font-size: 12px; line-height: 18px; pointer-events: none; overflow: hidden; }
.lw-tag b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lw-tag .dot { background: #4cc491; }
.lw-tag .lw-s { display: none; padding: 0; background: none; border-radius: 0; color: #f0a92e; white-space: nowrap; }
.lwt.wait .dot { background: #f0a92e; } .lwt.dead .dot, .lwt.offline .dot { background: #ff7361; }
.lwt.wait:not(.dead) .lw-tag .lv-wait { display: inline; }
.lwt.dead .lw-tag .lv-dead, .lwt.offline .lw-tag .lw-off { display: inline; color: #ff9d90; }
.lwt.dead .lv-snap, .lwt.offline .lv-m { filter: grayscale(1) brightness(.4); }
.lwt .open-n { position: absolute; right: 6px; top: 6px; background: #d23c2a; color: #fff; border-radius: 10px; padding: 0 7px; font-family: var(--f-mono); font-size: 11px; line-height: 18px; }
.lw-empty { background: #0a0e14; display: grid; place-items: center; color: #36425a; font-size: 12px; min-width: 0; min-height: 0; letter-spacing: .08em; text-transform: uppercase; }
.lw.fs .lw-bar { position: absolute; inset: 0 0 auto 0; z-index: 6; background: rgba(21,28,39,.92); transition: opacity .2s; }
.lw.fs.idle .lw-bar { opacity: 0; pointer-events: none; }
.lw.fs.idle, .lw.fs.idle .lwt { cursor: none; }
.lw .lz { position: absolute; z-index: 10; }
.lv-dead { display: none; background: rgba(5,8,12,.72); padding: 2px 8px; border-radius: 3px; color: #ff9d90; }
.dead .lv-dead { display: inline-block; } .dead .lv-wait { display: none; }
.lz-stage.dead .lv-snap { filter: grayscale(1) brightness(.4); }
.nosnap .lv-snap { visibility: hidden; }
@media (max-width: 640px) and (orientation: portrait) { .lw .lw-grid.l4 { grid-template: repeat(4, minmax(0, 1fr)) / minmax(0, 1fr); } .lw-tag { left: 3px; bottom: 3px; max-width: calc(100% - 6px); font-size: 10.5px; padding: 1px 5px; gap: 4px; } .lw-bar h1 { display: none; } }
/* İzleme merkezi karoları: CANLI yalnız taze kare gelirken; yoksa "Önizleme · saat". */
.tile .lv-prev { display: none; background: rgba(5,8,12,.6); padding: 0 6px; border-radius: 3px; }
.tile.wait .lv-prev { display: inline-flex; }
.tile.nosnap.wait:not(.offline) .lv-m::before { content: "Önizleme yok"; position: absolute; inset: 0; display: grid; place-items: center; color: #93a0b3; font-size: 12px; }
.lv-zoom { pointer-events: auto; display: inline-flex; gap: 4px; align-items: center; background: rgba(5,8,12,.72); border: 1px solid #5a6a86; border-radius: 4px; padding: 1px 6px; font-size: 11px; line-height: 16px; color: #fff; flex: none; cursor: zoom-in; white-space: nowrap; }
.lv-zoom svg { width: 12px; height: 12px; }
.lv-zoom:hover { background: #e7ecf3; color: #0c1118; border-color: #e7ecf3; }
