/* Zabit Paneli — modern uygulama arayüzü.
   Gündüz: temiz nötr zemin, beyaz kartlar, deniz mavisi + düzeltme macentası.
   Gece: vardiya modu — gece görüşünü koruyan kırmızı/siyah (işlevsel, korunur). */

:root {
  --bg: #f3f4f7;
  --card: #ffffff;
  --ink: #18222d;
  --muted: #66707d;
  --border: #e4e7ec;
  --rule: #eceef2;
  --magenta: #c2186b;
  --magenta-soft: #fbe7f1;
  --sea: #1f5d80;
  --sea-strong: #174a67;
  --sea-soft: #e8f1f6;
  --ok: #157f5f;
  --ok-soft: #e2f3ec;
  --warn: #a05e00;
  --warn-soft: #faeeda;
  --danger: #bb271a;
  --danger-soft: #fbe9e6;
  --nav-bg: #14324a;
  --nav-ink: #b9cad8;
  --nav-active: #1e4a6b;
  --focus: #1f5d80;
  --shadow: 0 8px 24px rgba(23, 34, 45, 0.10);
  --shadow-sm: none;
  --radius: 4px;
  --radius-sm: 3px;
  /* veri/sayı yazı tipi — çevrimdışı çalışsın diye sistem yığını, web font YOK */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  /* koyu zemin (durum şeridi) üzerinde okunur tonlar */
  --on-dark: #ffffff;
  --on-dark-dim: #a8bccd;
  --on-dark-alert: #f579ad;
  --on-dark-danger: #ff9084;
  --on-dark-ok: #7fd0ae;
  /* rota krokisi — admiralty harita renkleri */
  --map-sea: #cfe4ef;
  --map-land: #f4eccd;
  --map-coast: #9b8f66;
}

html[data-theme="night"] {
  --bg: #0c0807;
  --card: #171009;
  --ink: #e3b7a0;
  --muted: #9a6f5c;
  --border: #31201a;
  --rule: #241812;
  --magenta: #ff5a72;
  --magenta-soft: #331119;
  --sea: #d08a63;
  --sea-strong: #e5a37d;
  --sea-soft: #241611;
  --ok: #b98a4a;
  --ok-soft: #241a0e;
  --warn: #d98e3d;
  --warn-soft: #271808;
  --danger: #ff5348;
  --danger-soft: #33100d;
  --nav-bg: #120b08;
  --nav-ink: #c69a83;
  --nav-active: #2a1a12;
  --focus: #ff5348;
  --shadow: none;
  --shadow-sm: none;
  /* koyu zemin üzeri — gece görüşü için yalnız kehribar/kırmızı aile */
  --on-dark: #e3b7a0;
  --on-dark-dim: #a97e68;
  --on-dark-alert: #ff8fa0;
  --on-dark-danger: #ff7a6e;
  --on-dark-ok: #cf9a55;
  /* rota krokisi — gece görüşünü koruyan kısık tonlar */
  --map-sea: #101b22;
  --map-land: #33291b;
  --map-coast: #8a6f50;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.55;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* ---------- yerleşim: masaüstünde yan menü ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  display: none;
  width: 232px; flex-shrink: 0;
  background: var(--nav-bg);
  flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 1.1rem 0.75rem 1rem;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em;
  padding: 0.25rem 0.6rem 1rem;
}
html[data-theme="night"] .sidebar .brand { color: var(--ink); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--nav-ink); text-decoration: none;
  padding: 0.48rem 0.7rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.005em;
  transition: background 120ms ease, color 120ms ease;
}
.sidebar nav a .icon { font-size: 1.02rem; width: 1.3rem; text-align: center; font-style: normal; }
/* SVG çizgi ikonlar — emoji yerine */
svg.icon {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.85;
}
.sidebar nav a.on svg.icon, .bottomnav a.on svg.icon { opacity: 1; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar nav a.on { background: var(--nav-active); color: #fff; }
.sidebar nav a.on::before {
  content: ""; width: 3px; height: 1.1rem; border-radius: 2px;
  background: var(--magenta); margin-left: -0.7rem; margin-right: calc(0.7rem - 3px);
}
html[data-theme="night"] .sidebar nav a.on { color: var(--danger); }
.sidebar .side-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09); }
html[data-theme="night"] .sidebar .side-foot { border-top-color: var(--rule); }

/* kullanıcı kimlik bloğu — yan menü altı */
.user-chip {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.45rem 0.7rem 0.65rem; margin-bottom: 0.15rem;
}
.user-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  color: #fff; font-size: 0.85rem; font-weight: 700;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-name {
  color: #fff; font-size: 0.86rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-ship {
  color: var(--nav-ink); font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-theme="night"] .user-avatar { background: var(--sea-soft); border-color: var(--rule); color: var(--ink); }
html[data-theme="night"] .user-name { color: var(--ink); }
.sidebar .side-foot a { color: var(--nav-ink); text-decoration: none; font-size: 0.88rem;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.65rem; }
.bottomnav svg.icon { width: 20px; height: 20px; }
.sidebar .side-foot a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.content { flex: 1; min-width: 0; }

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .sidebar { display: flex; }
  .topnav { display: none; }
  .bottomnav { display: none; }
}

/* ---------- üst çubuk (mobil/tablet) ---------- */
.topnav {
  background: var(--nav-bg);
  color: var(--nav-ink);
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.55rem 1rem;
  padding-top: max(0.55rem, env(safe-area-inset-top, 0px));
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 1px 0 rgba(0,0,0,0.18);
}
.topnav .brand {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.02rem;
  display: flex; align-items: center; gap: 0.55rem;
}
html[data-theme="night"] .topnav .brand { color: var(--ink); }
.brand-logo { width: 26px; height: 26px; display: block; }
.login-logo { width: 84px; height: 84px; display: block; margin: 0 auto 0.6rem; }
.navlinks { display: none; }

.theme-toggle {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--nav-ink); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.8rem; padding: 0.32rem 0.8rem; line-height: 1.4;
  white-space: nowrap; transition: border-color 120ms ease;
}
html[data-theme="night"] .theme-toggle { border-color: var(--rule); color: var(--ink); background: transparent; }
.theme-toggle:hover { border-color: var(--magenta); color: #fff; }
.sidebar .theme-toggle { align-self: stretch; text-align: left; padding: 0.45rem 0.7rem; border-radius: var(--radius-sm); border: 0; background: transparent; font-size: 0.88rem; }
.sidebar .theme-toggle:hover { background: rgba(255,255,255,0.06); }

/* ---------- mobil alt navigasyon ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--nav-bg);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav a, .bottomnav summary {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--nav-ink); text-decoration: none;
  font-size: 0.62rem; letter-spacing: 0.02em;
  padding: 0.5rem 0.2rem 0.55rem;
  min-height: 52px; justify-content: center;
  cursor: pointer; list-style: none; position: relative;
}
.bottomnav summary::-webkit-details-marker { display: none; }
.bottomnav .icon { font-size: 1.25rem; line-height: 1; font-style: normal; }
.bottomnav a.on { color: #fff; }
.bottomnav a.on::after {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; background: var(--magenta); border-radius: 0 0 3px 3px;
}
html[data-theme="night"] .bottomnav a.on { color: var(--danger); }
.nav-count {
  position: absolute; top: 4px; left: calc(50% + 6px);
  background: var(--magenta); color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-sm); padding: 3px 5px; min-width: 17px; text-align: center;
}
html[data-theme="night"] .nav-count { background: var(--danger); color: #1a0503; }

.more { position: relative; }
.more[open] summary { color: #fff; }
.more-menu {
  position: absolute; bottom: calc(100% + 8px); right: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 200px; padding: 0.35rem 0;
  /* Menü ekrandan uzun olunca kendi içinde kaysın (telefonda sayfa kayıyordu,
     menü kaymıyordu — 28.08.2026). Üst çubuk + alt sekme payı düşülür. */
  max-height: calc(100vh - 64px - 80px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 64px - 80px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.more-menu a {
  display: flex; flex-direction: row; justify-content: flex-start; gap: 0.6rem;
  color: var(--ink); font-size: 0.94rem; padding: 0.62rem 1rem; min-height: 0;
}
.more-menu a.on { color: var(--magenta); font-weight: 600; }
.more-menu a:active { background: var(--sea-soft); }
.more-menu .sep { border-top: 1px solid var(--border); margin: 0.3rem 0; }

/* ---------- içerik ---------- */
.container { max-width: 1040px; margin: 0 auto; padding: 1.15rem 1rem 2rem; }
.container.container-wide { max-width: 1680px; }
.footer {
  text-align: center; color: var(--muted); font-size: 0.72rem;
  padding: 1rem 1.2rem 1.4rem; max-width: 640px; margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.card h2 {
  margin: 0 0 0.85rem;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--rule);
  text-wrap: balance;
}
.card h2 a { color: inherit; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }

/* ---------- pano istatistikleri ---------- */
.stat { text-align: center; padding: 1.05rem 0.4rem 0.95rem; margin-bottom: 0; }
.stat .num {
  font-size: 1.9rem; font-weight: 700; display: block; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--sea);
}
.stat .lbl {
  color: var(--muted); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 600;
}
.stat.warn .num { color: var(--warn); }
.stat.danger .num { color: var(--danger); }
.stat.ok .num { color: var(--ok); }

/* ---------- tablolar ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  color: var(--muted); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
tr:last-child td { border-bottom: 0; }
tbody tr, table tr { transition: background 100ms ease; }
tr:hover td { background: var(--sea-soft); }
/* tablo taşması: kenara taşma (bleed) YALNIZ kartın doğrudan çocuğunda —
   katlanır bölüm/ekleme formu içinde negatif margin sayfayı taşırıyordu */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.card > .table-wrap { margin: 0 -1.25rem; padding: 0 1.25rem; }
td strong, .nm-ref { font-variant-numeric: tabular-nums; }

.table-compact { width: auto; min-width: min(100%, 520px); }
.table-compact th, .table-compact td { white-space: nowrap; padding-right: 1.6rem; }
.table-compact td.wrap, .table-compact th.wrap { white-space: normal; overflow-wrap: break-word; }

/* ---------- rozetler ---------- */
/* damga/etiket görünümü: köşeli, çerçeveli, büyük harf */
.badge {
  display: inline-block; padding: 0.14rem 0.5rem; border-radius: 2px;
  font-size: 0.67rem; font-weight: 700; white-space: nowrap;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid currentColor;
}
.badge-pending { background: var(--magenta-soft); color: var(--magenta); }
.badge-applied { background: var(--ok-soft); color: var(--ok); }
.badge-gap { background: var(--danger-soft); color: var(--danger); }
.badge-tp { background: var(--sea-soft); color: var(--sea); }
.badge-muted { background: var(--bg); color: var(--muted); }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sea); color: #fff; border: 1px solid transparent;
  padding: 0.5rem 1.05rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; min-height: 40px; gap: 0.35rem;
  transition: background 120ms ease;
}
html[data-theme="night"] .btn { background: var(--sea-soft); color: var(--sea); border: 1px solid var(--rule); }
.btn:hover { background: var(--sea-strong); }
html[data-theme="night"] .btn:hover { background: var(--sea-soft); filter: brightness(1.2); }
.btn-sm { padding: 0.32rem 0.8rem; font-size: 0.83rem; min-height: 34px; }
.btn-ok { background: var(--ok); }
.btn-ok:hover { background: var(--ok); filter: brightness(0.92); }
html[data-theme="night"] .btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-danger { background: var(--danger); }
html[data-theme="night"] .btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ghost { background: transparent; color: var(--sea); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: var(--sea-soft); }
html[data-theme="night"] .btn-ghost { color: var(--ink); }
html[data-theme="night"] .btn-ghost:hover { background: var(--sea-soft); }

form.inline { display: inline-block; margin: 0.2rem 0.2rem 0 0; }

/* ---------- form elemanları ---------- */
html[data-theme="night"] { color-scheme: dark; }

/* type'sız <input> (101 tane) da metin kutusudur — seçiciye eklendi (28.08.2026) */
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=email], input[type=search],
input[type=datetime-local], input[type=date], input[type=time], input[type=month],
textarea, select {
  width: 100%; padding: 0.6rem 0.75rem; font-size: 0.95rem; font-family: inherit;
  color: var(--ink); background: color-mix(in srgb, var(--card) 92%, var(--border));
  border: 1px solid var(--border); border-bottom: 2px solid color-mix(in srgb, var(--border) 60%, var(--muted));
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
input[type=number], input[type=datetime-local], input[type=date], input[type=time] {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) {
  border-color: color-mix(in srgb, var(--sea) 45%, var(--border));
  border-bottom-color: var(--sea);
}
input:focus, textarea:focus, select:focus {
  outline: none; background: var(--card);
  border-color: var(--sea); border-bottom-color: var(--sea);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sea) 16%, transparent);
}
input:focus-visible, textarea:focus-visible, select:focus-visible,
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-style: italic; }
/* select: sistem oku yerine ince çift ok, sağda */
select {
  appearance: none; -webkit-appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14'><path d='M2 5.5 6 1.5l4 4M2 8.5l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 0.6rem center;
}
select[multiple] { background-image: none; padding-right: 0.75rem; }
textarea { min-height: 140px; font-family: var(--mono); font-size: 0.88rem; line-height: 1.45; resize: vertical; }
html[data-theme="night"] input:not([type]), html[data-theme="night"] input[type=text], html[data-theme="night"] input[type=password],
html[data-theme="night"] input[type=number], html[data-theme="night"] input[type=datetime-local],
html[data-theme="night"] input[type=date], html[data-theme="night"] input[type=time],
html[data-theme="night"] textarea, html[data-theme="night"] select {
  background: color-mix(in srgb, var(--card) 85%, black); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
label { display: block; margin: 0.7rem 0 0.3rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
label.inline, .bottomnav label, .route-layers label, label:has(> input[type=checkbox]), label:has(> input[type=radio]) { text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }
input[type=checkbox], input[type=radio] { width: 1rem; height: 1rem; accent-color: var(--sea); }

/* ---------- flash ---------- */
.flash { padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
  font-size: 0.93rem; border: 1px solid currentColor; }
.flash-info { background: var(--sea-soft); color: var(--sea); }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- giriş ---------- */
.login-box { max-width: 380px; margin: 10vh auto 0; padding: 1.6rem; }
.login-box h1 {
  text-align: center; color: var(--ink); font-size: 1.35rem; font-weight: 700;
  letter-spacing: -0.01em; margin-top: 0;
}

/* ---------- düzeltme metni: macenta kalem ---------- */
.corr-text {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem; background: var(--bg);
  border: 1px solid var(--border); border-left: 3px solid var(--magenta);
  border-radius: 0; padding: 0.75rem 0.9rem; margin: 0.45rem 0;
  overflow-x: auto;
}

details summary { cursor: pointer; color: var(--sea); font-weight: 600; }
details summary:hover { color: var(--sea-strong); }
a { color: var(--sea); }
a:hover { color: var(--sea-strong); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* masaüstü: mobil çubuklar gizli (temel kurallardan SONRA gelmeli) */
@media (min-width: 1024px) {
  .topnav, .bottomnav { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- yazdırma: köprüüstü föyü ---------- */
@media print {
  .sidebar, .topnav, .bottomnav, .footer, .btn, .theme-toggle, .no-print { display: none !important; }
  body { background: #fff !important; color: #000; font-size: 12px; padding-bottom: 0; }
  .card { border: none; box-shadow: none; padding: 0; background: #fff; }
  .corr-text { border: 1px solid #999; border-left: 3px solid #999; background: #fff; }
  .content, .layout { display: block; }
}

/* ==========================================================================
   PANO — durum şeridi ve yerleşim
   Fikir: sayfanın açılışı bir vardiya defteri başlığı gibi okunsun; hangi NM
   haftasındayız ve ne bekliyor, tek bakışta. Sayılar tabular mono (defter
   vernaküleri + çevrimdışı çalışır, web font yok).
   ========================================================================== */

.deckhead {
  background: var(--nav-bg);
  border: 1px solid var(--nav-bg);
  border-radius: var(--radius);
  padding: 0.95rem 1.15rem 0.85rem;
  margin-bottom: 1rem;
  color: var(--on-dark);
}
html[data-theme="night"] .deckhead { border-color: var(--border); }
.deckhead-eyebrow {
  font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--on-dark-dim);
}
.deckhead-top {
  display: flex; align-items: baseline; gap: 0.7rem;
  flex-wrap: wrap; margin-top: 0.2rem;
}
.deckhead-week {
  font-family: var(--mono);
  font-size: 1.5rem; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark);
}
.deckhead-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem; color: var(--on-dark-dim);
}
.deckhead-note a { color: var(--on-dark); }

/* koyu zemin üzeri damga rozet */
.badge-ondark {
  display: inline-block;
  border: 1px solid currentColor; border-radius: var(--radius-sm);
  padding: 0.1rem 0.45rem;
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--on-dark-dim);
}
.badge-ondark.is-ok { color: var(--on-dark-ok); }
.badge-ondark.is-err { color: var(--on-dark-danger); }

/* ölçüm şeridi: defter sütunları gibi ince çizgilerle bölünmüş */
.deckhead-metrics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
html[data-theme="night"] .deckhead-metrics { border-top-color: var(--border); }
.metric {
  display: block; text-decoration: none; color: inherit;
  padding: 0.6rem 0.75rem 0.5rem 0;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  min-width: 0;
}
html[data-theme="night"] .metric { border-color: var(--border); }
.metric:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 0.75rem; }
.metric:nth-last-child(-n + 2) { border-bottom: 0; padding-bottom: 0; }
.metric-val {
  display: block;
  font-family: var(--mono);
  font-size: 1.3rem; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark);
}
.metric-lbl {
  display: block; margin-top: 0.1rem;
  font-size: 0.62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--on-dark-dim);
  overflow-wrap: break-word;
}
.metric.is-alert .metric-val { color: var(--on-dark-alert); }
.metric.is-danger .metric-val { color: var(--on-dark-danger); }
.metric.is-quiet .metric-val { color: var(--on-dark-dim); font-size: 1.1rem; }
a.metric:hover .metric-val { text-decoration: underline; }
a.metric:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }

/* pano gövdesi: iş listesi geniş, izleme dar.
   minmax(0,1fr) + min-width:0 şart — grid çocuğu varsayılan olarak içeriğinin
   min-content genişliğinden dar olamaz, geniş tablo sütunu şişiriyordu. */
.pano-cols { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.pano-cols > .card { margin-bottom: 0; min-width: 0; }

/* sistem durumu: dar sütunda tablo taşıyordu — tek satırlık liste */
.dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  flex-shrink: 0; vertical-align: baseline;
}
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-err { background: var(--danger); }
.health-list { list-style: none; margin: 0; padding: 0; }
.health-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--rule);
}
.health-item:last-child { border-bottom: 0; }
.health-name { flex: 1; min-width: 0; font-size: 0.85rem; overflow-wrap: break-word; }
.health-age {
  font-family: var(--mono); font-size: 0.74rem;
  color: var(--muted); white-space: nowrap;
}
.health-note { flex-basis: 100%; margin-left: 1rem; font-size: 0.72rem; color: var(--muted); }

/* katlanır tanı bölümü — göz hizasında yer kaplamasın */
.fold { border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); margin-bottom: 1rem; }
.fold > summary {
  cursor: pointer; list-style: none;
  padding: 0.7rem 1.15rem;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: " +"; font-family: var(--mono); }
.fold[open] > summary::after { content: " −"; }
.fold > summary:hover { color: var(--ink); }
.fold-body { padding: 0 1.15rem 1rem; }

/* masaüstü: iki sütun + daha geniş şerit (temel kurallardan SONRA) */
@media (min-width: 700px) {
  .deckhead-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric { border-bottom: 0; padding-bottom: 0; padding-left: 0.75rem; }
  .metric:first-child { padding-left: 0; }
  .metric:nth-child(2n) { border-right: 1px solid rgba(255, 255, 255, 0.10); }
  .metric:last-child { border-right: 0; }
  html[data-theme="night"] .metric:nth-child(2n) { border-right-color: var(--border); }
}
@media (min-width: 1024px) {
  .deckhead { padding: 1.1rem 1.35rem 1rem; }
  .deckhead-week { font-size: 1.75rem; }
  .pano-cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
}
@media print {
  .deckhead { background: #fff; color: #000; border: 1px solid #999; }
  .deckhead-week, .metric-val { color: #000; }
  .deckhead-eyebrow, .metric-lbl, .deckhead-note { color: #444; }
  .fold { border: none; }
  .fold-body { display: block; padding: 0; }
}

/* ==========================================================================
   ORTAK SAYFA BİLEŞENLERİ
   Pano koyu "durum şeridi"ni tek başına taşır (cesaret tek yerde harcanır);
   diğer sayfalar aynı tipografi ailesinden sakin bir başlık kullanır.
   ========================================================================== */

/* ---------- sayfa başlığı ---------- */
.pagehead {
  display: flex; gap: 0.9rem 1.2rem; flex-wrap: wrap; align-items: flex-start;
  margin: 0 0 1.1rem; padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--rule);
}
.pagehead-main { flex: 1 1 16rem; min-width: 0; }
.pagehead-title {
  margin: 0; font-size: 1.16rem; font-weight: 700;
  letter-spacing: -0.005em; text-wrap: balance;
}
.pagehead-title .qual { color: var(--muted); font-weight: 600; font-size: 0.86rem; }
.pagehead-sub {
  margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--muted);
  max-width: 76ch; overflow-wrap: break-word;
}
.pagehead-stats { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.pagehead-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }

/* başlık yanı sayaç damgası */
.phstat {
  display: inline-flex; align-items: baseline; gap: 0.38rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); padding: 0.22rem 0.55rem;
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); white-space: nowrap;
  text-decoration: none;
}
.phstat b {
  font-family: var(--mono); font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
a.phstat:hover { border-color: var(--sea); }
.phstat.is-alert { border-color: var(--magenta); color: var(--magenta); }
.phstat.is-alert b { color: var(--magenta); }
.phstat.is-danger { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.phstat.is-danger b { color: var(--danger); }
.phstat.is-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.phstat.is-warn b { color: var(--warn); }
.phstat.is-ok { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.phstat.is-ok b { color: var(--ok); }

/* ---------- form alanları (inline style yerine) ---------- */
.fieldrow { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.field { flex: 1 1 12rem; min-width: 0; }
.field.is-wide { flex: 2 1 16rem; }
.field.is-narrow { flex: 0 1 10rem; }
.field.is-tiny { flex: 0 1 6rem; }
/* tarayıcı input[type=date] için asgari genişlik dayatır — daraltma */
.field > input[type="date"] { min-width: 9.5rem; }
.field > label {
  display: block; margin-bottom: 2px;
  font-size: 0.71rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.field > input, .field > select, .field > textarea { width: 100%; }

/* ---------- "+ yeni ekle" açılır kutusu ---------- */
.addbox { margin: 0.2rem 0 0.9rem; }
.addbox > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0; font-size: 0.82rem; font-weight: 700; color: var(--sea);
}
.addbox > summary::-webkit-details-marker { display: none; }
.addbox > summary::before {
  content: "+"; font-family: var(--mono); font-size: 1.05rem;
  line-height: 1; width: 1rem; text-align: center;
}
.addbox[open] > summary::before { content: "−"; }
.addbox > summary:hover { color: var(--sea-strong); }
html[data-theme="night"] .addbox > summary { color: var(--ink); }

/* ---------- satır içi düzenle açılırı ---------- */
.rowedit > summary {
  cursor: pointer; list-style: none; white-space: nowrap;
  font-size: 0.74rem; color: var(--muted);
}
.rowedit > summary::-webkit-details-marker { display: none; }
.rowedit > summary::before { content: "▸ "; }
.rowedit[open] > summary::before { content: "▾ "; }
.rowedit > summary:hover { color: var(--ink); }

/* ---------- boş durum ---------- */
.empty {
  padding: 1.4rem 1rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty p { margin: 0 0 0.6rem; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- veri/sayı hizası ---------- */
.mono, td.mono, .num-cell { font-family: var(--mono); font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .pagehead-stats, .pagehead-actions { justify-content: flex-end; }
}
@media print {
  .pagehead { border-bottom: 1px solid #999; }
  .addbox, .rowedit { display: none !important; }
}

/* kart başlığı içinde yatay dizilim (harita no + rozetler) */
h2.h2-flex { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
h2.h2-flex .qual { font-weight: 600; font-size: 0.8rem; color: var(--muted); }
h2.h2-flex .mono { font-weight: 700; }

/* ---------- etiket çipi (kategori/grup) — duties + certs ortak ---------- */
.chip {
  display: inline-block; white-space: nowrap;
  padding: 1px 8px; border-radius: 99px;
  background: var(--sea-soft); color: var(--sea);
  font-size: 0.7rem; font-weight: 600;
}

/* ---------- liste satırı: iş / sertifika gibi eylemli kayıtlar ---------- */
.rowlist { margin: 0; }
.listrow {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap;
}
.listrow:last-child { border-bottom: none; }
.listrow-main { flex: 1 1 15rem; min-width: 0; }
.listrow-title { font-weight: 600; overflow-wrap: break-word; }
.listrow-meta { font-size: 0.76rem; color: var(--muted); overflow-wrap: break-word; }
.listrow-meta .late { color: var(--danger); font-weight: 700; }
.listrow-act { display: flex; gap: 0.3rem; align-items: center; }
.listrow-act input { width: 8rem; font-size: 0.8rem; padding: 4px 6px; }

/* gecikmiş grubunu öne çıkar */
.card.is-urgent { border-left: 4px solid var(--danger); }
.card.is-urgent > h2 { color: var(--danger); border-bottom-color: var(--danger); }

/* ---------- kalan gün göstergesi (sertifikalar) ---------- */
.daysleft {
  font-family: var(--mono); font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.daysleft.is-expired, .daysleft.is-soon { color: var(--danger); }
.daysleft.is-near { color: var(--warn); }
.daysleft.is-ok { color: var(--sea); }

/* ---------- geri dönüş bağlantısı (detay sayfaları) ---------- */
.backlink {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin: 0 0 0.7rem; font-size: 0.8rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.backlink::before { content: "←"; font-family: var(--mono); }
.backlink:hover { color: var(--sea); }

/* ---------- iki sütuna bölünen bölüm (mobilde tek sütun) ---------- */
.split2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.split2 > * { min-width: 0; }
@media (min-width: 700px) {
  .split2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* uzun metinli sütuna asgari genişlik (ad/başlık sütunları kırılmasın) */
.col-wide { min-width: 15rem; }

/* ==========================================================================
   REVİR / İLAÇ LİSTESİ — açılır satırlar
   Satırın kendisi bir <summary>; tıklayınca aşağı doğru bilgi paneli açılır.
   ========================================================================== */
.medlist { border-top: 1px solid var(--rule); }
.med { border-bottom: 1px solid var(--rule); }
.med > summary {
  cursor: pointer; list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: baseline;
  padding: 0.55rem 0.5rem 0.55rem 0.2rem;
}
.med > summary::-webkit-details-marker { display: none; }
.med > summary:hover { background: var(--sea-soft); }
.med[open] > summary { background: var(--sea-soft); }
.med-name { font-weight: 600; flex: 1 1 12rem; min-width: 0; overflow-wrap: break-word; }
.med-right {
  display: flex; gap: 0.75rem; align-items: baseline;
  margin-left: auto; white-space: nowrap;
}
.med-qty { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.med-exp { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
/* açılma göstergesi — emoji değil, mono işaret (kural 8) */
.med-toggle {
  font-family: var(--mono); font-size: 1rem; line-height: 1;
  color: var(--sea); width: 1rem; text-align: center; flex-shrink: 0;
}
.med-toggle::before { content: "+"; }
.med[open] .med-toggle::before { content: "−"; }
html[data-theme="night"] .med-toggle { color: var(--ink); }

.med-body { padding: 0.4rem 0.2rem 1.1rem 2.1rem; }
.med-sub {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted);
  margin: 0.9rem 0 0.4rem; padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
}
.med-sub:first-child { margin-top: 0; }

/* son kullanma tarihi satırı (kutu miktarı tutulmuyor — sadece tarih) */
.expline {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  padding: 0.4rem 0; border-bottom: 1px solid var(--rule);
}
.expline:last-of-type { border-bottom: 0; }
.batch-exp { font-family: var(--mono); font-size: 0.85rem; min-width: 6.5rem; }
.batch-note {
  flex-basis: 100%; font-size: 0.73rem; color: var(--warn);
  overflow-wrap: break-word;
}
/* birden çok tarihi olan ilaçta "+2" göstergesi */
.med-more {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 0.25rem;
}
.med-qty.is-zero { color: var(--muted); }

/* "kontrol et" ve "bilgi yok" işaretleri */
.flag-check {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--warn);
  border: 1px solid var(--warn); border-radius: var(--radius-sm);
  padding: 0 0.35rem; white-space: nowrap;
}
.flag-noinfo {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 0 0.35rem; white-space: nowrap;
}

/* prospektüsten girilen serbest metin */
.leaflet {
  white-space: pre-wrap; overflow-wrap: break-word;
  font-size: 0.86rem; margin: 0 0 0.7rem;
}
.leaflet-src { font-size: 0.72rem; color: var(--muted); }

@media (max-width: 560px) {
  .med-right { margin-left: 0; flex-basis: 100%; }
  .med-body { padding-left: 0.4rem; }
}

/* satır içi prospektüs kısayolu */
.flag-pdf {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; text-decoration: none;
  color: var(--sea); border: 1px solid var(--sea);
  border-radius: var(--radius-sm); padding: 0 0.35rem; white-space: nowrap;
}
.flag-pdf:hover { background: var(--sea); color: #fff; }
html[data-theme="night"] .flag-pdf { color: var(--ink); border-color: var(--border); }
html[data-theme="night"] .flag-pdf:hover { background: var(--sea-soft); color: var(--ink); }

/* ---------- revir araması (tarayıcı tarafında, çevrimdışı çalışır) ---------- */
.medsearch { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.ms-lbl {
  display: block; margin-bottom: 2px;
  font-size: 0.71rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.medsearch input { width: 100%; font-size: 1rem; }

/* sık aranan kısayollar */
.quickchips { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin-top: 0.5rem; }
.qc-lbl {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-right: 0.2rem;
}
.qc {
  cursor: pointer; font: inherit; font-size: 0.78rem;
  padding: 0.15rem 0.6rem; border-radius: 99px;
  border: 1px solid var(--border); background: var(--card); color: var(--sea);
}
.qc:hover { border-color: var(--sea); background: var(--sea-soft); }
html[data-theme="night"] .qc { color: var(--ink); }

/* etkin madde ızgarası */
.elgrid { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.elchip {
  cursor: pointer; font: inherit; display: inline-flex; align-items: baseline; gap: 0.4rem;
  padding: 0.2rem 0.55rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  font-size: 0.8rem; text-align: left;
}
.elchip:hover { border-color: var(--sea); background: var(--sea-soft); }
.el-name { overflow-wrap: break-word; font-size: 0.74rem; letter-spacing: 0.02em; }
.el-n {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; color: var(--muted);
}

/* satırdaki etkin madde rozeti */
.flag-el {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--muted); border-bottom: 1px dotted var(--border);
  overflow-wrap: break-word;
}

/* sertifika: sıradaki sörvey hücresi */
.srv-kind { font-weight: 600; font-size: 0.8rem; }
.srv-win { font-size: 0.68rem; color: var(--muted); }

/* gökyüzü paneli: kaydırıcı üzerinde gözlem anı işareti */
.sky-marktrack { position: relative; height: 10px; margin: 0 0 0.2rem; }
.sky-obsmark {
  position: absolute; top: 0; width: 2px; height: 9px;
  background: var(--magenta); transform: translateX(-1px);
}
.sky-obsmark::after {
  content: ""; position: absolute; left: -3px; top: 7px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 5px solid var(--magenta);
}

/* AIS — Gemi Nerede kartı (pano) */
.ais-card { margin-bottom: 1rem; }
.ais-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.ais-head h2 { margin: 0; flex: 1; }
.ais-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0.5rem 1rem; }
.ais-grid > div { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ais-k { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ais-v { font-size: 0.95rem; overflow-wrap: break-word; }
.ais-foot { margin: 0.6rem 0 0; }
.chip.is-ok { border-color: var(--ok); color: var(--ok); }
.chip.is-warn { border-color: var(--warn); color: var(--warn); }
@media (max-width: 640px) { .ais-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ais-map { height: 420px; min-height: 260px; background: var(--surface-2, #eef1f4); border: 1px solid var(--line, #cfd5dc); }
.ais-map .leaflet-container { font-family: inherit; }
/* Leaflet pane'leri z-index 400+ — üst çubuk (40) ve alt sekme (50) altına
   giriyordu; harita kendi yığın bağlamında kalsın */
.ais-map { position: relative; z-index: 0; isolation: isolate; }
.ais-ship, .ais-pin { background: transparent; border: 0; }
.leaflet-popup-content { font-size: 0.85rem; }
@media (max-width: 640px) { .ais-map { height: 300px; } }

.route-map { height: 480px; }
.route-layers { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 0.5rem; }
.route-layers label { display: inline-flex; align-items: center; gap: 0.3rem; }
@media (max-width: 640px) { .route-map { height: 340px; } }

/* Harita lejantı — renk örnekleri (metin açıklaması yerine) */
.maplegend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0.55rem 0 0; font-size: 0.78rem; color: var(--muted); }
.maplegend .lg { display: inline-flex; align-items: center; gap: 0.4rem; }
.maplegend i { display: inline-block; width: 22px; height: 14px; box-sizing: border-box; }
.maplegend .lg-box { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.maplegend .lg-boxdash { border: 2px dashed var(--c); }
.maplegend .lg-line { height: 0; border-top: 3px solid var(--c); }
.maplegend .lg-linedash { height: 0; border-top: 2px dashed var(--c); }
.maplegend .lg-dot { width: 12px; height: 12px; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px #333; }
.maplegend .lg-ship { width: 14px; height: 14px; background: var(--c); clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%); }
.pop-head { font-weight: 600; margin-bottom: 0.3rem; }
.pop-row { padding: 0.3rem 0; border-top: 1px solid #e3e6ea; font-size: 0.82rem; line-height: 1.3; }
.pop-row .muted { color: #6b7280; font-size: 0.75rem; }
.leaflet-popup-content { max-height: 260px; overflow-y: auto; }
.pano-map { height: 240px; margin: 0 0 0.7rem; cursor: pointer; }
@media (max-width: 640px) { .pano-map { height: 200px; } }
.voyage-card { margin-bottom: 1rem; border-left: 4px solid var(--sea, #1f5d80); }
.ais-v.is-alert { color: var(--magenta); font-weight: 600; }

.print-only { display: none; }
@media print { .print-only { display: block; } }
.bar { position: relative; height: 1.25rem; background: var(--surface-2, #eef1f4); min-width: 60px; }
.bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sea, #1f5d80); opacity: 0.35; }
.bar b { position: relative; padding-left: 0.4rem; line-height: 1.25rem; font-size: 0.85rem; }

/* Dosya seçici — tarayıcı varsayılanı yerine panel düğmesi (28.08.2026) */
input[type=file] {
  padding: 0.3rem; border: 1px dashed var(--border); background: var(--surface-2, #f4f6f8);
  color: var(--muted); font-size: 0.85rem; cursor: pointer; width: 100%; max-width: 100%;
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em;
  padding: 0.4rem 0.9rem; margin-right: 0.7rem; cursor: pointer;
  background: var(--sea, #1f5d80); color: #fff; border: 0; border-radius: var(--radius);
}
input[type=file]:hover { border-color: var(--sea, #1f5d80); }
input[type=file]:focus-visible { outline: 2px solid var(--sea, #1f5d80); outline-offset: 2px; }
html[data-theme="night"] input[type=file]::file-selector-button { background: #7a1e1e; }

/* Hava Durumu (28.08.2026) */
.wx-map { height: 68vh; min-height: 360px; }
@media (max-width: 640px) { .wx-map { height: 55vh; } }
.wx-tools { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin: 0 0 0.5rem; }
.wx-modes { display: inline-flex; border: 1px solid var(--line, #cfd5dc); }
.wx-mode { background: var(--surface-2, #eef1f4); color: var(--ink); border: 0; border-right: 1px solid var(--line, #cfd5dc); padding: 0.35rem 0.85rem; font: inherit; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.wx-mode:last-child { border-right: 0; }
.wx-mode.on { background: var(--navy, #0b2545); color: #fff; }
.wx-time { display: inline-flex; align-items: center; gap: 0.6rem; flex: 1 1 320px; }
.wx-time input[type=range] { flex: 1 1 auto; min-width: 120px; accent-color: var(--navy, #0b2545); box-shadow: none; background: transparent; border: 0; padding: 0; }
.wx-time .mono { white-space: nowrap; font-size: 0.85rem; }
.wx-play { width: 2rem; height: 2rem; border: 1px solid var(--line, #cfd5dc); background: var(--surface-2, #eef1f4); color: var(--ink); cursor: pointer; font-size: 0.8rem; }
.wx-scale { margin: 0.5rem 0 0; }
.wx-bar { height: 10px; border: 1px solid var(--line, #cfd5dc); }
.wx-ticks { position: relative; height: 1.1rem; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.wx-ticks span { position: absolute; transform: translateX(-50%); }
.wx-ticks .wx-unit { right: 0; left: auto; transform: none; }
.wx-arrow { background: transparent; border: 0; }
.wx-table th, .wx-table td { white-space: nowrap; }
.wx-table tr.is-warn td { background: color-mix(in srgb, #d9a400 14%, transparent); }
.wx-table tr.is-danger td { background: color-mix(in srgb, #c8102e 14%, transparent); }
.wx-spd { display: inline-flex; align-items: center; gap: 0.4rem; }
.wx-spd input { width: 5rem; }
html[data-theme="night"] .wx-mode.on { background: var(--accent, #b5179e); }
.wx-field { position: absolute; left: 0; top: 0; image-rendering: auto; pointer-events: none; }
.wx-map { background: #2b2f33; }
.wx-field { transform-origin: 0 0; }
.wx-map .leaflet-popup-content { color: #1a1a1a; }
.wx-row { display: flex; align-items: center; gap: 0.7rem; margin: 0.6rem 0 0; padding: 0.45rem 0.6rem; border: 1px solid var(--line, #cfd5dc); border-left-width: 4px; text-decoration: none; color: inherit; }
.wx-row.is-ok { border-left-color: #2b7a3d; } .wx-row.is-warn { border-left-color: #d9a400; } .wx-row.is-danger { border-left-color: #c8102e; }
.wx-row:hover { background: var(--surface-2, #eef1f4); }
.wx-tag { font-size: 0.7rem; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); }
.wx-body { display: flex; flex-direction: column; gap: 0.1rem; flex: 1 1 auto; min-width: 0; font-size: 0.88rem; }
.wx-row .chip { flex: 0 0 auto; }
.wx-mapwrap { position: relative; }
.wx-pinwrap { background: transparent; border: 0; }
.wx-pin-dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: #fff; border: 2px solid #1d2730; box-sizing: border-box; }
.wx-pin-line { position: absolute; left: -1px; top: -96px; width: 2px; height: 92px; background: rgba(255,255,255,0.85); }
.wx-pin { position: absolute; left: -8px; bottom: 96px; min-width: 150px; white-space: nowrap; background: rgba(20,28,36,0.94); color: #fff; border: 1px solid rgba(255,255,255,0.25); padding: 0.4rem 0.6rem; font-size: 0.8rem; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.wx-pin::after { content: ""; position: absolute; left: 3px; bottom: -6px; border: 6px solid transparent; border-top-color: rgba(20,28,36,0.94); border-bottom: 0; }
.wx-pin-t { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-family: var(--mono); color: #cfd8e3; font-size: 0.72rem; }
.wx-pin-x { background: none; border: 0; color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 0 0 0.4rem; }
.wx-pin-v { font-family: var(--mono); font-size: 1.7rem; font-weight: 700; line-height: 1.15; margin: 0.15rem 0 0; }
.wx-pin-v small { font-size: 0.85rem; font-weight: 500; color: #cfd8e3; }
.wx-pin-s { color: #e6ebf0; } .wx-pin-s.muted { color: #9fb0c0; }
.wx-days { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 0; margin: -0.2rem 0 0.5rem; font-family: var(--mono); font-size: 0.68rem; border-bottom: 1px solid var(--line, #cfd5dc); }
.wx-day { flex: 0 0 auto; padding: 0.15rem 0.45rem 0.15rem 0.3rem; border-left: 2px solid var(--line, #cfd5dc); color: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.wx-tick { flex: 0 0 auto; min-width: 1.6rem; padding: 0.15rem 0.2rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: inherit; cursor: pointer; }
.wx-tick.on { color: var(--ink); border-bottom-color: var(--navy, #0b2545); font-weight: 700; }
.wx-spark svg { display: block; margin: 0.2rem 0; }
.wx-meteo { margin: 0.6rem 0 0; background: #1d2730; color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 0.4rem 0.6rem 0.2rem; overflow-x: auto; }
.wx-meteo-t { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: #e6ebf0; margin-bottom: 0.2rem; }
.wx-meteo-svg { display: block; font-family: var(--mono); cursor: crosshair; }

/* ---------- Hava Durumu: tam ekran Windy düzeni (28.08.2026) ---------- */
.container.container-full { max-width: none; padding: 0; }
.wx-app { position: relative; height: calc(100dvh - 118px); min-height: 420px; overflow: hidden; background: #2b2f33; isolation: isolate; }
@media (min-width: 1024px) { .wx-app { height: 100dvh; } }
.wx-app .wx-map { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; z-index: 0; isolation: isolate; }
.wx-hud { position: absolute; top: 10px; left: 10px; z-index: 6; max-width: min(360px, calc(100% - 70px)); background: rgba(20,28,36,0.9); color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 0.45rem 0.6rem; font-size: 0.82rem; }
.wx-hud-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.wx-hud-row + .wx-hud-row { margin-top: 0.3rem; }
.wx-hud-row.small { color: #cfd8e3; font-size: 0.74rem; }
.wx-hud-warn { color: #ffd166; }
.wx-hud-title { font-weight: 700; letter-spacing: 0.08em; font-size: 0.72rem; }
.wx-hud-chip { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; padding: 0.1rem 0.4rem; border: 1px solid; }
.wx-hud-chip.is-ok { color: #8ee09a; border-color: #2b7a3d; } .wx-hud-chip.is-warn { color: #ffd166; border-color: #d9a400; } .wx-hud-chip.is-danger { color: #ff8a80; border-color: #c8102e; }
.wx-hbtn { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 0.28rem 0.6rem; font: inherit; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.wx-hbtn:hover { background: rgba(255,255,255,0.2); }
.wx-hud form { display: inline; }
.wx-app .wx-modes { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,0.25); background: rgba(20,28,36,0.9); }
.wx-app .wx-mode { background: transparent; color: #e6ebf0; border: 0; border-bottom: 1px solid rgba(255,255,255,0.15); text-align: right; padding: 0.45rem 0.7rem; font-size: 0.74rem; }
.wx-app .wx-mode:last-child { border-bottom: 0; }
.wx-app .wx-mode.on { background: #fff; color: #14324a; font-weight: 700; }
.wx-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(20,28,36,0.92); color: #fff; padding: 0.35rem 0.6rem calc(0.3rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255,255,255,0.15); }
.wx-bottom .wx-scale { margin: 0 0 0.25rem; }
.wx-bottom .wx-bar { border-color: rgba(255,255,255,0.25); height: 7px; }
.wx-bottom .wx-ticks { color: #cfd8e3; height: 0.95rem; }
.wx-bottom .wx-time { display: flex; align-items: center; gap: 0.5rem; }
.wx-bottom .wx-time .mono { color: #fff; }
.wx-bottom .wx-play { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }
.wx-bottom .wx-time input[type=range] { accent-color: #fff; }
.wx-bottom .wx-days { margin: 0.1rem 0 0; border-bottom: 0; }
.wx-bottom .wx-day { color: #fff; border-left-color: rgba(255,255,255,0.35); }
.wx-bottom .wx-tick { color: #9fb0c0; } .wx-bottom .wx-tick.on { color: #fff; border-bottom-color: #fff; }
.wx-app .wx-meteo { position: absolute; left: 10px; right: 10px; bottom: 112px; z-index: 7; margin: 0; max-height: 46%; overflow: auto; }
@media (max-width: 640px) { .wx-app .wx-meteo { bottom: 124px; } .wx-app .wx-modes { top: auto; bottom: 128px; flex-direction: row; right: 6px; left: 6px; overflow-x: auto; } .wx-app .wx-mode { text-align: center; border-bottom: 0; border-right: 1px solid rgba(255,255,255,0.15); flex: 1 0 auto; } .wx-hud { max-width: calc(100% - 20px); } }
.wx-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; width: min(640px, 100%); background: var(--surface, #fff); color: var(--ink); box-shadow: -4px 0 18px rgba(0,0,0,0.35); display: flex; flex-direction: column; }
.wx-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line, #cfd5dc); background: var(--surface-2, #eef1f4); }
.wx-tabs { display: flex; gap: 0; border: 1px solid var(--line, #cfd5dc); }
.wx-tab { background: transparent; color: var(--ink); border: 0; border-right: 1px solid var(--line, #cfd5dc); padding: 0.3rem 0.8rem; font: inherit; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.wx-tab:last-child { border-right: 0; } .wx-tab.on { background: var(--navy, #0b2545); color: #fff; }
.wx-drawer-x { color: var(--ink); }
.wx-drawer-body { overflow: auto; padding: 0.6rem 0.8rem 1rem; flex: 1 1 auto; }
.wx-pane h2 { font-size: 1rem; margin: 0.2rem 0 0.4rem; }
.wx-pane .ais-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; }
html[data-theme="night"] .wx-drawer { background: var(--bg); }
/* sağ dikey Windy tarzı düğmeler */
.wx-app .wx-modes { display: none; }
.wx-side { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wx-side form { display: contents; }
.wx-side .wx-mode, .wx-side .wx-sbtn { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(20,28,36,0.88); color: #fff; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 3px 3px 3px 0.8rem; font: inherit; font-size: 0.78rem; cursor: pointer; text-align: right; text-transform: none; letter-spacing: 0; }
.wx-side .wx-mode:hover, .wx-side .wx-sbtn:hover { background: rgba(40,52,66,0.95); }
.wx-side .wx-mode.on { background: #fff; color: #14324a; font-weight: 700; }
.wx-side .wx-mode.on .wx-ic { box-shadow: 0 0 0 2px #14324a inset; }
.wx-ic { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,0.7); box-sizing: border-box; }
.wx-ic .icon { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 1.8; }
.ic-wind { background: linear-gradient(135deg, #6271b7, #53a553, #e6a531); }
.ic-gust { background: linear-gradient(135deg, #4d8d7b, #d94b3c, #8e3ca3); }
.ic-wave { background: linear-gradient(135deg, #30a0b9, #565ac5, #a92ea6); }
.ic-pres { background: linear-gradient(135deg, #3949ab, #fdd835, #e53935); }
.ic-vis { background: linear-gradient(135deg, #5c6bc0, #9ccc65, #e53935); }
.ic-rain { background: linear-gradient(135deg, #42a5f5, #66bb6a, #8e24aa); }
.ic-route, .ic-here, .ic-refresh { background: rgba(255,255,255,0.12); }
.wx-side-sep { width: 30px; height: 1px; background: rgba(255,255,255,0.3); margin: 2px 3px; }
@media (max-width: 640px) {
  .wx-side { top: auto; bottom: 128px; left: 6px; right: 6px; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
  .wx-side .wx-mode span, .wx-side .wx-sbtn span { display: none; }
  .wx-side .wx-mode, .wx-side .wx-sbtn { padding: 2px; }
  .wx-side-sep { width: 1px; height: 26px; }
}
.wx-drawer[hidden], .wx-pane[hidden], .wx-meteo[hidden] { display: none !important; }
/* yan menü: menü uzayınca alt bölüm (kullanıcı/Gece Modu/Ayarlar/Çıkış) ekranda kalsın — nav kaydırılır */
.sidebar { box-sizing: border-box; height: 100dvh; }
.sidebar nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.sidebar .side-foot { flex-shrink: 0; }
/* yan menü sığdırma: kaydırma çubuğu görünmez, satırlar sıkı; kısa ekranda daha da sıkı */
.sidebar nav { scrollbar-width: none; gap: 1px; }
.sidebar nav::-webkit-scrollbar { display: none; }
.sidebar nav a { padding: 0.36rem 0.7rem; font-size: 0.88rem; }
.sidebar { padding-top: 0.8rem; }
.sidebar .brand { padding-bottom: 0.6rem; }
@media (max-height: 820px) {
  .sidebar nav a { padding: 0.27rem 0.7rem; font-size: 0.84rem; }
  .sidebar .side-foot { padding-top: 0.4rem; }
}

/* ---------- Şirket / filo görünümü (29.08.2026) ---------- */
.co-attn { display: flex; flex-direction: column; gap: 0.35rem; }
.co-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line, #cfd5dc); border-left-width: 4px; }
.co-row.is-danger { border-left-color: var(--danger, #c8102e); } .co-row.is-warn { border-left-color: var(--warn, #d9a400); }
.co-ship { font-weight: 700; white-space: nowrap; }
.co-text { flex: 1 1 auto; min-width: 0; }
.co-table th, .co-table td { vertical-align: top; }
.co-table td:first-child { white-space: nowrap; }
.co-dot { display: inline-block; width: 10px; height: 10px; margin-right: 0.45rem; background: var(--ok, #2b7a3d); vertical-align: middle; }
.co-dot.is-warn { background: var(--warn, #d9a400); } .co-dot.is-danger { background: var(--danger, #c8102e); }
.co-cell { display: inline-block; font-family: var(--mono); font-size: 0.8rem; padding: 0.1rem 0.4rem; border: 1px solid var(--line, #cfd5dc); margin: 0 0.2rem 0.2rem 0; color: inherit; text-decoration: none; white-space: nowrap; }
.co-cell.is-warn { border-color: var(--warn, #d9a400); color: var(--warn, #d9a400); font-weight: 700; }
.co-cell.is-danger { border-color: var(--danger, #c8102e); color: var(--danger, #c8102e); font-weight: 700; }
.co-cell.muted { color: var(--muted); }
a.co-cell[href]:hover { background: var(--surface-2, #eef1f4); }
.chip.is-danger { border-color: var(--danger, #c8102e); color: var(--danger, #c8102e); }

/* ---------- ÜST ŞERİT DÜZENİ (29.08.2026, Navatom incelemesi) — html[data-layout="topbar"] ---------- */
.appbar { display: none; }
.crumbs { display: none; }
@media (min-width: 1024px) {
  html[data-layout="topbar"] .sidebar { display: none; }
  html[data-layout="topbar"] .appbar { display: flex; position: sticky; top: 0; z-index: 55; align-items: center; gap: 1rem; height: 52px; padding: 0 1rem 0 0.6rem; background: var(--nav-bg); color: var(--nav-ink); box-shadow: 0 1px 0 rgba(0,0,0,0.25); }
  html[data-layout="topbar"] .crumbs { display: flex; }
  html[data-layout="topbar"] .container { max-width: 1680px; padding-top: 0.8rem; }
}
.appbar-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.08em; font-size: 0.78rem; padding-right: 1rem; border-right: 1px solid rgba(255,255,255,0.18); height: 100%; }
.appbar-module { display: inline-flex; align-items: center; gap: 0.5rem; }
.appbar-switch { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.appbar-switch:hover, .appbar-switch[aria-expanded="true"] { background: rgba(255,255,255,0.16); }
.appbar-switch .icon { width: 18px; height: 18px; opacity: 1; }
.appbar-modname { font-weight: 700; font-size: 1rem; color: #fff; white-space: nowrap; }
.appbar-search { position: relative; flex: 0 1 320px; margin-left: auto; }
.appbar-search input[type=search] { width: 100%; height: 32px; box-sizing: border-box; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 0 0.6rem; font: inherit; font-size: 0.85rem; box-shadow: none; }
.appbar-search input::placeholder { color: rgba(255,255,255,0.55); }
.appbar-results { position: absolute; left: 0; right: 0; top: 36px; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line, #cfd5dc); box-shadow: 0 6px 18px rgba(0,0,0,0.2); z-index: 60; }
.appbar-results a { display: block; padding: 0.4rem 0.7rem; text-decoration: none; color: inherit; font-size: 0.88rem; border-bottom: 1px solid var(--line, #cfd5dc); }
.appbar-results a:hover, .appbar-results a:first-child { background: var(--surface-2, #eef1f4); }
.appbar-right { display: inline-flex; align-items: center; gap: 0.35rem; }
.appbar-btn { background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.2); padding: 0.3rem 0.6rem; font: inherit; font-size: 0.76rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.appbar-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.appbar-badge { background: var(--magenta); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 0.72rem; padding: 0.15rem 0.45rem; text-decoration: none; }
.appbar-user { display: inline-flex; align-items: center; gap: 0.45rem; color: #fff; text-decoration: none; padding: 0 0.4rem; }
.appbar-user .user-avatar { width: 30px; height: 30px; font-size: 0.85rem; }
.appbar-usermeta { display: flex; flex-direction: column; line-height: 1.1; }
.appbar-usermeta b { font-size: 0.82rem; } .appbar-usermeta small { font-size: 0.66rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.04em; }
.modpanel { position: absolute; left: 0; right: 0; top: 52px; background: var(--surface, #fff); color: var(--ink); border-bottom: 2px solid var(--nav-bg); box-shadow: 0 10px 24px rgba(0,0,0,0.22); padding: 1rem 1.2rem 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem 1.6rem; z-index: 60; }
.modpanel[hidden] { display: none; }
.modgroup-t { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 0.35rem; border-bottom: 1px solid var(--line, #cfd5dc); padding-bottom: 0.25rem; }
.modtile { display: flex; align-items: center; gap: 0.5rem; padding: 0.38rem 0.4rem; color: var(--ink); text-decoration: none; font-size: 0.88rem; border-left: 3px solid transparent; }
.modtile:hover { background: var(--surface-2, #eef1f4); }
.modtile.on { border-left-color: var(--magenta); font-weight: 700; }
.modtile .icon { width: 16px; height: 16px; }
html[data-theme="night"] .appbar-badge { background: var(--magenta); color: #000; }
html[data-theme="night"] .modpanel, html[data-theme="night"] .appbar-results { background: var(--bg); }
/* breadcrumb */
.crumbs { align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--muted); margin: 0 0 0.6rem; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .crumb-cur { color: var(--ink); font-weight: 600; }
/* yoğun grid tablolar (tüm site, her düzende) */
html[data-layout="topbar"] table { font-size: 0.86rem; }
html[data-layout="topbar"] th, html[data-layout="topbar"] td { padding: 0.42rem 0.6rem; }
html[data-layout="topbar"] thead th, html[data-layout="topbar"] tr:first-child th { background: var(--surface-2, #eef1f4); }
html[data-layout="topbar"] tbody tr:hover td { background: color-mix(in srgb, var(--navy, #0b2545) 6%, transparent); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable::after { content: " ⇅"; font-size: 0.7em; color: var(--muted); }
th.sortable[aria-sort="ascending"]::after { content: " ▲"; color: var(--ink); }
th.sortable[aria-sort="descending"]::after { content: " ▼"; color: var(--ink); }
@media (min-width: 1024px) { html[data-layout="topbar"] .wx-app { height: calc(100dvh - 52px); } html[data-layout="topbar"] .container-full { padding-top: 0; } html[data-layout="topbar"] .container-full .crumbs { display: none; } }

/* ---------- 3 SÜTUNLU DETAY DÜZENİ (29.08.2026, Navatom) ---------- */
.d3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; align-items: start; }
@media (min-width: 1100px) { .d3 { grid-template-columns: 300px minmax(0, 1fr) 300px; } .d3.d3-two { grid-template-columns: 300px minmax(0, 1fr); } }
.d3-left, .d3-main, .d3-right { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.d3 .card { margin: 0; }
.d3 .card h2, .d3 .card h3 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--line, #cfd5dc); }
.d3-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem; margin: 0 0 0.9rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--rule); }
.d3-head h1 { margin: 0; font-size: 1.35rem; }
.d3-head .qual { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.d3-head .d3-actions { margin-left: auto; display: inline-flex; gap: 0.35rem; }
/* etiket–değer listesi */
.kv { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; gap: 0.35rem 0.8rem; font-size: 0.88rem; }
.kv dt { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.1rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; }
.kv dd.mono { font-variant-numeric: tabular-nums; }
/* sekmeler */
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line, #cfd5dc); margin: 0 0 0.8rem; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 0.5rem 0.9rem; font: inherit; font-size: 0.86rem; font-weight: 600; color: var(--muted); cursor: pointer; text-transform: none; letter-spacing: 0; }
.tabs button .n { display: inline-block; min-width: 1.2em; margin-left: 0.35rem; padding: 0 0.35rem; font-family: var(--mono); font-size: 0.72rem; background: var(--surface-2, #eef1f4); color: var(--ink); border: 1px solid var(--line, #cfd5dc); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--magenta); }
.tabs button.on .n { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.tabpane[hidden] { display: none !important; }
.d3-list > div { padding: 0.55rem 0; border-bottom: 1px solid var(--line, #cfd5dc); }
.d3-list > div:last-child { border-bottom: 0; }
.d3 .corr-text { margin: 0.5rem 0; }
@media print { .d3 { display: block; } .tabs { display: none; } .tabpane[hidden] { display: block !important; } }
/* tablo araç çubuğu: filtre + sütun seçici (grid.js) */
.gridbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.5rem; }
.gridbar-q { flex: 1 1 200px; max-width: 320px; height: 32px; padding: 0 0.6rem; font-size: 0.85rem; box-shadow: none; }
.gridbar-count { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.gridbar-cols { position: relative; margin-left: auto; }
.gridbar-btn { background: var(--surface-2, #eef1f4); color: var(--ink); border: 1px solid var(--line, #cfd5dc); padding: 0.3rem 0.7rem; font: inherit; font-size: 0.78rem; cursor: pointer; text-transform: none; letter-spacing: 0; }
.gridbar-btn:hover { background: var(--surface, #fff); }
.gridbar-menu { position: absolute; right: 0; top: 34px; z-index: 20; min-width: 200px; max-height: 320px; overflow: auto; background: var(--surface, #fff); border: 1px solid var(--line, #cfd5dc); box-shadow: 0 6px 18px rgba(0,0,0,0.18); padding: 0.35rem 0; }
.gridbar-menu label { display: flex !important; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; font-size: 0.82rem; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; }
.gridbar-menu label:hover { background: var(--surface-2, #eef1f4); }
.gridcol-hidden { display: none; }
.gridrow-hidden { display: none; }
html[data-theme="night"] .gridbar-menu { background: var(--bg); }
@media print { .gridbar { display: none; } }
/* Pano: KPI şeridi + kısayollar (29.08.2026) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin: 0 0 0.9rem; }
.kpi { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.9rem; background: var(--surface, #fff); border: 1px solid var(--line, #cfd5dc); border-top: 3px solid var(--nav-bg); text-decoration: none; color: inherit; }
.kpi:hover { background: var(--surface-2, #eef1f4); }
.kpi.is-warn { border-top-color: var(--warn, #d9a400); } .kpi.is-danger { border-top-color: var(--danger, #c8102e); }
.kpi-v { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; line-height: 1.1; } .kpi-v small { font-size: 0.85rem; color: var(--muted); }
.kpi.is-warn .kpi-v { color: var(--warn, #d9a400); } .kpi.is-danger .kpi-v { color: var(--danger, #c8102e); }
.kpi-l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.shortcuts { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.shortcuts a { display: inline-block; padding: 0.3rem 0.6rem; border: 1px solid var(--line, #cfd5dc); text-decoration: none; color: inherit; font-size: 0.82rem; }
.shortcuts a:hover { background: var(--surface-2, #eef1f4); }
.d3 .pano-map { height: 320px; }
html[data-theme="night"] .kpi { background: var(--bg); }
.tabs button .n.fr-fresh { background: var(--ok, #2b7a3d); color: #fff; border-color: var(--ok, #2b7a3d); }
.tabs button .n.fr-aging { background: var(--warn, #d9a400); color: #1a1a1a; border-color: var(--warn, #d9a400); }
.tabs button .n.fr-stale { background: var(--danger, #c8102e); color: #fff; border-color: var(--danger, #c8102e); }
.tabs button.on .n.fr-fresh, .tabs button.on .n.fr-aging, .tabs button.on .n.fr-stale { filter: none; }
.staging-bar { background: repeating-linear-gradient(45deg, #b3261e 0 12px, #8f1d17 12px 24px); color: #fff; text-align: center; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; padding: 5px 10px; position: sticky; top: 0; z-index: 70; }
