/* ============================================================================
   QDMS ENTERPRISE DESIGN SYSTEM (v3.0)
   Linear / Shadcn UI keskinliği + SAP Fiori / Opcenter görev netliği +
   Tulip / Qualio şablon odaklı kurumsal kalite yönetim arayüzü.
   ============================================================================ */

@font-face { font-family: 'Plex'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plex'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plex'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plex'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* 3.1 Kurumsal Renk Paleti (Marka Kimliği Korunarak) */
  --color-primary: #11087F;
  --color-primary-hover: #1B10A6;
  --color-primary-soft: #F0EEFF;
  --color-bg: #F7F8FC;
  --color-surface: #FFFFFF;
  --color-surface-subtle: #F2F4F9;
  --color-text-primary: #181C2E;
  --color-text-secondary: #5E667E;
  --color-text-muted: #8C94AB;
  --color-border: #E4E7F0;
  --color-border-strong: #CFD5E6;

  /* Anlamsal Durum ve Risk Renkleri */
  --color-success: #128056;
  --color-success-bg: #EAF7F1;
  --color-success-border: #B8E2CE;
  --color-warning: #C98212;
  --color-warning-bg: #FEF6E7;
  --color-warning-border: #F3D49B;
  --color-danger: #CF3E3E;
  --color-danger-bg: #FDECEC;
  --color-danger-border: #F5B8B8;
  --color-info: #2B6CB0;
  --color-info-bg: #EBF4FF;
  --color-info-border: #BDD8F7;

  /* 3.2 Tipografi, Boşluk (Spacing) ve Yükselti (Elevation) */
  --font-sans: 'Inter', 'Plex', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-card: 10px;
  --radius-ctrl: 7px;
  --radius-badge: 5px;
  --radius-pill: 999px;

  --shadow-subtle: 0 1px 3px rgba(17, 8, 127, 0.04);
  --shadow-float: 0 8px 24px rgba(24, 28, 46, 0.08), 0 1px 3px rgba(17, 8, 127, 0.04);
  --shadow-modal: 0 20px 50px rgba(24, 28, 46, 0.18), 0 1px 4px rgba(17, 8, 127, 0.06);

  --sidebar-w: 256px;
  --sidebar-collapsed-w: 68px;
  --topbar-h: 56px;

  /* Geriye Dönük Uyumluluk Değişken Köprüleri */
  --signal: #11087F;
  --on-signal: #FFFFFF;
  --brand: var(--signal);
  --canvas: var(--color-bg);
  --sheet: var(--color-surface);
  --sunk: var(--color-surface-subtle);
  --ink: var(--color-text-primary);
  --ink-1: var(--color-text-primary);
  --ink-2: var(--color-text-secondary);
  --ink-3: var(--color-text-muted);
  --rule: var(--color-border);
  --rule-2: var(--color-border-strong);
  --h: var(--color-danger);
  --h-soft: var(--color-danger-bg);
  --h-ink: #FFFFFF;
  --m: var(--color-warning);
  --m-soft: var(--color-warning-bg);
  --m-ink: #3D2600;
  --l: var(--color-success);
  --l-soft: var(--color-success-bg);
  --l-ink: #FFFFFF;
  --info-soft: var(--color-info-bg);
  --rail-w: var(--sidebar-w);
  --radius: var(--radius-card);
  --shadow: var(--shadow-subtle);
  --focus: 0 0 0 2px #FFFFFF, 0 0 0 4px rgba(17, 8, 127, 0.35);
  --tint: var(--color-primary-soft);
  --tint-2: #E2DFFF;
  --mono: var(--font-mono);
}

/* ---------- Temel Sıfırlama & Tipografi ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font: 13.5px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; color: var(--color-text-primary); }
p { margin: 0 0 var(--space-2); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-ctrl); }

.skip { position: absolute; left: -999px; top: 0; background: var(--color-surface); padding: var(--space-2) var(--space-3); z-index: 200; border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); }
.skip:focus { left: var(--space-2); top: var(--space-2); }

code, pre, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
kbd {
  font: 500 11px/1.4 var(--font-mono);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--color-text-secondary);
}

.num, td.num, th.num, .kdays, .ap, .scorebox input, table.fm .sod select {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sub { color: var(--color-text-muted); font-size: 12px; }
.sub.bad, .bad { color: var(--color-danger); }
.sub.miss { color: var(--color-danger); }
.mt { margin-top: var(--space-1); }
.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lead { color: var(--color-text-secondary); max-width: 78ch; margin-bottom: var(--space-3); }
.hint { color: var(--color-text-muted); font-size: 12px; margin: 6px 0 0; line-height: 1.45; }

/* ============================================================================
   4. NAVİGASYON VE YERLEŞİM MİMARİSİ (APP SHELL: SIDEBAR + TOPBAR + STAGE)
   ============================================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.sb-collapsed .app {
  grid-template-columns: var(--sidebar-collapsed-w) minmax(0, 1fr);
}

/* ---------- Sol Sidebar (.rail) ---------- */
.rail {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-right: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 40;
  user-select: none;
}

/* Sidebar Üst Marka Başlığı */
.sb-header {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-primary);
  min-width: 0;
  flex: 1;
}
.brand:hover { text-decoration: none; }
.brand .bm {
  width: 34px;
  height: 34px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17, 8, 127, 0.18);
}
.brand .bm img { max-width: 100%; max-height: 28px; display: block; background: #fff; padding: 2px; border-radius: 4px; }
.brand .bm .mono { font-weight: 700; font-size: 16px; color: #FFFFFF; }
.brand .bt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand .bt b { font-size: 13.5px; font-weight: 700; color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .bt span { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-toggle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-ctrl);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
}
.sb-toggle:hover { background: var(--color-surface-subtle); color: var(--color-text-primary); border-color: var(--color-border); }

/* Sidebar Navigasyon Grupları */
.sb-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-2) var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group-lbl {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 4px 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-ctrl);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.rl:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
  text-decoration: none;
}
.rl.on {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.rl.on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-primary);
}
.rl .rl-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rl .rl-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  line-height: 1.3;
}
.rl .rl-badge.bad { background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger-border); }
.rl .rl-badge.warn { background: var(--color-warning-bg); color: var(--color-warning); border-color: var(--color-warning-border); }

/* Sidebar Alt Sabit Alan (Aktif Proje Seçici, Rol Rozeti, Bağlantı Durumu) */
.rfoot {
  border-top: 1px solid var(--color-border);
  padding: var(--space-3);
  background: var(--color-surface-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sb-proj-box { display: flex; flex-direction: column; gap: 4px; }
.sb-proj-box label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.sb-proj-sel {
  width: 100%;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-primary);
  min-height: 30px;
}
.sb-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.userchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-ctrl);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  min-width: 0;
}
.userchip:hover { border-color: var(--color-border-strong); background: var(--color-primary-soft); }
.userchip .uc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.userchip .uc-name { font-weight: 600; color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip .uc-role { font-size: 10.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.savestate {
  font-size: 11px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.savestate .i { width: 13px; height: 13px; color: var(--color-success); }
.savestate .bad { color: var(--color-danger); font-weight: 600; }
.savestate .warn { color: var(--color-warning); font-weight: 600; }

.refchip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
}
.refchip:hover { text-decoration: none; filter: brightness(0.97); }
.refchip.bad { background: var(--color-danger-bg); border-color: var(--color-danger-border); color: var(--color-danger); }
.refchip .i { width: 13px; height: 13px; }

/* Daraltılmış Sidebar (68px) Görünümü */
body.sb-collapsed .brand .bt,
body.sb-collapsed .sb-group-lbl,
body.sb-collapsed .rl .rl-txt,
body.sb-collapsed .rl .rl-badge,
body.sb-collapsed .sb-proj-box,
body.sb-collapsed .userchip .uc-info,
body.sb-collapsed .refchip span,
body.sb-collapsed .savestate span {
  display: none;
}
body.sb-collapsed .sb-header { justify-content: center; padding: 0 var(--space-1); }
body.sb-collapsed .brand { display: none; }
body.sb-collapsed .rl { justify-content: center; padding: 9px 0; }
body.sb-collapsed .rfoot { align-items: center; padding: var(--space-2) var(--space-1); }
body.sb-collapsed .userchip,
body.sb-collapsed .refchip { justify-content: center; width: 38px; height: 38px; padding: 0; }

/* ---------- Üst Bar (Topbar - 56px) ---------- */
.stage { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 35;
}
.tb-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}
.ui-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.ui-breadcrumb a:hover { color: var(--color-primary); }
.ui-breadcrumb .bc-sep { color: var(--color-text-muted); font-size: 12px; }
.ui-breadcrumb .bc-cur {
  color: var(--color-text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-proj-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  border: 1px solid #D8D3FF;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: var(--space-2);
}
.tb-proj-pill:hover { background: #E3DEFF; text-decoration: none; }

.tb-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

/* Global Arama Kutusu (Ctrl+K) */
.tb-search-wrap {
  position: relative;
  width: 280px;
}
.tb-search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-ctrl);
  padding: 0 10px;
  height: 34px;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.tb-search-box:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(17, 8, 127, 0.12);
}
.tb-search-box .i { width: 14px; height: 14px; color: var(--color-text-muted); }
.tb-search-box input {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 100%;
  font-size: 12.5px;
  color: var(--color-text-primary);
  box-shadow: none !important;
  width: 100%;
}
.tb-search-box input::placeholder { color: var(--color-text-muted); }

.tb-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  z-index: 80;
  overflow: hidden;
}
.tb-search-dd {
  left: 0;
  right: auto;
  width: min(460px, 90vw);
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-2);
}
.gs-group-title {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 6px 8px 4px;
}
.gs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 7px 10px;
  border-radius: var(--radius-ctrl);
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 12.5px;
}
.gs-item:hover { background: var(--color-primary-soft); text-decoration: none; }
.gs-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-item-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-main span { font-size: 11.5px; color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: var(--space-4); text-align: center; color: var(--color-text-muted); font-size: 12.5px; }

/* Hızlı Oluştur (+ Yeni) Menüsü */
.tb-quick-wrap { position: relative; }
.tb-quick-dd {
  width: 250px;
  padding: 6px;
}
.qd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-ctrl);
  text-align: left;
  color: var(--color-text-primary);
  font-size: 12.5px;
}
.qd-item:hover { background: var(--color-primary-soft); color: var(--color-primary); }
.qd-item .i { width: 15px; height: 15px; color: var(--color-primary); }
.qd-item div { display: flex; flex-direction: column; line-height: 1.25; }
.qd-item b { font-weight: 600; }
.qd-item span { font-size: 11px; color: var(--color-text-muted); }
.qd-sep { height: 1px; background: var(--color-border); margin: 4px 0; }

/* ---------- Proje/Modül Başlık Bloğu (#titleblock) ve Sekmeler (#tabs) ---------- */
#titleblock {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
#titleblock h1 { font-size: 18px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.tb-sub { color: var(--color-text-secondary); font-size: 12.5px; margin-top: 2px; }
.tb-facts { display: flex; gap: var(--space-5); margin: 0; flex-wrap: wrap; }
.tb-facts > div { display: flex; flex-direction: column; gap: 2px; }
.tb-facts dt { font-size: 11px; color: var(--color-text-muted); font-weight: 500; }
.tb-facts dd { margin: 0; font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

.tabs {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 2px;
  padding: 0 var(--space-5);
  overflow-x: auto;
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s, background-color 0.12s;
}
.tab .i { width: 15px; height: 15px; }
.tab:hover { color: var(--color-text-primary); background: var(--color-surface-subtle); text-decoration: none; }
.tab.on { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab.gstart { margin-left: var(--space-3); position: relative; }
.tab.gstart::before { content: ''; position: absolute; left: -7px; top: 10px; bottom: 10px; width: 1px; background: var(--color-border); }
.tab .cnt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0 6px;
  line-height: 16px;
}
.tab .cnt.bad { background: var(--color-danger); border-color: var(--color-danger); color: #FFFFFF; }

main { padding: var(--space-5) var(--space-5) 64px; min-width: 0; outline: none; flex: 1; }
main.tab-tablo, main.tab-kp, main.tab-aksiyon { padding-left: var(--space-4); padding-right: var(--space-4); }

/* Bildirim Şeritleri (.banner) */
.banner {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--space-5);
  font-size: 12.5px;
  border-bottom: 1px solid var(--color-border);
}
.banner.info { background: var(--color-info-bg); color: var(--color-info); border-bottom-color: var(--color-info-border); }
.banner.warn { background: var(--color-warning-bg); color: #7C4D05; border-bottom-color: var(--color-warning-border); }
.banner.bad { background: var(--color-danger-bg); color: #8A1D1D; border-bottom-color: var(--color-danger-border); }

/* ============================================================================
   3.3 ORTAK UI BİLEŞEN KÜTÜPHANESİ (SHARED ENTERPRISE COMPONENTS)
   ============================================================================ */
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.pagehead h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.pagehead p { color: var(--color-text-secondary); max-width: 74ch; margin: 4px 0 0; font-size: 13px; }
.sect { font-size: 14px; font-weight: 600; color: var(--color-text-primary); margin: var(--space-5) 0 var(--space-3); display: flex; align-items: baseline; gap: var(--space-2); }
.sect.first { margin-top: var(--space-4); }
.sect .sub { font-weight: 400; }

/* Butonlar */
.btnrow { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.btnrow.tight { gap: 4px; flex-wrap: nowrap; }
.btnrow.center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-ctrl);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-primary);
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(17, 8, 127, 0.03);
  transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--color-surface-subtle); border-color: var(--color-text-muted); text-decoration: none; }
.btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(17, 8, 127, 0.18);
}
.btn.primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #FFFFFF; }
.btn.danger { color: var(--color-danger); border-color: var(--color-danger-border); background: var(--color-surface); }
.btn.danger:hover { background: var(--color-danger-bg); border-color: var(--color-danger); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--color-text-secondary); }
.btn.quiet:hover { background: var(--color-surface-subtle); color: var(--color-text-primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ibtn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctrl);
  background: transparent;
  color: var(--color-text-secondary);
  padding: 0;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.ibtn:hover:not(:disabled) { background: var(--color-primary-soft); color: var(--color-primary); border-color: #D8D3FF; }
.ibtn.danger:hover:not(:disabled) { background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger-border); }
.ibtn:disabled { opacity: 0.35; cursor: default; }

/* Kartlar ve Izgaralar */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4) 20px;
  box-shadow: var(--shadow-subtle);
  min-width: 0;
}
.card h2 { font-size: 14.5px; font-weight: 600; margin-bottom: var(--space-3); color: var(--color-text-primary); }
.ovgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-4); align-items: start; }
.ovgrid .wide { grid-column: 1 / -1; }

/* Boş Durum (EmptyState) ve İskelet Yükleyici (SkeletonLoader) */
.empty {
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--space-6) var(--space-4);
  line-height: 1.6;
}
.empty.big {
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-card);
  padding: 48px 24px;
}
.empty.big h2 { font-size: 17px; margin-bottom: 6px; }
.ui-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5) var(--space-4);
  gap: var(--space-2);
  color: var(--color-text-secondary);
}
.ui-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-card);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  display: grid;
  place-items: center;
}
.ui-empty-icon .i { width: 20px; height: 20px; }

@keyframes skPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.ui-skeleton {
  display: block;
  background: linear-gradient(90deg, var(--color-surface-subtle) 25%, #E7EBF5 50%, var(--color-surface-subtle) 75%);
  background-size: 200% 100%;
  animation: skPulse 1.5s ease-in-out infinite;
  border-radius: 5px;
  height: 16px;
}
.ui-skeleton.lg { height: 28px; width: 64px; border-radius: 6px; }
.ui-skeleton.row { height: 42px; width: 100%; margin-bottom: 8px; border-radius: var(--radius-ctrl); }

.okline { display: flex; align-items: center; gap: var(--space-2); color: var(--color-success); font-weight: 500; }
.okbox { background: var(--color-success-bg); border: 1px solid var(--color-success-border); color: var(--color-success); border-radius: var(--radius-ctrl); padding: 10px 14px; font-size: 13px; }
.warnbox { background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: var(--radius-ctrl); padding: 8px 12px; margin-top: var(--space-2); color: #7C4D05; font-size: 12.5px; }
.warnbox.bad, .errbox { background: var(--color-danger-bg); border: 1px solid var(--color-danger-border); color: #8A1D1D; border-radius: var(--radius-ctrl); padding: 8px 12px; font-size: 12.5px; }

.plainlist { margin: 0; padding-left: 18px; display: grid; gap: 6px; max-width: 90ch; }
.plainlist li { padding-left: 2px; }
.plainlist.warn li::marker { color: var(--color-warning); }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0; }
.defs dt { color: var(--color-text-muted); }
.defs dd { margin: 0; }
.scroll-x { overflow-x: auto; }

/* Rozetler: AP, StatusBadge, Kchip, Docst */
.ap {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-badge);
  font-weight: 700;
  font-size: 11.5px;
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.ap.H { background: var(--color-danger); color: #FFFFFF; border-color: var(--color-danger); }
.ap.M { background: var(--color-warning); color: #FFFFFF; border-color: var(--color-warning); }
.ap.L { background: var(--color-success); color: #FFFFFF; border-color: var(--color-success); }
.ap.lg { min-width: 34px; height: 30px; font-size: 15px; border-radius: var(--radius-ctrl); }
.ap.sm { min-width: 20px; height: 18px; font-size: 10.5px; padding: 0 4px; }
.apmini { display: inline-flex; gap: 3px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 18px;
}
.chip.link { color: var(--color-primary); background: var(--color-primary-soft); border-color: #D8D3FF; cursor: pointer; text-decoration: none; }
.chip.link:hover { background: #E2DCFF; text-decoration: none; }
.chip.link .i { width: 12px; height: 12px; }
.chip.warn { background: var(--color-warning-bg); border-color: var(--color-warning-border); color: #7C4D05; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; background: var(--color-primary-soft); color: var(--color-primary); border-radius: 4px; padding: 0 6px; margin-left: 4px; }
.tag.draft { background: var(--color-warning-bg); color: #7C4D05; margin: 2px 0 0; }
.tag.review { background: var(--color-warning-bg); color: #7C4D05; border: 1px solid var(--color-warning-border); }

.status, .kchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  line-height: 18px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.status.Uygulama, .status.info, .kchip.info { background: var(--color-info-bg); border-color: var(--color-info-border); color: var(--color-info); }
.status.Tamamlandı, .status.ok, .kchip.ok { background: var(--color-success-bg); border-color: var(--color-success-border); color: var(--color-success); }
.status.Karar, .status.warn, .kchip.warn { background: var(--color-warning-bg); border-color: var(--color-warning-border); color: #7C4D05; }
.status.Uygulanmadı, .kchip.muted { background: var(--color-surface-subtle); border-color: var(--color-border); color: var(--color-text-muted); }
.status.late, .status.bad, .kchip.bad { background: var(--color-danger-bg); border-color: var(--color-danger-border); color: var(--color-danger); }

.docst { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
.ds-taslak { background: var(--color-surface-subtle); color: var(--color-text-secondary); border-color: var(--color-border-strong); }
.ds-inceleme { background: var(--color-info-bg); color: var(--color-info); border-color: var(--color-info-border); }
.ds-talep { background: var(--color-warning-bg); color: #7C4D05; border-color: var(--color-warning-border); }
.ds-onay { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success-border); }
.ds-dis { background: var(--color-danger-bg); color: var(--color-danger); border-color: var(--color-danger-border); }

.meter { display: inline-block; vertical-align: middle; width: 90px; height: 7px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-pill); overflow: hidden; margin-right: 6px; }
.meter.lg { width: 100%; height: 9px; margin: 6px 0 10px; display: block; }
.meter.sm { width: 56px; height: 6px; }
.meter i { display: block; height: 100%; border-radius: var(--radius-pill); }
.meter i.good { background: var(--color-success); }
.meter i.mid { background: var(--color-warning); }
.meter i.low { background: var(--color-danger); }

/* KPI Kartları (.kpis) */
.kpis { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.kpis .item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  min-width: 156px;
  box-shadow: var(--shadow-subtle);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.kpis a.item:hover, .kpis a.item.link:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(17, 8, 127, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.kpis .num { font-family: var(--font-mono); font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-text-primary); }
.kpis .num.bad { color: var(--color-danger); }
.kpis .num.warn { color: var(--color-warning); }
.kpis .lbl { font-size: 12px; color: var(--color-text-secondary); }
.kpis.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ============================================================================
   5. KOMUTA MERKEZİ DASHBOARD TASARIMI (v-overview.js)
   ============================================================================ */
.cmd-center {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 1440px;
}

/* Bölüm A: Akıllı Karşılama & Hızlı Şablon Başlatıcı */
.cmd-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-subtle);
}
.cmd-welcome-text h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}
.cmd-welcome-text p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.cmd-welcome-badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cmd-tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.ui-tpl-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  text-align: left;
  text-decoration: none;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.ui-tpl-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(17, 8, 127, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.ui-tpl-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  flex: none;
}
.ui-tpl-icon.danger { background: var(--color-danger-bg); color: var(--color-danger); }
.ui-tpl-icon.warn { background: var(--color-warning-bg); color: var(--color-warning); }
.ui-tpl-icon.success { background: var(--color-success-bg); color: var(--color-success); }
.ui-tpl-icon .i { width: 18px; height: 18px; }
.ui-tpl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ui-tpl-body b { font-size: 13.5px; font-weight: 600; color: var(--color-text-primary); display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.ui-tpl-body span { font-size: 12px; color: var(--color-text-secondary); line-height: 1.4; }
.ui-tpl-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
}

/* Bölüm B: Canlı Kalite KPI Kartları (4'lü Grid) */
.cmd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.ui-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4) 18px;
  text-decoration: none;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ui-kpi-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(17, 8, 127, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.ui-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.ui-kpi-lbl {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
}
.ui-kpi-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 2px 0;
}
.ui-kpi-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-primary);
}
.ui-kpi-val.danger { color: var(--color-danger); }
.ui-kpi-val.warn { color: var(--color-warning); }
.ui-kpi-val.success { color: var(--color-success); }
.ui-kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
}
.ui-kpi-link {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Bölüm C (%65) & Bölüm D (%35) İki Kolonlu Yerleşim */
.cmd-split {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.cmd-col-main, .cmd-col-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.card-head-row h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: var(--space-2); }

/* Benim İşlerim ve Bekleyen Onaylar Listesi */
.cmd-task-list {
  display: flex;
  flex-direction: column;
  divide-y: 1px solid var(--color-border);
}
.cmd-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 11px 4px;
  border-bottom: 1px solid var(--color-border);
}
.cmd-task-item:last-child { border-bottom: 0; }
.cmd-task-left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}
.cmd-task-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.cmd-task-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-task-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cmd-task-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

/* Modül Sağlık Çubukları & Zaman Çizelgesi */
.cmd-health-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cmd-health-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cmd-health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}
.cmd-health-top b { font-weight: 600; color: var(--color-text-primary); }
.cmd-health-top span { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-text-secondary); }

.cmd-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.cmd-timeline li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 12.5px;
}
.cmd-timeline li:last-child { border-bottom: 0; }
.cmd-tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 5px;
}
.cmd-tl-dot.warn { background: var(--color-warning); }
.cmd-tl-dot.danger { background: var(--color-danger); }
.cmd-tl-dot.success { background: var(--color-success); }
.cmd-tl-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cmd-tl-content b { font-weight: 600; color: var(--color-text-primary); }
.cmd-tl-content time { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); }

/* ============================================================================
   FORM ELEMANLARI, ARAÇ ÇUBUĞU VE VERİ TABLOLARI (DATA TABLES)
   ============================================================================ */
.toolbar {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-subtle);
}
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar.sections { align-items: center; }

.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f .k { font-size: 12px; font-weight: 500; color: var(--color-text-secondary); }
.f.inline { flex-direction: row; align-items: center; gap: var(--space-2); }
.f.chk, label.chk { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; cursor: pointer; }
label.inline { display: inline-flex; align-items: center; gap: 6px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }

input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], input[type=password], input:not([type]), select, textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-ctrl);
  padding: 6px 10px;
  min-height: 34px;
  font-size: 13px;
  color: var(--color-text-primary);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--color-primary); flex: none; }
textarea { resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--color-text-muted); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(17, 8, 127, 0.14);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-ctrl);
  overflow: hidden;
  background: var(--color-surface);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-right: 1px solid var(--color-border);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--color-surface-subtle); color: var(--color-text-primary); }
.seg button[aria-pressed=true], .seg button.on { background: var(--color-primary); color: #FFFFFF; font-weight: 600; }

.lvlfilter { margin-bottom: var(--space-3); }
.lvlfilter button b { margin-left: 4px; font-family: var(--font-mono); }
.filterchip { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.bulk {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--color-primary-soft);
  border: 1px solid #D8D3FF;
  border-radius: var(--radius-card);
  padding: 8px 14px;
  margin-bottom: 10px;
}
.bulk select { width: auto; }

/* Standart Veri Tablosu (table.plain) */
table.plain {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}
table.plain th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  font-weight: 600;
  padding: 10px 14px;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
}
table.plain td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: 13px;
}
table.plain tr:last-child td { border-bottom: 0; }
table.plain tr.link { cursor: pointer; }
table.plain tr.link:hover td { background: var(--color-primary-soft); }
table.plain tr.sel td { background: var(--color-primary-soft); }
table.plain .name { font-weight: 600; color: var(--color-text-primary); }
table.plain caption { text-align: left; font-weight: 600; padding: 6px 0; }
table.compactt td, table.compactt th { padding: 8px 11px; }
table.flowlist td { vertical-align: middle; }
table.classes td { padding: 6px 8px; }
table.plain input.cell, table.plain select.cell { font: inherit; padding: 4px 6px; border: 1px solid var(--color-border); border-radius: 5px; max-width: 100%; }

/* PFMEA & Kontrol Planı Mühendislik Tabloları (table.fm) */
.tablewrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: auto;
  max-height: calc(100vh - 165px);
  box-shadow: var(--shadow-subtle);
}
table.fm { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
table.fm th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--color-surface-subtle);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  color: var(--color-text-secondary);
  padding: 8px 8px;
  border-bottom: 1px solid var(--color-border-strong);
  border-right: 1px solid var(--color-border);
  vertical-align: bottom;
}
table.fm thead tr.bands th {
  top: 0;
  height: 28px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10.5px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-right: 1px solid #D8D3FF;
  border-bottom: 1px solid #D8D3FF;
  padding: 5px 6px;
}
table.fm thead tr.bands th.b2,
table.fm thead tr.bands th.b4 { background: #E3DEFF; }
table.fm thead tr.bands th:first-child { background: var(--color-surface-subtle); border-right-color: var(--color-border); }
table.fm thead tr:nth-child(2) th { top: 28px; }

table.fm td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  vertical-align: top;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
table.fm td.num, table.fm th.num { text-align: center; }
table.fm td:last-child, table.fm th:last-child { border-right: 0; }
table.fm .selc { width: 30px; text-align: center; padding: 6px 4px; }
table.fm .ribbon { width: 5px; padding: 0; min-width: 5px; }
td.ribbon.H { background: var(--color-danger); }
td.ribbon.M { background: var(--color-warning); }
td.ribbon.L { background: var(--color-success); }
td.ribbon { background: var(--color-border); }

tr.data { cursor: pointer; }
tr.data:hover td { background: var(--color-primary-soft); }
tr.data.sel td { background: #E3DEFF; }
tr.data.late td:first-child { box-shadow: inset 3px 0 0 var(--color-danger); }
tr.data:focus-visible { box-shadow: none; }
tr.data:focus-visible td { background: #E3DEFF; }

table.fm .sod select { width: 50px; padding: 2px; min-height: 28px; font-weight: 600; text-align: center; background: var(--color-surface); border-radius: 6px; }
tr.group td { background: var(--color-surface-subtle); border-bottom: 1px solid var(--color-border-strong); padding: 0; position: sticky; left: 0; white-space: normal; }
.ghead { display: flex; align-items: center; gap: 10px; padding: 6px 10px; position: sticky; left: 0; }
.ghead .gt { font-weight: 600; color: var(--color-text-primary); }
.gspace { flex: 1; }
table.fm .ops { white-space: nowrap; }

.tablewrap.compact table.fm td { padding: 4px 6px; font-size: 12px; line-height: 1.3; }
.tablewrap.simple .x { display: none; }
.tablewrap.simple table.fm th { min-width: 0 !important; }
.tablewrap.simple table.fm td:nth-child(3) { min-width: 100px; }
.tablewrap.simple table.fm td:nth-child(4), .tablewrap.simple table.fm td:nth-child(5), .tablewrap.simple table.fm td:nth-child(8) { min-width: 125px; }
.tablewrap.simple table.fm td { padding: 8px 6px; }
.tablewrap.simple table.fm .sod select { width: 46px; padding: 2px 0; }
.tablewrap.simple table.fm td:last-child { min-width: 78px; }
.tablewrap.simple table.fm td:nth-last-child(2) { min-width: 120px; }
table.fm td.num .chip { white-space: nowrap; }
table.fm td.num .chip.warn, table.fm td.num .chip.link { font-size: 11px; padding: 0 7px; }
table.fm .mt .status { white-space: nowrap; }

table.cpt td { padding: 4px; white-space: normal; }
table.cpt td.kpno { padding: 7px 8px; }
table.cpt tr.focus td { background: #E3DEFF; }
table.cpt tr.draftrow td.kpno { box-shadow: inset 3px 0 0 var(--color-warning); }
.kpno .tag { white-space: nowrap; }
.kpno .sub { overflow-wrap: normal; word-break: normal; }

.cell { width: 100%; min-height: 32px; border: 1px solid transparent; background: transparent; border-radius: 5px; padding: 4px 6px; }
td:hover > .cell { border-color: var(--color-border-strong); background: var(--color-surface); }
.cell.miss { border-color: var(--color-danger-border); background: var(--color-danger-bg); }
textarea.cell { resize: vertical; min-height: 54px; }
table.acts td { white-space: normal; }
table.acts tr.late td:nth-child(6) { color: var(--color-danger); font-weight: 600; }

/* ============================================================================
   PROJE ÖZETİ, MATRİS, AKIŞ ŞEMASI, IATF, AYARLAR, RAPOR
   ============================================================================ */
.ready .big { display: flex; align-items: baseline; gap: 12px; }
.ready .big .num { font-size: 36px; font-weight: 700; line-height: 1; }
.ready .big.good .num { color: var(--color-success); }
.ready .big.mid .num { color: var(--color-warning); }
.ready .big.low .num { color: var(--color-danger); }
.tally { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
.tally .t b { font-family: var(--font-mono); font-size: 15px; }
.tally .t.bad b { color: var(--color-danger); }
.tally .t.warn b { color: var(--color-warning); }
.tally .t.ok b { color: var(--color-success); }
.tally .t.info b { color: var(--color-info); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.steps li:last-child { border-bottom: 0; }
.cmp { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.cmp .cl { display: flex; align-items: center; gap: 6px; }
.cmp .bl { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 8px; margin: 2px 0; }
.bar { height: 9px; background: var(--color-surface-subtle); border-radius: var(--radius-pill); overflow: hidden; }
.bar i { display: block; height: 100%; }
i.ap-H { background: var(--color-danger); }
i.ap-M { background: var(--color-warning); }
i.ap-L { background: var(--color-success); }

.matrix { display: grid; grid-template-columns: 18px 1fr; gap: 4px; align-items: center; }
.mx-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; color: var(--color-text-muted); text-align: center; }
.mx-grid { display: grid; grid-template-columns: 20px repeat(10, 1fr); gap: 2px; }
.mx-h { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); text-align: center; align-self: center; }
.mx-c { font-family: var(--font-mono); aspect-ratio: 1.5; background: var(--color-surface-subtle); border-radius: 3px; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.mx-c.ap-H { background: var(--color-danger); color: #fff; }
.mx-c.ap-M { background: var(--color-warning); color: #fff; }
.mx-c.ap-L { background: var(--color-success); color: #fff; }
.mx-x { grid-column: 2; text-align: center; font-size: 11px; color: var(--color-text-muted); }

.oprisk { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.oprisk a { display: grid; grid-template-columns: 210px 1fr 28px; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 3px 6px; border-radius: 5px; }
.oprisk a:hover { background: var(--color-primary-soft); text-decoration: none; }
.oprisk .on { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.oprisk .track { display: block; background: var(--color-surface-subtle); border-radius: 6px; height: 10px; }
.oprisk .stack { display: flex; height: 10px; border-radius: 6px; overflow: hidden; min-width: 6px; }
.oprisk .stack i { display: block; }
.oprisk b { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }

.loglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 12.5px; }
.loglist li { display: grid; grid-template-columns: 130px 120px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.loglist li:last-child { border-bottom: 0; }
.loglist li > * { min-width: 0; overflow-wrap: anywhere; }
.loglist time { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-muted); }
.loglist time.bad { color: var(--color-danger); font-weight: 600; }
.loglist .who { color: var(--color-text-secondary); font-weight: 600; }
.loglist.full { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 4px 14px; }

.owners { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ownchip { display: flex; flex-direction: column; text-align: left; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); padding: 6px 12px; box-shadow: var(--shadow-subtle); }
.ownchip span { font-size: 11.5px; color: var(--color-text-muted); }
.ownchip span i.bad { color: var(--color-danger); font-style: normal; font-weight: 600; }
.ownchip.on { border-color: var(--color-primary); background: var(--color-primary-soft); }

/* Proses Akış Şeması */
.flowwrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); overflow-x: auto; }
.flowwrap svg { display: block; max-width: none; height: auto; }
.flowwrap.print svg { max-width: 100%; height: auto; }
.flow text { font-family: var(--font-sans); }
.sym { fill: #fff; stroke: var(--color-text-secondary); stroke-width: 2; }
.fn.ap-H .sym, .fsym.ap-H .sym { stroke: var(--color-danger); stroke-width: 3; }
.fn.ap-M .sym, .fsym.ap-M .sym { stroke: var(--color-warning); stroke-width: 3; }
.fn.ap-L .sym, .fsym.ap-L .sym { stroke: var(--color-success); stroke-width: 3; }
.sn { font-size: 12px; font-weight: 600; fill: var(--color-text-primary); }
.ft { font-size: 13px; font-weight: 600; fill: var(--color-text-primary); }
.fs { font-size: 11px; fill: var(--color-text-muted); }
.fk { font-size: 10px; font-weight: 700; fill: var(--color-primary); }
.fb { fill: var(--color-border); }
.fb.ap-H { fill: var(--color-danger); }
.fb.ap-M { fill: var(--color-warning); }
.fb.ap-L { fill: var(--color-success); }
.fbt { font-size: 11px; font-weight: 700; fill: #fff; }
.farrow { fill: var(--color-text-muted); }
.farrowline { stroke: var(--color-text-muted); stroke-width: 1.5; }
.fconn { fill: #fff; stroke: var(--color-text-secondary); stroke-width: 1.5; }
.fcn { font-size: 11px; font-weight: 700; fill: var(--color-text-primary); }
.fsym { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 12px; color: var(--color-text-secondary); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border: 3px solid var(--color-danger); border-radius: 3px; background: #fff; }

/* IATF Bulguları */
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.finding { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: start; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-border-strong); border-radius: var(--radius-card); padding: 12px 14px; box-shadow: var(--shadow-subtle); }
.finding.bad { border-left-color: var(--color-danger); }
.finding.warn { border-left-color: var(--color-warning); }
.finding.info { border-left-color: var(--color-info); }
.finding.ok { border-left-color: var(--color-success); }
.finding .fl { display: flex; flex-direction: column; gap: 6px; }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.lvl.bad { color: var(--color-danger); }
.lvl.warn { color: var(--color-warning); }
.lvl.info { color: var(--color-info); }
.lvl.ok { color: var(--color-success); }
.clause { font: 600 11.5px var(--font-mono); color: var(--color-text-muted); }
.fb2 p { margin: 3px 0 0; color: var(--color-text-secondary); }
.manual { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.manual li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.manual li.done { background: var(--color-success-bg); border-color: var(--color-success-border); }
.mchk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.mchk .mt { display: block; color: var(--color-text-secondary); margin-top: 2px; }
.manual .mt.kek { display: block; margin-top: 4px; font-size: 11.5px; color: var(--color-primary); font-weight: 600; }
.mnote { display: flex; flex-direction: column; gap: 4px; }
.src li { max-width: 100ch; }

/* Form Düzenleri & Ayarlar */
.infoform { display: grid; gap: 16px; max-width: 1100px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.stack, .stackform { display: grid; gap: 12px; }
.diff { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 14px 18px; margin-top: 12px; }
.diff h4 { margin: 12px 0 4px; }
.idgrid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.logobox { display: flex; flex-direction: column; gap: 10px; }
.lp { height: 110px; background: repeating-conic-gradient(#f3f5f7 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--color-border-strong); border-radius: 8px; display: grid; place-items: center; padding: 10px; }
.lp img { max-width: 100%; max-height: 100%; }
.lp.none { color: var(--color-text-muted); }
.colorrow { display: flex; gap: 8px; }
.colorrow input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-ctrl); background: #fff; }
.colorrow input[type=text] { width: 110px; font-family: var(--font-mono); }

.apgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.apgrid > table.apt { width: 100%; min-width: 0; table-layout: fixed; background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-subtle); }
.apgrid table.apt caption { text-align: left; font-weight: 600; padding: 0 2px 6px; color: var(--color-text-secondary); caption-side: top; }
.apgrid table.apt th:first-child { width: 78px; }
table.apt td, table.apt th { padding: 4px 6px; text-align: center; }
table.apt th { text-transform: none; letter-spacing: 0; }
.apsel { width: 100%; min-width: 0; font-weight: 700; text-align: center; padding: 2px; }
.apsel.ap-H { background: var(--color-danger-bg); color: var(--color-danger); }
.apsel.ap-M { background: var(--color-warning-bg); color: #7C4D05; }
.apsel.ap-L { background: var(--color-success-bg); color: var(--color-success); }

details.scale { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); margin-bottom: 8px; }
details.scale summary { padding: 10px 14px; font-weight: 600; cursor: pointer; }
details.scale ol { list-style: none; margin: 0; padding: 4px 14px 14px; display: grid; gap: 6px; }
details.scale li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; }
.stepn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; font-size: 13px; }
ol.guide { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 90ch; }
ol.guide li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 14px 16px; }
ol.guide .stepn { width: 30px; height: 30px; }
ol.guide p { margin: 3px 0 0; color: var(--color-text-secondary); }

/* ============================================================================
   SLIDE-OVER DRAWER, MODAL VE TOAST BİLEŞENLERİ
   ============================================================================ */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 46, 0.42);
  z-index: 60;
  animation: scIn 0.16s ease;
}
.modal {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
}
.modal.wide { width: min(900px, 94vw); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--color-border); }
.modal header h2 { font-size: 16px; font-weight: 600; }
.mbody { padding: 16px 18px; overflow-y: auto; }
.mbody h3 { font-size: 14px; margin: 14px 0 6px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--color-border); background: var(--color-surface-subtle); border-radius: 0 0 var(--radius-card) var(--radius-card); flex-wrap: wrap; }

.drawer {
  position: fixed;
  z-index: 70;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(680px, 100vw);
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: -12px 0 36px rgba(24, 28, 46, 0.16);
  animation: drIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes drIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes scIn { from { opacity: 0; } to { opacity: 1; } }

.drawer form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.drawer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.drawer header h2 { font-size: 16px; }
.dr-sum { font-size: 12.5px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dr-sum #dr-ap { display: inline-flex; align-items: center; gap: 8px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 16px 18px 20px; display: grid; gap: 16px; align-content: start; }
.drawer footer { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--color-border); background: var(--color-surface-subtle); flex-wrap: wrap; }

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-card); margin: 0; padding: 12px 14px 14px; min-width: 0; background: var(--color-surface); }
legend { font-weight: 600; font-size: 12.5px; padding: 0 6px; color: var(--color-primary); }
.sodbox { display: flex; gap: 12px; align-items: center; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); padding: 8px 10px; }
.scorebox input { width: 62px; text-align: center; font-size: 18px; font-weight: 700; min-height: 40px; }
.sodbox .hint { margin: 0; }
.apbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; background: var(--color-surface-subtle); border-radius: var(--radius-ctrl); }
.apbar .txt { color: var(--color-text-secondary); font-size: 12.5px; }
#ap-warn .warnbox { margin-top: 8px; }

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--color-text-primary);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-ctrl);
  box-shadow: var(--shadow-float);
  max-width: min(640px, 92vw);
  font-size: 13px;
  font-weight: 500;
}
.toast.bad { background: var(--color-danger); }

/* ============================================================================
   RAPOR, KALİBRASYON, 8D CAPA VE YARDIMCI MODÜL STİLLERİ
   ============================================================================ */
.paper { display: grid; gap: 22px; }
.rsheet { background: #fff; border: 1px solid var(--color-border-strong); box-shadow: var(--shadow-subtle); padding: 18px; overflow-x: auto; border-radius: var(--radius-card); }
.rh { display: grid; grid-template-columns: 130px minmax(200px, .8fr) minmax(520px, 2fr); gap: 16px; align-items: stretch; border: 1.5px solid var(--color-text-primary); }
.rh > div { padding: 5px 10px; }
.rh-logo { display: grid; place-items: center; border-right: 1.5px solid var(--color-text-primary); }
.rlogo { max-width: 112px; max-height: 40px; display: block; }
.rlogo.big { max-width: 240px; max-height: 90px; }
.rname { font-weight: 700; font-size: 16px; text-align: center; }
.rh-title { display: flex; flex-direction: column; justify-content: center; background: var(--color-primary-soft); border-right: 1.5px solid var(--color-text-primary); }
.rh-title h2 { font-size: 15px; color: var(--color-primary); line-height: 1.2; }
.rh-sub { color: var(--color-text-secondary); font-size: 12px; }
.rh-meta { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 12px; font-size: 10.5px; padding: 4px 10px !important; align-content: center; }
.rh-meta div { display: flex; flex-direction: column; border-bottom: 1px solid var(--color-border); padding: 2px 0; min-width: 0; }
.rh-meta span { color: var(--color-text-muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.rh-meta b { font-weight: 600; overflow-wrap: anywhere; }

table.rpt { border-collapse: collapse; width: 100%; font-size: 11px; }
table.rpt th, table.rpt td { border: 1px solid #8793a3; padding: 3px 5px; vertical-align: top; overflow-wrap: anywhere; }
table.rpt thead th { background: #e9edf2; font-weight: 600; text-align: left; font-size: 10.5px; }
table.rpt thead tr.bands th { background: var(--color-primary); color: #fff; text-align: center; text-transform: uppercase; letter-spacing: 0.06em; font-size: 9.5px; }
table.rpt thead td.rhead { border: 0; padding: 0 0 8px; background: #fff; }
table.rpt td.rhead .rh { margin: 0; }
table.rpt td.n, table.rpt th.n { text-align: center; white-space: nowrap; font-family: var(--font-mono); }
table.rpt td i { font-style: normal; color: var(--color-text-muted); font-size: 10px; }
table.rpt tr.opstart td { border-top: 2px solid var(--color-text-secondary); }
table.rpt .sub { font-size: 10px; color: var(--color-text-muted); }
table.rpt .ap { min-width: 20px; height: 18px; font-size: 11px; }
table.rpt.fmea th.w-op { min-width: 84px; }
table.rpt.fmea th.w-fn { min-width: 110px; }
table.rpt.fmea th.w-ow, table.rpt.fmea th.w-st, table.rpt.fmea th.w-nw { min-width: 74px; }
table.rpt th.n, table.rpt td.n { min-width: 26px; }
.rsheet > .rh { margin-bottom: 14px; }
.rsheet > .legend { margin: 6px 0 8px; }

.cover { min-height: 640px; display: flex; flex-direction: column; gap: 22px; border-top: 8px solid var(--color-primary); }
.cv-top { display: flex; justify-content: space-between; align-items: center; }
.cv-conf { border: 1.5px solid var(--color-text-secondary); padding: 3px 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.cv-mid { margin: 40px 0 10px; }
.cv-kicker { color: var(--color-primary); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.cover h1 { font-size: 34px; letter-spacing: -0.02em; margin: 6px 0; }
.cv-sub { color: var(--color-text-secondary); font-size: 15px; }
.cv-part { margin-top: 22px; font-size: 24px; font-weight: 600; padding-left: 14px; border-left: 5px solid var(--color-primary); }
.cv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
table.kv { border-collapse: collapse; width: 100%; font-size: 13px; }
table.kv th { text-align: left; color: var(--color-text-muted); font-weight: 500; width: 40%; padding: 6px 8px; border-bottom: 1px solid var(--color-border); }
table.kv td { padding: 6px 8px; font-weight: 600; border-bottom: 1px solid var(--color-border); }
.cv-team { border: 1px solid var(--color-border-strong); border-radius: 6px; padding: 10px 14px; }
.cv-team h3 { font-size: 13px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.cv-stats { margin-top: auto; display: flex; gap: 26px; color: var(--color-text-secondary); border-top: 1px solid var(--color-border); padding-top: 12px; }
.cv-stats b { font-size: 20px; color: var(--color-text-primary); font-family: var(--font-mono); }
.sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 60px; }
.sig { display: flex; flex-direction: column; gap: 3px; }
.sline { border-bottom: 1.5px solid var(--color-text-primary); height: 56px; margin-bottom: 4px; }
.cv-5t { border: 1px solid var(--color-border-strong); border-radius: 6px; padding: 10px 14px; margin-top: 10px; }
.cv-5t h3 { font-size: 13px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; }
.cv-5tg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 16px; font-size: 11.5px; }
.cv-5tg p { margin: 2px 0 0; }

abbr.req { color: var(--color-danger); text-decoration: none; cursor: help; margin-left: 2px; }
.ibtn.reviewbtn { color: #7C4D05; background: var(--color-warning-bg); }
table.difft { margin: 6px 0 10px; width: 100%; font-size: 12.5px; }
table.difft td.was { color: var(--color-danger); background: var(--color-danger-bg); }
table.difft td.now { color: var(--color-success); background: var(--color-success-bg); }
details > summary { cursor: pointer; }
.optset { border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 10px 14px; margin: 12px 0 0; }
.optset legend { font-weight: 600; padding: 0 6px; }
.optset .radio { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.optset .radio input { margin-top: 4px; }

details.more { margin-top: var(--space-4); }
details.more > summary { cursor: pointer; color: var(--color-text-secondary); font-weight: 600; padding: 8px 2px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '›'; display: inline-block; transition: transform 0.15s; font-size: 18px; line-height: 1; color: var(--color-text-muted); }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .ovgrid { margin-top: 12px; }

details.crit { margin-top: 6px; font-size: 12.5px; }
details.crit > summary { cursor: pointer; color: var(--color-primary); font-weight: 500; list-style: none; }
details.crit > summary::-webkit-details-marker { display: none; }
details.crit > summary::before { content: "▸ "; }
details.crit[open] > summary::before { content: "▾ "; }
dl.critdl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0 2px; padding: 8px 10px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); max-height: 240px; overflow: auto; }
dl.critdl dt { font-weight: 600; font-size: 11.5px; color: var(--color-text-muted); }
dl.critdl dd { margin: 0; line-height: 1.45; }
table.reft th, table.reft td { vertical-align: top; font-size: 12.5px; min-width: 120px; line-height: 1.4; }
table.reft th.num { min-width: 44px; text-align: center; }

/* Supabase Auth Gate */
.authgate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--color-bg); padding: 16px; }
.authgate .authbox { width: min(460px, 100%); max-height: 92vh; overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 24px 26px 20px; box-shadow: var(--shadow-modal); }
.authgate .auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); margin-bottom: 18px; }
.authgate .auth-tab { border: 0; background: transparent; padding: 8px 12px; border-radius: 5px; font: inherit; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; transition: background 0.15s, color 0.15s; }
.authgate .auth-tab:hover { color: var(--color-text-primary); }
.authgate .auth-tab.on { background: var(--color-surface); color: var(--color-primary); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.authgate h1 { font-size: 20px; margin: 0 0 4px; }
.authgate .authsub { color: var(--color-text-secondary); font-size: 13px; margin: 0 0 14px; }
.authgate form { display: grid; gap: 10px; }
.authgate label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.authgate input:not([type="radio"]):not([type="checkbox"]) { font: inherit; padding: 9px 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-ctrl); background: var(--color-surface); color: var(--color-text-primary); }
.authgate .auth-code-inp { text-transform: uppercase; letter-spacing: 0.04em; }
.authgate .auth-mode-wrap { display: grid; gap: 6px; margin-top: 2px; }
.authgate .auth-mode-lbl { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.authgate .auth-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.authgate .auth-mode-opt { display: flex; align-items: flex-start; gap: 7px; padding: 9px 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-ctrl); background: var(--color-surface-subtle); font-size: 12.5px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.authgate .auth-mode-opt input[type="radio"] { margin: 2px 0 0; accent-color: var(--color-primary); flex: none; }
.authgate .auth-mode-opt.on { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary); font-weight: 600; }
.authgate .autherr { color: var(--color-danger); background: var(--color-danger-bg); border: 1px solid var(--color-danger-border); border-radius: var(--radius-ctrl); padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.authgate .authok { color: var(--color-success); background: var(--color-success-bg); border: 1px solid var(--color-success-border); border-radius: var(--radius-ctrl); padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.authgate .authlinks { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.authgate .authlinks a, .authgate .authlinks button { color: var(--color-primary); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }
.authgate .authnote { margin-top: 14px; font-size: 11.5px; color: var(--color-text-muted); }
#authgate [hidden], .inv-created-box[hidden] { display: none; }
.auditbox { max-height: 420px; overflow: auto; }

/* Ekip Davet Yönetimi (Ayarlar) */
.inv-create-bar { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) auto; gap: 10px; align-items: end; margin-top: 10px; }
.inv-create-bar .f { margin: 0; }
.inv-create-act { display: flex; align-items: flex-end; }
.inv-created-box { margin-top: 12px; padding: 12px; border: 1px solid var(--color-success-border); background: var(--color-success-bg); border-radius: var(--radius-ctrl); display: grid; gap: 8px; }
.inv-created-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--color-success); }
.inv-url-row { display: flex; gap: 8px; align-items: center; }
.inv-url-inp { flex: 1; min-width: 0; font-size: 12.5px; padding: 7px 9px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-ctrl); background: var(--color-surface); color: var(--color-text-primary); }
@media (max-width: 720px) {
  .inv-create-bar { grid-template-columns: 1fr; }
  .authgate .auth-mode-switch { grid-template-columns: 1fr; }
}

/* Kalibrasyon Modülü */
.kal-scroll { overflow: auto; max-width: 100%; }
.kdays { font-variant-numeric: tabular-nums; font-weight: 600; }
.kdays.bad { color: var(--color-danger); }
.kdays.warn { color: var(--color-warning); }
.kpis .item.kpi-i { text-decoration: none; color: inherit; }
.kpis a.item.kpi-i:hover { border-color: var(--color-primary); }
.kinv td, .kpts td { vertical-align: top; }
.kpts input.kn, input.kn { width: 84px; font: inherit; padding: 3px 5px; border: 1px solid var(--color-border-strong); border-radius: 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.kpts tr.kack td { background: var(--color-warning-bg); }
.kpts tr.kack[hidden] { display: none; }
.kconf { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-success); }
.kconf.low { color: var(--color-danger); }
.kwarn { color: var(--color-warning); }
.ksteps { display: flex; gap: 0; list-style: none; padding: 0; margin: 10px 0 14px; flex-wrap: wrap; }
.ksteps li { flex: 1; min-width: 110px; padding: 7px 10px; font-size: 12px; text-align: center; background: var(--color-surface-subtle); color: var(--color-text-muted); border: 1px solid var(--color-border); margin-left: -1px; }
.ksteps li.done { background: var(--color-success-bg); color: var(--color-success); font-weight: 600; }
.ksteps li.cur { background: var(--color-primary); color: #fff; font-weight: 600; }

.kmonth { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--color-border); border-left: 1px solid var(--color-border); }
.kmonth .kh { padding: 5px 6px; background: var(--color-surface-subtle); font-size: 12px; font-weight: 600; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.kd { min-height: 78px; padding: 4px 6px; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--color-surface); display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.kd .n { color: var(--color-text-muted); font-size: 11.5px; font-family: var(--font-mono); }
.kd.out { background: var(--color-surface-subtle); opacity: 0.6; }
.kd.today { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.kweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--color-border); border-left: 1px solid var(--color-border); }
.kweek .kd { min-height: 140px; }
.kyear { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.kym { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); cursor: pointer; font: inherit; text-align: left; }
.kym:hover { border-color: var(--color-primary); }
.kym .num { font-size: 22px; font-weight: 600; font-family: var(--font-mono); }
.kcal { display: block; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; text-decoration: none; color: #fff; background: var(--color-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcal.due { background: var(--color-warning); }
.kcal.due.late { background: var(--color-danger); }
.kcal.plan { background: var(--color-info); }
.kcal.sent { background: #6b5aa8; }
.kdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); vertical-align: middle; }
.kdot.due { background: var(--color-warning); }
.kdot.plan { background: var(--color-info); }
.kdot.sent { background: #6b5aa8; }
.kal-kpcard .kcp { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.kal-kpcard .kcp.bad { background: var(--color-danger-bg); padding: 6px 8px; border-radius: 4px; }
.kinv { min-width: 1280px; }
.kinv th, .kinv td { white-space: nowrap; padding: 6px 8px; }
.kinv td:nth-child(4), .kinv td:nth-child(7) { white-space: normal; min-width: 130px; }
.kinv th .sortb, .kpts th .sortb { all: unset; cursor: pointer; font-weight: 600; color: inherit; }
.kinv th .sortb:hover { color: var(--color-primary); }

/* 8D / DÖF (CAPA) Modülü */
.capa-step-dots { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.capa-step-dot { font-family: var(--font-mono); display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--color-surface-subtle); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.capa-step-dot.done { background: var(--color-success-bg); color: var(--color-success); border-color: var(--color-success-border); }
.capa-step-dot.cur { background: var(--color-warning-bg); color: #7C4D05; border-color: var(--color-warning-border); }
.capa-top-strip { border-left: 4px solid var(--color-primary); }
.capa-strip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.capa-cmp-box { padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.capa-sod-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.capa-diff-val { padding: 1px 6px; border-radius: 4px; background: var(--color-warning-bg); color: #7C4D05; font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.capa-wizard-nav.capa-stepper { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 14px 0; }
.capa-wizard-nav.capa-stepper li { min-width: 0; }
.capa-wiz-btn { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 9px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); cursor: pointer; font: inherit; text-align: left; transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s; }
.capa-wiz-btn:hover { border-color: var(--color-primary); }
.capa-step-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.capa-wiz-code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 700; color: var(--color-text-secondary); background: var(--color-surface-subtle); padding: 1px 6px; border-radius: 5px; }
.capa-step-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; font-size: 11px; color: var(--color-text-muted); background: var(--color-surface-subtle); }
.capa-step-ico svg { width: 11px; height: 11px; }
.capa-wiz-lbl { font-size: 12px; color: var(--color-text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.capa-wiz-st { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capa-wizard-nav li.done .capa-wiz-btn { border-color: var(--color-success-border); background: rgba(18, 128, 86, 0.04); }
.capa-wizard-nav li.done .capa-step-ico { background: var(--color-success-bg); color: var(--color-success); }
.capa-wizard-nav li.done .capa-wiz-st { color: var(--color-success); font-weight: 600; }
.capa-wizard-nav li.prog .capa-wiz-btn { border-color: var(--color-warning-border); }
.capa-wizard-nav li.prog .capa-step-ico { background: var(--color-warning-bg); color: var(--color-warning); }
.capa-wizard-nav li.prog .capa-wiz-st { color: var(--color-warning); font-weight: 600; }
.capa-wizard-nav li.locked .capa-wiz-btn { background: var(--color-surface-subtle); opacity: 0.82; }
.capa-wizard-nav li.locked .capa-step-ico { background: var(--color-border); color: var(--color-text-secondary); }
.capa-wizard-nav li.cur .capa-wiz-btn, .capa-wiz-btn.on { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px var(--color-primary), var(--shadow-subtle); opacity: 1; }
.capa-wizard-nav li.cur .capa-wiz-code { background: var(--color-primary); color: #fff; }
.capa-wizard-nav li.cur .capa-wiz-lbl { color: var(--color-primary); }
.capa-step-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.capa-step-head h3 { margin: 0; }
.capa-rc-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 12px 14px; background: var(--color-surface-subtle); }
.capa-rc-fieldset legend { padding: 0 8px; font-weight: 600; color: var(--color-primary); }
.capa-row-bar { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; vertical-align: middle; margin-left: 4px; }
.capa-badge { text-decoration: none; cursor: pointer; font-size: 11px; padding: 1px 7px; }
.capa-badge:hover { filter: brightness(0.95); text-decoration: none; }
.capa-row-cell { display: inline; }

/* Faz 5 Kalibrasyon Drawer & Yardımcı Modül Sınıfları */
.kal-due-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kal-drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.kal-drawer-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kal-drawer-kv span { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.kal-drawer-kv b { font-size: 13px; color: var(--color-text-primary); word-break: break-word; }
.kal-cert-frame { width: 100%; height: 56vh; min-height: 320px; border: 1px solid var(--color-border); border-radius: var(--radius-ctrl); background: var(--color-surface-subtle); }
.iatf-meter-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.iatf-meter-row .meter { flex: 1; }
.rpt-screen-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.rpt-sec-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rpt-sec-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-size: 12.5px; cursor: pointer; user-select: none; }
.rpt-sec-pill:hover { border-color: var(--color-primary); }
.rpt-sec-pill input { accent-color: var(--color-primary); margin: 0; }

/* Bootfail */
#bootfail { visibility: hidden; margin: 16px; padding: 14px 16px; border: 1px solid var(--color-danger-border); background: var(--color-danger-bg); color: var(--color-danger); border-radius: 8px; font-size: 14px; line-height: 1.5; max-width: 760px; }
body:not(.booted) #bootfail { animation: bootfail-show 0s 3s forwards; }
body.booted #bootfail { display: none; }
@keyframes bootfail-show { to { visibility: visible; } }

/* ============================================================================
   DUYARLI (RESPONSIVE) VE YAZDIRMA (PRINT) KURALLARI
   ============================================================================ */
@media (max-width: 1160px) {
  .cmd-tpl-grid, .cmd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmd-split { grid-template-columns: 1fr; }
  .capa-wizard-nav.capa-stepper { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .capa-wizard-nav.capa-stepper li { flex: 0 0 132px; }
}
@media (max-width: 900px) {
  .app, body.sb-collapsed .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .sb-scroll { flex-direction: row; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
  .sb-group { flex-direction: row; flex-wrap: wrap; }
  .sb-group-lbl, .rfoot, .sb-toggle { display: none; }
  .topbar { padding: 0 var(--space-3); }
  .tb-search-wrap { width: 190px; }
  main { padding: var(--space-4); }
  #titleblock { padding: var(--space-3) var(--space-4); }
  .tabs { padding: 0 var(--space-3); top: 0; }
  .grid3, .grid2, .idgrid, .manual li, .finding, .cmd-tpl-grid, .cmd-kpi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .loglist li { grid-template-columns: 1fr; gap: 2px; }
  .tb-search-wrap { width: 140px; }
}

#kal-printarea { display: none; }
@page { size: A3 landscape; margin: 10mm 10mm 14mm; }
@media print {
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rail, .topbar, .tabs, #titleblock, #banner, .noprint, .toast, #drawer-root, #modal-root, .skip { display: none !important; }
  .app { display: block; }
  main { padding: 0 !important; }
  .paper { display: block; }
  .rsheet { border: 0; box-shadow: none; padding: 0; overflow: visible; break-before: page; page-break-before: always; }
  .paper > .rsheet:first-child { break-before: auto; page-break-before: auto; }
  table.rpt { font-size: 7.6pt; }
  table.rpt thead { display: table-header-group; }
  table.rpt tr { break-inside: avoid; page-break-inside: avoid; }
  table.rpt.fmea tr, table.rpt.cp tr { break-inside: auto; page-break-inside: auto; }
  table.rpt.fmea td, table.rpt.cp td { break-inside: avoid; }
  table.rpt td.rhead .rh { height: 22mm; overflow: hidden; }
  .flowwrap { border: 0; padding: 0; overflow: visible; }
  .cover { min-height: 255mm; }
  body.printing-kal > *:not(#kal-printarea) { display: none !important; }
  body.printing-kal #kal-printarea { display: block !important; padding: 8mm; font-size: 9pt; }
  body.printing-kal #kal-printarea table { width: 100%; border-collapse: collapse; font-size: 7.5pt; }
  body.printing-kal #kal-printarea th, body.printing-kal #kal-printarea td { border: 1px solid #999; padding: 2px 4px; text-align: left; vertical-align: top; }
  body.printing-kal #kal-printarea thead { display: table-header-group; }
  body.printing-kal #kal-printarea .nw { white-space: nowrap; }
}
