/* RYL Sigorta — kurumsal tasarım sistemi (marka bordosu #992D31, nötr soğuk gri zemin) */
@font-face { font-family: "Inter"; src: local("Inter Variable"), local("Inter"), url(fonts/InterVariable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  /* Marka */
  --brand-900: #4a1517; --brand-800: #6b1f22; --brand-700: #84262a; --brand-600: #992d31; --brand-100: #f6e9ea; --brand-50: #fbf4f4;
  --primary: var(--brand-600); --primary-hover: var(--brand-700); --primary-active: var(--brand-800); --primary-dark: var(--brand-800);
  --primary-solid: var(--brand-600); --primary-fg: var(--brand-600);
  --primary-soft: var(--brand-100); --primary-line: #e5c6c8; --on-primary: #ffffff;
  /* Nötr */
  --gray-25: #fafbfc; --gray-50: #f5f6f8; --gray-100: #eef0f3; --gray-200: #e3e6ea; --gray-300: #cdd2d9; --gray-400: #9aa1ab; --gray-500: #6b7380; --gray-600: #5f6773; --gray-700: #3a404a; --gray-900: #1a1d23;
  --bg: var(--gray-50); --surface: #ffffff; --surface-2: var(--gray-25); --surface-sunken: #f7f8fa; --raised: #ffffff;
  --card: var(--surface); --card-2: var(--surface-2);
  --line: var(--gray-200); --line-strong: var(--gray-300);
  --text: var(--gray-900); --text-2: var(--gray-700); --muted: var(--gray-600); --subtle: #737a85; /* beyaz zeminde 4.5:1 (eski gray-400 2.6:1 idi) */
  --hover: #f3f4f6;
  /* Durum */
  --success: #0f7b4b; --success-soft: #e7f5ee;
  --warning: #b54708; --warning-soft: #fef4e6;
  --danger: #d92d20;  --danger-soft: #fdecea;
  --info: #1d5fbf;    --info-soft: #e8f0fc;
  --green: var(--success); --green-soft: var(--success-soft); --orange: var(--warning); --orange-soft: var(--warning-soft);
  --red: var(--danger); --red-soft: var(--danger-soft); --blue: var(--info); --blue-soft: var(--info-soft); --gray-soft: var(--gray-100);
  --focus: var(--brand-600); --focus-ring: 0 0 0 3px rgba(153, 45, 49, .18);
  /* Grafik */
  --chart: #992d31; --chart-1: #992d31; --chart-2: #2f5d8a; --chart-3: #b7832f; --chart-4: #4f7f6a; --chart-5: #6e5a8e; --chart-6: #8a919c;
  --chart-muted: #d5d9df; --chart-grid: #eef0f3; --chart-axis: #8a919c;
  /* Tipografi */
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 14px; --fs-md: 15px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 30px;
  /* Boşluk */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  /* Köşe ve gölge */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --radius: var(--r-md); --radius-sm: var(--r-sm);
  --sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --sh-md: 0 4px 8px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --sh-lg: 0 12px 24px -4px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --sh-xl: 0 24px 48px -12px rgba(16, 24, 40, .22);
  --shadow: none; --shadow-lg: var(--sh-xl);
  /* Yerleşim */
  --sidebar: 240px; --topbar-h: 56px; --content-max: 1440px; --content-narrow: 760px;
  --control-h: 36px; --control-h-sm: 30px; --tap: 44px;
  --ease: cubic-bezier(.2, 0, 0, 1); --dur-1: 120ms; --dur-2: 200ms;
}
body.big { --fs-xs: 13px; --fs-sm: 14px; --fs: 16px; --fs-md: 17px; --fs-lg: 18px; }

:root[data-theme="dark"], :root.auto-dark {
  color-scheme: dark;
  --bg: #111317; --surface: #1a1d22; --surface-2: #20242a; --surface-sunken: #16191d; --raised: #23272e;
  --line: #2c3138; --line-strong: #383e47; --hover: #22262c;
  --text: #eceef1; --text-2: #c9ced6; --muted: #a3aab3; --subtle: #8b929c;
  --primary: #b3393e; --primary-hover: #c4474c; --primary-active: #a03236; --primary-dark: #e58a8e; --primary-solid: #b3393e; --primary-fg: #e58a8e;
  --primary-soft: #3a2224; --primary-line: #5b3134;
  --success: #4ade80; --success-soft: #14321f; --warning: #fbbf24; --warning-soft: #3b2a10;
  --danger: #f87171; --danger-soft: #3d1b1b; --info: #93c5fd; --info-soft: #172a4a; --gray-soft: #262a30;
  --focus: #e58a8e; --focus-ring: 0 0 0 3px rgba(229, 138, 142, .25);
  --chart: #e58a8e; --chart-1: #e58a8e; --chart-2: #7fa7d3; --chart-3: #d9ae5f; --chart-4: #7fb39c; --chart-5: #a593c4; --chart-muted: #3a4049; --chart-grid: #262a30; --chart-axis: #8a919c;
  --sh-xs: none; --sh-sm: none; --sh-md: 0 4px 12px rgba(0, 0, 0, .4); --sh-lg: 0 12px 28px rgba(0, 0, 0, .5); --sh-xl: 0 24px 56px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); font-feature-settings: "cv11", "ss01", "tnum" 0;
  font-size: var(--fs); line-height: 1.43; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.01em; font-weight: 600; }
svg.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.num, .money, .kpi .v, .stat-n, .bar-row, .item-side b, .tbl td, .detail-row > span:last-child { font-variant-numeric: tabular-nums; }

/* Odak */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; }

/* ---------- Yerleşim ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; }
.brand-logo { width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: contain; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .04em; flex: none; }
.brand-name { font-weight: 600; font-size: var(--fs-md); color: var(--text); letter-spacing: -.01em; }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); padding: 16px 10px 6px; }
.nav-group:first-child { padding-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  padding: 6px 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs); font-weight: 500;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.nav-item svg.ic { color: var(--subtle); width: 18px; height: 18px; }
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--hover); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.nav-item.active svg.ic { color: var(--primary-fg); }
.nav-item .grow { flex: 1; }
.nav-item .nav-lock { color: var(--subtle); width: 14px; height: 14px; }
.nav-badge { background: var(--gray-200); color: var(--text); font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav-badge.alert { background: var(--danger); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px;
  padding: 0 32px; padding-top: env(safe-area-inset-top); min-height: var(--topbar-h);
}
.topbar h1 { font-size: var(--fs); margin: 0; font-weight: 500; color: var(--muted); white-space: nowrap; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs); color: var(--muted); white-space: nowrap; min-width: 0; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb svg.ic { width: 14px; height: 14px; color: var(--subtle); }
.topbar-search { flex: 0 1 360px; margin: 0 auto; position: relative; }
.topbar-search .input { height: 34px; min-height: 34px; padding-left: 34px; background: var(--surface-sunken); border-color: var(--line); }
.topbar-search > svg.ic { position: absolute; left: 11px; top: 9px; color: var(--subtle); width: 16px; height: 16px; pointer-events: none; }
.topbar-search kbd { position: absolute; right: 8px; top: 7px; font: 500 11px/18px var(--font); color: var(--subtle); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 0 5px; background: var(--surface); }
.search-pop { position: absolute; top: 40px; left: 0; right: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg); max-height: 420px; overflow-y: auto; z-index: 30; padding: 4px; }
.search-pop[hidden] { display: none; }
.search-pop .sp-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); padding: 8px 10px 4px; }
.search-pop button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; background: none; border: 0; border-radius: var(--r-sm); padding: 7px 10px; cursor: pointer; font-size: var(--fs-sm); }
.search-pop button:hover, .search-pop button.on { background: var(--hover); }
.search-pop .sp-sub { color: var(--muted); font-size: var(--fs-xs); margin-left: auto; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-actions { display: flex; gap: 8px; }
.backup-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.backup-pill:hover { background: var(--hover); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--gray-400); }
.dot.ok { background: var(--success); } .dot.warn { background: #f79009; } .dot.bad { background: var(--danger); } .dot.primary { background: var(--primary); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; background: none; border: 0; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; }
.user-chip:hover { background: var(--hover); }
.user-chip .ini { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--gray-100); color: var(--text-2); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.user-chip .role { font-size: 11px; color: var(--muted); display: block; line-height: 1.1; }

.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 24px 32px 64px; }
.content.narrow > * { max-width: var(--content-narrow); margin-left: auto; margin-right: auto; }
.top-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--primary); z-index: 200; width: 0; transition: width .3s var(--ease), opacity .3s; }

/* Sayfa başlığı */
.page-header { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 24px; flex-wrap: wrap; }
.page-header h2 { font-size: 22px; line-height: 30px; margin: 0; font-weight: 600; letter-spacing: -.015em; }
.page-header .ph-sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.page-header .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.bottom-nav { display: none; }
.fab { display: none; }
@media (max-width: 820px) {
  .sidebar { display: none; }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); gap: 8px; }
  .topbar-search, .backup-pill .lbl, .user-chip .nm { display: none; }
  .topbar { position: relative; }
  .topbar.search-open .topbar-search { display: block; position: absolute; left: 8px; right: 8px; bottom: 6px; margin: 0; z-index: 30; flex: none; }
  .topbar.search-open .topbar-search .input { height: 40px; min-height: 40px; background: var(--surface); font-size: 16px; }
  .topbar.search-open .topbar-search kbd { display: none; }
  .topbar.search-open .search-pop { top: 46px; max-height: 60dvh; }
  body.kb-open .bottom-nav, body.kb-open .fab { display: none; }
  body.kb-open .content { padding-bottom: 24px; }
  .topbar-actions .btn .lbl { display: none; }
  .topbar-actions .btn:has(.lbl) { padding: 0; width: var(--tap); }
  .topbar-actions .btn.primary:has(.lbl) { padding: 0 14px; width: auto; }
  .topbar-actions .btn.primary .lbl { display: inline; }
  .fab[hidden] { display: none; }
  .page-header .ph-actions { margin-left: 0; width: 100%; }
  .content { padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); }
  .page-header { margin-bottom: 16px; }
  .page-header h2 { font-size: 20px; line-height: 28px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted);
    min-height: 52px; position: relative; background: none; border: 0; cursor: pointer;
  }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav svg { width: 22px; height: 22px; padding: 3px 0; box-sizing: content-box; width: 22px; border-radius: 999px; transition: background-color var(--dur-2) var(--ease); }
  .bottom-nav .active { color: var(--text); font-weight: 600; }
  .bottom-nav .active svg { background: var(--brand-100); color: var(--primary); padding: 3px 17px; }
  :root[data-theme="dark"] .bottom-nav .active svg, :root.auto-dark .bottom-nav .active svg { background: var(--primary-soft); color: var(--primary-fg); }
  .bottom-nav .dot {
    position: absolute; top: 2px; left: calc(50% + 8px); background: var(--danger); color: #fff; font-size: 10px; width: auto; height: auto;
    border-radius: 999px; padding: 0 5px; font-weight: 600;
  }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; border: 0; box-shadow: var(--sh-lg); z-index: 21; cursor: pointer; }
  .fab svg.ic { width: 24px; height: 24px; }
  .hide-mobile { display: none !important; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; }
  .chips::-webkit-scrollbar { display: none; }
  .chips > * { scroll-snap-align: start; flex: none; }
}
@media (min-width: 821px) { .only-mobile { display: none !important; } }

/* ---------- Ortak ---------- */
.banner { background: var(--info-soft); color: var(--text); font-size: var(--fs-sm); padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--info) 20%, transparent); }
.banner > svg.ic { color: var(--info); margin-top: 1px; }
.banner.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.banner.warn > svg.ic { color: var(--warning); }
.banner.ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.banner.ok > svg.ic { color: var(--success); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.text-error, .is-danger { color: var(--danger); }
.text-ok, .is-success { color: var(--success); }
.text-warn, .is-warning { color: var(--warning); }
.is-brand { color: var(--primary-fg); }
.b { font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.card + .card { margin-top: 16px; }
.card.tight { padding: 12px 14px; }
.card.flat { box-shadow: none; }
.card h3 { margin: 0 0 4px; font-size: var(--fs-md); font-weight: 600; line-height: 22px; }
a.card { transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
a.card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.section-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin: 32px 2px 12px; }
.modal-body .section-label { margin: 24px 0 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.center { text-align: center; justify-content: center; }
.spacer { flex: 1; }
.grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-4 > .card + .card { margin-top: 0; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; } .card { padding: 16px; } }

/* Düğmeler */
.btn {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 0 14px; min-height: var(--control-h); font-size: var(--fs); font-weight: 500;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text); box-shadow: var(--sh-xs);
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn svg.ic { width: 16px; height: 16px; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary-solid); border-color: var(--primary-solid); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.primary:active { background: var(--primary-active); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line-strong)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.ghost-dashed { border-style: dashed; color: var(--muted); box-shadow: none; }
.btn.sm { padding: 0 10px; min-height: var(--control-h-sm); font-size: var(--fs-sm); }
.btn.icon-only { padding: 0; width: var(--control-h); }
.btn.sm.icon-only { width: var(--control-h-sm); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (pointer: coarse) { .btn, .btn.sm { min-height: 40px; } .btn.icon-only, .btn.sm.icon-only { width: 40px; } .chip { min-height: 36px; } }
.icon-btn { border: 0; background: transparent; cursor: pointer; width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link-btn { background: none; border: 0; padding: 2px; color: var(--primary-fg); cursor: pointer; font-weight: 500; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* Menü (⋯) */
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: 4px; z-index: 40; }
.menu[hidden] { display: none; }
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; background: none; border: 0; border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; font-size: var(--fs-sm); text-align: left; color: var(--text); }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* Filtre düğmeleri */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 0 10px; min-height: 28px; font-size: var(--fs-sm); cursor: pointer; font-weight: 500;
  display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); white-space: nowrap; transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.chip:hover { background: var(--hover); }
.chip .n { color: var(--subtle); font-size: var(--fs-xs); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.active .n { color: inherit; opacity: .7; }

/* Sekmeler (altı çizili) */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .chip, .tabs .tab { border: 0; background: none; border-radius: 0; padding: 10px 2px; min-height: 0; font-size: var(--fs); font-weight: 500; color: var(--muted); box-shadow: none; }
.tabs .chip:hover, .tabs .tab:hover { color: var(--text); background: none; }
.tabs .chip.active, .tabs .chip[aria-selected="true"], .tabs .tab[aria-selected="true"] { color: var(--text); background: none; box-shadow: inset 0 -2px 0 var(--primary); font-weight: 600; }
.tabs .chip .n { background: var(--gray-100); color: var(--muted); border-radius: 999px; padding: 0 6px; font-size: 11px; opacity: 1; }
.modal-body .tabs { margin-bottom: 16px; }
@media (max-width: 820px) { .tabs { margin-left: -16px; margin-right: -16px; padding: 0 16px; gap: 20px; margin-bottom: 16px; } }

/* Birleşik seçici */
.seg { display: inline-flex; background: var(--gray-100); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 5px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); font-weight: 600; }
:root[data-theme="dark"] .seg, :root.auto-dark .seg { background: var(--surface-sunken); }
:root[data-theme="dark"] .seg button.active, :root.auto-dark .seg button.active { background: var(--raised); }
.seg select { border: 0; background: none; height: 28px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); padding: 0 6px; cursor: pointer; }
.seg select.active { background: var(--surface); color: var(--text); border-radius: 5px; box-shadow: var(--sh-sm); font-weight: 600; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .range { font-size: var(--fs-sm); color: var(--muted); }

/* Girdiler */
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 7px 11px; min-height: var(--control-h); font-size: var(--fs);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
textarea.input { line-height: 1.5; }
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: var(--gray-400); }
.input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
.input:focus-visible { outline: none; }
.input:disabled { background: var(--surface-sunken); color: var(--muted); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
@media (max-width: 820px) { .filters { grid-template-columns: 1fr 1fr; } .filters .input:first-child { grid-column: 1 / -1; } }

/* Durum etiketleri */
.tag { font-size: var(--fs-xs); font-weight: 500; padding: 2px 8px; border-radius: var(--r-xs); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; line-height: 18px; background: var(--gray-100); color: var(--text-2); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tag.plain::before, .tag:has(svg)::before { display: none; }
.tag.blue { background: var(--info-soft); color: var(--info); }
.tag.green { background: var(--success-soft); color: var(--success); }
.tag.orange { background: var(--warning-soft); color: var(--warning); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.gray { background: var(--gray-100); color: var(--muted); }
.tag.brand { background: var(--brand-100); color: var(--primary); }
:root[data-theme="dark"] .tag.gray, :root.auto-dark .tag.gray { background: var(--gray-soft); }
:root[data-theme="dark"] .tag.brand, :root.auto-dark .tag.brand { background: var(--primary-soft); color: var(--primary-fg); }

/* Dosya bırakma alanı */
.dropzone { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 28px 16px; text-align: center; cursor: pointer; background: var(--surface-2); transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.dropzone.compact { padding: 14px 16px; }
.dropzone.over, .dropzone:hover { background: var(--hover); border-color: var(--gray-400); }
.dropzone .dz-title { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }

/* Yükleniyor */
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); transition: width .3s; }
.skeleton { background: linear-gradient(90deg, var(--gray-100), var(--line), var(--gray-100)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-xs); height: 12px; }
.sk-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
@keyframes sk { to { background-position: -200% 0; } }
.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { background: #fff8e6; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: 0s !important; transition: none !important; } }

/* ---------- Bugün ---------- */
.date-line { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.headline { font-size: 22px; font-weight: 600; margin: 2px 0; letter-spacing: -.015em; line-height: 30px; }
.subline { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-n { font-size: var(--fs-2xl); font-weight: 600; line-height: 32px; }
.stat-l { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
@media (max-width: 520px) { .headline { font-size: 20px; } }

/* Listeler */
.list { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.list:empty { display: none; }
.list > .placeholder { margin: 0; border-radius: 0; }
.modal-body .list { background: none; }
.item {
  background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 12px; align-items: center;
  cursor: pointer; min-height: 60px; transition: background-color var(--dur-1) var(--ease);
}
.list > .item:last-child, .list > .pol-card:last-child { border-bottom: 0; }
.item:hover, .pol-card:hover { background: var(--surface-2); }
button.item { width: 100%; text-align: left; font: inherit; color: inherit; }
.card.list { padding: 0; }
.card.list > .item, .card.list > a.item { border-bottom: 1px solid var(--line); }
.card.list > .item:last-child { border-bottom: 0; }
.icon-box { width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--gray-100); color: var(--text-2); }
.avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-sm); display: grid; place-items: center; font-weight: 600; font-size: 12px; background: var(--gray-100); color: var(--text-2); }
:root[data-theme="dark"] .avatar, :root.auto-dark .avatar, :root[data-theme="dark"] .icon-box, :root.auto-dark .icon-box { background: var(--gray-soft); }
@media (min-width: 821px) { .list > .item > .avatar { display: none; } }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: var(--fs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.item-side b { font-weight: 600; }
@media (max-width: 520px) { .item-side .btn .lbl { display: none; } }

.pol-card { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; cursor: pointer; transition: background-color var(--dur-1) var(--ease); }
.pol-head { display: flex; justify-content: space-between; gap: 8px; }
.pol-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 8px; }
.pol-card input[type="checkbox"], .check { width: 16px; height: 16px; accent-color: var(--primary); }

.empty { text-align: center; padding: 48px 16px; }
.empty h3 { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: 600; }
.empty p, .empty .muted { max-width: 440px; margin-left: auto; margin-right: auto; }
.empty .empty-ic { width: 48px; height: 48px; color: var(--gray-400); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .empty-ic svg.ic { width: 36px; height: 36px; stroke-width: 1.5; }
.list > .empty, .card > .empty { padding: 40px 16px; }

/* ---------- Göstergeler (KPI) ---------- */
.kpi { min-height: 112px; display: flex; flex-direction: column; }
.kpi .l { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: clamp(18px, 2vw, 24px); font-weight: 600; line-height: 32px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; color: var(--text); }
.kpi .v.text-error, .kpi .v.text-ok, .kpi .v.text-warn { color: var(--text); }
.kpi .s { font-size: var(--fs-xs); color: var(--muted); margin-top: auto; padding-top: 6px; }
.kpi .go { position: absolute; right: 14px; top: 14px; color: var(--subtle); width: 16px; height: 16px; }
.kpi { position: relative; }
a.kpi:hover .go { color: var(--text); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-xs); font-weight: 600; padding: 1px 6px; border-radius: var(--r-xs); background: var(--gray-100); color: var(--muted); white-space: nowrap; }
.delta.up { background: var(--success-soft); color: var(--success); }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.delta svg.ic { width: 12px; height: 12px; }
.card.tight.kpi { min-height: 0; }
.dark-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; color: var(--text); }
.dark-bar .v { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.dark-bar .l { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }

/* Çubuk ve çizgi grafikler */
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 32%) 1fr minmax(96px, auto); gap: 12px; align-items: center; font-size: var(--fs-sm); }
.bar-row > span:first-child { color: var(--text-2); }
.bar-track { background: var(--gray-100); border-radius: 2px; height: 8px; overflow: hidden; }
:root[data-theme="dark"] .bar-track, :root.auto-dark .bar-track { background: var(--gray-soft); }
.bar-fill { background: var(--chart); height: 100%; border-radius: 2px; }
.bar-row.other .bar-fill { background: var(--chart-muted); }
.chart { width: 100%; height: 200px; margin-top: 12px; display: block; overflow: visible; }
.chart rect.bar { fill: var(--chart); }
.chart rect.ghost { fill: var(--chart-muted); }
.chart rect.bar:hover { fill: var(--primary-hover); }
.chart line.grid { stroke: var(--chart-grid); }
.chart line.axis { stroke: var(--line-strong); }
.chart text { fill: var(--chart-axis); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: var(--fs-xs); color: var(--muted); align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: -1px; background: var(--chart); }
.legend i.ghost { background: var(--chart-muted); }
.chart-tip { position: fixed; z-index: 80; background: var(--gray-900); color: #fff; font-size: var(--fs-xs); padding: 6px 8px; border-radius: var(--r-sm); pointer-events: none; box-shadow: var(--sh-md); white-space: nowrap; }
.chart-tip[hidden] { display: none; }
.placeholder { background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 24px; text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 12px; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .progress { flex: 1; height: 8px; }

/* Tablolar */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { background: var(--surface-sunken); font-weight: 600; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 1; }
.tbl tbody tr { transition: background-color var(--dur-1) var(--ease); }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr[role="button"], .tbl tbody tr[data-rowbtn], .tbl tbody tr[data-pol], .tbl tbody tr[data-pid] { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot th, .tbl tfoot td, .tbl tr.total td { border-top: 2px solid var(--line-strong); border-bottom: 0; font-weight: 600; background: var(--surface); color: var(--text); font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; position: static; }
.tbl tr.bad td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.tbl tr.warn td:first-child { box-shadow: inset 3px 0 0 #f79009; }
.tbl td:first-child, .tbl th:first-child { position: sticky; left: 0; background: inherit; }
.tbl td:first-child { background: var(--surface); }
.tbl thead th:first-child { z-index: 2; background: var(--surface-sunken); }
.tbl tbody tr:hover td:first-child { background: var(--surface-2); }
.tbl .cell-main { font-weight: 600; color: var(--text); }
.tbl .cell-sub { font-size: var(--fs-xs); color: var(--muted); }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .sort { opacity: .5; margin-left: 4px; }
.tbl th.sorted .sort { opacity: 1; color: var(--text); }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 12px; background: var(--surface); }
.tbl-wrap.tall { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
.tbl.data td { height: 48px; padding-top: 6px; padding-bottom: 6px; }
.tbl.data td.wrap { white-space: normal; min-width: 200px; }
.col-tools { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: middle; }
.tbl-empty { text-align: center; color: var(--muted); padding: 32px 12px !important; white-space: normal !important; }

/* ---------- Asistan ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: var(--r-lg); font-size: var(--fs); line-height: 1.55; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--primary-solid); color: var(--on-primary); align-self: flex-end; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg li[data-pol] { cursor: pointer; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 620px) { .quick { grid-template-columns: 1fr; } }
.quick button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 12px; min-height: var(--tap); font-weight: 500; font-size: var(--fs-sm); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.quick button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.quick button .spacer { flex: 1; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Ayarlar ---------- */
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; pointer-events: none; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--sh-xs); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.setting-link { display: flex; align-items: center; gap: 12px; color: inherit; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.setting-link:last-child { border-bottom: 0; }
.setting-link:hover { text-decoration: none; background: var(--surface-2); }
.admin-card { border-color: var(--line); }
.logo-preview { width: 56px; height: 56px; border-radius: var(--r-md); border: 1px solid var(--line); object-fit: contain; background: #fff; }
.pin-input { letter-spacing: .5em; text-align: center; font-size: 22px; max-width: 240px; margin: 0 auto; height: 48px; }

/* ---------- Pencereler ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn var(--dur-2) var(--ease); }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--raised); border-radius: var(--r-lg); width: 100%; max-width: 600px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; box-shadow: var(--sh-xl); animation: rise var(--dur-2) var(--ease); }
.modal.sm { max-width: 440px; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 12px 0 20px; min-height: 56px; border-bottom: 1px solid var(--line); flex: none; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-body > .form-actions, .modal-body > form > .form-actions {
  position: sticky; bottom: -20px; margin: 20px -20px 0; padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--line); z-index: 2;
}
.modal-body > .form-actions:last-child, .modal-body > form:last-child > .form-actions:last-child { margin-bottom: -20px; }
.modal-body form.form > .form-actions { grid-column: 1 / -1; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
/* Sağ panel (detay görünümleri, masaüstü) */
@media (min-width: 900px) {
  .modal-backdrop.panel { justify-content: flex-end; padding: 0; }
  .modal-backdrop.panel .modal { max-width: 720px; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; animation: slideIn var(--dur-2) var(--ease); }
}
.detail-head { margin: -4px 0 16px; }
.detail-head .dh-title { font-size: var(--fs-xl); font-weight: 600; line-height: 28px; letter-spacing: -.01em; }
.detail-head .dh-sub { color: var(--muted); font-size: var(--fs-sm); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
@media (max-width: 620px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom); position: relative; }
  .modal::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); }
  .modal-head { padding-top: 8px; }
}
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--text); }
.req { color: var(--danger); margin-left: 2px; }
.help { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.field-err { font-size: var(--fs-xs); color: var(--danger); display: flex; gap: 4px; align-items: center; }
.form fieldset { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 0; }
.form legend { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 6px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 420px) { .form, .form fieldset { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.detail-row > span:first-child { color: var(--muted); }
.detail-row > span:last-child { text-align: right; color: var(--text); }
.detail-row[role="button"]:hover, .detail-row[data-rowbtn]:hover { background: var(--surface-2); }
.timeline { border-left: 1px solid var(--line-strong); margin-left: 4px; padding-left: 16px; display: flex; flex-direction: column; gap: 12px; }
.timeline > div { position: relative; font-size: var(--fs-sm); }
.timeline > div::before { content: ""; position: absolute; left: -21px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gray-400); }

/* Bildirim */
.toast {
  position: fixed; right: 24px; top: calc(var(--topbar-h) + 16px); background: var(--raised); color: var(--text); border: 1px solid var(--line);
  padding: 12px 12px 12px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); z-index: 60; box-shadow: var(--sh-lg), inset 3px 0 0 var(--success);
  display: flex; gap: 12px; align-items: center; max-width: min(420px, calc(100vw - 24px)); animation: slideIn var(--dur-2) var(--ease);
}
.toast[hidden] { display: none; }
.toast .link-btn { color: var(--primary-fg); font-weight: 600; }
@media (max-width: 820px) { .toast { right: 12px; left: 12px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; animation: rise var(--dur-2) var(--ease); } }

.storage-alert { position: sticky; top: 0; z-index: 70; background: var(--danger); color: #fff; padding: 10px 16px; display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.storage-alert a { color: #fff; text-decoration: underline; font-weight: 600; margin-left: auto; }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 65; background: var(--gray-900); color: #fff; padding: 6px 6px 6px 16px; border-radius: var(--r-md); display: flex; gap: 10px; align-items: center; box-shadow: var(--sh-lg); font-size: var(--fs-sm); }

/* Kilit ve tek pencere ekranları */
.tab-block, .lock-screen { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; padding: 20px; }
.tab-block-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--sh-lg); }
.tab-block-card h2 { margin: 6px 0; font-size: var(--fs-xl); }
.lock-screen.split { display: grid; grid-template-columns: 45% 1fr; padding: 0; place-items: stretch; }
.lock-brand { background: var(--brand-800); color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.lock-brand::after { content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: repeating-linear-gradient(135deg, #fff 0 1px, transparent 1px 22px); }
.lock-brand .lb-logo { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 18px; }
.lock-brand .lb-logo img { width: 40px; height: 40px; border-radius: var(--r-sm); background: #fff; object-fit: contain; padding: 3px; }
.lock-brand .lb-mark { width: 40px; height: 40px; border-radius: var(--r-sm); background: #fff; color: var(--brand-800); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.lock-brand h1 { font-size: 30px; line-height: 38px; font-weight: 600; margin: auto 0 8px; letter-spacing: -.02em; max-width: 380px; position: relative; z-index: 1; }
.lock-brand p { opacity: .8; margin: 0; max-width: 360px; }
.lock-brand .lb-foot { margin-top: 40px; font-size: var(--fs-xs); opacity: .6; }
.lock-pane { display: grid; place-items: center; padding: 32px 24px; background: var(--surface); }
.lock-card { width: 100%; max-width: 380px; text-align: left; }
.lock-card h2 { margin: 0 0 4px; font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.015em; }
.lock-card .pin-input { max-width: none; margin: 0; letter-spacing: .6em; }
.lock-card .btn.primary { width: 100%; min-height: 44px; }
.lock-note { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--muted); margin-top: 24px; }
@media (max-width: 900px) {
  .lock-screen.split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lock-brand { padding: 24px; min-height: 120px; }
  .lock-brand h1, .lock-brand p, .lock-brand .lb-foot { display: none; }
}
.onboard-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.onboard-steps span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.onboard-steps span.on { background: var(--primary); }

/* ---------- Yazdırma ---------- */
.print-header { display: none; }
@page { size: A4; margin: 14mm 12mm 16mm; }
@media print {
  .sidebar, .bottom-nav, .topbar, .toast, .fab, .chips, .tabs, .toolbar, .btn, .banner, .update-bar, .ph-actions, .col-tools, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .app, .main { display: block; }
  .content { max-width: none; padding: 0; }
  .card { border: 0; padding: 0 0 12pt; break-inside: avoid; box-shadow: none; }
  .tbl-wrap { overflow: visible; border: 0; max-height: none; }
  .tbl { font-size: 9pt; }
  .tbl th { position: static; background: #f3f4f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl tr { break-inside: avoid; }
  .tbl td:first-child, .tbl th:first-child { position: static; }
  .kpi { min-height: 0; border: 1px solid #ddd !important; padding: 8pt !important; }
  .print-header { display: flex !important; align-items: center; gap: 12pt; border-bottom: 2px solid #992d31; padding-bottom: 8pt; margin-bottom: 14pt; }
  .print-header img { width: 32pt; height: 32pt; object-fit: contain; }
  .print-header .ph-t { font-size: 14pt; font-weight: 600; }
  .print-header .ph-m { font-size: 9pt; color: #555; }
  .print-header .ph-r { margin-left: auto; text-align: right; font-size: 9pt; color: #555; }
  a { color: inherit; }
}
.cd-title { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: 600; }
.cd-text { font-size: var(--fs); color: var(--muted); white-space: pre-line; }
.modal-body > .form-actions.cd-actions { position: static; margin: 20px -20px -20px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.chart { height: auto; max-height: 280px; }
.kpi:has(.v.text-error) .l::before, .kpi:has(.v.text-warn) .l::before, .kpi:has(.v.text-ok) .l::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kpi:has(.v.text-error) .l::before { background: var(--danger); } .kpi:has(.v.text-warn) .l::before { background: #f79009; } .kpi:has(.v.text-ok) .l::before { background: var(--success); }
.sel-bar { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; box-shadow: var(--sh-md); }
@media print { body.modal-open .app { display: none !important; } body.modal-open .modal-backdrop { position: static; background: none; padding: 0; display: block; } body.modal-open .modal { max-height: none; height: auto !important; box-shadow: none; max-width: none; } body.modal-open .modal-head .icon-btn, .detail-actions { display: none !important; } body.modal-open .modal-body { overflow: visible; } }
/* Yazdırılabilir aylık rapor */
#printDoc { display: none; }
@media print {
  body.print-doc .app, body.print-doc .modal-backdrop, body.print-doc .toast { display: none !important; }
  body.print-doc #printDoc { display: block; }
  #printDoc .pr-cover { height: 250mm; display: flex; flex-direction: column; justify-content: center; border-left: 6pt solid #992d31; padding-left: 18mm; break-after: page; }
  #printDoc .pr-brand { display: flex; align-items: center; gap: 10pt; font-size: 14pt; font-weight: 600; margin-bottom: 40mm; }
  #printDoc .pr-brand img { width: 40pt; height: 40pt; object-fit: contain; }
  #printDoc .lb-mark { width: 40pt; height: 40pt; border-radius: 6pt; background: #992d31; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printDoc h1 { font-size: 30pt; line-height: 1.15; margin: 0 0 12pt; font-weight: 600; letter-spacing: -.02em; }
  #printDoc .pr-meta { color: #555; font-size: 10pt; }
  #printDoc .pr-page { break-before: page; }
  #printDoc .pr-page:nth-of-type(2) { break-before: auto; }
  #printDoc h2 { font-size: 15pt; margin: 0 0 10pt; padding-bottom: 6pt; border-bottom: 2px solid #992d31; font-weight: 600; }
  #printDoc h3 { font-size: 11pt; margin: 14pt 0 6pt; font-weight: 600; }
  #printDoc .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 8pt; } #printDoc .grid-2 { grid-template-columns: 1fr 1fr; gap: 12pt; }
  #printDoc .tbl { font-size: 8.5pt; } #printDoc .tbl th, #printDoc .tbl td { padding: 4pt 6pt; }
  #printDoc .chart { max-height: 60mm; }
  #printDoc .delta { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printDoc .chart rect.bar { fill: #992d31; } #printDoc .chart rect.ghost { fill: #d5d9df; }
}
@media print { @page { @bottom-right { content: "Sayfa " counter(page) " / " counter(pages); font-size: 8pt; color: #777; } } }
/* Koyu antrasit kenar çubuğu */
.sidebar { background: #1e2126; border-right-color: #1e2126; color: #c9ced6; }
.sidebar .brand-name { color: #ffffff; }
.sidebar .brand-sub { color: #8a919c; }
.sidebar .brand-mark { background: #992d31; color: #fff; }
.sidebar .brand-logo { background: #fff; padding: 2px; }
.sidebar .nav-group { color: #6f7680; }
.sidebar .nav-item { color: #c9ced6; }
.sidebar .nav-item svg.ic { color: #8a919c; }
.sidebar .nav-item:hover { background: #2a2e35; color: #ffffff; }
.sidebar .nav-item:hover svg.ic { color: #c9ced6; }
.sidebar .nav-item.active { background: #2c3037; color: #ffffff; box-shadow: inset 3px 0 0 #c4474c; }
.sidebar .nav-item.active svg.ic { color: #ffffff; }
.sidebar .nav-badge { background: #383e47; color: #ffffff; }
.sidebar .nav-badge.alert { background: #d92d20; }
.sidebar .nav-lock { color: #6f7680; }
.sidebar :focus-visible { outline-color: #e58a8e; }
.sidebar #navBottom { border-top: 1px solid #2c3037; padding-top: 8px; }
:root[data-theme="dark"] .sidebar, :root.auto-dark .sidebar { background: #0c0e11; border-right-color: #23272e; }

/* Sıralanabilir tablo başlığı düğmesi (klavye erişimi) */
.th-btn { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: inherit; }
.th-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
#phTitle:focus { outline: none; }

/* ---- CRM: sıralama, yenileme hunisi, zaman çizelgesi, teklif karşılaştırma ---- */
.seg.sm button { height: 24px; padding: 0 8px; font-size: var(--fs-xs, 12px); }
.section-label .row { gap: 8px; align-items: center; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.funnel-col { background: var(--gray-100); border-radius: var(--r-sm); padding: 8px; min-width: 0; }
.funnel-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.funnel-h b { font-size: 15px; }
.funnel-card { height: auto; min-height: 0; line-height: 1.35; justify-content: flex-start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; cursor: pointer; color: var(--text); font: inherit; font-size: var(--fs-sm); }
.funnel-card:hover { border-color: var(--line-strong); }
.funnel-card b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
:root[data-theme="dark"] .funnel-col, :root.auto-dark .funnel-col { background: var(--hover); }
@media (max-width: 760px) { .funnel { grid-template-columns: 1fr; } }
.timeline { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.tl-row { display: grid; grid-template-columns: 78px 20px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.tl-d { color: var(--muted); font-size: 12px; }
.tl-ic svg { width: 16px; height: 16px; color: var(--muted); }
summary.section-label { list-style: none; }
summary.section-label::-webkit-details-marker { display: none; }
.tbl.cmp td, .tbl.cmp th { vertical-align: top; }
.tbl.cmp th { white-space: nowrap; }
#printDoc .tbl.cmp { width: 100%; border-collapse: collapse; font-size: 10pt; }
#printDoc .tbl.cmp th, #printDoc .tbl.cmp td { border: 1px solid #ccc; padding: 6pt; text-align: left; }
#printDoc .tag { border: 1px solid #2e7d32; color: #2e7d32; padding: 0 4pt; border-radius: 3pt; font-size: 8pt; }
