/* YILBELNET kamera paneli — beyaz, köşeli kutular.
   Zemin açık gri, kutular beyaz ve 1px çizgili; hiçbir öğede yuvarlak köşe ya da gölge yok.
   Tek veri rengi güneş kehribarı (--accent); düğmelere ve gezinmeye değmez. */

:root {
  /* Açık tema: açık gri zemin üzerinde beyaz, köşeli (yarıçapsız) kutular; kutular 1px çizgiyle ayrılır. */
  --ground: #f4f4f5;
  --surface: #ffffff;
  --well: #0b0b0c;          /* video sahnesi: görüntü koyu zeminde durur */
  --raised: #efeff1;
  --raised-hover: #e4e4e7;
  --border: #dcdce0;
  --rule: #ececef;
  --text: #111113;
  --muted: #4d4d55;
  --faint: #70707a;
  --accent: #b45f06;        /* tek veri rengi: güneş kehribarı, beyaz üzerinde okunur koyulukta */
  --accent-fill: #e8a53a;   /* aynı renk, dolgu olarak (çubuk, çizelge) */
  --positive: #17663a;
  --negative: #b42318;
  --pill-positive-bg: #e3f4e8; --pill-positive-ink: #17663a;
  --pill-negative-bg: #fdeaea; --pill-negative-ink: #b42318;
  --pill-warning-bg: #fdf1d3;  --pill-warning-ink: #8a5a00;
  --pill-neutral-bg: #ececef;  --pill-neutral-ink: #33333a;
  --radius-card: 0px;
  --gap: 14px;
  --pad: 22px;
  --gutter: 29px;
  --control: 36px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--ground); color-scheme: light; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 14px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- üst çubuk ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.bar-scope {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.stamp { color: var(--faint); font-size: 12px; white-space: nowrap; }

.who { padding-left: 12px; border-left: 1px solid var(--border); color: var(--muted); white-space: nowrap; }

.banner.banner-warning { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.banner.banner-warning .link { color: inherit; text-decoration-color: currentColor; }
button.who { text-decoration: none; }
button.who:hover { text-decoration: underline; }

.dialog { width: min(calc(100vw - 32px), 380px); padding: 24px; border: 0; border-radius: 0; background: var(--surface); color: var(--text); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.dialog .login-form { margin-top: 0; }
.dialog h2 { margin-bottom: 18px; }
.dialog .meta { margin-top: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dialog-actions .btn { height: var(--control); margin-top: 0; }

/* ---------- giriş sayfası ---------- */

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(100%, 360px); }
.login h1 { margin-top: 28px; }
.login-form { display: flex; flex-direction: column; margin-top: 20px; }
.login-form label { margin: 14px 0 6px; color: var(--muted); }
.login-form label:first-child { margin-top: 0; }
.login-form .field { height: 44px; border-radius: 0; }
.login-form .note { margin-top: 12px; }
.login-form .btn { height: 44px; margin-top: 8px; }

/* izleyici rolünde kamerayı yöneten denetimler kapalıdır */
[data-role="viewer"] .operator-only { opacity: 0.45; pointer-events: none; }

/* ---------- düğmeler ---------- */

.btn {
  flex: none;
  height: var(--control);
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, transform 80ms ease, opacity 120ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2c2c31; }
.btn-ghost { background: var(--raised); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--raised-hover); }
.btn-danger { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.btn-danger:hover:not(:disabled) { background: #f9d6d6; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #a0a0a8;
  text-underline-offset: 3px;
}
.link:hover:not(:disabled) { color: var(--text); }
.link:disabled { opacity: 0.5; cursor: default; }

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--pill-neutral-bg);
  color: var(--pill-neutral-ink);
}
.pill[data-tone="positive"] { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill[data-tone="negative"] { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill[data-tone="warning"]  { background: var(--pill-warning-bg);  color: var(--pill-warning-ink); }

/* ---------- tuval ---------- */

.canvas { padding: 22px var(--gutter) 40px; }

.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.title-text { min-width: 0; }
h1 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.finding { margin-top: 4px; color: var(--muted); }
.title-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.countdown { color: var(--muted); white-space: nowrap; }

.banner {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 0;
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
}

/* ---------- mercekler ---------- */

/* 2 sütun: (tuval − 14) / 2 her biri; kartlar tuvalin iki kenarına oturur. */
.lenses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 18px; }

.lens { background: var(--surface); border-radius: 0; overflow: hidden; }
.lens-head { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 12px 0 var(--pad); }
.lens-name { font-size: 16px; font-weight: 600; white-space: nowrap; }
.lens-meta { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lens-head .btn { margin-left: auto; }

.stage { position: relative; aspect-ratio: 16 / 9; background: var(--well); overflow: hidden; }
.stage-mount { position: absolute; inset: 0; }
/* Oynatıcı kök öğesine sabit piksel ölçü yazıyor; pencere daralınca sahneyi izlesin. */
.stage-mount > div { width: 100% !important; height: 100% !important; }
.stage-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.stage-idle strong { font-size: 16px; font-weight: 500; }
.stage-idle span { color: var(--faint); max-width: 36ch; }
.stage[data-state="live"] .stage-idle { display: none; }

/* ---------- alt paneller ---------- */

/* 3 sütun: (tuval − 2×14) / 3. */
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }

.card { display: flex; flex-direction: column; background: var(--surface); border-radius: 0; padding: 18px var(--pad) var(--pad); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 12px; font-weight: 400; color: var(--faint); }
.meta { color: var(--faint); font-size: 12px; }
.note { margin-top: 14px; color: var(--faint); font-size: 12px; min-height: 17px; }
.note[data-tone="negative"] { color: var(--pill-negative-ink); }
.note[data-tone="positive"] { color: var(--pill-positive-ink); }

/* güç akışı: Güneş → Pil → Kamera → 4G */
.flow { display: grid; grid-template-columns: auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto; align-items: start; }
.node { display: flex; flex-direction: column; min-width: 0; }
.node-label { color: var(--muted); font-size: 14px; }
.node-figure { margin-top: 2px; font-size: 22px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.node-figure small { margin-left: 2px; font-size: 14px; font-weight: 400; color: var(--faint); }
.node-figure[data-hue] { color: var(--accent); }
.node-sub { margin-top: 2px; color: var(--faint); font-size: 12px; white-space: nowrap; }
.wire { position: relative; height: 2px; margin: 37px 10px 0; background: var(--raised); border-radius: 0; }
.wire[data-on="solar"] { background: var(--accent-fill); }
.wire[data-on="yes"] { background: #6f6f78; }
.wire[data-on="no"] { height: 0; border-top: 1px dashed #b9b9c0; background: none; }

.level { height: 4px; margin-top: 16px; border-radius: 0; background: var(--raised); overflow: hidden; }
.level-fill { height: 100%; background: var(--accent-fill); border-radius: 0; }
.level-ends { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 12px; }

/* yön kontrolü */
.ptz { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.pad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 6px;
  grid-template-areas: ". up ." "left home right" ". down .";
}
.pad-btn {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: var(--raised);
  cursor: pointer;
  transition: background-color 120ms ease, transform 80ms ease;
}
.pad-btn:hover:not(:disabled) { background: var(--raised-hover); }
.pad-btn:active { transform: scale(0.94); }
.pad-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.pad-btn svg { width: 16px; height: 16px; fill: var(--text); }
.pad-btn[data-dir="up"] { grid-area: up; }
.pad-btn[data-dir="left"] { grid-area: left; }
.pad-btn[data-dir="right"] { grid-area: right; }
.pad-btn[data-dir="down"] { grid-area: down; }
.pad-home { grid-area: home; font-size: 11px; font-weight: 500; }

.presets { min-width: 0; }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preset-list .empty { color: var(--faint); }
.preset-list .btn { height: 32px; padding: 0 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* caydırma */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.row + .row { border-top: 1px solid var(--rule); }
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-name { font-weight: 500; }
.row-sub { color: var(--faint); font-size: 12px; }
.row-sub[data-on] { color: var(--pill-negative-ink); }
.row-actions { display: flex; gap: 8px; flex: none; }

/* alarmlar: üç sütuna akan satırlar (sütun = (tuval − 2×44) / 3) */
.alarms-card { margin-top: var(--gap); }
.alarm-list { margin-top: 12px; columns: 3; column-gap: 44px; }
.alarm-list li { display: flex; align-items: center; gap: 12px; min-height: 46px; border-top: 1px solid var(--rule); break-inside: avoid; }
.alarm-list .when { font-weight: 500; flex: none; }
.alarm-list .what { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alarm-list .what b { font-weight: 400; color: var(--text); margin-right: 8px; }
.alarm-list .btn { height: 30px; padding: 0 14px; }
.alarm-list:empty { display: none; }
.alarm-more { margin-top: 14px; align-self: flex-start; }

/* kayıtlar: sol yarı çizelge ve olaylar, sağ yarı oynatıcı (mercek ızgarasıyla aynı iki sütun) */
.records-card { margin-top: var(--gap); }
.records-head { align-items: center; }
.records-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; padding: 3px; border-radius: 0; background: var(--raised); }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--text); color: #fff; font-weight: 500; }
.field { height: var(--control); padding: 0 12px; border: 0; border-radius: 0; background: var(--raised); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.records .stage { border-radius: 0; }
.records-side { min-width: 0; padding-right: 8px; }
.records-summary { color: var(--muted); }
.records-summary[data-tone="negative"] { color: var(--pill-negative-ink); }
.timeline { margin-top: 18px; }
.timeline-track { position: relative; height: 34px; border-radius: 0; background: var(--raised); overflow: hidden; cursor: pointer; }
.timeline-track span { position: absolute; top: 0; bottom: 0; min-width: 2px; }
.timeline-track span[data-kind="normal"] { background: #8d8d96; }
.timeline-track span[data-kind="aov"] { background: #b9b9c0; }
.timeline-track span[data-kind="motion"] { background: var(--accent-fill); z-index: 1; }
.timeline-track i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); z-index: 2; pointer-events: none; }
.timeline-hours { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend li::before { content: ""; width: 10px; height: 10px; border-radius: 0; background: var(--swatch); }
.records-side h3 { margin-top: 22px; }
.event-list { margin-top: 6px; max-height: 232px; overflow-y: auto; }
.event-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-top: 1px solid var(--rule); }
.event-list .when { font-weight: 500; }
.event-list .len { color: var(--faint); font-size: 12px; margin-left: 10px; }
.event-list .btn { height: 30px; padding: 0 14px; }
.event-list li[aria-current="true"] .when { color: var(--accent); }

/* cihaz ayrıntıları: 6 grup, 3 sütun × 2 satır */
.details-card { margin-top: var(--gap); }
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 44px; }
.detail-group h3 { margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.detail-group dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.detail-group dt, .detail-group dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--rule); }
.detail-group dt { color: var(--muted); }
.detail-group dd { padding-left: 16px; text-align: right; overflow-wrap: anywhere; }
.detail-group dd.missing { color: var(--faint); }

/* işlem kaydı */
.audit-card { margin-top: var(--gap); }
.table-wrap { max-height: 320px; overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { position: sticky; top: 0; background: var(--surface); padding: 0 16px 8px 0; text-align: left; font-size: 12px; font-weight: 400; color: var(--faint); white-space: nowrap; }
.table td { padding: 9px 16px 9px 0; border-top: 1px solid var(--rule); white-space: nowrap; }
.table td:nth-child(3) { width: 100%; white-space: normal; }
.table td.muted { color: var(--muted); }
.table td[data-ok="false"] { color: var(--pill-negative-ink); }

/* ---------- kamera listesi ---------- */

.bar-back { color: var(--muted); text-decoration: none; padding-left: 18px; border-left: 1px solid var(--border); align-self: stretch; display: flex; align-items: center; }
.bar-back::before { content: "‹"; margin-right: 6px; font-size: 18px; line-height: 1; }
.bar-back:hover { color: var(--text); }
.bar-back + .bar-scope { border-left: 0; padding-left: 0; }

/* durum sayıları: tek kap, eşit beş sütun; aynı zamanda listenin süzgeci */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 18px; background: var(--surface); border-radius: 0; overflow: hidden; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px var(--pad); border: 0; border-left: 1px solid var(--rule); background: none; text-align: left; cursor: pointer; }
.kpi:first-child { border-left: 0; }
.kpi:hover { background: #fafafa; }
.kpi[aria-pressed="true"] { background: var(--raised); }
.kpi-label { color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 500; line-height: 1.2; }
.kpi[data-tone="negative"] .kpi-value { color: var(--pill-negative-ink); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--gap); }
.filters #search { width: min(100%, 320px); }
.filters select.field { padding-right: 28px; }
.site-add { display: flex; gap: 8px; margin-left: auto; }
.field::placeholder { color: var(--faint); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #55555d 50%), linear-gradient(135deg, #55555d 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.field-inline { height: 30px; padding: 0 26px 0 10px; font-size: 14px; background-position: calc(100% - 13px) 13px, calc(100% - 8px) 13px; max-width: 180px; }

.fleet-card { margin-top: var(--gap); }
.fleet-wrap { max-height: none; }
.fleet th.num, .fleet td.num { text-align: right; padding-right: 28px; }
.fleet th:last-child, .fleet td:last-child { padding-right: 0; }
.fleet td:nth-child(3) { width: auto; white-space: nowrap; }
.fleet td:first-child { width: 34%; white-space: normal; }
.fleet td small { color: var(--faint); font-size: 12px; }
.fleet td.missing { color: var(--faint); }
.fleet .btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; text-decoration: none; }
.fleet tbody tr:hover td { background: #fafafa; }
.cam-name { display: block; color: var(--text); font-weight: 500; text-decoration: none; }
.cam-name:hover { text-decoration: underline; }
.cam-sub { display: block; color: var(--faint); font-size: 12px; }

/* ---------- dar ekranlar ---------- */

@media (max-width: 1100px) {
  .fleet-layout { grid-template-columns: minmax(0, 1fr); }
  .feed { position: static; max-height: 420px; }
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panels > .card:first-child { grid-column: 1 / -1; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alarm-list { columns: 2; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --pad: 18px; }
  .bar { gap: 12px; }
  .bar-scope, .stamp, .who { display: none; }
  .title-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .title-actions { justify-content: space-between; }
  .title-actions .btn-primary { margin-left: auto; }
  .lenses, .panels, .details, .records { grid-template-columns: minmax(0, 1fr); }
  .records-controls { justify-content: flex-start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-top: 1px solid var(--rule); }
  .site-add { margin-left: 0; width: 100%; }
  .bar-back { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .alarm-list { columns: 1; }
  .records-side { padding-right: 0; }
  .card-head { flex-wrap: wrap; }
  .panels > .card:first-child { grid-column: auto; }
  .node-figure { font-size: 18px; }
  .wire { margin: 33px 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .feed-item.arrive { animation: none; }
  .btn, .pad-btn { transition: none; }
  .btn:active, .pad-btn:active { transform: none; }
}

/* ---------- kamera kutuları ve bildirim paneli ---------- */

/* İki sütun: solda kutular, sağda 340px bildirim paneli. */
.fleet-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.fleet-main { min-width: 0; }
.filters .meta { margin-left: 4px; }

/* Kare kutular: en az 176px, satıra sığdığı kadar; her kutu kenarı eşit. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.tile { position: relative; display: flex; flex-direction: column; aspect-ratio: 1 / 1; padding: 14px 14px 18px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.tile:hover { border-color: #9a9aa3; }
.tile:has(.tile-name:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.tile-site { position: relative; z-index: 1; min-width: 0; max-width: 55%; color: var(--faint); font: inherit; font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select.tile-site { border: 0; background: none; padding: 2px 0; cursor: pointer; text-align-last: right; }
select.tile-site:hover { color: var(--text); }
.tile-name { margin-top: 12px; color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.25; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-name::after { content: ""; position: absolute; inset: 0; }   /* kutunun tamamı tıklanır */
.tile-name:focus-visible { outline: none; }
.tile-sub { margin-top: 2px; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tile-stat { display: flex; flex-direction: column; min-width: 0; }
.tile-stat-right { align-items: flex-end; text-align: right; }
.tile-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tile-figure { font-size: 24px; font-weight: 500; line-height: 1.15; }
.tile-figure small { margin-left: 2px; font-size: 13px; font-weight: 400; color: var(--faint); }
.tile-read { color: var(--faint); font-size: 12px; white-space: nowrap; }
.tile-level { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--raised); }
.tile-level-fill { display: block; height: 100%; background: var(--accent-fill); }
.tile[data-low] .tile-figure { color: var(--negative); }
.tile[data-low] .tile-level-fill { background: var(--negative); }
.tile[data-status="offline"] .tile-name, .tile[data-status="unknown"] .tile-name { color: var(--muted); }
.tiles-empty { margin-top: var(--gap); padding: 28px var(--pad); background: var(--surface); border: 1px solid var(--border); color: var(--muted); }

/* Bildirim paneli: ekranda sabit durur, kendi içinde kayar. */
.feed { position: sticky; top: var(--gap); display: flex; flex-direction: column; max-height: calc(100vh - 56px - 22px - var(--gap)); background: var(--surface); border: 1px solid var(--border); }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px var(--pad) 12px; border-bottom: 1px solid var(--rule); }
.feed-list { overflow-y: auto; overscroll-behavior: contain; }
.feed-item a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 11px var(--pad); border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.feed-item a:hover { background: #fafafa; }
.feed-time { grid-row: 1 / span 2; color: var(--muted); white-space: nowrap; }
.feed-what { font-weight: 500; }
.feed-where { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-empty { padding: 20px var(--pad); color: var(--muted); }
.feed-item.arrive { animation: feed-arrive 320ms ease-out; }
.feed-item.arrive a { box-shadow: inset 3px 0 0 var(--accent-fill); }
@keyframes feed-arrive { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- beyaz, köşeli kutular ---------- */

.card, .lens, .kpis, .dialog { border: 1px solid var(--border); }
.bar { background: var(--surface); }
.btn-ghost, .field, .seg, .pad-btn { box-shadow: inset 0 0 0 1px var(--border); }
.seg button[aria-pressed="true"] { box-shadow: none; }
.stage { color: #fff; }
.stage .stage-idle span { color: #b4b4b8; }
.dialog::backdrop { background: rgba(17, 17, 19, 0.45); }
.table th { background: var(--surface); }
