﻿/* ==========================================================================
   OTO EKSPERTİZ CRM — ENTERPRISE SAAS DESIGN SYSTEM (v2.0)
   Inspired by Linear, Stripe Dashboard, Vercel & Modern Enterprise ERPs
   ========================================================================== */
:root {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #475569;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --line-subtle: #f1f5f9;

  /* Controlled Corporate Blue Accents */
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;

  /* Semantic Status Tokens */
  --green: #16a34a;
  --green-700: #15803d;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;

  --amber: #d97706;
  --amber-700: #b45309;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;

  --red: #dc2626;
  --red-700: #b91c1c;
  --red-50: #fef2f2;
  --red-100: #fee2e2;

  --violet: #7c3aed;
  --violet-50: #f5f3ff;
  --violet-100: #ede9fe;

  /* Geometry & Elevation */
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 12px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.08);

  /* Layout Dimensions */
  --side-w: 272px;
  --side-w-collapsed: 74px;
  --top-h: 62px;

  /* Bootstrap Overrides */
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: #0f172a;
  --bs-body-bg: #f8fafc;
  --bs-border-color: #e2e8f0;
  --bs-link-color: #2563eb;
}

/* Super Admin Theme Differentiation */
body.theme-sa {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-700: #3730a3;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

a { text-decoration: none; color: var(--brand); transition: color 0.15s ease; }
a:hover { text-decoration: none; color: var(--brand-600); }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; color: var(--ink); font-weight: 600; }
.ic { flex: none; vertical-align: -3px; }
.font-mono { font-family: var(--bs-body-font-family); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   APP SHELL & COLLAPSIBLE SIDEBAR
   ========================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  background: #0b1120;
  background-image: radial-gradient(ellipse at 0% 0%, rgba(37, 99, 235, 0.14), transparent 55%),
                    linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  z-index: 45;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

body.theme-sa .sidebar {
  background-image: radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.2), transparent 60%),
                    linear-gradient(180deg, #090d1a 0%, #111827 100%);
}

.content {
  margin-left: var(--side-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brand Header */
.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  min-height: var(--top-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex: none;
}
body.theme-sa .brand-mark {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 4px 14px -3px rgba(99, 102, 241, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.brand-text { min-width: 0; flex: 1; overflow: hidden; }
.brand-name {
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.brand-badge-sa {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.side-collapse-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  flex: none;
}
.side-collapse-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Sidebar Search & Branch Context */
.side-tools {
  padding: 0.75rem 0.85rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.side-search {
  position: relative;
  display: flex;
  align-items: center;
}
.side-search .ic {
  position: absolute;
  left: 0.65rem;
  color: #64748b;
  pointer-events: none;
}
.side-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.42rem 2.2rem 0.42rem 2rem;
  color: #f1f5f9;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.side-search input::placeholder { color: #64748b; }
.side-search input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.side-search kbd {
  position: absolute;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  pointer-events: none;
}

.side-branch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  color: #94a3b8;
  font-size: 0.78rem;
}
.side-branch select {
  background: transparent;
  border: 0;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.8rem;
  width: 100%;
  cursor: pointer;
  outline: none;
}
.side-branch select option { background: #0f172a; color: #f8fafc; }

/* Navigation List */
.side-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}
.nav-group {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #475569;
  margin: 1rem 0.55rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: color 0.15s;
}
.nav-group:hover { color: #94a3b8; }
.nav-group-items {
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.18s ease;
}
.nav-group.closed + .nav-group-items {
  max-height: 0 !important;
  opacity: 0;
}
.nav-group .chev { transition: transform 0.2s ease; opacity: 0.6; }
.nav-group.closed .chev { transform: rotate(-90deg); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.52rem 0.7rem;
  border-radius: 8px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.86rem;
  margin-bottom: 2px;
  position: relative;
  transition: background 0.14s ease, color 0.14s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}
.nav-item.on {
  background: rgba(37, 99, 235, 0.16);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}
body.theme-sa .nav-item.on {
  background: rgba(99, 102, 241, 0.2);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.32);
}
.nav-item.on::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #3b82f6;
}
body.theme-sa .nav-item.on::before { background: #818cf8; }
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.25rem 0.1rem 0.75rem;
  padding: 0.62rem 0.9rem;
  border-radius: 9px;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Sidebar User Footer */
.side-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin: 0.35rem 0.75rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-weight: 700;
  font-size: 0.76rem;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
body.theme-sa .avatar { background: linear-gradient(135deg, #6366f1, #4338ca); }
.su-text { min-width: 0; flex: 1; }
.su-name { color: #f1f5f9; font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { font-size: 0.7rem; color: #64748b; display: flex; align-items: center; gap: 4px; }
.su-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; }

.icon-btn {
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.side-user .icon-btn { color: #94a3b8; }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.icon-btn:hover { background: rgba(15, 23, 42, 0.06); }

/* Desktop Collapsed Sidebar Mode */
@media (min-width: 1181px) {
  body.side-collapsed .sidebar { width: var(--side-w-collapsed); }
  body.side-collapsed .content { margin-left: var(--side-w-collapsed); }
  body.side-collapsed .brand-text,
  body.side-collapsed .side-tools,
  body.side-collapsed .nav-group,
  body.side-collapsed .nav-item span,
  body.side-collapsed .nav-item .nav-badge,
  body.side-collapsed .nav-cta span,
  body.side-collapsed .su-text,
  body.side-collapsed .side-user form { display: none !important; }
  body.side-collapsed .brand-row { justify-content: center; padding: 1rem 0.5rem; position: relative; }
  body.side-collapsed .side-collapse-btn {
    position: absolute;
    right: -13px;
    top: 18px;
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transform: rotate(180deg);
  }
  body.side-collapsed .nav-item,
  body.side-collapsed .nav-cta { justify-content: center; padding: 0.65rem; }
  body.side-collapsed .side-user { flex-direction: column; padding: 0.5rem; gap: 0.35rem; align-items: center; }
}

/* ==========================================================================
   TOPBAR & BREADCRUMBS
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.75rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.top-breadcrumb .bc-root { font-weight: 500; color: var(--muted); }
.top-breadcrumb .bc-sep { color: var(--line-2); }
.top-title { font-weight: 700; font-size: 0.96rem; color: var(--ink); letter-spacing: -0.01em; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 0.65rem; }
.menu-toggle { display: none; color: var(--ink); }

.top-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.lic {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.32rem 0.75rem;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.lic.warn {
  background: var(--amber-50);
  color: var(--amber-700);
  border-color: var(--amber-100);
}

.imp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.75rem;
  background: linear-gradient(90deg, #4338ca, #2563eb);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 35;
}
.imp-bar .ic { margin-right: 0.35rem; }

.page {
  padding: 1.65rem 1.85rem;
  flex: 1;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}
.app-foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.scrim { display: none; }

/* ==========================================================================
   PAGE HEADERS, ALERTS & TOASTS
   ========================================================================== */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.page-head h3, .page-head h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.page-sub {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.15rem;
  font-weight: 400;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.flash {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.15rem;
  font-weight: 500;
  font-size: 0.88rem;
  box-shadow: var(--shadow-xs);
  animation: slideDown 0.22s ease;
}
.flash-ok { background: var(--green-50); color: #166534; border: 1px solid #bbf7d0; }
.flash-err { background: var(--red-50); color: #991b1b; border: 1px solid #fecaca; }

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

.alert { border-radius: var(--radius); border: 1px solid transparent; font-size: 0.88rem; }
.alert-success { background: var(--green-50); border-color: #bbf7d0; color: #166534; }
.alert-danger { background: var(--red-50); border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--amber-50); border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--brand-50); border-color: var(--brand-200); color: #1e40af; }

/* Floating Toast Container */
.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  pointer-events: none;
}
.ui-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.2s ease;
}
.ui-toast.ok { border-left: 4px solid #22c55e; }
.ui-toast.err { border-left: 4px solid #ef4444; }

/* ==========================================================================
   CARDS, PANELS & KPI METRICS
   ========================================================================== */
.card-s, .kpi, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-s { padding: 1.35rem 1.5rem; margin-bottom: 1.1rem; }
.card-s h5, .panel h5 {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.card-s h5::before {
  content: "";
  width: 3.5px;
  height: 15px;
  border-radius: 2px;
  background: var(--brand);
}
.card-s-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -0.65rem;
  margin-bottom: 1rem;
}

.panel { padding: 1.25rem 1.4rem; height: 100%; display: flex; flex-direction: column; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-subtle);
}
.panel-head h5 { margin: 0; font-size: 0.92rem; }
.panel-head h5::before { display: none; }

.kpi {
  padding: 1.2rem 1.3rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.kpi-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  flex: none;
}
.kpi-top .kpi-ic { margin-bottom: 0; }
.kpi-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

.ic-green { background: var(--green-50); color: var(--green); border: 1px solid var(--green-100); }
.ic-orange { background: var(--amber-50); color: var(--amber); border: 1px solid var(--amber-100); }
.ic-blue { background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); }
.ic-red { background: var(--red-50); color: var(--red); border: 1px solid var(--red-100); }
.ic-violet { background: var(--violet-50); color: var(--violet); border: 1px solid var(--violet-100); }
.ic-slate { background: var(--bg-subtle); color: var(--ink-2); border: 1px solid var(--line); }

.kpi-l {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.kpi-n {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 0.15rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi .sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Dashboard Hero / Command Bar */
.hero {
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  color: #fff;
  background:
    radial-gradient(900px 320px at 95% -15%, rgba(59, 130, 246, 0.38), transparent 60%),
    linear-gradient(135deg, #0b1120 0%, #0f172a 55%, #1e3a8a 100%);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body.theme-sa .hero {
  background:
    radial-gradient(900px 320px at 95% -15%, rgba(139, 92, 246, 0.4), transparent 60%),
    linear-gradient(135deg, #090d1a 0%, #1e1b4b 55%, #3730a3 100%);
}
.hero h2 { color: #fff; font-size: 1.3rem; font-weight: 600; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.hero p { margin: 0; color: #94a3b8; font-size: 0.88rem; }
.hero .btn { font-weight: 600; }
.btn-hero {
  background: #ffffff;
  color: #0f172a;
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn-hero:hover { background: #f1f5f9; color: #0f172a; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.hero-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.hero-select, .hero-input {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 8px;
  padding: 0.42rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
}
.hero-select option { background: #0f172a; color: #fff; }
.hero-input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.75; cursor: pointer; }

/* List Rows & Empty States */
.list-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--line-subtle);
  transition: background 0.12s;
}
.list-row:last-child { border: 0; }
.list-row:hover { background: var(--surface-hover); border-radius: 8px; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; color: var(--ink); font-size: 0.88rem; }
.list-row .s { font-size: 0.76rem; color: var(--muted); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--muted);
}
.empty-ic {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--subtle);
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   CHARTS & DATA VISUALIZATION
   ========================================================================== */
.chart { width: 100%; height: 200px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .val { font-size: 10px; fill: var(--ink-2); font-weight: 600; }
.chart .lbl { font-size: 10px; fill: var(--muted); }
.chart rect { transition: opacity 0.15s; }
.chart rect:hover { opacity: 0.82; }
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 165px;
  color: var(--subtle);
  font-size: 0.85rem;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: var(--bg);
}
.donut-wrap { display: flex; align-items: center; gap: 1.35rem; flex-wrap: wrap; }
.donut { width: 144px; height: 144px; flex: none; }
.donut .d-total { font-size: 6.2px; font-weight: 800; fill: var(--ink); }
.donut .d-sub { font-size: 2.6px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 145px; }
.legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0;
  font-size: 0.84rem;
  border-bottom: 1px dashed var(--line);
}
.legend li:last-child { border: 0; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend span { flex: 1; color: var(--ink-2); }
.legend b { font-weight: 700; color: var(--ink); }

/* Horizontal Progress Bars for Branch & Package Breakdown */
.metric-bar-row { margin-bottom: 0.85rem; }
.metric-bar-row:last-child { margin-bottom: 0; }
.metric-bar-head { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.3rem; }
.metric-bar-head .name { font-weight: 600; color: var(--ink); }
.metric-bar-head .meta { color: var(--muted); font-size: 0.78rem; }
.metric-bar-track { height: 7px; background: var(--bg-subtle); border-radius: 99px; overflow: hidden; }
.metric-bar-fill { height: 100%; background: var(--brand); border-radius: 99px; transition: width 0.3s ease; }

/* ==========================================================================
   ENTERPRISE DATA TABLES & TOOLBARS
   ========================================================================== */
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.dt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.dt-toolbar-left, .dt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dt-search {
  position: relative;
  min-width: 230px;
}
.dt-search .ic {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  pointer-events: none;
}
.dt-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.38rem 0.7rem 0.38rem 2rem;
  font-size: 0.83rem;
  background: var(--bg);
  color: var(--ink);
  transition: all 0.15s;
}
.dt-search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.dt-count {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  background: var(--bg-subtle);
  border-radius: 6px;
}
.dt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: #fcfdff;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dt-pager {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.dt-page-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  min-width: 28px;
  height: 28px;
  padding: 0 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.dt-page-btn:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--line-2); }
.dt-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dt-page-btn:disabled { opacity: 0.45; cursor: default; }

.table {
  --bs-table-bg: var(--surface);
  margin-bottom: 0;
  font-size: 0.875rem;
}
.table-responsive {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
}
.table-card .table-responsive {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.table > :not(caption) > * > * {
  padding: 0.78rem 1rem;
  border-bottom-color: var(--line-subtle);
}
.table thead th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
.table thead th.sortable { cursor: pointer; transition: color 0.12s; }
.table thead th.sortable:hover { color: var(--ink); }
.table thead th.sortable::after {
  content: "↕";
  font-size: 0.7rem;
  margin-left: 0.3rem;
  opacity: 0.35;
}
.table thead th.sort-asc::after { content: "↑"; opacity: 1; color: var(--brand); }
.table thead th.sort-desc::after { content: "↓"; opacity: 1; color: var(--brand); }

.table tbody tr { transition: background 0.1s ease; }
.table tbody tr:hover { background: #f8fafc; }
.table tfoot th, .table tfoot td { background: #f8fafc; font-weight: 700; border-top: 1px solid var(--line); }
.table-sm > :not(caption) > * > * { padding: 0.55rem 0.8rem; }
.table td { vertical-align: middle; }

/* License Plate Pill */
.plate-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.plate-tag span { padding: 0; }

/* Status Badges */
.badge {
  font-weight: 600;
  font-size: 0.74rem;
  padding: 0.32em 0.68em;
  border-radius: 99px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge.bg-success { background: var(--green-50) !important; color: var(--green-700) !important; border-color: var(--green-100); }
.badge.bg-secondary { background: var(--bg-subtle) !important; color: var(--ink-3) !important; border-color: var(--line); }
.badge.bg-warning { background: var(--amber-50) !important; color: var(--amber-700) !important; border-color: var(--amber-100); }
.badge.bg-danger { background: var(--red-50) !important; color: var(--red-700) !important; border-color: var(--red-100); }
.badge.bg-primary { background: var(--brand-50) !important; color: var(--brand-700) !important; border-color: var(--brand-100); }

/* ==========================================================================
   FORMS, INPUTS & BUTTONS
   ========================================================================== */
.form-label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.32rem;
}
.form-hint {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.form-control, .form-select {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  background-color: #fff;
  color: var(--ink);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  font-size: 0.88rem;
}
.form-control::placeholder { color: var(--subtle); }
.form-control-sm, .form-select-sm { border-radius: 7px; padding: 0.34rem 0.6rem; font-size: 0.82rem; }
.form-control-lg, .form-select-lg { border-radius: 10px; padding: 0.65rem 0.9rem; font-size: 0.95rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}
.form-control:disabled, .form-select:disabled { background: var(--bg-subtle); color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Custom Searchable Brand/Model Combobox (Replaces native HTML datalist) */
.bm-combo {
  position: relative;
  width: 100%;
}
.bm-combo .bm-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.bm-combo .bm-input-wrap .form-control {
  padding-right: 2.2rem;
}
.bm-combo .bm-chev {
  position: absolute;
  right: 0.65rem;
  color: var(--muted);
  pointer-events: none;
  transition: transform 0.18s ease, color 0.15s ease;
}
.bm-combo.open .bm-chev {
  transform: rotate(180deg);
  color: var(--brand);
}
.bm-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 290px;
  overflow-y: auto;
  padding: 0.35rem;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.bm-combo.open .bm-menu {
  display: block;
  animation: slideDown 0.14s ease;
}
.bm-group {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.6rem 0.2rem;
  margin-top: 0.2rem;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bm-group:first-child {
  margin-top: 0;
  border-top: 0;
}
.bm-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.44rem 0.65rem;
  border-radius: 7px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.bm-opt:hover, .bm-opt.active {
  background: var(--brand-50);
  color: var(--brand-700);
}
.bm-opt .bm-brand-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
}
.bm-opt:hover .bm-brand-pill, .bm-opt.active .bm-brand-pill {
  background: var(--brand-100);
  color: var(--brand-700);
}
.bm-opt mark {
  background: #fef08a;
  color: var(--ink);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}
.bm-empty {
  padding: 0.75rem 0.65rem;
  font-size: 0.81rem;
  color: var(--muted);
  text-align: center;
}

/* Global Command Palette Modal (Ctrl+K) */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1090;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 11vh;
}
.cmd-backdrop.open { display: flex; animation: slideDown 0.14s ease; }
.cmd-box {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.cmd-input-row input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
}
.cmd-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 0.45rem;
}
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none !important;
}
.cmd-item:hover, .cmd-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
}
.cmd-item .cmd-cat {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
}


.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.48rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.1s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { border-radius: 7px; padding: 0.3rem 0.65rem; font-size: 0.79rem; }
.btn-lg { border-radius: 10px; padding: 0.65rem 1.2rem; font-size: 0.94rem; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(37, 99, 235, 0.38);
}
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.btn-success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(22, 163, 74, 0.38);
}
.btn-success:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }

.btn-light { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-light:hover { background: var(--bg-subtle); border-color: var(--line-2); color: var(--ink); }

.btn-outline-primary { color: var(--brand); border-color: var(--brand-200); background: #fff; }
.btn-outline-primary:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }

.btn-outline-secondary { color: var(--ink-2); border-color: var(--line-2); background: #fff; }
.btn-outline-secondary:hover { background: var(--bg-subtle); color: var(--ink); border-color: var(--line-2); }

.btn-outline-danger { color: var(--red-700); border-color: #fecaca; background: #fff; }
.btn-outline-danger:hover { background: var(--red-50); color: var(--red-700); border-color: var(--red); }

.btn-outline-success { color: var(--green-700); border-color: #bbf7d0; background: #fff; }
.btn-outline-success:hover { background: var(--green-50); color: var(--green-700); border-color: var(--green); }

.btn-outline-warning { border-color: #fde68a; color: var(--amber-700); background: #fff; }
.btn-outline-warning:hover { background: var(--amber-50); border-color: var(--amber); color: var(--amber-700); }

.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }

.nav-pills { gap: 0.35rem; }
.nav-pills .nav-link {
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--line);
  background: #fff;
}
.nav-pills .nav-link:hover { background: var(--bg-subtle); }
.nav-pills .nav-link.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Filter Bar Card */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   EKSPERTİZ WORKSPACE & REPORT SCREENS
   ========================================================================== */
.report-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
}
.report-head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.rh-title { font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; color: var(--ink); }
.rh-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rh-strip span {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.rh-strip b {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  margin-right: 0.45rem;
  text-transform: uppercase;
}
.rh-progress {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.rh-prog-track {
  flex: 1;
  min-width: 180px;
  height: 7px;
  background: var(--bg-subtle);
  border-radius: 99px;
  overflow: hidden;
}
.rh-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #22c55e);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.rtabs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 78px;
}
.rtab-sec {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0.75rem 0.5rem 0.3rem;
}
.rtab {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none !important;
  margin-bottom: 2px;
  transition: all 0.12s;
}
.rtab:hover { background: var(--bg-subtle); color: var(--ink); }
.rtab.on {
  background: var(--brand-50);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand-200);
}
.rtab.off { color: #9aa7bd; font-weight: 500; }
.rtab.done { color: var(--green-700); }
.rtab.done.on { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); }
.rtab .ic { margin-right: 0.55rem; }
.rtab-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
  display: inline-grid;
  place-items: center;
  font-size: 0.65rem;
}

.opts { display: flex; flex-wrap: wrap; gap: 0.32rem; }
.opt {
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 0.24rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  background: #fff;
  transition: all 0.12s;
  user-select: none;
}
.opt:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.btn-check:checked + .opt {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px -1px rgba(37, 99, 235, 0.45);
}
.btn-check[value="SORUNSUZ"]:checked + .opt,
.btn-check[value="ORJİNAL"]:checked + .opt,
.btn-check[value="İYİ"]:checked + .opt,
.btn-check[value="YOK"]:checked + .opt {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 2px 6px -1px rgba(22, 163, 74, 0.45);
}
.btn-check[value="SORUNLU"]:checked + .opt,
.btn-check[value="DEĞİŞEN"]:checked + .opt,
.btn-check[value="KÖTÜ"]:checked + .opt,
.btn-check[value="VAR"]:checked + .opt {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 2px 6px -1px rgba(220, 38, 38, 0.45);
}
.btn-check[value="ORTA"]:checked + .opt,
.btn-check[value="BOYALI"]:checked + .opt,
.btn-check[value="LOKAL BOYALI"]:checked + .opt {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 2px 6px -1px rgba(217, 119, 6, 0.45);
}
.btn-check:disabled + .opt { opacity: 0.65; cursor: default; }

.numb {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 700;
}
.thumbs { display: flex; gap: 0.35rem; margin-top: 0.45rem; flex-wrap: wrap; }
.thumbs img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: transform 0.15s;
}
.thumbs img:hover { transform: scale(1.06); }

.docslot {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem;
  height: 100%;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.docslot:hover { border-color: var(--line-2); box-shadow: var(--shadow-xs); }
.docimg { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.dropz {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 4/3;
  border: 1.5px dashed var(--line-2);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 1rem;
  background: var(--bg);
  transition: all 0.15s;
}
.dropz:hover {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  background: #fff;
  box-shadow: -16px 0 40px -12px rgba(15, 23, 42, 0.25);
  transform: translateX(105%);
  transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-h {
  background: #0f172a;
  color: #fff;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.w-45 { width: 45%; }

.carmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }
.part { border: 2px solid var(--green); border-radius: 12px; padding: 0.55rem; background: #fff; transition: border-color 0.15s; }
.part .pt { font-size: 0.68rem; font-weight: 700; margin-bottom: 0.3rem; letter-spacing: 0.02em; }
.part-KAPUT, .part-TAVAN, .part-BAGAJ { grid-column: span 2; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-xs); }
.stat .n { font-size: 1.8rem; font-weight: 800; }

.rpage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.rpage-head h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}
.rtab-balance {
  margin-top: 0.85rem;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.info-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 0.2rem;
}

/* ==========================================================================
   AUTH, ONBOARDING & MOBILE UPLOAD SCREENS (Premium Animated Centered Layout)
   ========================================================================== */
@keyframes authCardIn {
  0% { opacity: 0; transform: translateY(22px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes authOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(55px, -35px) scale(1.12); }
}
@keyframes authOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.15); }
}
@keyframes authShimmer {
  0% { transform: translateX(-120%) skewX(-20deg); }
  100% { transform: translateX(220%) skewX(-20deg); }
}
@keyframes authBorderFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: #eef2f8;
  background-image:
    radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.12) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(15, 23, 42, 0.08) 0px, transparent 50%);
  position: relative;
  overflow: hidden;
}
.auth-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  pointer-events: none;
  z-index: 0;
}
.auth-page::before {
  width: 420px;
  height: 420px;
  top: -80px;
  left: calc(50% - 380px);
  background: rgba(37, 99, 235, 0.22);
  animation: authOrb1 9s ease-in-out infinite;
}
.auth-page::after {
  width: 380px;
  height: 380px;
  bottom: -90px;
  right: calc(50% - 360px);
  background: rgba(56, 189, 248, 0.18);
  animation: authOrb2 11s ease-in-out infinite;
}

.auth-box {
  width: 100%;
  max-width: 410px;
  position: relative;
  z-index: 2;
  animation: authCardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-box-wide {
  width: 100%;
  max-width: 660px;
  position: relative;
  z-index: 2;
  animation: authCardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-header {
  text-align: center;
  margin-bottom: 1.4rem;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: #ffffff;
  margin-bottom: 0.85rem;
  box-shadow: 0 10px 24px -6px rgba(29, 78, 216, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.auth-logo:hover {
  transform: translateY(-3px) scale(1.06) rotate(-3deg);
  box-shadow: 0 14px 28px -6px rgba(29, 78, 216, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.auth-header h1 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.015em;
}
.auth-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.3rem 0 0;
}

.auth-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 2rem 1.95rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 45px -15px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0f172a, #2563eb, #38bdf8, #2563eb, #0f172a);
  background-size: 200% 100%;
  animation: authBorderFlow 6s ease infinite;
}
.auth-card:focus-within {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(37, 99, 235, 0.06),
    0 26px 55px -14px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(37, 99, 235, 0.2);
}

.auth-field {
  position: relative;
}
.auth-field .af-ic {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.auth-field:focus-within .af-ic {
  color: #2563eb;
  transform: translateY(-50%) scale(1.08);
}
.auth-card .form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.35rem;
}
.auth-card .form-control,
.auth-card .form-select {
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  font-size: 0.9rem;
  padding: 0.58rem 0.8rem;
  transition: all 0.2s ease;
}
.auth-field .form-control {
  padding-left: 2.55rem;
}
.auth-card .form-control:hover,
.auth-card .form-select:hover {
  border-color: #94a3b8;
  background-color: #ffffff;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border: 0;
  color: #ffffff;
  border-radius: 9px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-140%) skewX(-20deg);
}
.auth-btn:hover {
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.auth-btn:hover::after {
  animation: authShimmer 0.75s ease forwards;
}
.auth-btn:active {
  transform: translateY(0);
}
.auth-btn svg {
  transition: transform 0.2s ease;
}
.auth-btn:hover svg {
  transform: translateX(4px);
}

.auth-pw-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.24rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-pw-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.83rem;
  color: #64748b;
}
.auth-links a {
  color: #334155;
  font-weight: 500;
  transition: color 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.auth-links a:hover {
  color: #2563eb;
}
.auth-dev {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
}
.auth-dev a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #dbe3ef;
  margin-left: 0.2rem;
  transition: all 0.18s ease;
}
.auth-dev a:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.m-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: #f4f5f7;
}
.m-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.m-card h2 { font-weight: 600; font-size: 1.2rem; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1920, 1440, 1024, 768, 390, 360)
   ========================================================================== */
.nw { white-space: nowrap; }
.inline-form { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.inline-form .form-control, .inline-form .form-select { min-width: 96px; flex: 1; }

@media (max-width: 1180px) {
  .sidebar {
    transform: translateX(-102%);
    box-shadow: var(--shadow-lg);
    width: 272px !important;
  }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(2px);
    z-index: 40;
  }
  .side-collapse-btn { display: none; }
  .content { margin-left: 0 !important; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 1rem; }
  .page { padding: 1.15rem; }
  .rtabs { position: static; }
  .login-hero { display: none; }
  .login-panel { background: linear-gradient(145deg, #070b14, #0f172a 60%, #1e3a8a); }
  .carmap { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 1.25rem; }
  .imp-bar { padding: 0.5rem 1rem; }
}

@media (max-width: 767px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .dt-toolbar { flex-direction: column; align-items: stretch; }
  .dt-search { min-width: 100%; }
  .top-breadcrumb .bc-root, .top-breadcrumb .bc-sep { display: none; }
}

@media (max-width: 575px) {
  .kpi-n { font-size: 1.4rem; }
  .kpi { padding: 1rem; }
  .card-s, .panel { padding: 1rem; }
  .table > :not(caption) > * > * { padding: 0.6rem 0.65rem; font-size: 0.82rem; }
  .top-title { font-size: 0.9rem; }
  .page { padding: 0.85rem; }
  .login-card, .apply-card { padding: 1.5rem; }
}
