/*
 * QRaraç UI — build.css
 * Tüm bileşenler + token'lar + utility sınıfları tek dosyada.
 * Kaynaklar: dist/ui/tokens.css + dist/ui/components/*.css + app utilities
 */

/* ==========================================================================
   1. TOKENS & RESET
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --border: #e2e8f0;
  --border-2: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --text-mut: #64748b;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-3: 0 10px 24px rgba(15, 23, 42, .10);
  --font: 'Inter', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --tr-fast: 120ms ease;
  --tr: 180ms ease;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-toast: 1100;
  --brand: #0a0a0a;
  --brand-hover: #1f1f1f;
  --brand-active: #000000;
  --brand-bg: #f4f4f5;
  --brand-fg: #ffffff;
  --ring: rgba(0, 0, 0, .3);
}

[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-2: #111827;
  --bg-3: #1f2937;
  --border: #1f2937;
  --border-2: #374151;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --text-mut: #94a3b8;
  --success-bg: #052e16;
  --warning-bg: #2c1d0a;
  --danger-bg: #2a0f0f;
  --info-bg: #082f49;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 4px 12px rgba(0,0,0,.45);
  --shadow-3: 0 10px 24px rgba(0,0,0,.55);
}

[data-panel="q"] {
  --brand: #ef4444;
  --brand-hover: #dc2626;
  --brand-active: #b91c1c;
  --brand-bg: #fef2f2;
  --brand-fg: #ffffff;
  --ring: rgba(239, 68, 68, .3);
}
[data-panel="tech"] {
  --brand: #1e3a8a;
  --brand-hover: #1e40af;
  --brand-active: #172554;
  --brand-bg: #eff6ff;
  --brand-fg: #ffffff;
  --ring: rgba(30, 58, 138, .3);
}
[data-panel="fleet"] {
  --brand: #047857;
  --brand-hover: #065f46;
  --brand-active: #064e3b;
  --brand-bg: #ecfdf5;
  --brand-fg: #ffffff;
  --ring: rgba(4, 120, 87, .3);
}
[data-panel="admin"],
[data-panel="qa"] {
  --brand: #0a0a0a;
  --brand-hover: #1f1f1f;
  --brand-active: #000000;
  --brand-bg: #f4f4f5;
  --brand-fg: #ffffff;
  --ring: rgba(0,0,0,.3);
}

[data-theme="dark"][data-panel="q"]     { --brand-bg: #2a0f0f; }
[data-theme="dark"][data-panel="tech"]  { --brand-bg: #0d1a3d; }
[data-theme="dark"][data-panel="fleet"] { --brand-bg: #052e1f; }
[data-theme="dark"][data-panel="admin"],
[data-theme="dark"][data-panel="qa"] {
  --brand: #f4f4f5;
  --brand-hover: #e4e4e7;
  --brand-active: #ffffff;
  --brand-bg: #1f1f1f;
  --brand-fg: #0a0a0a;
}

/* === Kurumsal kabuk (sidebar / topbar / footer) tokenları === */
:root {
  --sb-bg: #17191e;
  --sb-bg-hover: #22252c;
  --sb-bg-active: #2b2f38;
  --sb-border: rgba(255, 255, 255, .08);
  --sb-text: #d6d9df;
  --sb-text-strong: #ffffff;
  --sb-text-mut: #8e94a0;
  --sb-accent: #e2e8f0;
  --sb-focus: #ffffff;
  --topbar-bg: #ffffff;
  --topbar-border: var(--border);
  --topbar-accent: #17191e;
  --footer-bg: #f8fafc;
  --footer-text: #526077;
  --footer-link-hover: var(--text);
  --page-bg: #f6f7f9;
}
[data-panel="fleet"] {
  --sb-bg: #0b2a23; --sb-bg-hover: #12372e; --sb-bg-active: #16423a;
  --sb-text: #d3e6df; --sb-text-mut: #86a99d; --sb-accent: #34d399;
  --topbar-accent: #047857;
}
[data-panel="tech"] {
  --sb-bg: #0c1a3a; --sb-bg-hover: #13264f; --sb-bg-active: #183060;
  --sb-text: #d2dbf0; --sb-text-mut: #8fa1cc; --sb-accent: #60a5fa;
  --topbar-accent: #1e3a8a;
}
[data-panel="admin"], [data-panel="qa"] {
  --sb-accent: #e2e8f0; --topbar-accent: #17191e;
}
[data-panel="q"] {
  --sb-accent: #ef4444; --topbar-accent: #dc2626;
}
[data-theme="dark"] {
  --topbar-bg: #0b0f17; --footer-bg: #0b0f17; --footer-text: #94a3b8; --page-bg: #0b0f17;
  --topbar-accent: var(--brand);
}
/* q paneli: kırmızı yalnız vurgu; birincil düğme AA için bir ton koyu */
[data-panel="q"] { --brand: #dc2626; --brand-hover: #b91c1c; --brand-active: #991b1b; --ring: rgba(220, 38, 38, .3); }

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

html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

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

img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { margin: 0 0 var(--space-3) 0; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 var(--space-4) 0; }

/* ==========================================================================
   2. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: background var(--tr), border-color var(--tr), color var(--tr), box-shadow var(--tr-fast);
  background: transparent;
  color: var(--text);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-fg); }
.btn-primary:active { background: var(--brand-active); border-color: var(--brand-active); }

.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--bg-2); }
.btn-secondary:active { background: var(--bg-3); }

.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-ghost:active { background: var(--bg-3); }

.btn-danger { background: var(--danger); color: #ffffff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-danger:active { background: #991b1b; border-color: #991b1b; }

.btn-success { background: var(--success); color: #ffffff; border-color: var(--success); }
.btn-success:hover { background: #15803d; border-color: #15803d; }

.btn-sm  { height: 32px; padding: 0 var(--space-3); font-size: 13px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg  { height: 48px; padding: 0 var(--space-5); font-size: 15px; }
.btn-lg svg { width: 18px; height: 18px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-lg { width: 48px; }
.btn-block { width: 100%; }

.btn[aria-busy="true"] { color: transparent; position: relative; }
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--brand-fg);
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   3. FORMS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: var(--space-1); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-help  { font-size: 12px; color: var(--text-mut); margin-top: var(--space-1); }
.form-error { font-size: 12px; color: var(--danger); margin-top: var(--space-1); display: flex; align-items: center; gap: 4px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-mut); }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--text-mut); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
.form-input[disabled], .form-input[readonly],
.form-select[disabled], .form-textarea[disabled], .form-textarea[readonly] {
  background: var(--bg-2);
  color: var(--text-mut);
  cursor: not-allowed;
}
.form-input.is-invalid, .form-select.is-invalid, .form-textarea.is-invalid { border-color: var(--danger); }
.form-input.is-invalid:focus, .form-select.is-invalid:focus, .form-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .25);
}

.form-textarea { height: auto; min-height: 96px; padding: var(--space-3); resize: vertical; }

.form-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-checkbox, .form-radio {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  transition: border-color var(--tr-fast), background var(--tr-fast);
  flex-shrink: 0;
}
.form-checkbox { border-radius: var(--radius-sm); }
.form-radio    { border-radius: var(--radius-full); }
.form-checkbox:checked, .form-radio:checked { background: var(--brand); border-color: var(--brand); }
.form-checkbox:checked::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px no-repeat;
}
.form-radio:checked::after { content: ""; position: absolute; inset: 4px; background: #fff; border-radius: 50%; }
.form-checkbox:focus-visible, .form-radio:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.form-check {
  display: flex; align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
}

.form-input-group { position: relative; display: flex; align-items: stretch; }
.form-input-group .form-input { padding-left: 36px; }
.form-input-group.has-suffix .form-input { padding-right: 36px; padding-left: var(--space-3); }
.form-input-group.has-prefix.has-suffix .form-input { padding-left: 36px; padding-right: 36px; }
.form-input-group .input-prefix,
.form-input-group .input-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mut); pointer-events: none;
}
.form-input-group .input-prefix { left: 12px; }
.form-input-group .input-suffix { right: 12px; pointer-events: auto; }
.form-input-group .input-suffix.is-button { cursor: pointer; }

/* ==========================================================================
   4. CARDS
   ========================================================================== */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: var(--space-5);
  transition: box-shadow var(--tr), border-color var(--tr);
}
.card-hoverable:hover { box-shadow: var(--shadow-2); border-color: var(--border-2); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.card-title    { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.card-subtitle { font-size: 13px; color: var(--text-mut); margin: 2px 0 0; }
.card-body     { color: var(--text-2); }
.card-footer   {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.stat-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2);
}
.stat-card .stat-label  { font-size: 12px; color: var(--text-mut); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value  { font-size: 28px; font-weight: 700; color: var(--text); font-family: var(--mono); }
.stat-card .stat-delta  { font-size: 12px; color: var(--success); }
.stat-card .stat-delta.is-down { color: var(--danger); }

.list-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-card .list-card-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.list-card .list-card-item:last-child { border-bottom: none; }
.list-card .list-card-item:hover { background: var(--bg-2); }

/* ==========================================================================
   5. TABLES
   ========================================================================== */

.tbl {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tbl th, .tbl td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.tbl thead th { background: var(--bg-2); color: var(--text-mut); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tbl tbody tr { transition: background var(--tr-fast); }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody td { color: var(--text-2); }
.tbl-striped tbody tr:nth-child(even) { background: var(--bg-2); }
.tbl-striped tbody tr:nth-child(even):hover { background: var(--bg-3); }
.tbl-compact th, .tbl-compact td { padding: var(--space-2) var(--space-3); }
.tbl th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 28px; }
.tbl th.sortable::after {
  content: ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 15l5 5 5-5'/><path d='M7 9l5-5 5 5'/></svg>") center/contain no-repeat;
  opacity: .5;
}
.tbl .num     { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .tbl-empty td { padding: var(--space-10) var(--space-4); text-align: center; color: var(--text-mut); font-size: 14px; }
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }

/* ==========================================================================
   6. NAVIGATION — Topbar, Bottom-nav, Sidebar, Breadcrumb
   ========================================================================== */

/* --- Topbar --- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-brand-strip { height: 3px; background: var(--brand); width: 100%; }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 56px;
  padding: 0 var(--space-4);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}
.topbar-brand img, .topbar-brand svg { height: 28px; width: auto; }
.topbar-brand:hover { color: var(--text); }

.topbar-brand-name { font-weight: 600; font-size: 15px; }

.topbar-title  { font-size: 14px; color: var(--text-2); font-weight: 500; }
.topbar-extra  { font-size: 13px; color: var(--text-mut); }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--tr-fast);
}
.topbar-menu-toggle:hover { background: var(--bg-2); }
.topbar-menu-toggle svg, .topbar-menu-toggle i { width: 20px; height: 20px; }

/* Topbar arama */
.topbar-search { position: relative; display: flex; align-items: center; }
.topbar-search-input {
  height: 34px;
  width: 200px;
  padding: 0 var(--space-3) 0 var(--space-5);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 13px;
  transition: border-color var(--tr-fast), width var(--tr);
}
.topbar-search-input:focus { outline: none; border-color: var(--brand); width: 260px; }

/* Topbar bildirim zili */
.topbar-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.topbar-bell:hover { background: var(--bg-2); color: var(--text); }
.topbar-bell svg, .topbar-bell i { width: 20px; height: 20px; }

.topbar-bell-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Topbar kullanıcı menüsü */
.topbar-user { position: relative; }

.topbar-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-2);
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--tr-fast);
}
.topbar-user-trigger:hover { background: var(--bg-2); }
.topbar-user-trigger svg, .topbar-user-trigger i { width: 16px; height: 16px; color: var(--text-mut); }

.topbar-user-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--brand-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.topbar-user-name { font-size: 14px; font-weight: 500; color: var(--text-2); }

.topbar-user-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  z-index: var(--z-dropdown);
  padding: var(--space-1) 0;
  animation: menu-in 140ms ease-out;
}
.topbar-user-menu[hidden] { display: none; }
.topbar-user-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.topbar-user-menu a:hover { background: var(--bg-2); color: var(--text); }
.topbar-user-menu a svg, .topbar-user-menu a i { width: 16px; height: 16px; flex-shrink: 0; }
.topbar-user-menu hr { margin: var(--space-1) 0; border: none; border-top: 1px solid var(--border); }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Bottom nav (mobil) --- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border-top: 1px solid var(--border);
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  padding: var(--space-1);
  font-size: 11px;
  color: var(--text-mut);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--tr-fast);
  position: relative;
}
.bottom-nav-item svg, .bottom-nav-item i { width: 22px; height: 22px; }
.bottom-nav-item:hover { color: var(--text-2); }
.bottom-nav-item.is-active,
.bottom-nav-item.active { color: var(--brand); }
.bottom-nav-item.is-active i,
.bottom-nav-item.active i { stroke-width: 2.4; }

.bottom-nav-label { font-size: 10px; line-height: 1; margin-top: 1px; }

.bottom-nav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* FAB (ortadaki + butonu) */
.bottom-nav-fab {
  width: 52px; height: 52px;
  background: var(--brand);
  color: var(--brand-fg);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  position: relative;
  top: -12px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--ring);
  transition: background var(--tr), transform var(--tr-fast);
}
.bottom-nav-fab:hover { background: var(--brand-hover); color: var(--brand-fg); transform: scale(1.05); }
.bottom-nav-fab svg, .bottom-nav-fab i { width: 24px; height: 24px; }

/* Araçlarım popover */
.bottom-nav-popover {
  position: fixed;
  bottom: 70px;
  left: 50%; transform: translateX(-50%);
  width: min(340px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  z-index: calc(var(--z-sticky) + 10);
  overflow: hidden;
  animation: popover-in 160ms ease-out;
}
.bottom-nav-popover[hidden] { display: none; }

@keyframes popover-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.bottom-nav-popover-header {
  padding: var(--space-3) var(--space-4);
  font-size: 12px; font-weight: 600;
  color: var(--text-mut);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.bottom-nav-popover-list { list-style: none; margin: 0; padding: var(--space-1) 0; }
.bottom-nav-popover-list li a {
  display: flex; align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text-2); font-size: 14px;
  text-decoration: none;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.bottom-nav-popover-list li a:hover { background: var(--bg-2); color: var(--text); }
.bottom-nav-popover-list li a svg,
.bottom-nav-popover-list li a i { width: 18px; height: 18px; color: var(--text-mut); }
.bottom-nav-popover-empty { padding: var(--space-4); color: var(--text-mut); font-size: 13px; text-align: center; }
.bottom-nav-popover-divider { height: 1px; background: var(--border); margin: var(--space-1) 0; }

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

/* --- Sidebar (desktop) --- */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky; top: 0;
  overflow-y: auto;
  padding: var(--space-4) var(--space-2);
}
.sidebar-section {
  padding: var(--space-2) var(--space-3);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-mut); margin-top: var(--space-3);
}
.sidebar-item {
  display: flex; align-items: center;
  gap: var(--space-3); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.sidebar-item svg, .sidebar-item i { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg-3); color: var(--text); }
.sidebar-item.active { background: var(--brand-bg); color: var(--brand); }
.sidebar-item.active svg, .sidebar-item.active i { color: var(--brand); }

@media (max-width: 1023px) { .sidebar { display: none; } }

/* --- Sidebar: header/logo, user, nav link'leri (qa/tech/fleet ortak şeması) --- */
.sidebar-header { padding: 0 var(--space-2) var(--space-4); }
.sidebar-logo {
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none; color: var(--text);
}
.sidebar-logo-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.sidebar-logo-text { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }
.sidebar-logo-text small { font-size: 11px; font-weight: 500; color: var(--text-mut); }

.sidebar-user {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.sidebar-user-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--brand-bg); color: var(--brand);
  font-size: 14px; font-weight: 700;
}
.sidebar-user-avatar svg, .sidebar-user-avatar i { width: 18px; height: 18px; }
.sidebar-user-meta { min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; color: var(--text-mut); }

.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-section-header {
  padding: var(--space-2) var(--space-3);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-mut); font-weight: 600; margin-top: var(--space-3);
}
.sidebar-section-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.sidebar-link:hover { background: var(--bg-3); color: var(--text); }
.sidebar-link.is-active { background: var(--brand-bg); color: var(--brand); }
.sidebar-link.is-active .sidebar-link-icon { color: var(--brand); }
.sidebar-link-icon { display: flex; flex-shrink: 0; }
.sidebar-link-icon svg, .sidebar-link-icon i { width: 18px; height: 18px; }
.sidebar-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-badge {
  flex-shrink: 0; min-width: 18px; padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-align: center;
}

.sidebar-footer { padding: var(--space-4) var(--space-3) 0; margin-top: auto; }
.sidebar-footer small { font-size: 11px; color: var(--text-mut); }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; align-items: center; gap: var(--space-1); font-size: 13px; color: var(--text-mut); padding: var(--space-2) 0; }
.breadcrumb a { color: var(--text-mut); text-decoration: none; transition: color var(--tr-fast); }
.breadcrumb a:hover { color: var(--text-2); }
.breadcrumb .sep { color: var(--border-2); display: inline-flex; }
.breadcrumb .sep svg { width: 14px; height: 14px; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ==========================================================================
   7. APP LAYOUT
   ========================================================================== */

.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  background: var(--brand); color: var(--brand-fg);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px; font-weight: 500;
  z-index: 9999; text-decoration: none;
  transition: top var(--tr-fast);
}
.skip-link:focus { top: 0; }

.app-shell {
  display: flex; min-height: 100vh;
}
.app-shell--mobile {
  flex-direction: column;
}

.app-main {
  flex: 1; min-width: 0;
  padding-bottom: 80px;
}
@media (min-width: 1024px) {
  .app-main { padding-bottom: 0; }
}
.app-main-content { width: 100%; }

.page-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: var(--space-3) var(--space-4);
}
.page-title { font-size: 16px; font-weight: 600; margin: 0; color: var(--text); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
}

/* ==========================================================================
   8. DIALOG
   ========================================================================== */

.dialog {
  padding: 0; border: none;
  border-radius: var(--radius-lg);
  background: var(--bg); color: var(--text);
  box-shadow: var(--shadow-3);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  overflow: hidden;
  margin: auto;
}
.dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.dialog[open]          { animation: dlg-in 180ms ease-out; }
.dialog[open]::backdrop{ animation: dlg-fade 180ms ease-out; }
@keyframes dlg-in   { from { opacity:0; transform:translateY(-12px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes dlg-fade { from { opacity:0; } to { opacity:1; } }

.dialog-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.dialog-title { font-size: 16px; font-weight: 600; margin: 0; color: var(--text); }
.dialog-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--text-mut); cursor: pointer;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.dialog-close:hover { background: var(--bg-2); color: var(--text); }
.dialog-close svg { width: 18px; height: 18px; }
.dialog-body { padding: var(--space-5); overflow-y: auto; max-height: 60vh; color: var(--text-2); }
.dialog-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-2); padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.dialog-sm   { width: min(400px, calc(100% - 32px)); }
.dialog-lg   { width: min(800px, calc(100% - 32px)); }

@media (max-width: 640px) {
  .dialog { width: calc(100% - 16px); max-height: calc(100vh - 32px); }
}

/* ==========================================================================
   9. TOAST
   ========================================================================== */

.toast-container {
  position: fixed; right: var(--space-4); bottom: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-2);
  z-index: var(--z-toast);
  pointer-events: none;
  max-width: 360px; width: calc(100% - 32px);
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start;
  gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--bg); border: 1px solid var(--border);
  border-left: 4px solid var(--text-mut);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  font-size: 14px; color: var(--text);
  animation: toast-in 220ms ease-out;
}
.toast.is-leaving { animation: toast-out 200ms ease-in forwards; }
.toast .toast-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.toast .toast-body { flex: 1; line-height: 1.45; }
.toast .toast-title { display: block; font-weight: 600; margin-bottom: 2px; }
.toast .toast-close { background: transparent; border: none; cursor: pointer; color: var(--text-mut); padding: 0; width: 20px; height: 20px; }
.toast .toast-close:hover { color: var(--text); }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-danger  { border-left-color: var(--danger); }
.toast-danger  .toast-icon { color: var(--danger); }
.toast-info    { border-left-color: var(--info); }
.toast-info    .toast-icon { color: var(--info); }
@keyframes toast-in  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toast-out { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(20px); } }

@media (max-width: 640px) {
  .toast-container { right: var(--space-2); left: var(--space-2); bottom: var(--space-2); max-width: none; width: auto; }
}

/* ==========================================================================
   10. EMPTY STATE
   ========================================================================== */

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-mut); gap: var(--space-3);
}
.empty-state .empty-icon {
  width: 48px; height: 48px;
  color: var(--border-2); background: var(--bg-2);
  border-radius: var(--radius-full); padding: var(--space-3);
  box-sizing: content-box;
  display: inline-flex; align-items: center; justify-content: center;
}
.empty-state .empty-icon svg { width: 32px; height: 32px; }
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.empty-state .empty-desc  { font-size: 14px; color: var(--text-mut); max-width: 380px; margin: 0; line-height: 1.5; }
.empty-state .empty-actions { margin-top: var(--space-3); display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   11. BADGE / STATUS
   ========================================================================== */

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.5;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: var(--bg-3);       color: var(--text-mut); }
.badge-brand   { background: var(--brand-bg);   color: var(--brand); }

/* ==========================================================================
   12. ALERT / CALLOUT
   ========================================================================== */

.alert {
  display: flex; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: var(--space-4);
}
.alert svg, .alert i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.alert-info    { background: var(--info-bg);    border-color: var(--info);    color: var(--info); }

/* ==========================================================================
   13. PAGINATION
   ========================================================================== */

.pagination { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; margin-top: var(--space-4); }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 var(--space-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--text-2); text-decoration: none;
  transition: background var(--tr-fast), border-color var(--tr-fast), color var(--tr-fast);
}
.page-link:hover { background: var(--bg-2); border-color: var(--border-2); }
.page-link.active { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.page-link:disabled { opacity: .4; pointer-events: none; }

/* ==========================================================================
   14. SETTINGS MENU (list menü öğesi)
   ========================================================================== */

.menu-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.menu-item {
  display: flex; align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  transition: background var(--tr-fast), color var(--tr-fast);
  cursor: pointer;
  background: var(--bg);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--bg-2); color: var(--text); }
.menu-item svg, .menu-item i { width: 20px; height: 20px; flex-shrink: 0; }
.menu-item .menu-arrow { margin-left: auto; color: var(--text-mut); }

.menu-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.menu-icon-primary { background: var(--brand-bg); color: var(--brand); }
.menu-icon-success { background: var(--success-bg); color: var(--success); }
.menu-icon-warning { background: var(--warning-bg); color: var(--warning); }
.menu-icon-danger  { background: var(--danger-bg);  color: var(--danger); }
.menu-icon-info    { background: var(--info-bg);     color: var(--info); }
.menu-icon-muted   { background: var(--bg-3);        color: var(--text-mut); }

/* ==========================================================================
   15. UTILITY CLASSES
   ========================================================================== */

/* --- Display --- */
.block         { display: block; }
.inline        { display: inline; }
.inline-block  { display: inline-block; }
.inline-flex   { display: inline-flex; }
.flex          { display: flex; }
.grid          { display: grid; }
.hidden        { display: none !important; }

/* --- Flexbox --- */
.flex-col      { flex-direction: column; }
.flex-row      { flex-direction: row; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow     { flex-grow: 1; }
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }

/* --- Grid --- */
.grid-cols-1  { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2  { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3  { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4  { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5  { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6  { grid-template-columns: repeat(6, 1fr); }
.col-span-1   { grid-column: span 1; }
.col-span-2   { grid-column: span 2; }
.col-span-3   { grid-column: span 3; }
.col-span-4   { grid-column: span 4; }
.col-span-6   { grid-column: span 6; }
.col-span-full{ grid-column: 1 / -1; }

/* --- Sizing --- */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.w-0     { width: 0; }
.w-4     { width: 16px; }
.w-5     { width: 20px; }
.w-6     { width: 24px; }
.w-7     { width: 28px; }
.w-8     { width: 32px; }
.w-10    { width: 40px; }
.w-11    { width: 44px; }
.w-12    { width: 48px; }
.w-16    { width: 64px; }
.w-24    { width: 96px; }
.w-32    { width: 128px; }
.w-56    { width: 224px; }
.w-60    { width: 240px; }

.h-full   { height: 100%; }
.h-auto   { height: auto; }
.h-0      { height: 0; }
.h-4      { height: 16px; }
.h-5      { height: 20px; }
.h-6      { height: 24px; }
.h-7      { height: 28px; }
.h-8      { height: 32px; }
.h-10     { height: 40px; }
.h-12     { height: 48px; }
.h-14     { height: 56px; }
.h-16     { height: 64px; }
.h-24     { height: 96px; }

.min-h-screen { min-height: 100vh; }
.min-w-0      { min-width: 0; }

.max-w-xs  { max-width: 320px; }
.max-w-sm  { max-width: 384px; }
.max-w-md  { max-width: 448px; }
.max-w-lg  { max-width: 512px; }
.max-w-xl  { max-width: 576px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.max-w-4xl { max-width: 896px; }
.max-w-6xl { max-width: 1152px; }
.max-w-full{ max-width: 100%; }
.mx-auto   { margin-left: auto; margin-right: auto; }

/* --- Spacing — Margin --- */
.m-0  { margin: 0; }
.m-1  { margin: 4px; }
.m-2  { margin: 8px; }
.m-3  { margin: 12px; }
.m-4  { margin: 16px; }

.mx-0 { margin-left: 0; margin-right: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: 4px; margin-bottom: 4px; }
.my-2 { margin-top: 8px; margin-bottom: 8px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.my-6 { margin-top: 24px; margin-bottom: 24px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.ml-0  { margin-left: 0; }
.ml-1  { margin-left: 4px; }
.ml-2  { margin-left: 8px; }
.ml-3  { margin-left: 12px; }
.ml-4  { margin-left: 16px; }
.mr-0  { margin-right: 0; }
.mr-1  { margin-right: 4px; }
.mr-2  { margin-right: 8px; }
.mr-3  { margin-right: 12px; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mb-8  { margin-bottom: 32px; }

/* --- Spacing — Padding --- */
.p-0   { padding: 0; }
.p-1   { padding: 4px; }
.p-2   { padding: 8px; }
.p-3   { padding: 12px; }
.p-4   { padding: 16px; }
.p-5   { padding: 20px; }
.p-6   { padding: 24px; }
.p-8   { padding: 32px; }

.px-2  { padding-left: 8px;  padding-right: 8px; }
.px-3  { padding-left: 12px; padding-right: 12px; }
.px-4  { padding-left: 16px; padding-right: 16px; }
.px-5  { padding-left: 20px; padding-right: 20px; }
.px-6  { padding-left: 24px; padding-right: 24px; }

.py-0  { padding-top: 0;    padding-bottom: 0; }
.py-1  { padding-top: 4px;  padding-bottom: 4px; }
.py-2  { padding-top: 8px;  padding-bottom: 8px; }
.py-3  { padding-top: 12px; padding-bottom: 12px; }
.py-4  { padding-top: 16px; padding-bottom: 16px; }
.py-6  { padding-top: 24px; padding-bottom: 24px; }
.py-8  { padding-top: 32px; padding-bottom: 32px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }

.pt-2  { padding-top: 8px; }
.pb-3  { padding-bottom: 12px; }
.pb-8  { padding-bottom: 32px; }
.pb-24 { padding-bottom: 96px; }
.pl-7  { padding-left: 28px; }
.pl-10 { padding-left: 40px; }
.pr-2  { padding-right: 8px; }
.pr-3  { padding-right: 12px; }

/* --- Gap & Space --- */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-x-2 { column-gap: 8px; }
.gap-x-4 { column-gap: 16px; }
.gap-y-2 { row-gap: 8px; }
.gap-y-4 { row-gap: 16px; }

.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-4 > * + * { margin-left: 16px; }

/* --- Typography --- */
.text-xs  { font-size: 12px; }
.text-sm  { font-size: 13px; }
.text-base{ font-size: 14px; }
.text-lg  { font-size: 16px; }
.text-xl  { font-size: 18px; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 28px; }
.text-4xl { font-size: 36px; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.leading-tight   { line-height: 1.25; }
.leading-normal  { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase     { text-transform: uppercase; }
.lowercase     { text-transform: lowercase; }
.capitalize    { text-transform: capitalize; }
.whitespace-nowrap { white-space: nowrap; }
.break-words   { word-break: break-word; overflow-wrap: break-word; }

/* --- Color utilities --- */
.text-text     { color: var(--text); }
.text-text-2   { color: var(--text-2); }
.text-text-mut { color: var(--text-mut); }
.text-brand    { color: var(--brand); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-info     { color: var(--info); }
.text-white    { color: #ffffff; }
.text-muted    { color: var(--text-mut); }
.text-red-500  { color: #ef4444; }
.text-primary  { color: var(--brand); }
.text-medium   { color: var(--text-2); }
.text-small    { font-size: 12px; color: var(--text-mut); }
.text-dark     { color: var(--text); }

.bg-white      { background: #ffffff; }
.bg-brand      { background: var(--brand); }
.bg-brand-10   { background: var(--brand-bg); }
.bg-primary    { background: var(--brand); }
.bg-success    { background: var(--success); }
.bg-danger     { background: var(--danger); }
.bg-warning    { background: var(--warning); }
.bg-info       { background: var(--info); }
.bg-surface    { background: var(--bg); }
.bg-surface-2  { background: var(--bg-2); }
.bg-bg         { background: var(--bg); }
.bg-bg-2       { background: var(--bg-2); }
.bg-bg-3       { background: var(--bg-3); }
.bg-border     { background: var(--border); }
.bg-light      { background: var(--bg-2); }
.bg-red-50     { background: #fef2f2; }
.bg-success-light  { background: var(--success-bg); }
.bg-danger-light   { background: var(--danger-bg); }
.bg-warning-light  { background: var(--warning-bg); }
.bg-info-light     { background: var(--info-bg); }
.bg-brand-light    { background: var(--brand-bg); }

/* --- Border --- */
.border      { border: 1px solid var(--border); }
.border-0    { border: none; }
.border-2    { border: 2px solid var(--border); }
.border-t    { border-top: 1px solid var(--border); }
.border-b    { border-bottom: 1px solid var(--border); }
.border-l    { border-left: 1px solid var(--border); }
.border-l-4  { border-left: 4px solid var(--border); }
.border-brand   { border-color: var(--brand); }
.border-success { border-color: var(--success); }
.border-danger  { border-color: var(--danger); }
.border-warning { border-color: var(--warning); }
.border-info    { border-color: var(--info); }
.border-border  { border-color: var(--border); }
.border-white   { border-color: #ffffff; }
.divide-y > * + * { border-top: 1px solid var(--border); }
.last\:border-0:last-child { border: none; }

/* --- Border radius --- */
.rounded     { border-radius: var(--radius); }
.rounded-sm  { border-radius: var(--radius-sm); }
.rounded-md  { border-radius: var(--radius); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-xl  { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }
.rounded-full{ border-radius: var(--radius-full); }

/* --- Shadow --- */
.shadow    { box-shadow: var(--shadow-1); }
.shadow-sm { box-shadow: var(--shadow-1); }
.shadow-md { box-shadow: var(--shadow-2); }
.shadow-lg { box-shadow: var(--shadow-3); }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* --- Position --- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.top-0    { top: 0; }
.left-0   { left: 0; }
.right-0  { right: 0; }
.bottom-0 { bottom: 0; }
.inset-0  { top: 0; right: 0; bottom: 0; left: 0; }
.top-1\/2 { top: 50%; }
.left-1\/2{ left: 50%; }
.left-3   { left: 12px; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-10     { z-index: 10; }
.z-50     { z-index: 50; }
.z-modal  { z-index: var(--z-modal); }

/* --- Object fit --- */
.object-contain { object-fit: contain; }
.object-cover   { object-fit: cover; }

/* --- Cursor & interaction --- */
.cursor-pointer  { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none{ pointer-events: none; }
.select-none     { user-select: none; }

/* --- Opacity --- */
.opacity-0   { opacity: 0; }
.opacity-50  { opacity: .5; }
.opacity-75  { opacity: .75; }
.opacity-100 { opacity: 1; }

/* --- Misc --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.not-sr-only { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.list-none   { list-style: none; margin: 0; padding: 0; }

/* Hover utilities */
.hover\:bg-bg-2:hover        { background: var(--bg-2); }
.hover\:bg-surface-2:hover   { background: var(--bg-2); }
.hover\:text-brand:hover     { color: var(--brand); }
.hover\:opacity-90:hover     { opacity: .9; }
.hover\:shadow-md:hover      { box-shadow: var(--shadow-2); }

/* ==========================================================================
   16. RESPONSIVE UTILITIES (sm:640px, md:768px, lg:1024px)
   ========================================================================== */

@media (min-width: 640px) {
  .sm\:inline      { display: inline; }
  .sm\:block       { display: block; }
  .sm\:flex        { display: flex; }
  .sm\:hidden      { display: none !important; }
  .sm\:flex-row    { flex-direction: row; }
  .sm\:items-center{ align-items: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:px-4        { padding-left: 16px; padding-right: 16px; }
  .sm\:py-4        { padding-top: 16px; padding-bottom: 16px; }
  .sm\:gap-4       { gap: 16px; }
  .sm\:text-lg     { font-size: 16px; }
  .sm\:col-span-2  { grid-column: span 2; }
}

@media (min-width: 768px) {
  .md\:inline      { display: inline; }
  .md\:block       { display: block; }
  .md\:flex        { display: flex; }
  .md\:hidden      { display: none !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
  .md\:col-span-1  { grid-column: span 1; }
  .md\:col-span-2  { grid-column: span 2; }
  .md\:col-span-3  { grid-column: span 3; }
  .md\:col-span-4  { grid-column: span 4; }
  .md\:col-span-8  { grid-column: span 8; }
  .md\:col-span-9  { grid-column: span 9; }
  .md\:col-start-4 { grid-column-start: 4; }
  .md\:col-start-5 { grid-column-start: 5; }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
  .md\:px-6        { padding-left: 24px; padding-right: 24px; }
  .md\:px-8        { padding-left: 32px; padding-right: 32px; }
  .md\:py-6        { padding-top: 24px; padding-bottom: 24px; }
  .md\:gap-6       { gap: 24px; }
  .md\:text-xl     { font-size: 18px; }
  .md\:max-w-xl    { max-width: 576px; }
}

@media (min-width: 1024px) {
  .lg\:inline      { display: inline; }
  .lg\:block       { display: block; }
  .lg\:flex        { display: flex; }
  .lg\:hidden      { display: none !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:px-6        { padding-left: 24px; padding-right: 24px; }
  .lg\:px-8        { padding-left: 32px; padding-right: 32px; }
  .lg\:gap-8       { gap: 32px; }
  .lg\:sidebar-show .sidebar { display: flex !important; }
}

/* ==========================================================================
   17. APP SHELL — Sidebar layout (admin / tech / fleet)
   ========================================================================== */

.app-shell--with-sidebar {
  display: flex;
  min-height: 100vh;
}

.app-shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Mobil sidebar aç/kapat */
.sidebar--open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: calc(var(--z-sticky) + 50);
  box-shadow: var(--shadow-3);
}

@media (min-width: 1024px) {
  .app-shell--with-sidebar .sidebar { display: flex !important; flex-direction: column; }
  .topbar-menu-toggle { display: none !important; }
}

/* ==========================================================================
   18. AUTH LAYOUT
   ========================================================================== */

.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-2);
  padding: var(--space-6) var(--space-4);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--text);
}
.auth-logo img { height: 40px; width: 40px; }
.auth-logo:hover { color: var(--text); }

.auth-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.auth-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: var(--space-4) 0 0;
}

.auth-card-meta {
  font-size: 13px;
  color: var(--text-mut);
  margin: var(--space-1) 0 0;
}

.auth-card-body { /* .card ile birlikte kullanılır — padding override */ }

.auth-card-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-mut);
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.auth-footer-link {
  color: var(--text-mut);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer-link:hover { color: var(--text-2); }

/* ==========================================================================
   19. PUBLIC LAYOUT
   ========================================================================== */

.public-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: var(--z-sticky);
}

.public-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
}

.public-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}
.public-logo img { height: 32px; width: 32px; }
.public-logo:hover { color: var(--text); }

.public-nav { display: flex; align-items: center; gap: var(--space-3); }

.public-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--tr-fast);
}
.public-nav-link:hover { color: var(--text); }

.public-main { flex: 1; }

.public-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.public-page-header {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

/* ==========================================================================
   20. APP FOOTER
   ========================================================================== */

.app-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: auto;
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  color: var(--text-mut);
}

.app-footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.app-footer-link {
  color: var(--text-mut);
  text-decoration: none;
  transition: color var(--tr-fast);
}
.app-footer-link:hover { color: var(--text-2); }

.app-footer-version { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   21. MOBILE APP — q/ paneli bileşenleri
   ========================================================================== */

/* Ana kapsayıcı */
.qapp-home { padding: 0; }

/* Karşılama alanı */
.qapp-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 8px;
  gap: 12px;
}
.qapp-greeting-sub {
  font-size: 13px;
  color: var(--text-mut);
  margin: 0 0 2px;
}
.qapp-greeting-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.qapp-add-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--ring);
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
  text-decoration: none;
}
.qapp-add-btn:hover { transform: scale(1.06); color: #fff; }
.qapp-add-btn svg, .qapp-add-btn i { width: 20px; height: 20px; }

/* Araç listesi */
.qapp-cars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 16px 96px;
}

/* Araç kartı */
.qapp-car-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  transition: box-shadow var(--tr);
}
.qapp-car-card:hover { box-shadow: var(--shadow-3); }

/* Kart başlığı — plaka + araç bilgisi */
.qapp-car-header {
  padding: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}

/* Plaka */
.qapp-plate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 14px;
  border: 2px solid rgba(255,255,255,.6);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.qapp-plate-flag { font-size: 20px; line-height: 1; }
.qapp-plate-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #111;
  font-family: var(--mono);
  white-space: nowrap;
}

/* Araç meta (marka/yıl) */
.qapp-car-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 0;
}
.qapp-car-brand {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.qapp-car-year {
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

/* İstatistik şeridi */
.qapp-stats {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.qapp-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.qapp-stat + .qapp-stat { border-left: 1px solid var(--border); }
.qapp-stat svg, .qapp-stat i {
  width: 15px; height: 15px;
  color: var(--text-mut);
  flex-shrink: 0;
}
.qapp-stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-mut);
  margin-bottom: 1px;
}
.qapp-stat-value {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hızlı işlem ızgarası */
.qapp-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--bg);
}
.qapp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 12px;
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: background var(--tr-fast), transform var(--tr-fast);
  cursor: pointer;
}
.qapp-action:hover { background: var(--bg-3); transform: translateY(-1px); }
.qapp-action:active { transform: scale(.97); }
.qapp-action-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qapp-action-icon svg, .qapp-action-icon i { width: 20px; height: 20px; }
.qapp-action-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-align: center;
  line-height: 1.3;
}

/* İşlem ikonu renk şemaları */
.qapp-action[data-color="brand"] .qapp-action-icon  { background: var(--brand-bg);    color: var(--brand); }
.qapp-action[data-color="success"] .qapp-action-icon { background: var(--success-bg);  color: var(--success); }
.qapp-action[data-color="info"] .qapp-action-icon    { background: var(--info-bg);     color: var(--info); }
.qapp-action[data-color="warning"] .qapp-action-icon { background: var(--warning-bg);  color: var(--warning); }
.qapp-action[data-color="purple"] .qapp-action-icon  { background: #f3f0ff;            color: #7c3aed; }
.qapp-action[data-color="neutral"] .qapp-action-icon { background: var(--bg-3);        color: var(--text-mut); }

/* Boş durum */
.qapp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 32px 96px;
  gap: 10px;
}
.qapp-empty-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.qapp-empty-icon svg, .qapp-empty-icon i { width: 38px; height: 38px; color: var(--text-mut); }
.qapp-empty-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }
.qapp-empty-text  { font-size: 14px; color: var(--text-mut); max-width: 280px; line-height: 1.6; margin: 0; }

/* ==========================================================================
   22. KPI KARTLARI — Admin / Fleet / Tech dashboardlar için
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--tr), transform var(--tr);
}
.kpi-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.kpi-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-card-icon svg, .kpi-card-icon i { width: 20px; height: 20px; }
.kpi-card-icon-brand   { background: var(--brand-bg);   color: var(--brand); }
.kpi-card-icon-success { background: var(--success-bg); color: var(--success); }
.kpi-card-icon-warning { background: var(--warning-bg); color: var(--warning); }
.kpi-card-icon-info    { background: var(--info-bg);    color: var(--info); }
.kpi-card-icon-danger  { background: var(--danger-bg);  color: var(--danger); }
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-mut);
  font-weight: 500;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1;
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-mut);
}

/* ==========================================================================
   23. RENK YARDIMCI SINIFLARI
   ========================================================================== */

.text-brand   { color: var(--brand); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-info    { color: var(--info); }
.text-muted   { color: var(--text-mut); }
.text-primary { color: var(--brand); }

.bg-brand   { background-color: var(--brand);   color: var(--brand-fg); }
.bg-success { background-color: var(--success); color: #fff; }
.bg-warning { background-color: var(--warning); color: #fff; }
.bg-danger  { background-color: var(--danger);  color: #fff; }
.bg-info    { background-color: var(--info);    color: #fff; }
.bg-primary { background-color: var(--brand);   color: var(--brand-fg); }
.bg-surface { background-color: var(--bg-2); }
.bg-surface-2 { background-color: var(--bg-3); }

.border-brand   { border-color: var(--brand); }
.border-success { border-color: var(--success); }
.border-warning { border-color: var(--warning); }
.border-danger  { border-color: var(--danger); }
.border-info    { border-color: var(--info); }

/* Opacity bg variants */
.bg-brand-10   { background-color: color-mix(in srgb, var(--brand) 10%, transparent); }
.bg-success-10 { background-color: color-mix(in srgb, var(--success) 10%, transparent); }
.bg-warning-10 { background-color: color-mix(in srgb, var(--warning) 10%, transparent); }
.bg-danger-10  { background-color: color-mix(in srgb, var(--danger) 10%, transparent); }
.bg-info-10    { background-color: color-mix(in srgb, var(--info) 10%, transparent); }

/* ==========================================================================
   24. SAYFA BAŞLIĞI — Admin / Fleet / Tech için page-header
   ========================================================================== */

.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.page-header-sub {
  font-size: 13px;
  color: var(--text-mut);
  margin: 2px 0 0;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Faz 5 ek sınıflar — qa/ admin panel yeni sayfaları için
   ========================================================================== */

.form-stack { display: flex; flex-direction: column; gap: var(--space-4, 16px); }

.btn-warning { background: var(--warning); color: #ffffff; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(0.92); }
.btn-warning:active { filter: brightness(0.85); }

.bg-surface-raised { background: var(--bg-2); }

.bg-info\/10 { background: var(--info-bg); }
.border-info\/30 { border-color: var(--info); border-width: 1px; border-style: solid; }
.bg-success\/10 { background: var(--success-bg); }
.border-success\/30 { border-color: var(--success); border-width: 1px; border-style: solid; }

/* ==========================================================================
   Faz 6 ek sınıflar — tech/ hizmet sağlayıcı paneli için
   ========================================================================== */

.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-subtitle { font-size: 13px; color: var(--text-mut); margin: 2px 0 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; flex-wrap: wrap; }
.section-header:first-child { margin-top: 0; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.form-inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.form-input-sm { padding: 6px 10px; font-size: 13px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; }

.detail-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.detail-list { display: flex; flex-direction: column; gap: 8px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.detail-label { font-size: 13px; color: var(--text-mut); }
.detail-value { font-size: 13px; color: var(--text); font-weight: 500; text-align: right; }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; }
.kv-grid > div { display: flex; flex-direction: column; gap: 2px; }

.pagination-info { font-size: 13px; color: var(--text-mut); }

.link-action { color: var(--info); text-decoration: none; font-size: 13px; }
.link-action:hover { text-decoration: underline; }
.auth-link { color: var(--text-mut); font-size: 13px; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.parts-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.parts-row .form-input { flex: 1; }
.parts-remove { background: none; border: none; color: var(--danger); cursor: pointer; padding: 4px 8px; font-size: 13px; }
.parts-remove:hover { text-decoration: underline; }

.scan-viewport { position: relative; width: 100%; max-width: 480px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); aspect-ratio: 1 / 1; }
.scan-viewport video, .scan-viewport canvas { width: 100%; height: 100%; object-fit: cover; }
.scan-actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .detail-list > div { flex-direction: column; gap: 2px; }
  .detail-value { text-align: left; }
}

/* === BLOK: fleet seyahat haritasi (trips/trip-detail/vehicles) === */
.fleet-map { position: relative; z-index: 0; width: 100%; height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
@media (max-width: 640px) { .fleet-map { height: 360px; } }
/* === /BLOK: fleet seyahat haritasi === */

/* === q/index plaka gorseli (2026-10-04) === */
.qapp-plate-img { height: 52px; width: auto; max-width: 64%; border-radius: 7px; display: block; box-shadow: 0 0 0 2px rgba(255,255,255,.92), 0 3px 10px rgba(0,0,0,.4); }

/* === BLOK: q giris/kayit akisi (auth-*) 2026-10-04 === */
.auth-otp { text-align: center; letter-spacing: 0.35em; font-size: 22px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.auth-sep { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.auth-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-bg); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.auth-note svg, .auth-note i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--brand); }
.auth-note a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-note a:hover { text-decoration: underline; }
.auth-hero-icon { width: 64px; height: 64px; border-radius: 999px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: var(--brand-bg); color: var(--brand); }
.auth-hero-icon svg, .auth-hero-icon i { width: 30px; height: 30px; }
.auth-hero-icon.is-success { background: var(--success-bg); color: var(--success); }
.auth-hero-icon.is-danger { background: var(--danger-bg); color: var(--danger); }
.auth-phone-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg-3); font-weight: 600; letter-spacing: 0.04em; }
.auth-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; color: var(--text-mut); }
.auth-contact a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.auth-contact a:hover { text-decoration: underline; }
.auth-contact svg, .auth-contact i { width: 12px; height: 12px; }
.auth-links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 16px; }
.auth-pw-toggle { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-mut); display: flex; align-items: center; }
.auth-pw-toggle:hover { color: var(--text); }
.auth-ref { display: inline-flex; align-items: center; gap: 6px; }
.auth-ref svg, .auth-ref i { width: 14px; height: 14px; }
.auth-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; }
.auth-consent input { margin-top: 3px; flex-shrink: 0; }
.auth-modal { display: none; position: fixed; z-index: 9999; inset: 0; overflow: auto; background: rgba(0,0,0,.5); padding: 16px; }
.auth-modal.is-open { display: block; }
.auth-modal-box { background: var(--bg); margin: 5vh auto; padding: 20px; border-radius: 16px; width: 100%; max-width: 640px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.auth-modal-box h2 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.auth-modal-scroll { max-height: 55vh; overflow-y: auto; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.auth-modal-scroll h3 { font-size: 14px; font-weight: 700; color: var(--text); margin: 14px 0 4px; }
/* === /BLOK: q giris/kayit akisi === */

/* === BLOK: q url/menu/bildirim turu 2026-10 === */
.brand-icon { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.menu-icon .brand-icon { margin: auto; }

/* q alt menü: tüm ekran boyutlarında görünür, geniş ekranda ortalanmış sütun */
.app-body--q .bottom-nav { display: flex; max-width: 640px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.app-body--q .app-main { padding-bottom: 80px; }
.app-body--q .app-main-content { max-width: 640px; margin: 0 auto; }
.bottom-nav--q .bottom-nav-item { min-width: 0; }
.bottom-nav-center { position: relative; }
.bottom-nav-center-icon {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--brand); color: var(--brand-fg);
  display: flex; align-items: center; justify-content: center;
  margin-top: -14px; box-shadow: 0 4px 14px var(--ring);
}
.bottom-nav-center-icon svg, .bottom-nav-center-icon i { width: 22px; height: 22px; }
.bottom-nav-center.is-active, .bottom-nav-center { color: var(--text-2); }
.bottom-nav-center.is-active { color: var(--brand); font-weight: 600; }
.bottom-nav-center.is-active .bottom-nav-center-icon { box-shadow: 0 0 0 3px var(--brand-bg), 0 4px 14px var(--ring); }
.bottom-nav-badge { right: calc(50% - 20px); }

/* q üst çubuk: marka + kullanıcı adı + çıkış */
.topbar-inner--q { gap: var(--space-3); max-width: 640px; margin: 0 auto; }
.topbar-q-user { margin-left: auto; min-width: 0; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-mut); }

/* Bildirim sayfası */
.notif-page { max-width: 640px; margin: 0 auto; padding: var(--space-4) 0; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.notif-title { font-size: 20px; font-weight: 700; margin: 0; color: var(--text); }
.notif-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-mut); }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.notif-item {
  width: 100%; display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); text-align: left; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); font: inherit; transition: background var(--tr-fast), border-color var(--tr-fast);
}
.notif-item:hover { background: var(--bg-2); }
.notif-item.is-unread { border-color: var(--brand); background: var(--brand-bg); }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.notif-item.is-unread .notif-dot { background: var(--danger); }
.notif-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notif-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.notif-name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item:not(.is-unread) .notif-name { font-weight: 500; }
.notif-time { font-size: 12px; color: var(--text-mut); flex-shrink: 0; }
.notif-text { font-size: 13px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.notif-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-mut); margin-top: 2px; }
.notif-meta svg, .notif-meta i { width: 14px; height: 14px; }
.notif-empty { text-align: center; padding: var(--space-8, 48px) var(--space-4); color: var(--text-mut); }
.notif-empty svg, .notif-empty i { width: 40px; height: 40px; margin: 0 auto var(--space-3); display: block; }
.notif-empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.notif-empty-desc { font-size: 13px; margin: 0 auto; max-width: 320px; line-height: 1.5; }
/* === /BLOK: q url/menu/bildirim turu 2026-10 === */

/* === BLOK: car.php herkese acik QR arac sayfasi 2026-10 === */
.qc-body { background: var(--bg-2); min-height: 100vh; }
.qc-wrap { max-width: 480px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.qc-brand { display: flex; justify-content: center; padding: var(--space-2) 0; }
.qc-brand img { height: 96px; width: 96px; max-width: 100%; display: block; }
.qc-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.qc-hero { padding: var(--space-4); display: flex; justify-content: center; }
.qc-plate-img { display: block; width: 100%; max-width: 360px; height: auto; }
.qc-plate-text { display: inline-flex; align-items: stretch; border: 3px solid #111; border-radius: 8px; overflow: hidden; background: #fff; max-width: 100%; box-shadow: var(--shadow-1); }
.qc-plate-tr { background: #1d4ed8; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding: 4px 8px; }
.qc-plate-no { font-size: clamp(26px, 9vw, 40px); font-weight: 800; letter-spacing: 2px; padding: 8px 16px; color: #111; white-space: nowrap; }
.qc-owner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); }
.qc-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--brand-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.qc-avatar svg { width: 22px; height: 22px; }
.qc-owner-body { min-width: 0; flex: 1; }
.qc-owner-label { display: block; font-size: 12px; color: var(--text-mut); margin-bottom: 2px; }
.qc-owner-name { font-size: 18px; font-weight: 600; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.qc-social { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.qc-social-link { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: transform var(--tr-fast); }
.qc-social-link:hover { transform: scale(1.08); color: #fff; }
.qc-social-link svg { width: 18px; height: 18px; }
.qc-social-facebook { background: #1877f2; }
.qc-social-twitter, .qc-social-tiktok { background: #000; }
.qc-social-instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.qc-social-linkedin { background: #0a66c2; }
.qc-social-youtube { background: #f00; }
.qc-note { display: flex; gap: var(--space-3); align-items: flex-start; background: var(--warning-bg); border: 1px solid var(--warning); border-left-width: 4px; border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); }
.qc-note-icon { color: var(--warning); flex: none; margin-top: 1px; }
.qc-note-icon svg { width: 20px; height: 20px; display: block; }
.qc-note strong { font-size: 13px; color: var(--text-2); }
.qc-note p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.qc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.qc-actions .btn { height: 48px; min-width: 0; padding: 0 var(--space-3); text-decoration: none; }
.qc-actions .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-actions .btn svg { width: 18px; height: 18px; flex: none; }
.qc-actions > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.qc-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.qc-btn-wa:hover { background: #1fb855; border-color: #1fb855; color: #fff; }
.qc-btn-danger { color: var(--danger); border-color: var(--danger); }
.qc-stats { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--bg-3); border-radius: var(--radius-lg); }
.qc-views { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.qc-views svg { width: 16px; height: 16px; color: var(--text-mut); }
.qc-views strong { font-size: 16px; }
.qc-views small { font-size: 12px; color: var(--text-mut); }
.qc-panel-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; }
.qc-panel-link svg { width: 15px; height: 15px; }
.qc-error { padding: var(--space-8) var(--space-5); text-align: center; display: flex; flex-direction: column; gap: var(--space-3); align-items: stretch; }
.qc-error-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-bg); color: var(--brand); margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.qc-error-icon svg { width: 28px; height: 28px; }
.qc-error-title { font-size: 20px; font-weight: 700; margin: 0; color: var(--text); }
.qc-error-text { font-size: 14px; line-height: 1.55; color: var(--text-mut); margin: 0 0 var(--space-2); }
.qc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); font-size: 12px; color: var(--text-mut); padding-top: var(--space-2); }
.qc-foot a { color: var(--text-mut); text-decoration: underline; }
.qc-dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--bg); color: var(--text); box-shadow: var(--shadow-3); }
.qc-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.qc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-2); }
.qc-dialog-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.qc-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--text-mut); cursor: pointer; padding: 0 4px; }
.qc-dialog-body { padding: var(--space-2) var(--space-4) var(--space-4); margin: 0; }
.qc-muted { margin: 0; font-size: 13px; color: var(--text-mut); }
.qc-small { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0 0 var(--space-3); }
.qc-small a { color: var(--brand); text-decoration: underline; }
.qc-dl-row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.qc-dl-row dt { color: var(--text-mut); flex: none; }
.qc-dl-row dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.qc-dl-row a { color: var(--brand); }
.qc-privacy-check { margin: var(--space-2) 0 var(--space-3); font-size: 13px; }
.qc-result { padding: var(--space-2) var(--space-3); border-radius: var(--radius); font-size: 13px; background: var(--bg-3); }
.qc-result[hidden] { display: none; }
.qc-result-ok { background: var(--success-bg); color: var(--success); }
.qc-result-error { background: var(--danger-bg); color: var(--danger); margin-bottom: var(--space-3); }
.qc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* === /BLOK: car.php herkese acik QR arac sayfasi === */

/* === q ust cubuk: ortada buyuk logo, solda kullanici adi, sagda cikis (2026-10-04) === */
.topbar-inner--q { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; }
.topbar-inner--q .topbar-q-user { margin-left: 0; justify-self: start; max-width: 100%; }
.topbar-q-logo { justify-self: center; display: flex; align-items: center; justify-content: center; }
.topbar-q-logo img { height: 64px; width: 64px; display: block; }
.topbar-inner--q .topbar-q-logout { justify-self: end; }

/* === SweetAlert onay penceresi: mobilde kucuk baslik (2026-10-04) === */
.qr-swal-title { font-size: 1.1rem !important; line-height: 1.35; padding: 0.4em 0.6em 0 !important; }
.swal2-popup { font-family: inherit; }

/* === BLOK: DataTables (self-host) tema uyumu — dist/ui/datatable-init.js (2026-10-04) === */
.dt-container { --dt-row-hover: 100, 116, 139; --dt-row-stripe: 100, 116, 139; --dt-column-ordering: 100, 116, 139; --dt-html-background: var(--bg); color: var(--text-2); font-family: var(--font); font-size: 14px; width: 100%; }
.dt-container .dt-layout-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin: 0; padding: 0; }
.dt-container .dt-layout-row:not(.dt-layout-table) { padding: var(--space-2) 0; }
.dt-container .dt-layout-row > .dt-layout-cell { padding: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.dt-container .dt-layout-cell.dt-end { margin-left: auto; justify-content: flex-end; }
/* tablo hücresi: yatay kaydırma (kontroller kaymaz) */
.tbl-wrap:has(> .dt-container) { overflow: visible !important; border: 0; background: none; }
.dt-container .dt-layout-row.dt-layout-table { display: block; }
.dt-container .dt-layout-row.dt-layout-table > .dt-layout-cell { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.dt-container table.dataTable { width: 100% !important; margin: 0 !important; border: 0; border-radius: 0; background: var(--bg); color: var(--text-2); }
.dt-container table.dataTable.tbl { border: 0; border-radius: 0; }
.dt-container table.dataTable > thead > tr > th, .dt-container table.dataTable > thead > tr > td { border-bottom: 1px solid var(--border); background: var(--bg-2); color: var(--text-mut); }
.dt-container table.dataTable > tbody > tr { background: transparent; }
.dt-container table.dataTable > tbody > tr > * { box-shadow: none !important; background: transparent; color: var(--text-2); border-bottom: 1px solid var(--border); }
.dt-container table.dataTable > tbody > tr:last-child > * { border-bottom: 0; }
.dt-container table.dataTable > tbody > tr:hover > * { background: var(--bg-2); }
.dt-container table.dataTable.tbl th, .dt-container table.dataTable.tbl td { padding: var(--space-3) var(--space-4); }
.dt-container table.dataTable thead th.dt-orderable-asc, .dt-container table.dataTable thead th.dt-orderable-desc { cursor: pointer; }
.dt-container table.dataTable thead > tr > th.dt-orderable-asc:hover, .dt-container table.dataTable thead > tr > th.dt-orderable-desc:hover { outline: none; background: var(--bg-3); }
.dt-container table.dataTable thead > tr > th.dt-ordering-asc, .dt-container table.dataTable thead > tr > th.dt-ordering-desc { color: var(--brand); }
.dt-container .dt-column-order { color: var(--text-mut); }
.dt-container table.dataTable thead > tr > th .dt-column-title { white-space: nowrap; }
.dt-container table.dataTable th.dt-type-numeric, .dt-container table.dataTable td.dt-type-numeric, .dt-container table.dataTable th.dt-type-date, .dt-container table.dataTable td.dt-type-date { text-align: left; }
.dt-container table.dataTable th.dt-type-numeric > .dt-column-header, .dt-container table.dataTable th.dt-type-date > .dt-column-header { flex-direction: row; justify-content: flex-start; }
.dt-container table.dataTable th.text-right > .dt-column-header { justify-content: flex-end; }
.dt-container table.dataTable th.text-center > .dt-column-header { justify-content: center; }
.dt-container table.dataTable td.dt-empty { text-align: center; color: var(--text-mut); padding: var(--space-6); }
/* arama + sayfa uzunluğu: .form-input görünümü */
.dt-container .dt-search { display: flex; align-items: center; gap: var(--space-2); }
.dt-container .dt-search label, .dt-container .dt-length label { margin: 0; color: var(--text-mut); font-size: 13px; }
.dt-container .dt-search input, .dt-container .dt-length select, .dt-container .dt-input { height: 36px; padding: 0 var(--space-3); margin: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border-2); border-radius: var(--radius); font-family: var(--font); font-size: 14px; }
.dt-container .dt-search input { min-width: 220px; }
.dt-container .dt-search input:focus, .dt-container .dt-length select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.dt-container .dt-length { display: flex; align-items: center; gap: var(--space-2); }
.dt-container .dt-length select { padding-right: 24px; width: auto; }
/* dışa aktarma düğmeleri: .btn .btn-secondary .btn-sm görünümü */
.dt-container .dt-buttons { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; }
.dt-container .dt-buttons .dt-button, .dt-container button.dt-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 var(--space-3); margin: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border-2); border-radius: var(--radius); font-family: var(--font); font-size: 13px; font-weight: 500; line-height: 1; cursor: pointer; box-shadow: none; transition: background var(--tr-fast); }
.dt-container .dt-buttons .dt-button:hover:not(.disabled), .dt-container button.dt-button:hover:not(:disabled) { background: var(--bg-2); border-color: var(--border-2); color: var(--text); }
.dt-container .dt-buttons .dt-button:active { background: var(--bg-3); }
.dt-container .dt-buttons .dt-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.dt-container .dt-buttons .dt-button.is-loading { opacity: .6; pointer-events: none; }
.dt-container .dt-buttons .dt-button.is-loading::after { content: ''; width: 12px; height: 12px; border: 2px solid var(--border-2); border-top-color: var(--brand); border-radius: 50%; animation: dtspin .7s linear infinite; }
@keyframes dtspin { to { transform: rotate(360deg); } }
/* alt bilgi + sayfalama */
.dt-container .dt-info { color: var(--text-mut); font-size: 13px; padding: 0; }
.dt-container .dt-paging { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.dt-container .dt-paging nav { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.dt-container .dt-paging .dt-paging-button, .dt-container .dt-paging button { min-width: 36px; height: 36px; padding: 0 var(--space-2); margin: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border-2) !important; border-radius: var(--radius); font-family: var(--font); font-size: 13px; cursor: pointer; box-shadow: none; }
.dt-container .dt-paging .dt-paging-button:hover:not(.disabled):not(.current) { background: var(--bg-2) !important; color: var(--text) !important; }
.dt-container .dt-paging .dt-paging-button.current, .dt-container .dt-paging .dt-paging-button.current:hover { background: var(--brand) !important; color: var(--brand-fg) !important; border-color: var(--brand) !important; }
.dt-container .dt-paging .dt-paging-button.disabled, .dt-container .dt-paging .dt-paging-button.disabled:hover { opacity: .45; cursor: not-allowed; background: var(--bg) !important; color: var(--text-mut) !important; }
/* sütun görünürlüğü (colvis) açılır menüsü */
div.dt-button-collection { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: var(--space-1); z-index: var(--z-dropdown); }
div.dt-button-collection .dt-button { display: block; width: 100%; text-align: left; margin: 0; background: transparent; color: var(--text); border: 0; border-radius: var(--radius-sm); padding: 6px var(--space-3); font-family: var(--font); font-size: 13px; cursor: pointer; }
div.dt-button-collection .dt-button:hover { background: var(--bg-2); }
div.dt-button-collection .dt-button.dt-button-active { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
div.dt-button-collection .dt-button.dt-button-active::before { content: '✓ '; }
div.dt-button-background { background: transparent; }
div.dt-button-info { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); font-family: var(--font); }
div.dt-button-info h2 { background: var(--bg-2); border-bottom: 1px solid var(--border); color: var(--text); font-size: 15px; }
@media (max-width: 640px) {
  .dt-container .dt-layout-row { flex-direction: column; align-items: stretch; }
  .dt-container .dt-layout-row > .dt-layout-cell, .dt-container .dt-layout-cell.dt-end { margin-left: 0; justify-content: flex-start; }
  .dt-container .dt-search, .dt-container .dt-search input { width: 100%; min-width: 0; }
  .dt-container .dt-search label { display: none; }
  .dt-container .dt-info { text-align: left; }
}
/* === /BLOK: DataTables === */


/* === KOKPIT (Genel Bakis) ortak bilesenler: ck- (2026-10-04) === */
.ck { display: flex; flex-direction: column; gap: 16px; max-width: 1280px; margin: 0 auto; }
.ck-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ck-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }
.ck-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-mut); }
.ck-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-grid { display: grid; gap: 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ck-col-3 { grid-column: span 3; } .ck-col-4 { grid-column: span 4; } .ck-col-5 { grid-column: span 5; }
.ck-col-6 { grid-column: span 6; } .ck-col-7 { grid-column: span 7; } .ck-col-8 { grid-column: span 8; } .ck-col-12 { grid-column: span 12; }
@media (max-width: 1024px) { .ck-col-3 { grid-column: span 6; } .ck-col-4, .ck-col-5, .ck-col-6, .ck-col-7, .ck-col-8 { grid-column: span 12; } }
@media (max-width: 560px) { .ck-grid { gap: 10px; } }
.ck-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.ck-tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.ck-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ck-tile-label { font-size: 12px; color: var(--text-mut); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.ck-tile-icon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-bg); color: var(--brand); flex: none; }
.ck-tile-icon svg, .ck-tile-icon i { width: 16px; height: 16px; }
.ck-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ck-tile-note { font-size: 12px; color: var(--text-mut); }
.ck-tile--danger { border-color: var(--danger); background: var(--danger-bg); }
.ck-tile--warning { border-color: var(--warning); background: var(--warning-bg); }
.ck-tile--success .ck-tile-icon { background: var(--success-bg); color: var(--success); }
.ck-tile--danger .ck-tile-icon { background: var(--danger-bg); color: var(--danger); }
.ck-tile--warning .ck-tile-icon { background: var(--warning-bg); color: var(--warning); }
.ck-delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.ck-delta--up { color: var(--success); } .ck-delta--down { color: var(--danger); } .ck-delta--flat { color: var(--text-mut); }
.ck-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.ck-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ck-card-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.ck-card-link { font-size: 12px; color: var(--text-mut); text-decoration: none; }
.ck-card-link:hover { color: var(--text); text-decoration: underline; }
.ck-card-body { padding: 12px 16px; }
.ck-chart { position: relative; height: 240px; }
.ck-chart--sm { height: 180px; }
.ck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ck-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.ck-list li:last-child { border-bottom: 0; }
.ck-li-main { flex: 1; min-width: 0; }
.ck-li-title { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-decoration: none; }
.ck-li-sub { font-size: 12px; color: var(--text-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ck-li-end { font-size: 12px; color: var(--text-mut); white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.ck-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mut); flex: none; }
.ck-dot--danger { background: var(--danger); } .ck-dot--warning { background: var(--warning); } .ck-dot--success { background: var(--success); } .ck-dot--info { background: var(--info); }
.ck-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg-2); color: var(--text-mut); }
.ck-badge--danger { background: var(--danger-bg); color: var(--danger); } .ck-badge--warning { background: var(--warning-bg); color: var(--warning); }
.ck-badge--success { background: var(--success-bg); color: var(--success); } .ck-badge--info { background: var(--info-bg); color: var(--info); }
.ck-progress { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.ck-progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ck-progress--danger > span { background: var(--danger); } .ck-progress--warning > span { background: var(--warning); } .ck-progress--success > span { background: var(--success); }
.ck-empty { padding: 20px 8px; text-align: center; font-size: 13px; color: var(--text-mut); }
.ck-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ck-quick a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; background: var(--bg); }
.ck-quick a:hover { border-color: var(--brand); background: var(--bg-2); }
.ck-quick svg, .ck-quick i { width: 16px; height: 16px; flex: none; }
.ck-kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; margin: 0; }
.ck-kv dt { color: var(--text-mut); } .ck-kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* === ck-q- (q/index Genel Bakis kokpiti) 2026-10-04 === */
.app-body--q .app-main-content:has(.ckq-home) { max-width: 960px; }
.ckq-greeting { padding-left: 0; padding-right: 0; }
.ckq-sec { margin-top: 12px; }
.ckq-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ckq-chips::-webkit-scrollbar { display: none; }
.ckq-chip { flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.ckq-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ckq-row-link { text-decoration: none; color: inherit; min-height: 44px; display: block; padding: 2px 0; }
.ckq-note { margin-top: 10px; font-size: 11px; }
.ckq-inline { display: inline; margin-left: 4px; }
.ckq-health .ck-progress { margin: 6px 0; }
.ckq-checks { white-space: normal; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ckq-check.is-ok { color: var(--success); } .ckq-check.is-bad { color: var(--danger); }
.ckq-quick a { min-height: 48px; }
.ckq-h2 { margin: 20px 0 8px; font-size: 16px; font-weight: 700; color: var(--text); }
.ckq-car-score { margin-left: auto; align-self: flex-start; }
.ckq-home .qapp-cars { padding-left: 0; padding-right: 0; }
.ckq-home .ck-tile-value { font-size: 22px; }
@media (min-width: 640px) { .ckq-home .ck-tile-value { font-size: 26px; } }

/* ent- : varlik kayit defteri baglantilari + global arama (qa/arama, config/Entities.php) */
.ent-link { display: inline-flex; align-items: center; gap: 4px; }
.ent-link.ent-plain { color: inherit; }
.ent-ikon { width: 14px; height: 14px; flex: none; }
.ent-silinmis { color: var(--text-mut); opacity: .6; font-style: italic; }
.ent-badge { display: inline-flex; align-items: center; gap: 4px; }
.ent-badge-link { text-decoration: none; }
.ent-tip { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 9px; font-size: 11px; color: var(--text-mut); background: var(--bg-3); }
.ent-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.ent-rehber-liste, .ent-sonuc-liste { list-style: none; margin: 0; padding: 0; }
.ent-rehber-liste li, .ent-sonuc-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ent-rehber-liste li:last-child, .ent-sonuc-liste li:last-child { border-bottom: 0; }
.ent-uyari { color: var(--warning); }
.ent-tek { border-left: 4px solid var(--success); }

/* === rol- (qa/roller izin matrisi) 2026-10-04 === */
.rol-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rol-group { margin: 0; min-width: 0; }
.rol-group-title { font-size: 13px; font-weight: 700; padding: 0 6px; color: var(--text); }
.rol-perm { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 13px; }
.rol-perm code { font-size: 11px; color: var(--text-mut); }
.rol-perm input[disabled] + span { opacity: .55; }

/* === cat- (qa/katalog + qa/genel-ayarlar) 2026-10-04 === */
.cat-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.cat-form-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .cat-form-grid { grid-template-columns: minmax(0, 1fr); } }
.cat-meta { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.cat-meta-cell { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.cat-row-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cat-row-actions form { display: inline-block; margin: 0; }
.cat-set-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 12px; align-items: start; margin-bottom: 16px; }
@media (max-width: 768px) { .cat-set-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.cat-set-field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-set-field .form-input { flex: 1 1 260px; min-width: 0; }
.cat-set-unit { font-size: 13px; color: var(--text-mut); }
.cat-set-default { font-size: 12px; color: var(--text-mut); margin-top: 4px; }
.cat-color { width: 56px; padding: 2px; height: 40px; flex: 0 0 56px !important; }

/* === BLOK: det- (360 derece detay sayfalari, F2, 2026-10-04) === */
.det .det-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-mut); }
.det .det-crumb a { color: var(--text-mut); text-decoration: none; }
.det .det-crumb a:hover { color: var(--text); text-decoration: underline; }
.det .det-crumb-sep { opacity: .6; }
.det .det-crumb [aria-current] { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.det .det-head { align-items: flex-start; }
.det .det-ident { display: flex; align-items: flex-start; gap: 14px; min-width: 0; flex: 1 1 320px; }
.det .det-ident-text { min-width: 0; }
.det .det-ident .ck-title { overflow-wrap: anywhere; }
.det .det-avatar { flex: none; width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-bg); color: var(--brand); border: 1px solid var(--border); }
.det .det-avatar svg, .det .det-avatar i { width: 26px; height: 26px; }
.det .det-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.det .det-actions { align-items: center; }
.det .det-actions form { margin: 0; }
.det .det-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.det .det-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.det .det-chip:hover { border-color: var(--brand); background: var(--bg-2); }
.det .det-chip-n { font-size: 11px; color: var(--text-mut); background: var(--bg-3); border-radius: 999px; padding: 0 6px; }
.det .det-card { scroll-margin-top: 16px; }
.det .det-title-ikon { width: 15px; height: 15px; vertical-align: -2px; color: var(--text-mut); }
.det .det-card .ck-badge { margin-left: 4px; vertical-align: 1px; }
.det .det-note { margin: 0 0 10px; font-size: 12px; color: var(--text-mut); }
.det .det-sub { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.det .det-kv dd { overflow-wrap: anywhere; min-width: 0; }
.det .det-kv .det-wrap, .det .det-wrap { white-space: pre-wrap; text-align: right; display: inline-block; max-width: 100%; }
.det .det-kv-inline { max-width: 420px; margin-bottom: 12px; }

.det .det-err { color: var(--danger); }
.det .det-center { text-align: center; margin: 10px 0 0; }
.det .det-ref { display: inline-block; margin: 0 6px 2px 0; }
.det .det-ek { font-size: 12px; color: var(--text-mut); line-height: 1.4; }
.det .det-plate { height: 34px; width: auto; max-width: 120px; border-radius: 4px; border: 1px solid var(--border); background: #fff; display: block; }
.det .det-plate-big { margin-bottom: 12px; padding: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.det .det-plate-big img { max-width: 100%; height: auto; max-height: 120px; border-radius: 4px; }
.det .det-qr { display: flex; justify-content: center; padding: 12px; }
.det .det-qr img { width: 100%; max-width: 240px; height: auto; background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--border); image-rendering: pixelated; }
.det .det-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); font-size: 13px; }
.det .det-banner svg, .det .det-banner i { width: 16px; height: 16px; flex: none; }
.det .det-banner--danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.det .det-banner--warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.det .det-live { font-weight: 700; }
.det .det-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--success); vertical-align: 1px; }
.det .det-notfound { padding: 36px 8px; }
.det .det-notfound svg, .det .det-notfound i { width: 40px; height: 40px; margin-bottom: 8px; }
.det .tbl-wrap { max-width: 100%; }
@media (max-width: 560px) {
  .det .ck-col-3 { grid-column: span 6; }
  .det .ck-col-6 { grid-column: span 12; }
  .det .det-avatar { width: 44px; height: 44px; }
  .det .det-actions { width: 100%; }
  .det .det-actions .btn { flex: 1 1 auto; }
  .det .ck-tile-value { font-size: 20px; }
}
/* === /BLOK: det- === */

/* === BLOK: sab- (şablonlar ekranı, F8) === */
.sab-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.sab-form-full { grid-column: 1 / -1; }
.sab-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.sab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sab-chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2, var(--surface)); color: var(--text); cursor: pointer; }
.sab-chip:hover, .sab-chip:focus-visible { border-color: var(--brand, var(--border)); }
.sab-chip--zorunlu { border-color: var(--warning); }
.sab-chip--genel { opacity: .8; border-style: dashed; }
.sab-var-list { margin: 0; padding-left: 18px; }
.sab-uyari { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--warning); background: var(--warning-bg); color: var(--warning); }
.sab-onizleme { white-space: pre-wrap; word-break: break-word; margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2, var(--surface)); font-size: 13px; line-height: 1.5; }
.sab-onizleme-konu { font-weight: 600; margin-bottom: 6px; }
.sab-counter { color: var(--text-mut, inherit); }
.sab-eylemler form { margin: 0; }
.sab-surum-metin { white-space: normal; word-break: break-word; }
@media (max-width: 640px) { .sab-form-grid { grid-template-columns: 1fr; } }
/* === /BLOK: sab- === */


/* ==========================================================================
   26. RESPONSIVE KİT — ortak, mobil uyumlu bileşenler (UI sahibi ekler)
   Mevcut sınıfların anlamı değişmez; yalnız eklenir / mobilde sağlamlaştırılır.
   ========================================================================== */

/* --- Taşma güvenliği --- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; }
img, video { height: auto; }
iframe, embed, object { max-width: 100%; }
.app-main-content, .app-shell-main, .card, .card-body { min-width: 0; }
.app-main-content { overflow-wrap: anywhere; }
.tbl td, .tbl th { overflow-wrap: anywhere; }
.tbl th { overflow-wrap: normal; }
pre, code { max-width: 100%; overflow-x: auto; }
.card { max-width: 100%; }

/* --- Odak halkası / hareket azaltma --- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sidebar-link:focus-visible, .sidebar-item:focus-visible, .topbar-menu-toggle:focus-visible,
.topbar-bell:focus-visible, .topbar-user-trigger:focus-visible, .bottom-nav-item:focus-visible,
.topbar-user-menu a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* --- Sayfa başlığı: .page-header (hem yeni iç yapı hem mevcut flex kullanımı) --- */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); flex-wrap: wrap; }
.page-header > :first-child { min-width: 0; }
.page-header .page-title, .page-header h1 { overflow-wrap: anywhere; }
.page-header .page-sub, .page-header .page-subtitle { font-size: 13px; color: var(--text-mut); margin: 2px 0 0; }
.page-header .page-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
@media (max-width: 639px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .page-actions { width: 100%; }
  .page-header .page-actions > .btn, .page-header .page-actions > form, .page-header .page-actions > a.btn { flex: 1 1 auto; }
  .page-header-bar { flex-direction: column; align-items: stretch; }
  .page-header-actions { width: 100%; }
  .page-header-actions > .btn { flex: 1 1 auto; }
}

/* --- Araç çubuğu / filtre çubuğu --- */
.toolbar, .filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin-bottom: var(--space-4); }
.toolbar > .grow, .filter-bar > .grow { flex: 1 1 200px; min-width: 0; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 140px; max-width: 100%; }
.filter-bar .form-group, .toolbar .form-group { margin: 0; }
@media (max-width: 639px) {
  .toolbar, .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-input, .filter-bar .form-select, .toolbar .form-input, .toolbar .form-select { width: 100%; min-width: 0; }
  .toolbar > .btn, .filter-bar > .btn, .toolbar > form, .filter-bar > form { width: 100%; }
}

/* --- KPI ızgarası: 2 kolon mobil, 4 kolon masaüstü --- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); } }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-grid--3 { }
@media (min-width: 1024px) { .stat-grid.stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-card { min-width: 0; }
.stat-card .stat-value { overflow-wrap: anywhere; line-height: 1.15; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-mut); }
@media (max-width: 639px) {
  .stat-card { padding: var(--space-3) var(--space-4); }
  .stat-card .stat-value { font-size: 22px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-card { padding: 14px 12px; }
  .kpi-value { font-size: 22px; overflow-wrap: anywhere; }
}

/* --- Kart ızgarası --- */
.card-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card-grid > * { min-width: 0; }
.card-grid--2 { }
@media (min-width: 1024px) { .card-grid.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Form ızgarası: 1 kolon mobil, 2 tablet, 3 geniş (.form-grid zaten 2 kolon idi) --- */
.form-grid > * { min-width: 0; }
.form-grid .form-full, .form-grid .col-full { grid-column: 1 / -1; }
@media (min-width: 1200px) { .form-grid.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- Düğme sırası --- */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.btn-row--end { justify-content: flex-end; }
@media (max-width: 639px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row > .btn, .btn-row > form, .btn-row > form > .btn, .btn-row > a { width: 100%; }
  .btn-block-sm { width: 100%; display: flex; }
}

/* --- Mobilde alt sabit aksiyon çubuğu --- */
.action-bar-sticky { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: flex-end; padding-top: var(--space-4); }
@media (max-width: 767px) {
  .action-bar-sticky {
    position: sticky; bottom: 0; z-index: calc(var(--z-sticky) - 10);
    margin: var(--space-4) calc(-1 * var(--space-4)) 0;
    padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(15, 23, 42, .06);
  }
  .action-bar-sticky > .btn { flex: 1 1 0; }
}

/* --- Yatay kaydırmalı sekmeler --- */
.tabs-scroll { display: flex; flex-wrap: nowrap; gap: var(--space-1); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); max-width: 100%; }
.tabs-scroll > a, .tabs-scroll > button, .tabs-scroll .tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4);
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text-mut); background: none; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.tabs-scroll > a:hover, .tabs-scroll > button:hover { color: var(--text); }
.tabs-scroll > .active, .tabs-scroll > .is-active, .tabs-scroll > [aria-selected="true"], .tabs-scroll > [aria-current] { color: var(--brand); border-bottom-color: var(--brand); }

/* --- Rozet ailesi tamamlayıcıları (mevcut .badge-* korunur) --- */
.badge { max-width: 100%; }
.badge-neutral { background: var(--bg-3); color: var(--text-2); }
.badge-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; margin-right: 6px; }

/* --- Boş durum: mobil ölçek --- */
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); }
.empty-state .empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }

/* --- Tanım listesi (anahtar / değer) --- */
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3) var(--space-5); margin: 0; }
.dl-grid > div { min-width: 0; }
.dl-grid dt { font-size: 12px; color: var(--text-mut); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 2px; }
.dl-grid dd { margin: 0; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
@media (min-width: 640px) { .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .dl-grid.dl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- Tablo: yatay kaydırma + mobilde kart dönüşümü (td[data-label]) --- */
.tbl-wrap { max-width: 100%; }
.tbl-wrap > .tbl { min-width: 0; }
.tbl-scroll-min > .tbl { min-width: 560px; }
@media (max-width: 767px) {
  .tbl-cards, .tbl-cards thead, .tbl-cards tbody, .tbl-cards tr, .tbl-cards th, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards { border: 0; background: transparent; overflow: visible; }
  .tbl-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tbl-cards tbody tr { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-3); padding: var(--space-2) var(--space-4); box-shadow: var(--shadow-1); }
  .tbl-cards tbody tr:hover { background: var(--bg); }
  .tbl-cards tbody td { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px dashed var(--border); text-align: right; min-height: 0; }
  .tbl-cards tbody td:last-child { border-bottom: 0; }
  .tbl-cards tbody td[data-label]::before { content: attr(data-label); flex: 0 0 38%; max-width: 45%; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-mut); text-transform: uppercase; letter-spacing: .03em; }
  .tbl-cards tbody td.actions, .tbl-cards tbody td.num { text-align: right; }
  .tbl-cards tbody td.actions { justify-content: flex-end; flex-wrap: wrap; }
  .tbl-cards tbody td[colspan] { display: block; text-align: center; }
  .tbl-cards tbody td[colspan]::before { content: none; }
  .tbl-cards .tbl-empty td { padding: var(--space-6) var(--space-4); }
}

/* --- Uygulama kabuğu: içerik dolgusu ölçeği + güvenli alan --- */
.app-main-content { padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
@media (min-width: 1024px) { .app-main-content { padding-left: var(--space-6); padding-right: var(--space-6); } }
.topbar { padding-top: env(safe-area-inset-top, 0px); }
.page-header { padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
@media (min-width: 1024px) { .page-header { padding-left: var(--space-6); padding-right: var(--space-6); } }
.bottom-nav { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.app-footer-inner { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
.topbar-brand-name { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) { .topbar-brand-name { max-width: 320px; } }
.topbar-inner { min-width: 0; }
.topbar-user-menu { max-width: calc(100vw - 16px); }

/* --- Çekmece menü (mobil / tablet < 1024) --- */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: calc(var(--z-sticky) + 40); display: none; }
.sidebar-overlay.is-open { display: block; }
body.has-drawer-open { overflow: hidden; }
@media (max-width: 1023px) {
  .sidebar--open {
    width: min(86vw, 300px); max-width: 100vw; overflow-y: auto; overscroll-behavior: contain;
    height: 100dvh; padding-top: calc(var(--space-4) + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    animation: drawer-in .18s ease-out;
  }
  .sidebar .sidebar-link, .sidebar .sidebar-item { min-height: 44px; }
}
@keyframes drawer-in { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.sidebar { overscroll-behavior: contain; }
@media (min-width: 1024px) { .sidebar { height: 100vh; height: 100dvh; } }

/* --- Dokunma hedefi, iOS yakınlaştırma engeli (yalnız dar / dokunmatik) --- */
@media (max-width: 767px), (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .btn-icon, .topbar-menu-toggle, .topbar-bell { min-width: 44px; min-height: 44px; width: auto; }
  .topbar-menu-toggle { width: 44px; height: 44px; }
  .topbar-user-trigger { min-height: 44px; }
  .topbar-user-menu a, .topbar-user-menu button { min-height: 44px; display: flex; align-items: center; }
  .form-check, .form-check label, .form-checkbox, .form-radio { min-height: 24px; }
  .form-check label, label.form-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
  .form-checkbox, .form-radio { width: 20px; height: 20px; }
  .pagination a, .pagination button, .page-link { min-height: 44px; min-width: 44px; }
}
@media (max-width: 767px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
  select, textarea, .form-input, .form-select, .form-textarea { font-size: 16px; }
  .form-input, .form-select { min-height: 44px; }
  .dt-container input, .dt-container select { font-size: 16px; }
}
@media (max-width: 767px) {
  .dialog { max-width: calc(100vw - 16px); width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog-footer { flex-wrap: wrap; }
  .dialog-footer .btn { flex: 1 1 auto; }
  .toast-container, .toast-stack { left: 8px; right: 8px; max-width: none; }
}
@media (max-width: 479px) {
  .container, .public-content { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* Alt sekme çubuğu olan sayfalarda bildirim çubuğunun üstünde dursun */
@media (max-width: 1023px) {
  body:has(.bottom-nav) .toast-container { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   29. KURUMSAL KABUK — sidebar / topbar / footer (tokenlarla; panel kimliği --sb-*, --topbar-*)
   Önceki sidebar/topbar kurallarının üstüne biner; yalnız görünüm.
   ========================================================================== */

/* --- Sayfa zemini --- */
.app-shell--with-sidebar .app-shell-main { background: var(--page-bg); }

/* --- Topbar: açık nötr zemin + ince alt sınır, 2px panel çizgisi --- */
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-border); box-shadow: var(--shadow-1); }
.topbar-brand-strip { height: 2px; background: var(--topbar-accent); }
.topbar-search-input { border-radius: var(--radius); background: var(--bg-2); border-color: var(--border-2); }
.topbar-search-input:focus { border-color: var(--topbar-accent); box-shadow: 0 0 0 3px var(--ring); }
.topbar-menu-toggle:hover, .topbar-bell:hover, .topbar-user-trigger:hover { background: var(--bg-3); }
.topbar-user-avatar { background: var(--topbar-accent); color: #ffffff; }
[data-theme="dark"] .topbar-user-avatar { color: var(--brand-fg); }
.topbar-user-menu { box-shadow: var(--shadow-2); }
.topbar-user-menu a:hover { background: var(--bg-3); }

/* --- Sidebar: derin koyu zemin, düz renk --- */
.sidebar {
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  color: var(--sb-text);
  scrollbar-width: thin;
  scrollbar-color: var(--sb-bg-active) transparent;
}
.sidebar-logo, .sidebar-logo-text { color: var(--sb-text-strong); }
.sidebar-logo-text small { color: var(--sb-text-mut); }
.sidebar-header { padding-bottom: var(--space-3); }

.sidebar-user { border-bottom: 1px solid var(--sb-border); }
.sidebar-user-avatar { background: var(--sb-bg-active); color: var(--sb-accent); border-radius: var(--radius); }
.sidebar-user-name { color: var(--sb-text-strong); }
.sidebar-user-role { color: var(--sb-text-mut); }

.sidebar-section, .sidebar-section-header {
  color: var(--sb-text-mut); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.sidebar-section-header { margin-top: var(--space-4); }

.sidebar-link, .sidebar-item { position: relative; color: var(--sb-text); }
.sidebar-link-icon, .sidebar-item svg, .sidebar-item i { color: var(--sb-text-mut); transition: color var(--tr-fast); }
.sidebar-link:hover, .sidebar-item:hover { background: var(--sb-bg-hover); color: var(--sb-text-strong); }
.sidebar-link:hover .sidebar-link-icon, .sidebar-item:hover svg, .sidebar-item:hover i { color: var(--sb-text); }
.sidebar-link.is-active, .sidebar-item.active { background: var(--sb-bg-active); color: var(--sb-text-strong); }
.sidebar-link.is-active .sidebar-link-icon,
.sidebar-item.active svg, .sidebar-item.active i { color: var(--sb-accent); }
.sidebar-link.is-active::before, .sidebar-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--sb-accent); border-radius: 0 2px 2px 0;
}
.sidebar .sidebar-link:focus-visible, .sidebar .sidebar-item:focus-visible { outline: 2px solid var(--sb-focus); outline-offset: -2px; }

/* Rozetler koyu zeminde: düz, düşük doygunluk */
.sidebar .sidebar-badge, .sidebar .badge { background: rgba(255, 255, 255, .12); color: #e5e7eb; border: 0; }
.sidebar .badge-danger, .sidebar .sidebar-badge.badge-danger { background: #7f1d1d; color: #fecaca; }
.sidebar .badge-warning, .sidebar .sidebar-badge.badge-warning { background: #78350f; color: #fde68a; }
.sidebar .badge-success, .sidebar .sidebar-badge.badge-success { background: #14532d; color: #bbf7d0; }

.sidebar-footer { border-top: 1px solid var(--sb-border); margin-top: var(--space-4); padding-top: var(--space-3); }
.sidebar-footer small { color: var(--sb-text-mut); }

/* Mobil çekmece */
.sidebar--open { box-shadow: var(--shadow-3); }
.sidebar-overlay { background: rgba(10, 12, 16, .55); }

/* --- Footer: sade, düşük kontrastlı nötr --- */
.app-footer { background: var(--footer-bg); border-top: 1px solid var(--border); }
.app-footer-inner { color: var(--footer-text); }
.app-footer-link { color: var(--footer-text); }
.app-footer-link:hover { color: var(--footer-link-hover); text-decoration: underline; }
.public-footer { background: var(--footer-bg); }
.auth-footer-link { color: var(--footer-text); }
.auth-footer-link:hover { color: var(--footer-link-hover); text-decoration: underline; }
.auth-card-footer { color: var(--footer-text); }

/* ==========================================================================
   30. KABUK ÜST ÇUBUĞU AKSİYONLARI, PENCERELER (modal), GÖRÜNÜM SEÇİCİ, GÖMÜLÜ MOD, SAYFA BAŞLIĞI TİPOGRAFİSİ
   Davranış: dist/ui/shell.js · mantık: config/Shell.php · işaretleme: _partials/topbar-actions.php
   ========================================================================== */

/* --- Aksiyon şeridi --- */
.shell-actions { display: flex; align-items: center; gap: 4px; }
.shell-menu { position: relative; }
.shell-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: transparent;
  color: var(--text-2); cursor: pointer; transition: background var(--tr-fast), color var(--tr-fast);
}
.shell-iconbtn:hover, .shell-iconbtn[aria-expanded="true"] { background: var(--bg-3); color: var(--text); }
.shell-iconbtn svg, .shell-iconbtn i { width: 20px; height: 20px; }
.shell-iconbtn--primary { background: var(--topbar-accent); color: #fff; }
.shell-iconbtn--primary:hover, .shell-iconbtn--primary[aria-expanded="true"] { background: var(--brand-hover); color: #fff; }
.shell-iconbtn:focus-visible, .shell-profilebtn:focus-visible, .shell-item:focus-visible, .shell-notif:focus-visible,
.shell-link:focus-visible, .shell-pop-foot:focus-visible, .shell-swatch:focus-visible { outline: 2px solid var(--topbar-accent); outline-offset: 2px; }
.shell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full);
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}
.shell-badge[hidden] { display: none; }
.shell-profilebtn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px; border: 0; border-radius: var(--radius);
  background: transparent; cursor: pointer; color: var(--text-2); max-width: 260px;
}
.shell-profilebtn:hover, .shell-profilebtn[aria-expanded="true"] { background: var(--bg-3); }
.shell-profile-text { display: none; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; line-height: 1.2; }
.shell-profile-name { font-size: 13px; font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.shell-profile-role { font-size: 11.5px; color: var(--text-mut); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.shell-chev { display: none; width: 16px; height: 16px; color: var(--text-mut); }
@media (min-width: 900px) { .shell-profile-text { display: flex; } .shell-chev { display: block; } }
.topbar-user-avatar--lg { width: 40px; height: 40px; font-size: 15px; }

/* --- Açılır paneller (sağda açılır; dar ekranda üstten tam genişlik sayfa gibi) --- */
.shell-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: calc(var(--z-dropdown) + 10);
  width: 360px; max-width: calc(100vw - 16px); max-height: min(560px, calc(100vh - 90px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  animation: menu-in 140ms ease-out;
}
.shell-pop[hidden] { display: none; }
.shell-pop--menu { width: 280px; padding: 6px; overflow-y: auto; }
.shell-pop--user { width: 300px; }
.shell-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.shell-pop--menu .shell-pop-head { border-bottom: 0; padding: 6px 10px 4px; }
.shell-pop-title { font-size: 13px; font-weight: 700; color: var(--text); }
.shell-pop--menu .shell-pop-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); }
.shell-link { background: none; border: 0; padding: 4px 0; font-size: 12.5px; font-weight: 600; color: var(--brand); cursor: pointer; text-decoration: none; }
.shell-link:hover { text-decoration: underline; color: var(--brand-hover); }
.shell-link[hidden] { display: none; }
.shell-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--text-2); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none;
}
.shell-item:hover, .shell-item:focus-visible { background: var(--bg-3); color: var(--text); }
.shell-item svg, .shell-item i { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-mut); }
.shell-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.shell-logout-form { margin: 0; }
.shell-userhead { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.shell-userhead-text { min-width: 0; display: flex; flex-direction: column; }
.shell-userhead .shell-profile-name, .shell-userhead .shell-profile-role { max-width: 200px; }

/* Bildirim listesi */
.shell-notif-list { overflow-y: auto; overscroll-behavior: contain; max-height: 400px; }
.shell-notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); text-decoration: none; }
.shell-notif:last-child { border-bottom: 0; }
.shell-notif:hover { background: var(--bg-2); color: var(--text-2); }
.shell-notif.is-unread { background: var(--brand-bg); }
.shell-notif.is-unread:hover { background: var(--bg-3); }
.shell-notif-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.shell-notif.is-unread .shell-notif-dot { background: var(--info); }
.shell-notif--uyari.is-unread .shell-notif-dot { background: var(--warning); }
.shell-notif--hata.is-unread .shell-notif-dot { background: var(--danger); }
.shell-notif--basari.is-unread .shell-notif-dot { background: var(--success); }
.shell-notif-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shell-notif-title { font-size: 13px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.shell-notif-msg { font-size: 12.5px; color: var(--text-mut); overflow-wrap: anywhere; }
.shell-notif-time { font-size: 11.5px; color: var(--text-mut); }
.shell-empty { padding: 28px 16px; text-align: center; color: var(--text-mut); }
.shell-empty svg, .shell-empty i { width: 28px; height: 28px; opacity: .6; }
.shell-empty p { margin: 8px 0 0; font-size: 13px; }
.shell-pop-foot { display: block; padding: 11px 14px; text-align: center; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; background: var(--bg-2); }
.shell-pop-foot:hover { background: var(--bg-3); color: var(--brand-hover); }

.shell-backdrop { position: fixed; inset: 0; z-index: calc(var(--z-sticky) - 1); background: rgba(10, 12, 16, .35); }
.shell-backdrop[hidden] { display: none; }

@media (max-width: 640px) {
  .shell-iconbtn { width: 44px; height: 44px; }
  .shell-pop, .shell-pop--menu, .shell-pop--user {
    position: fixed; left: 8px; right: 8px; width: auto; max-width: none; top: calc(env(safe-area-inset-top, 0px) + 62px);
    max-height: calc(100dvh - 78px);
  }
  .topbar-q-actions .shell-pop { top: calc(env(safe-area-inset-top, 0px) + 86px); }
  .shell-notif-list { max-height: calc(100dvh - 190px); }
  .shell-actions { gap: 0; }
}
/* q üst çubuğu: sağ sütun */
.topbar-inner--q .topbar-q-actions { justify-self: end; }
.topbar-q-actions .shell-profilebtn { padding: 0 4px; }

/* --- Pencereler (modal) --- */
.shell-dlg { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); }
.shell-dlg[open] { display: flex; flex-direction: column; }
.shell-dlg .dialog-header { flex: 0 0 auto; }
.shell-dlg .dialog-header .shell-link { margin-left: auto; }
.shell-dlg .dialog-body { max-height: none; flex: 1 1 auto; overflow-y: auto; }
.shell-dlg-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-2); flex: 0 0 auto; flex-wrap: wrap; }
.shell-spacer { flex: 1; }
.shell-dlg--frame { width: min(920px, calc(100% - 24px)); height: min(860px, calc(100dvh - 32px)); }
.shell-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; background: var(--bg); }
.shell-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.shell-frame-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-mut); font-size: 13px; background: var(--bg); z-index: 1; pointer-events: none; }
.shell-frame-loading[hidden] { display: none; }
@media (max-width: 640px) {
  .shell-dlg, .shell-dlg--frame { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .shell-dlg--frame { height: 94dvh; max-height: 94dvh; }
  .shell-dlg:not(.shell-dlg--frame) { max-height: 92dvh; }
}

/* --- Görünüm (renk paleti) seçici --- */
.shell-hint { margin: 0 0 12px; font-size: 13px; color: var(--text-mut); }
.shell-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 14px; }
.shell-swatch { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 8px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; min-height: 44px; }
.shell-swatch:hover { border-color: var(--border-2); }
.shell-swatch.is-on { border-color: var(--topbar-accent); box-shadow: 0 0 0 3px var(--ring); }
.shell-swatch-chip { position: relative; display: block; height: 34px; border-radius: 6px; overflow: hidden; }
.shell-swatch-chip i { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.shell-swatch-chip--custom { background: conic-gradient(#ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ef4444); }
.shell-swatch-chip--custom i { display: none; }
.shell-swatch-name { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; }
.shell-custom { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 14px; }
.shell-color { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.shell-color[hidden] { display: none; }
.shell-color input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--bg); cursor: pointer; }
.shell-preview { display: flex; min-height: 96px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.shell-preview-side { width: 46%; padding: 8px; background: var(--sb-bg); display: flex; flex-direction: column; gap: 2px; }
.shell-preview-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; color: var(--sb-text); }
.shell-preview-item i { width: 12px; height: 12px; border-radius: 3px; background: var(--sb-text-mut); }
.shell-preview-item.is-active { background: var(--sb-bg-active); color: var(--sb-text-strong); }
.shell-preview-item.is-active i { background: var(--sb-accent); }
.shell-preview-mut { color: var(--sb-text-mut); }
.shell-preview-main { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg-2); }
.shell-preview-btn { padding: 8px 16px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }
.shell-warn { margin: 0 0 8px; padding: 8px 10px; border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); font-size: 13px; }
.shell-warn[hidden] { display: none; }
.shell-scope { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.shell-scope legend { padding: 0 6px; font-size: 12px; font-weight: 600; color: var(--text-mut); }
.shell-scope label { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.shell-status { min-height: 18px; margin: 8px 0 0; font-size: 12.5px; color: var(--text-mut); }

/* --- Gömülü mod (?embed=1): modal içi iframe; kabuk gizli, kompakt --- */
body.is-embed .sidebar, body.is-embed .topbar, body.is-embed .app-footer, body.is-embed .bottom-nav,
body.is-embed .sidebar-overlay, body.is-embed .skip-link, body.is-embed .page-header, body.is-embed .breadcrumb { display: none !important; }
body.is-embed .app-shell--with-sidebar { display: block; min-height: 0; }
body.is-embed, body.is-embed .app-shell-main, body.is-embed .app-shell, body.is-embed .app-main { background: var(--bg); min-height: 0; }
body.is-embed .app-main-content { padding: 14px 16px 18px !important; }

/* --- Sayfa başlığı tipografisi (tüm paneller): başlık + açıklama + aksiyonlar --- */
.page-header, .to-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.page-header > :first-child, .to-head > :first-child { flex: 1 1 320px; min-width: 0; }
.page-header > :not(:first-child), .to-head > :not(:first-child) { flex: 0 0 auto; }
.page-header .page-title, .page-header h1, .to-head h1, h1.page-title {
  margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere;
}
.page-header .page-subtitle, .page-header .page-sub, .page-header > div > p, .to-head p, p.page-subtitle {
  margin: 4px 0 0; max-width: 70ch; font-size: 13.5px; line-height: 1.55; color: var(--text-mut); font-weight: 400;
}
.app-main-content .page-header, .app-main-content .to-head {
  background: transparent; padding: 16px 0 12px; margin: 0 0 16px; border-bottom: 1px solid var(--border);
}
.app-main > .page-header { background: var(--bg); }
.page-header .page-actions, .to-head .page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 12.5px; color: var(--text-mut); margin: 0 0 6px; }
@media (max-width: 640px) {
  .page-header .page-title, .page-header h1, .to-head h1, h1.page-title { font-size: 18px; }
  .page-header > :not(:first-child), .to-head > :not(:first-child) { width: 100%; }
  .page-header > :not(:first-child) .btn, .to-head > :not(:first-child) .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}
