/* =====================================================================
   TEK GORUNUM DOSYASI. Marka, yuzey ve yazi tipi degerleri yalniz :root'ta.
   Kaynak dil: GoFactory (lacivert/grafit, cam yuzeyler, cyan vurgu).
   Bolum 2 (durum renkleri) plan §6'dir ve temadan BAGIMSIZ sabittir.
   ===================================================================== */

/* 1. MARKA / YUZEY */
:root {
  --font: Inter, "Segoe UI", Arial, sans-serif;
  --bg: #08121e;
  --workspace: #0b141e;
  --sidebar: #0a111a;
  --panel: linear-gradient(145deg, #24415752, #14273638);
  --panel-solid: #102334;
  --line: #263646;
  --line-soft: #9fbad533;
  --text: #e0eaf3;
  --text-strong: #edf4fb;
  --muted: #95a8ba;
  --accent: #6bd7eb;
  --accent-ink: #082034;
  --accent-fill: linear-gradient(105deg, #88c9e2, #b1dfed);
  --orange: #f19152;
  --radius: 10px;
  --sidebar-w: 230px;
  --header-h: 76px;
  color-scheme: dark;
}

/* 2. DURUM RENKLERI — plan §6. Disina cikilmaz. Kirmizi YALNIZ aktif alarm. */
:root {
  --durum-run: #68ddb0;       /* yesil */
  --durum-hold: #f19152;      /* turuncu */
  --durum-stop: #8fa6b8;      /* gri-mavi */
  --durum-alarm: #f07878;     /* kirmizi: yalniz ALARM */
  --durum-offline: #5b6b78;   /* koyu gri */
  --durum-hic: #7d8c98;       /* cizgili gri */
}
[data-durum="RUN"] { --d: var(--durum-run); }
[data-durum="HOLD"] { --d: var(--durum-hold); }
[data-durum="STOP"], [data-durum="RESET"] { --d: var(--durum-stop); }
[data-durum="ALARM"] { --d: var(--durum-alarm); }
[data-durum="OFFLINE"] { --d: var(--durum-offline); }
[data-durum="HIC_BAGLANMADI"] { --d: var(--durum-hic); }
[data-durum="UNKNOWN"] { --d: var(--durum-hic); }
.durum-satir { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.durum-rozet {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 6px 11px;
  border-radius: 6px; color: var(--d); border: 1.5px solid var(--d);
  background: color-mix(in srgb, var(--d) 14%, transparent);
}
.durum-rozet::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
[data-durum="HIC_BAGLANMADI"].durum-rozet {
  background: repeating-linear-gradient(135deg, #7d8c9822 0 6px, transparent 6px 12px);
}
/* Bayatlik rengi degil CERCEVEYI degistirir: kesik cerceve renge biner. */
[data-bayat="1"].durum-rozet { border-style: dashed; }

/* 3. TEMEL */
* { box-sizing: border-box; }
html { font-family: var(--font); font-size: 16px; background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100dvh; background: var(--workspace); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid #73dced; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; margin: 0; color: var(--text-strong); }
.muted { color: var(--muted); line-height: 1.7; }
.overline { font-size: 12px; letter-spacing: .18em; color: #8fabbf; font-weight: 600; margin: 0 0 10px; }

/* 4. ISKELET: yan menu + ust serit + govde */
.workspace-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 26px 17px 16px;
}
.sidebar-brand { padding: 0 10px 18px; border-bottom: 1px solid #253541; margin-bottom: 8px; }
.sidebar-brand img { display: block; width: 130px; height: auto; }
.sidebar-brand span { display: block; font-size: 9px; letter-spacing: .12em; color: #607e94; margin-top: 12px; }
.workspace-sidebar nav { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #314556 transparent; }
.workspace-sidebar details { margin: 8px 0 15px; }
.workspace-sidebar summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 650; letter-spacing: .075em; text-transform: uppercase;
  padding: 8px 10px; min-height: 35px; border-radius: 7px;
  color: var(--nav-accent); background: rgba(var(--nav-rgb), .075); border: 1px solid rgba(var(--nav-rgb), .15);
}
.workspace-sidebar summary:hover { background: rgba(var(--nav-rgb), .13); }
.workspace-sidebar summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--nav-accent); border-bottom: 2px solid var(--nav-accent);
  transform: rotate(45deg); margin: -3px 3px 0 0;
}
.workspace-sidebar details:not([open]) summary::after { transform: rotate(-45deg); margin-top: 0; }
.workspace-sidebar details[open] > summary { margin-bottom: 6px; }
.workspace-sidebar nav a {
  display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.3; padding: 10px 11px; margin: 2px 0;
  border-radius: 6px; color: var(--nav-text); background: rgba(var(--nav-rgb), .025);
}
.workspace-sidebar nav a > span { width: 20px; text-align: center; font-size: 17px; color: var(--nav-accent); opacity: .8; }
.workspace-sidebar nav a:hover { color: #fff; background: rgba(var(--nav-rgb), .12); }
.workspace-sidebar nav a.selected {
  color: #f5fbff; font-weight: 600; box-shadow: inset 3px 0 var(--nav-accent);
  background: linear-gradient(90deg, rgba(var(--nav-rgb), .22), rgba(var(--nav-rgb), .07));
}
.workspace-sidebar nav a.selected > span { opacity: 1; }
[data-menu-group="0"] { --nav-accent: #8dddeb; --nav-rgb: 141,221,235; --nav-text: #d8eff5; }
[data-menu-group="1"] { --nav-accent: #c4b5f4; --nav-rgb: 196,181,244; --nav-text: #e5ddf7; }
[data-menu-group="2"] { --nav-accent: #f1c783; --nav-rgb: 241,199,131; --nav-text: #f0e3cf; }

.sidebar-user { border-top: 1px solid #26343f; padding: 16px 5px 0; display: grid; gap: 14px; }
.sidebar-account { padding: 0 7px; min-width: 0; }
.sidebar-account b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { display: block; font-size: 11px; color: #7893a7; margin-top: 3px; }
.signout {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 42px;
  border: 1px solid #345065; border-radius: 8px; background: linear-gradient(120deg, #162c3b, #10212e);
  color: #cedde7; font-size: 14px;
}
.signout:hover { background: #34232e; border-color: #966477; color: #ffc2c8; }

.workspace-main { margin-left: var(--sidebar-w); min-width: 0; }
.workspace-header {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; border-bottom: 1px solid #24333f; background: #0b151ff2;
}
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #879fb2; min-width: 0; }
.breadcrumb > span { color: #375269; }
.breadcrumb h1 { font-size: 15px; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; border: 1px solid #365262; border-radius: 6px; overflow: hidden; }
.lang-switch button { border: 0; background: #112736; color: #b8d9ea; font-size: 11px; padding: 6px 11px; letter-spacing: .06em; }
.lang-switch button + button { border-left: 1px solid #365262; }
.lang-switch button:hover { background: #2c5064; }
.lang-switch button.active { background: #2c5064; color: #fff; }
.mobile-menu { display: none; border: 1px solid #355066; border-radius: 8px; background: #192b38; width: 40px; height: 40px; font-size: 18px; }
.nav-backdrop { position: fixed; inset: 0; z-index: 39; border: 0; background: #02081099; backdrop-filter: blur(3px); }
.surface { padding: 28px; display: grid; gap: 18px; align-content: start; }

/* 5. BILESENLER */
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 26px 28px; backdrop-filter: blur(20px); }
.panel h2 { font-size: 24px; margin-bottom: 10px; }
.panel h3 { font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { border: 1px solid #98d9ec45; border-radius: 7px; background: #95d8ea0d; color: #b9deed; padding: 10px 16px; font-size: 13px; }
.btn:hover { background: #95d8ea1f; }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; display: inline-block; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }

.ui-dialog { border: 1px solid #385267; background: var(--panel-solid); color: #e9f3fa; border-radius: 16px; width: min(440px, 90vw); padding: 32px; box-shadow: 0 30px 100px #0008; }
.ui-dialog::backdrop { background: #030b16ba; backdrop-filter: blur(8px); }
.ui-dialog h2 { font-size: 20px; margin: 14px 0 10px; }
.ui-dialog p { color: #a9bdce; line-height: 1.7; margin: 0; }
.ui-dialog-ikon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--t); color: var(--t); }
.ui-dialog[data-tip="bilgi"] { --t: var(--accent); }
.ui-dialog[data-tip="uyari"] { --t: #f1c783; }
.ui-dialog[data-tip="hata"] { --t: #f07878; }
.ui-dialog-butonlar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dialog-x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 26px; color: #a0b4c6; }
body:has(dialog[open]) { overflow: hidden; }
.ui-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; padding: 12px 18px; border-radius: 8px; background: var(--panel-solid); border: 1px solid #385267; border-left: 4px solid var(--t, var(--accent)); box-shadow: 0 12px 40px #0008; font-size: 14px; }
.ui-toast[data-tip="uyari"] { --t: #f1c783; }
.ui-toast[data-tip="hata"] { --t: #f07878; }

.liste-baslik { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.liste-sonuc { margin: 0; font-size: 13px; }
.liste-araclar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 18px; }
.liste-arama { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.liste-arama-girdi { background: var(--workspace); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); padding: 9px 12px; font-size: 13px; min-width: 220px; }
.liste-gorunum { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.liste-gorunum-bag { padding: 8px 14px; font-size: 13px; color: var(--muted); background: transparent; }
.liste-gorunum-bag + .liste-gorunum-bag { border-left: 1px solid var(--line); }
.liste-gorunum-bag.aktif { background: var(--panel-solid); color: var(--accent); font-weight: 600; }
.liste-tablo-kap { overflow-x: auto; }
.liste-tablo { width: 100%; border-collapse: collapse; font-size: 14px; }
.liste-tablo th, .liste-tablo td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.liste-tablo th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.liste-tablo tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.liste-kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.liste-kart { background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.liste-kart-baslik { font-size: 16px; margin: 0 0 12px; color: var(--text-strong); }
.liste-kart-alanlar { margin: 0; display: grid; gap: 8px; }
.liste-kart-satir { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.liste-kart-satir dt { color: var(--muted); }
.liste-kart-satir dd { margin: 0; color: var(--text); text-align: right; }
.liste-bos { padding: 24px 0; text-align: center; }
.liste-sayfalama { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.sayfalama-oge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 7px 11px; border-radius: 7px; border: 1px solid var(--line); font-size: 13px; color: var(--text); background: transparent; }
a.sayfalama-oge:hover { border-color: var(--accent); color: var(--accent); }
.sayfalama-oge.aktif { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.sayfalama-oge.pasif { color: var(--muted); opacity: .5; cursor: default; }
.sayfalama-aralik { padding: 0 6px; color: var(--muted); }
.rozet { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 6px; color: var(--r, var(--text)); border: 1px solid var(--r, var(--line)); background: color-mix(in srgb, var(--r, var(--muted)) 14%, transparent); }
.rozet-aktif { --r: var(--durum-run); }
.rozet-pasif { --r: var(--durum-offline); }
.rozet-bekliyor { --r: var(--durum-hold); }
.liste-baslik-sag { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.liste-eylem-grubu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.liste-eylem-form { display: inline; margin: 0; }
.liste-kart-eylemler { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn.tehlikeli { border-color: var(--durum-alarm); color: var(--durum-alarm); background: color-mix(in srgb, var(--durum-alarm) 10%, transparent); }
.btn.tehlikeli:hover { background: color-mix(in srgb, var(--durum-alarm) 20%, transparent); }
.form-panel { max-width: 560px; }
.yonetim-form { display: grid; gap: 16px; margin-top: 18px; }
.form-alan { display: grid; gap: 6px; }
.form-alan label { font-size: 13px; color: var(--text); font-weight: 500; }
.form-alan input[type="text"], .form-alan select { width: 100%; background: var(--workspace); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; }
.form-alan-ipucu { font-size: 12px; color: var(--muted); }
.form-alan-onay { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.form-alan-onay input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.form-hata-kutu { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--durum-alarm); background: color-mix(in srgb, var(--durum-alarm) 12%, transparent); color: var(--durum-alarm); font-size: 13px; margin: 0; }
.form-alan-hata { font-size: 12px; color: var(--durum-alarm); margin: 0; }
.kod-kutu { display: block; padding: 16px 18px; margin: 16px 0; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--workspace); color: var(--text-strong); font-family: monospace; font-size: 18px; letter-spacing: .08em; text-align: center; word-break: break-all; }
.kod-uyari { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--durum-hold); background: color-mix(in srgb, var(--durum-hold) 12%, transparent); color: var(--durum-hold); font-size: 13px; margin: 14px 0; }
.kod-detay { display: grid; gap: 8px; margin: 14px 0; }
.kod-detay-satir { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kod-detay-satir dt { color: var(--muted); }
.kod-detay-satir dd { margin: 0; color: var(--text-strong); font-weight: 500; }
.form-ayirac { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.rozet-sistem { --r: var(--durum-hold); }
.rozet-ozel { --r: var(--accent); }
.form-panel-genis { max-width: 820px; }
.form-alan textarea { width: 100%; background: var(--workspace); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; }
.yetki-matrisi-kap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--workspace); }
.yetki-matrisi { width: 100%; border-collapse: collapse; font-size: 13px; }
.yetki-matrisi th, .yetki-matrisi td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.yetki-matrisi th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-solid); }
.yetki-matrisi tbody tr:last-child td, .yetki-matrisi tbody tr:last-child th { border-bottom: 0; }
.yetki-matrisi tbody th { font-weight: 500; color: var(--text-strong); background: transparent; text-transform: none; letter-spacing: 0; font-size: 13px; }
.yetki-kutu { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.yetki-kutu input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.yetki-kutu.devre-disi { opacity: .45; cursor: not-allowed; }
.yetki-kutu.devre-disi input[type="checkbox"] { cursor: not-allowed; }
.yetki-ozel-liste { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.liste-araclar-sag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.liste-disa-aktar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* 6. GIRIS / HATA (menusuz yerlesim) */
.auth-body { min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(0deg, #07121fe8, transparent 35%, #07121f55), linear-gradient(90deg, rgba(4,15,28,.42), rgba(4,15,28,.12)), url("/static/assets/login-factory.png") center/cover, #091320; }
.auth-card { width: min(400px, 100%); background: linear-gradient(145deg, #24415752, #14273638); backdrop-filter: blur(28px); border: 1px solid var(--line-soft); border-radius: 18px; padding: 32px; box-shadow: 0 30px 80px #0005, inset 0 1px #bde4fc20; }
.auth-logo { display: block; width: 130px; height: auto; }
.login-rule { height: 1px; background: linear-gradient(90deg, #7594a94d, transparent); margin: 18px 0 22px; }
.auth-card h1 { font-size: 30px; margin-bottom: 14px; }
.auth-note { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; color: #c9d7e2; margin-top: 16px; }
.auth-form input { width: 100%; background: #07152273; border: 1px solid #7d9ab740; border-radius: 7px; color: #fff; padding: 12px 14px; margin-top: 8px; font-size: 15px; }
.form-error { font-size: 13px; color: #ffb1a0; min-height: 18px; margin: 12px 0; }
.auth-form .btn { width: 100%; }

/* 7. DAR EKRAN */
@media (max-width: 960px) {
  .workspace-sidebar { transform: translateX(-100%); transition: transform .2s; max-width: calc(100vw - 56px); }
  .workspace-sidebar.open { transform: none; }
  .workspace-main { margin-left: 0; }
  .mobile-menu { display: block; }
  .workspace-header { padding: 0 16px; }
  .surface { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 8. Y2 YERLESIM */
.yerlesim-panel { display: grid; gap: 16px; }
.yerlesim-ust-serit { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.yerlesim-aciklama { margin: 4px 0 0; font-size: 13px; }
.yerlesim-ust-sag { display: grid; gap: 8px; justify-items: end; }
.yerlesim-sayimlar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.yerlesim-sayim { padding: 5px 10px; font-size: 12px; gap: 6px; }
.yerlesim-sayim strong { font-weight: 700; color: var(--text-strong); }
.yerlesim-guncelleme { margin: 0; font-size: 12px; color: var(--muted); }
.yerlesim-uyari {
  margin: 0; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--durum-hold);
  background: color-mix(in srgb, var(--durum-hold) 14%, transparent);
  color: var(--text-strong); font-size: 13px;
}
.yerlesim-alan-kap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--workspace);
}
.yerlesim-harita {
  width: 100%; min-width: 900px; aspect-ratio: 1672 / 941;
  background: var(--bg);
}
.yerlesim-harita > svg { display: block; width: 100%; height: 100%; }
.yerlesim-lejant { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.yerlesim-lejant-satir { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.yerlesim-lejant-olculmeyen {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 11px;
  border-radius: 6px; color: var(--muted); border: 1.5px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.04);
}
.yerlesim-lejant-not { margin: 0; font-size: 12px; color: var(--muted); }
[data-durum="UNKNOWN"].durum-rozet {
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--durum-hic) 14%, transparent) 0 6px,
    transparent 6px 12px
  );
}
@media (max-width: 960px) {
  .yerlesim-ust-sag { justify-items: start; }
  .yerlesim-sayimlar { justify-content: flex-start; }
}

/* 9. Y3 TEZGAH DETAYI */
.detay-sayfa { display: grid; gap: 18px; }
.detay-ust-panel { display: grid; gap: 14px; }
.detay-geri {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-size: 13px; color: var(--accent);
}
.detay-geri:hover { text-decoration: underline; }
.detay-ust-serit {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.detay-baslik { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0; }
.detay-kod-etiket { font-size: 26px; font-weight: 700; color: var(--text-strong); }
.detay-ad { font-size: 18px; font-weight: 400; color: var(--muted); }
.detay-devreye-bilgi { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.detay-rozetler { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detay-erisim-rozet, .detay-profil-rozet { gap: 6px; }
.detay-rozet-etiket { color: var(--muted); }
.detay-zaman-serit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px;
}
.detay-zaman-oge { display: flex; align-items: baseline; gap: 6px; }
.detay-zaman-etiket { color: var(--muted); }
.detay-uyari-bant {
  padding: 12px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--durum-hold);
  background: color-mix(in srgb, var(--durum-hold) 14%, transparent);
  color: var(--text-strong); font-size: 14px; font-weight: 500;
}
.detay-bos-kart {
  display: grid; gap: 8px;
  border: 1.5px dashed var(--durum-hic);
  background: repeating-linear-gradient(135deg, #7d8c9816 0 8px, transparent 8px 16px);
}
.detay-icerik { display: grid; gap: 18px; }
.detay-kartlar {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-top: 14px;
}
.detay-kart {
  display: grid; gap: 6px; align-content: start;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.detay-kart[data-durum="ALARM"] {
  border-color: var(--d);
  background: color-mix(in srgb, var(--d) 12%, var(--panel-solid));
}
.detay-kart-baslik {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.detay-kart-deger { font-size: 20px; font-weight: 600; color: var(--text-strong); word-break: break-word; }
.detay-kart[data-durum="ALARM"] .detay-kart-deger { color: var(--d); }
.detay-kart-alt { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.detay-kart-zaman { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.detay-bolum-baslik { display: grid; gap: 4px; margin-bottom: 12px; }
.detay-bolum-aciklama { margin: 0; font-size: 13px; }
.detay-tablo { margin-top: 8px; }
.detay-grup-satir th {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-solid));
  color: var(--accent); font-size: 11px; letter-spacing: .07em;
}
.detay-kod-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--text-strong); }
.detay-kalem-not { margin-top: 4px; font-size: 11px; color: var(--durum-hold); }
.detay-deger-hucre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-strong); }
.detay-bos-hucre { text-align: center; color: var(--muted); padding: 18px 12px; }
@media (max-width: 960px) {
  .detay-kartlar { grid-template-columns: 1fr; }
  .detay-zaman-serit { gap: 10px; }
}

/* 10. Y4C GUN GORUNUMU */
.detay-ust-baglantilar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gun-sayfa { display: grid; gap: 18px; }
.gun-ust-panel { display: grid; gap: 14px; }
.gun-ust-serit { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gun-sinir-notu { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.gun-tarih-gezinme { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gun-tarih-gezinme button:disabled { opacity: .45; cursor: not-allowed; }
.gun-tarih-girdi {
  background: var(--workspace); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); padding: 6px 10px; font-size: 13px; color-scheme: dark;
}
.gun-devrede-degil-kutu {
  display: grid; gap: 10px; border: 1.5px dashed var(--durum-hic);
  background: color-mix(in srgb, var(--durum-hic) 8%, var(--panel-solid));
}
.gun-icerik { display: grid; gap: 18px; }
.gun-ozet-kartlar {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-top: 14px;
}
.gun-ozet-kart {
  display: grid; gap: 6px; align-content: start;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.gun-ozet-kart[data-durum] {
  border-color: color-mix(in srgb, var(--d) 55%, var(--line));
}
.gun-ozet-kart[data-durum="ALARM"] {
  border-color: var(--d);
  background: color-mix(in srgb, var(--d) 12%, var(--panel-solid));
}
.gun-ozet-kart[data-durum="ALARM"] .detay-kart-deger { color: var(--d); }
.gun-pencere-bilgi { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.gun-bolum-ust {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.gun-serit-kap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--workspace); padding: 10px 8px;
}
.gun-serit-svg-kap { min-width: 900px; }
.gun-svg { display: block; width: 100%; height: auto; }
.gun-desen-cizgi { stroke: var(--durum-hic); opacity: .45; }
.gun-slot-zemin { fill: color-mix(in srgb, var(--line) 35%, transparent); }
.gun-dilim[data-durum] { fill: var(--d); }
.gun-alarm-serit[data-durum="ALARM"] { fill: var(--d); }
.gun-slot-eksik { fill: url(#gunEksikDesen); stroke: color-mix(in srgb, var(--durum-hic) 45%, transparent); stroke-width: .7; }
.gun-slot-devrede-degil { fill: transparent; stroke: var(--durum-hic); stroke-dasharray: 2 2; stroke-width: .8; opacity: .55; }
.gun-slot-henuz { fill: color-mix(in srgb, var(--line) 20%, transparent); opacity: .35; }
.gun-slot-etkilesim { fill: transparent; cursor: pointer; }
.gun-slot-etkilesim:hover, .gun-slot-etkilesim.aktif { stroke: var(--accent); stroke-width: 1.5; }
.gun-slot-etkilesim:focus-visible { outline: none; stroke: var(--accent); stroke-width: 2; }
.gun-cetvel-cizgi, .gun-cetvel-tick { stroke: var(--line); stroke-width: 1; }
.gun-cetvel-metin { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.gun-lejant {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
  margin-top: 12px; font-size: 12px; color: var(--muted);
}
.gun-lejant-oge { display: inline-flex; align-items: center; gap: 6px; }
.gun-lejant-renk {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  background: var(--d, var(--muted));
}
.gun-lejant-eksik {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--durum-hic) 45%, transparent) 0 3px, transparent 3px 6px);
  border: 1px solid var(--durum-hic);
}
.gun-lejant-devrede-degil { background: transparent; border: 1px dashed var(--durum-hic); }
.gun-lejant-henuz { background: color-mix(in srgb, var(--line) 30%, transparent); border: 1px solid var(--line); }
.gun-slot-ayrinti {
  margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel-solid); display: grid; gap: 10px;
}
.gun-slot-ipucu { margin: 0; font-size: 13px; }
.gun-slot-ayrinti-ust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gun-slot-ayrinti-grid {
  margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px;
}
.gun-slot-ayrinti-oge { display: grid; gap: 2px; font-size: 12px; }
.gun-slot-ayrinti-oge dt { color: var(--muted); }
.gun-slot-ayrinti-oge dd { margin: 0; font-weight: 600; color: var(--text-strong); }
.gun-slot-not { margin: 0; font-size: 11px; color: var(--muted); }
.gun-pencere-tablo-kap { margin-top: 14px; }
.gun-olay-filtreler { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.gun-basi-satir { background: color-mix(in srgb, var(--accent) 7%, var(--panel-solid)); font-weight: 500; }
.gun-alarm-bos { margin: 12px 0 0; font-size: 14px; }
@media (max-width: 960px) {
  .gun-ozet-kartlar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 11. Y8 MAKINE PANELI */
.y8-anlik-panel, .y8-barfeeder-alarm-panel { display: grid; gap: 18px; }
.y8-alt-baslik {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 0;
}
.y8-durum-izgara {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.y8-yol-kart, .y8-panel-kart {
  display: grid; gap: 10px; align-content: start;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.y8-kart-ust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.y8-yol-satirlar {
  display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line);
}
.y8-yol-satir {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px;
}
.y8-yol-satir .detay-kart-zaman { grid-column: 1 / -1; margin-top: 0; }
.y8-etiket { font-size: 12px; color: var(--muted); font-weight: 500; }
.y8-alarm-rozet { width: fit-content; }
.y8-alarm-rozet:not([data-durum]) {
  --d: var(--muted); color: var(--muted); border-color: var(--line); background: transparent;
}
.y8-alarm-rozet[data-durum="ALARM"] {
  border-color: var(--d); color: var(--d);
  background: color-mix(in srgb, var(--d) 14%, transparent);
}
.y8-emergency-deger { font-size: 18px; font-weight: 600; color: var(--text-strong); }

.y8-lamba-bolum, .y8-barfeeder-bolum, .y8-son-alarmlar-bolum { display: grid; gap: 10px; }
.y8-lamba-izgara {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px;
}
.y8-barfeeder-izgara { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.y8-lamba {
  display: grid; gap: 5px; align-content: start;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-solid);
}
.y8-lamba-ust { display: flex; align-items: center; gap: 8px; }
.y8-lamba-nokta {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--muted); background: transparent;
}
.y8-lamba-durum { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.y8-lamba-ad { font-size: 13px; font-weight: 500; color: var(--text-strong); }
.y8-lamba[data-lamba-durum="yanik"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-solid));
}
.y8-lamba[data-lamba-durum="yanik"] .y8-lamba-nokta {
  border-color: var(--accent); background: var(--accent);
}
.y8-lamba[data-lamba-durum="yanik"] .y8-lamba-durum { color: var(--accent); }
.y8-lamba[data-lamba-durum="sonuk"] .y8-lamba-nokta {
  border-color: var(--line); background: var(--workspace);
}
.y8-lamba[data-lamba-durum="bilinmiyor"] {
  border-style: dashed; border-color: var(--durum-hic);
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--durum-hic) 14%, transparent) 0 6px,
    transparent 6px 12px
  );
}
.y8-lamba[data-lamba-durum="bilinmiyor"] .y8-lamba-nokta {
  border-color: var(--durum-hic); border-style: dashed;
}

.y8-sayac-mil-izgara {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px;
}
.y8-sayac-cift, .y8-sayac-alt-cift, .y8-mil-anlik-cift {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.y8-sayac-alt-cift { padding-top: 10px; border-top: 1px solid var(--line); }
.y8-sayac-oge { display: grid; gap: 4px; align-content: start; }
.y8-buyuk-sayi { font-size: 28px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.y8-orta-sayi { font-size: 20px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }

.y8-mil-ust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.y8-pencere-secici { display: inline-flex; gap: 6px; }
.y8-sn-dugme.aktif {
  background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; font-weight: 600;
}
.y8-trend-not { margin: 0; font-size: 12px; color: var(--muted); }
.y8-trend-grafikler { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.y8-trend-kutu {
  display: grid; gap: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--workspace);
}
.y8-trend-baslik-satir {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px;
}
.y8-trend-aralik { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.y8-trend-svg-kap { position: relative; min-height: 76px; }
.y8-trend-svg { display: block; width: 100%; height: 76px; }
.y8-trend-izgara { stroke: var(--line); stroke-width: 1; }
.y8-trend-cizgi { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.y8-trend-cizgi-yuk { stroke: var(--accent); }
.y8-trend-cizgi-devir { stroke: var(--text-strong); }
.y8-trend-bos {
  position: absolute; inset: 0; display: grid; place-items: center;
  margin: 0; font-size: 12px; color: var(--muted);
}
.y8-trend-eksen {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--muted);
}

.y8-katlanir { padding: 18px 24px; }
.y8-katlanir-ozet {
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text-strong);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.y8-katlanir-ozet::after {
  content: ""; width: 8px; height: 8px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); transition: transform .15s;
}
.y8-katlanir[open] > .y8-katlanir-ozet::after { transform: rotate(45deg); }
.y8-katlanir-icerik { margin-top: 16px; display: grid; gap: 12px; }

@media (max-width: 960px) {
  .y8-durum-izgara, .y8-barfeeder-izgara, .y8-sayac-mil-izgara, .y8-trend-grafikler {
    grid-template-columns: 1fr;
  }
}

/* 12. Y9 DURUS KAYITLARI */
.y9-durus-panel { display: grid; gap: 14px; }
.y9-durus-ust {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.y9-durus-not { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.y9-saat-dugme.aktif {
  background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; font-weight: 600;
}
.y9-durus-araclar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
}
.y9-durus-ozet { margin: 0; font-size: 13px; color: var(--text-strong); font-weight: 500; }
.y9-kisa-grup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.y9-kisa-filtre {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer;
}
.y9-kisa-filtre input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.y9-kisa-bilgi { font-size: 12px; color: var(--muted); }
.y9-pencere-oncesi { margin-top: 3px; font-size: 11px; color: var(--muted); }
.y9-sure-suruyor { font-weight: 600; color: var(--accent); }
.y9-gecis-ana { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.y9-durum-rozet { padding: 3px 8px; font-size: 11px; }
.y9-ara-gecisler { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.y9-ara-gecis { display: inline-flex; }
.y9-alarm-oge[data-durum="ALARM"] {
  font-size: 12px; line-height: 1.4; padding: 3px 7px; border-radius: 5px; margin: 2px 0;
  border: 1px solid var(--d); color: var(--d);
  background: color-mix(in srgb, var(--d) 12%, transparent);
}

/* 13. Y10 MAKINE GORSELI */
.y10-baslik-duzen {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.y10-baslik-bilgi {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.tezgah-gorsel {
  flex: 0 1 420px;
  max-width: 420px;
  width: 100%;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 2px solid var(--d, var(--line));
}
.tezgah-gorsel[data-durum] {
  border-color: var(--d);
}
.tezgah-gorsel[data-durum="ALARM"] {
  background: color-mix(in srgb, var(--d) 8%, var(--panel-solid));
}
.tezgah-gorsel[data-bayat="1"] {
  border-style: dashed;
}
.tezgah-gorsel-kap {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}
.tezgah-gorsel-kap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}
.tezgah-gorsel[data-durum="OFFLINE"] .tezgah-gorsel-kap img {
  opacity: 0.55;
}
.tezgah-gorsel[data-durum="HIC_BAGLANMADI"] .tezgah-gorsel-kap img,
.tezgah-gorsel[data-durum="UNKNOWN"] .tezgah-gorsel-kap img {
  opacity: 0.5;
}
.tezgah-gorsel[data-durum="HIC_BAGLANMADI"] .tezgah-gorsel-kap::after,
.tezgah-gorsel[data-durum="UNKNOWN"] .tezgah-gorsel-kap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--durum-hic) 14%, transparent) 0 6px,
    transparent 6px 12px
  );
}
.tezgah-gorsel-alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.tezgah-gorsel-altyazi {
  flex: 1 1 160px;
}
.tezgah-gorsel-rozet {
  padding: 3px 8px;
  font-size: 11px;
}
@media (max-width: 960px) {
  .y10-baslik-duzen {
    flex-direction: column;
  }
  .y10-baslik-bilgi {
    width: 100%;
  }
  .tezgah-gorsel {
    flex: none;
    max-width: 420px;
  }
}

/* 14. Y11 YERLESIM LISTESI */
.yerlesim-durumlar { display: grid; gap: 10px; }
.yerlesim-durumlar-baslik { font-size: 16px; margin: 0; }
.yerlesim-durum-tablo {
  width: 100%; border-collapse: collapse; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-solid);
}
.yerlesim-durum-tablo th,
.yerlesim-durum-tablo td {
  text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.yerlesim-durum-tablo th {
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.yerlesim-durum-tablo tbody tr:last-child td { border-bottom: 0; }
.yerlesim-durum-tablo tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.yerlesim-durum-bag { font-weight: 700; color: var(--accent); }
.yerlesim-durum-bag:hover { text-decoration: underline; }
.yerlesim-durum-zaman { font-variant-numeric: tabular-nums; color: var(--text); }

@media (max-width: 720px) {
  .yerlesim-durum-tablo { border: 0; background: transparent; }
  .yerlesim-durum-tablo thead { display: none; }
  .yerlesim-durum-tablo,
  .yerlesim-durum-tablo tbody { display: grid; gap: 8px; width: 100%; }
  .yerlesim-durum-tablo tbody tr {
    display: grid; gap: 8px; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel-solid);
  }
  .yerlesim-durum-tablo tbody tr:hover { background: var(--panel-solid); }
  .yerlesim-durum-tablo td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0; border-bottom: 0;
  }
  .yerlesim-durum-tablo td::before {
    content: attr(data-etiket);
    font-size: 12px; color: var(--muted); font-weight: 600;
  }
}
