/* =====================================================================
   İnci Ecza · Masraf Yönetimi — Tasarım sistemi
   Marka rengi logodan alınmıştır: #487690
   ===================================================================== */
:root {
  --brand: #487690;
  --brand-600: #3d6780;
  --brand-700: #2f5264;
  --brand-50: #f0f5f8;
  --brand-100: #e1ecf2;
  --brand-200: #c5d9e4;

  --bg: #f5f8fa;
  --surface: #ffffff;
  --surface-2: #fafcfd;
  --line: #e4ebef;
  --line-2: #eef3f6;
  --text: #1e3544;
  --text-2: #4b6272;
  --muted: #7d919e;

  --green: #2e8763;  --green-bg: #e8f5ef;
  --amber: #a86d12;  --amber-bg: #fdf3e2;
  --red: #c04a44;    --red-bg: #fcebe9;
  --blue: #3a6d8a;   --blue-bg: #e8f1f6;
  --violet: #6a5eaf; --violet-bg: #f0eefa;
  --gray: #5d6f7c;   --gray-bg: #eef2f5;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(22, 52, 70, .05);
  --shadow: 0 1px 2px rgba(22, 52, 70, .04), 0 6px 20px rgba(22, 52, 70, .05);
  --shadow-lg: 0 12px 40px rgba(22, 52, 70, .14);
  --sidebar: 268px;
  --topbar: 68px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.25; color: var(--text); }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 .6em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.strong { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ico { flex-shrink: 0; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ Layout */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px 16px;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.brand img { height: 58px; width: auto; }
.brand-sub { margin: 10px 8px 18px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sidebar-cta { margin: 0 4px 14px; }
.nav { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.nav-group { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-item.active { background: var(--brand-100); color: var(--brand-700); }
.nav-item.active .ico { color: var(--brand); }
.nav-item span { flex: 1; }
.count { font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; display: inline-grid; place-items: center; }
.count.amber { background: #d99a2b; }
.sidebar-foot { border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 10px; }
.me-card { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.me-txt { display: flex; flex-direction: column; min-width: 0; }
.me-txt strong { font-size: 13px; }
.me-txt span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-switch { margin-top: 12px; padding: 0 6px; }
.role-switch label { font-size: 11px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.role-switch select { font-size: 12.5px; padding: 7px 10px; }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); padding: 0 28px;
  background: rgba(245, 248, 250, .85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar-in { height: 100%; max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title span { font-size: 12.5px; color: var(--muted); }
.topbar-mark img { height: 30px; width: auto; }
.topbar-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 14px; width: 300px; color: var(--muted); }
.topbar-search input { border: 0; background: none; padding: 9px 0; box-shadow: none; }
.topbar-search input:focus { box-shadow: none; }
.topbar-actions { display: flex; gap: 6px; align-items: center; }
.content { padding: 8px 28px 48px; width: 100%; max-width: 1496px; margin: 0 auto; }
.scrim { display: none; }
.only-mobile { display: none !important; }

/* ------------------------------------------------------------------ Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: 600 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  background: var(--surface); color: var(--text); border-color: var(--line);
}
.btn:hover { border-color: var(--brand-200); color: var(--brand-700); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 1px 2px rgba(47, 82, 100, .2); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-soft { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-50); }
.btn-soft:hover { background: var(--brand-100); border-color: var(--brand-100); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #267353; color: #fff; border-color: #267353; }
.btn-warn { background: var(--amber-bg); color: var(--amber); border-color: #f5e0bb; }
.btn-warn:hover { color: #8a5808; border-color: #eccd92; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #f5d3cf; }
.btn-danger:hover { color: #a13b36; border-color: #eab3ad; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--brand-50); color: var(--brand-700); }
.icon-btn .dot, .bottomnav .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #e0704f; border: 2px solid var(--bg); }
.avatar-btn { border: 0; background: none; padding: 2px; cursor: pointer; border-radius: 50%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ Kart / grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card + .card { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head h3 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.card-head .sub { width: 100%; margin-top: -8px; color: var(--muted); font-size: 12.5px; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 12px 0 4px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.h-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: inline-grid; place-items: center; flex-shrink: 0; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-main-wide { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.span-2 { grid-column: span 2; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 12px 0 20px; flex-wrap: wrap; }
.page-head .ph-txt { flex: 1; min-width: 220px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 26px 0 10px; }

/* KPI */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.kpi .k-val { font-size: 24px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.kpi .k-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
a.kpi { color: inherit; transition: border-color .15s, box-shadow .15s; }
a.kpi:hover { border-color: var(--brand-200); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ Rozetler */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--gray); }
.badge .ico { width: 13px; height: 13px; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.tone-green { color: var(--green); background: var(--green-bg); }
.tone-amber { color: var(--amber); background: var(--amber-bg); }
.tone-red { color: var(--red); background: var(--red-bg); }
.tone-blue { color: var(--blue); background: var(--blue-bg); }
.tone-violet { color: var(--violet); background: var(--violet-bg); }
.tone-gray { color: var(--gray); background: var(--gray-bg); }
.pill-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar { --h: 200; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: hsl(var(--h) 34% 32%); background: hsl(var(--h) 38% 91%); }
.avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.xs { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

/* ------------------------------------------------------------------ Formlar */
label, .label { display: block; font-size: 12.5px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.req::after { content: " *"; color: var(--red); }
input, select, textarea {
  width: 100%; font: 500 14px/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; transition: border-color .15s, box-shadow .15s, background .3s; appearance: none; -webkit-appearance: none;
}
input[type=checkbox], input[type=radio] { width: auto; appearance: auto; -webkit-appearance: auto; accent-color: var(--brand); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d919e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
textarea { min-height: 88px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--brand-200); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(72, 118, 144, .12); }
input[readonly], .ro { background: var(--surface-2); color: var(--text-2); }
input::placeholder, textarea::placeholder { color: #a7b6c0; }
.field { min-width: 0; }
.field + .field { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.hint .ico { margin-top: 1px; }
.err { font-size: 12px; color: var(--red); margin-top: 6px; font-weight: 600; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: #e8a6a1; background: #fffafa; }
.input-group { display: flex; }
.input-group > *:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > *:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group select { width: auto; flex: 0 0 96px; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; font-weight: 600; color: var(--text); font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 40px; height: 24px; border-radius: 99px; background: #d5dfe5; position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }

.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; }
.seg span { display: block; padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; margin: 0; }
.chip input { position: absolute; opacity: 0; width: 1px; }
.chip:has(input:checked), .chip.on { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--text); font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Tablolar */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fbfdfe; }
.table tr.row-link { cursor: pointer; }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main strong { display: block; font-weight: 650; }
.table .cell-main small { color: var(--muted); display: block; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .cb { width: 36px; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
.cat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.cat-ico.sm { width: 30px; height: 30px; border-radius: 8px; }

.table .b-sfx { display: none; }
.table td.td-main { min-width: 200px; }
.table-dense td { padding: 12px 10px; }
.table-dense th { padding: 10px; }
.stack-badges { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.table .cell-main strong { line-height: 1.35; }

/* Liste satırları */
.rows { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-2); color: inherit; transition: background .12s; min-width: 0; }
.row-item:first-child { border-top: 0; }
a.row-item:hover { background: #fbfdfe; color: inherit; }
.row-item .ri-main { flex: 1; min-width: 0; }
.row-item .ri-main strong { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .ri-main small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .ri-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.row-item.active { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }

/* Tanım listeleri */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.dl div { min-width: 0; }
.dl dt { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.dl .full { grid-column: 1 / -1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--text-2); }
.kv strong { font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------------ Sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 10px 14px; font: 600 13.5px var(--font); color: var(--text-2); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--brand-700); }
.tabs .active { color: var(--brand-700); border-bottom-color: var(--brand); }
.tabs .count { background: var(--line-2); color: var(--text-2); }
.tabs .active .count { background: var(--brand-100); color: var(--brand-700); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ------------------------------------------------------------------ İlerleme / limit */
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s; }
.bar.warn i { background: #d9a13c; }
.bar.over i { background: #d0625c; }
.limit-row + .limit-row { margin-top: 14px; }
.limit-row .lr-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.limit-row .lr-top span { color: var(--text-2); font-weight: 600; }
.limit-row .lr-bot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 5px; }
.limit-box { border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.limit-box.in { background: var(--green-bg); color: #235f47; }
.limit-box.over { background: var(--red-bg); color: #8f3530; }
.limit-box.none { background: var(--gray-bg); color: var(--gray); }
.limit-box strong { display: block; font-size: 14px; }
.limit-box small { display: block; opacity: .9; }

/* Sapma kartı */
.dev { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dev div { padding: 12px 14px; }
.dev div + div { border-left: 1px solid var(--line); }
.dev small { display: block; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.dev strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.dev .up { color: var(--red); }
.dev .down { color: var(--green); }

/* ------------------------------------------------------------------ Onay akışı (timeline) */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { position: relative; padding: 0 0 18px 42px; min-height: 44px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; background: var(--line); border-radius: 2px; }
.steps li:last-child::before { display: none; }
.steps .s-dot { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.steps .done .s-dot { background: var(--green); color: #fff; box-shadow: 0 0 0 1px var(--green); }
.steps .done::before { background: #a9d8c3; }
.steps .current .s-dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.steps .iade .s-dot { background: #d99a2b; color: #fff; box-shadow: 0 0 0 1px #d99a2b; }
.steps .red .s-dot { background: var(--red); color: #fff; box-shadow: 0 0 0 1px var(--red); }
.steps .s-title { font-weight: 700; font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.steps .s-meta { font-size: 12.5px; color: var(--muted); }
.steps .s-note { margin-top: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--text-2); }
.steps .s-reason { font-size: 11.5px; font-weight: 600; color: var(--violet); background: var(--violet-bg); padding: 1px 8px; border-radius: 99px; }

/* Süreç şeridi */
.flow { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; }
.flow a, .flow div.f { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 6px 4px; color: inherit; position: relative; }
.flow a:not(:last-child)::after, .flow div.f:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; background: repeating-linear-gradient(90deg, var(--brand-200) 0 6px, transparent 6px 10px); }
.flow .f-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); position: relative; }
.flow .f-ico b { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--surface); }
.flow span { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.3; }

/* ------------------------------------------------------------------ Audit */
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.audit li:first-child { border-top: 0; }
.audit time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.audit .a-who { font-weight: 650; }
.audit .a-type { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--gray-bg); color: var(--gray); margin-right: 6px; }

/* ------------------------------------------------------------------ Belge (fiş / adisyon görünümü) */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.doc-frame { background: linear-gradient(135deg, #e9eff3, #f5f8fa); border-radius: var(--r); padding: 18px; display: grid; place-items: center; min-height: 260px; position: relative; border: 1px solid var(--line); }
.doc-frame .doc-label { z-index: 2; position: absolute; top: 10px; left: 12px; font-size: 11px; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .85); padding: 3px 8px; border-radius: 6px; display: flex; gap: 5px; align-items: center; }
.doc-frame.missing { border: 1.5px dashed #e3b0ab; background: #fdf7f6; color: var(--red); text-align: center; font-weight: 600; font-size: 13px; }
.doc-frame img.upl { max-height: 360px; border-radius: 8px; box-shadow: var(--shadow); }
.paper {
  width: 210px; background: #fffefb; color: #333; font: 11px/1.45 'Courier New', monospace; padding: 16px 14px 20px;
  box-shadow: 0 8px 22px rgba(30, 50, 60, .14); transform: rotate(-1.2deg);
}
.paper.adisyon { transform: rotate(1deg); background: #fbfbf6; }
.paper .p-c { text-align: center; }
.paper .p-b { font-weight: 700; }
.paper .p-hr { border-top: 1px dashed #999; margin: 6px 0; }
.paper .p-r { display: flex; justify-content: space-between; gap: 8px; }
.paper .p-big { font-size: 13px; font-weight: 700; }
.paper .ocr-hl { background: rgba(72, 118, 144, .16); outline: 1px solid rgba(72, 118, 144, .45); border-radius: 2px; }

/* ------------------------------------------------------------------ Masraf formu */
.capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.capture {
  position: relative; border: 1.5px dashed var(--brand-200); border-radius: var(--r-lg); background: var(--brand-50);
  min-height: 176px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 18px; cursor: pointer; transition: background .15s, border-color .15s; overflow: hidden; margin: 0;
}
.capture:hover { background: var(--brand-100); border-color: var(--brand); }
.capture input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.capture .c-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--surface); color: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.capture strong { font-size: 14px; color: var(--text); }
.capture small { color: var(--muted); font-weight: 500; }
.capture.filled { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.capture.filled .c-ico { color: var(--green); }
.capture .c-prev { position: absolute; inset: 0; background-size: cover; background-position: center; }
.capture .c-prev + .c-over { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255, 255, 255, .92); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; font-weight: 600; color: var(--green); display: flex; gap: 6px; align-items: center; justify-content: center; }
.capture.req-missing { border-color: #e3a9a3; background: #fdf5f4; }
.demo-docs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.demo-docs small { color: var(--muted); font-weight: 600; margin-right: 2px; }

.scan-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20, 40, 52, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.scan-card { background: var(--surface); border-radius: var(--r-xl); padding: 26px 24px; width: min(360px, 100%); text-align: center; box-shadow: var(--shadow-lg); }
.scan-doc { width: 120px; height: 150px; margin: 0 auto 18px; border-radius: 10px; background: repeating-linear-gradient(#fff 0 12px, #eef3f6 12px 14px); border: 1px solid var(--line); position: relative; overflow: hidden; }
.scan-doc::after { content: ""; position: absolute; left: 0; right: 0; height: 36px; background: linear-gradient(transparent, rgba(72, 118, 144, .35)); border-bottom: 2px solid var(--brand); animation: scan 1.1s ease-in-out infinite alternate; }
@keyframes scan { from { top: -36px; } to { top: 100%; } }
.scan-steps { text-align: left; font-size: 13px; margin-top: 14px; }
.scan-steps div { display: flex; gap: 8px; align-items: center; color: var(--muted); padding: 3px 0; }
.scan-steps div.ok { color: var(--green); }

.ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--violet); background: var(--violet-bg); padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }
.ai-tag .ico { width: 12px; height: 12px; }
.ai-filled { background: #faf9ff !important; border-color: #cfc8ef !important; }
.ai-suggest { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--violet-bg); color: #4b418d; margin-bottom: 14px; flex-wrap: wrap; }
.ai-suggest .ico { color: var(--violet); }
.ai-suggest strong { color: #3c3275; }
.ai-suggest .conf { margin-left: auto; font-size: 12px; font-weight: 700; }

.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat-opt { margin: 0; cursor: pointer; }
.cat-opt input { position: absolute; opacity: 0; width: 1px; }
.cat-opt span { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); line-height: 1.3; min-height: 54px; transition: border-color .15s, background .15s; }
.cat-opt span .ico { color: var(--brand); }
.cat-opt:hover span { border-color: var(--brand-200); }
.cat-opt input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); box-shadow: 0 0 0 3px rgba(72, 118, 144, .12); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.cat-opt span { position: relative; }
.cat-opt.ai input + span::after { content: "Öneri"; position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 700; color: var(--violet); background: var(--violet-bg); padding: 2px 6px; border-radius: 99px; }

.cond { display: none; }
.cond.show { display: block; }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); font-size: 13px; align-items: flex-start; }
.callout .ico { margin-top: 1px; }
.callout.info { background: var(--blue-bg); color: #2f5a72; }
.callout.warn { background: var(--amber-bg); color: #7d5210; }
.callout.danger { background: var(--red-bg); color: #8f3530; }
.callout.ok { background: var(--green-bg); color: #235f47; }
.callout.violet { background: var(--violet-bg); color: #4b418d; }
.callout strong { display: block; }

.participants .p-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr) 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.participants .p-head { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.check-list li:first-child { border-top: 0; }
.check-list .cl-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.check-list .cl-ico .ico { width: 13px; height: 13px; }
.check-list .ok .cl-ico { background: var(--green-bg); color: var(--green); }
.check-list .warn .cl-ico, .check-list .exc .cl-ico { background: var(--amber-bg); color: var(--amber); }
.check-list .fail .cl-ico { background: var(--red-bg); color: var(--red); }
.check-list .off .cl-ico { background: var(--gray-bg); color: var(--muted); }
.check-list .pending .cl-ico { background: var(--line-2); color: var(--muted); }
.check-list strong { display: block; font-size: 13px; }
.check-list small { color: var(--muted); }

.route-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.route-preview .rp { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.route-preview .rp .avatar { width: 22px; height: 22px; font-size: 9px; }
.route-preview .rp.extra { border-color: #d8d2f3; background: var(--violet-bg); }
.route-preview .sep { color: var(--muted); }

.actionbar { position: sticky; bottom: 0; z-index: 20; margin-top: 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); }
.actionbar .ab-sum { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); }
.actionbar .ab-sum strong { display: block; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.actionbar .ab-sum span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ Onay ekranı (split) */
.split { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.split .list-pane { position: sticky; top: calc(var(--topbar) + 8px); max-height: calc(100vh - var(--topbar) - 24px); overflow: auto; }
.review-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.review-head .rh-amt { margin-left: auto; text-align: right; }
.review-head .rh-amt strong { font-size: 26px; font-weight: 800; letter-spacing: -.03em; display: block; font-variant-numeric: tabular-nums; }
.decision { display: grid; gap: 10px; }
.decision textarea { min-height: 72px; }
.decision .btn-row .btn { flex: 1; }

/* ------------------------------------------------------------------ Dropdown / toast / modal */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-head { padding: 10px 12px; font-weight: 700; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.dd-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font: 600 13px var(--font); border: 0; background: none; cursor: pointer; text-align: left; }
.dd-item:hover, .dd-item.active { background: var(--brand-50); color: var(--brand-700); }
.dd-form { margin: 0; }
.notif { width: 340px; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.notif-item:hover { background: var(--brand-50); color: var(--text); }
.notif-item strong { display: block; font-size: 13px; font-weight: 650; }
.notif-item small { color: var(--muted); display: block; }
.ni-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.empty-sm { padding: 16px; color: var(--muted); font-size: 13px; }

.toast { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); margin: 8px 0 14px; font-weight: 600; font-size: 13.5px; animation: pop .25s ease-out; }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; display: grid; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

dialog.modal { border: 0; border-radius: var(--r-xl); padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(20, 40, 52, .45); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }

/* ------------------------------------------------------------------ Filtreler */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.filters .f-actions { display: flex; gap: 8px; align-items: flex-end; }
.filters label { font-size: 11.5px; margin-bottom: 4px; }
.filters input, .filters select { padding: 8px 10px; font-size: 13px; }
.filters select { padding-right: 30px; }
.filter-toggle { display: none; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.bulkbar .sel { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-right: auto; }

/* ------------------------------------------------------------------ Grafikler */
.hbar { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; font-size: 13px; }
.hbar .hb-label { color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .hb-track { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.hbar .hb-track i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.hbar .hb-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 84px; }
.vchart { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding-top: 16px; }
.vchart .vc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.vchart .vc i { width: 100%; max-width: 44px; background: var(--brand-200); border-radius: 8px 8px 3px 3px; min-height: 4px; }
.vchart .vc.cur i { background: var(--brand); }
.vchart .vc span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.vchart .vc b { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ""; position: absolute; inset: 22px; background: var(--surface); border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; font-size: 12px; color: var(--muted); }
.donut-center strong { display: block; font-size: 18px; color: var(--text); }
.legend { display: grid; gap: 8px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Boş durum / yardımcılar */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .e-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.hero {
  background: linear-gradient(120deg, var(--brand) 0%, #5b8aa3 60%, #7aa3b8 100%); color: #fff; border: 0; border-radius: var(--r-xl);
  padding: 24px 26px; display: flex; gap: 20px; align-items: center; position: relative; overflow: hidden; flex-wrap: wrap;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .07); }
.hero h2 { color: #fff; font-size: 22px; }
.hero p { color: rgba(255, 255, 255, .85); margin: 4px 0 0; }
.hero .h-txt { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.hero .btn { position: relative; z-index: 1; }
.hero .btn-white { background: #fff; color: var(--brand-700); border-color: #fff; }
.hero .btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); }
.hero .btn-glass:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--text-2); white-space: nowrap; display: inline-block; }
.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 6px; color: var(--text-2); white-space: nowrap; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; } .flex { display: flex; } .items-center { align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }

/* Giriş ekranı */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: linear-gradient(150deg, #3d6780, #487690 45%, #7aa3b8); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); right: -180px; bottom: -160px; }
.login-art h2 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 440px; }
.login-art p { color: rgba(255, 255, 255, .82); max-width: 420px; font-size: 15px; }
.login-art .la-logo { background: #fff; border-radius: 16px; padding: 12px 16px; display: inline-block; }
.login-art .la-logo img { height: 56px; }
.login-flow { display: flex; flex-wrap: wrap; gap: 6px; max-width: 480px; position: relative; z-index: 1; }
.login-flow span { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); padding: 5px 10px; border-radius: 99px; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: min(440px, 100%); }
.role-cards { display: grid; gap: 10px; margin-top: 20px; }
.role-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; width: 100%; }
.role-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.role-card .rc-txt { flex: 1; }
.role-card strong { display: block; }
.role-card small { color: var(--muted); }

/* ------------------------------------------------------------------ Alt menü (mobil) */
.bottomnav { display: none; }

/* =====================================================================
   Duyarlı kırılımlar
   ===================================================================== */
@media (min-width: 961px) and (max-width: 1600px) {
  .detail-pane .grid-main-wide { grid-template-columns: minmax(0, 1fr); }
  .detail-pane .grid-main-wide > .stack:last-child { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .detail-pane .grid-main-wide > .stack:last-child > * { margin-top: 0; }
  .split { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 1280px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-main-wide { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: 300px minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .flow a:nth-child(4)::after, .flow div.f:nth-child(4)::after { display: none; }
  .topbar-search { width: 220px; }
}
@media (max-width: 960px) {
  :root { --topbar: 60px; }
  .only-mobile { display: inline-grid !important; }
  .only-desktop { display: none !important; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; width: min(300px, 86vw); box-shadow: var(--shadow-lg); padding-bottom: calc(16px + var(--safe-b)); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(20, 40, 52, .4); z-index: 35; }
  body.nav-open { overflow: hidden; }
  .main { margin-left: 0; }
  .topbar { padding: 0 10px; background: rgba(255, 255, 255, .92); border-bottom-color: var(--line); }
  .topbar-in { gap: 6px; }
  .only-desktop-inline { display: none !important; }
  .topbar-title h1 { font-size: 16.5px; }
  .topbar-mark { display: inline-flex !important; margin-right: 2px; }
  .content { padding: 4px 16px calc(96px + var(--safe-b)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .list-pane { position: static; max-height: none; }
  .split.has-sel .list-pane { display: none; }
  .split:not(.has-sel) .detail-pane { display: none; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + var(--safe-b));
  }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 600 10.5px var(--font); border: 0; background: none; position: relative; padding: 4px 0; cursor: pointer; min-height: 50px; }
  .bottomnav .active { color: var(--brand); }
  .bottomnav .fab { width: 58px; height: 58px; border-radius: 20px; background: var(--brand); color: #fff; margin: -24px auto 0; box-shadow: 0 8px 20px rgba(47, 82, 100, .35); justify-self: center; }
  .bottomnav .count { position: absolute; top: 0; left: 55%; height: 17px; min-width: 17px; font-size: 10px; padding: 0 4px; }
  .bottomnav .dot { top: 4px; right: calc(50% - 16px); }
  .actionbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 18px 18px 0 0; padding: 12px 16px calc(12px + var(--safe-b)); z-index: 32; border-width: 1px 0 0; }
  body.has-actionbar .bottomnav { display: none; }
  body.has-actionbar .content { padding-bottom: calc(110px + var(--safe-b)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-toggle { display: inline-flex; }
  .filters-wrap:not(.open) .filters { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 28px 22px; gap: 18px; }
  .login-art h2 { font-size: 24px; }
  .login-art .login-flow { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .grid-2, .grid-3, .form-grid, .form-grid-3, .docs, .dl { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .k-val { font-size: 19px; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-foot { padding: 12px 16px; }
  .row-item { padding: 13px 16px; gap: 12px; }
  .page-head { margin: 8px 0 14px; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn { flex: 1; }
  h2 { font-size: 18px; }
  .hero { padding: 20px; }
  .hero .btn { flex: 1; }
  input, select, textarea { font-size: 16px; padding: 11px 12px; } /* iOS yakınlaştırmayı engeller */
  .btn { height: 44px; }
  .btn-sm { height: 36px; }
  .capture-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .capture { min-height: 150px; padding: 12px; }
  .capture .c-ico { width: 44px; height: 44px; }
  .capture strong { font-size: 13px; }
  .participants .p-row { grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); }
  .participants .p-row > :nth-child(3) { grid-column: 1 / 2; }
  .participants .p-head { display: none; }
  .audit li { grid-template-columns: 1fr; gap: 2px; }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow .f-ico { width: 40px; height: 40px; }
  .flow span { font-size: 11px; }
  .flow a::after, .flow div.f::after { display: none; }
  .dev { grid-template-columns: 1fr 1fr 1fr; }
  .dev div { padding: 10px; }
  .dev strong { font-size: 14px; }
  .hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar .hb-track { grid-column: 1 / -1; order: 3; margin-bottom: 6px; }
  .review-head .rh-amt { margin-left: 0; text-align: left; width: 100%; }
  .notif { width: calc(100vw - 24px); right: -48px; }
  .dropdown-menu { max-width: calc(100vw - 24px); }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 12px; }
  .b-sfx { display: none; }
  .row-item .ri-main { min-width: 42%; }
  .actionbar { gap: 8px; }
  .actionbar .ab-sum { min-width: 90px; }
  .actionbar .ab-sum strong { font-size: 15px; }
  .actionbar .btn-lg { height: 46px; padding: 0 16px; font-size: 14px; }
  .actionbar .btn:not(.btn-primary) { padding: 0 12px; }
  .actionbar .ab-lbl { display: none; }
  .actionbar .btn-lg { padding: 0 14px; }

  /* Tablolar → kart görünümü */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); position: relative; }
  .table-cards td { border: 0; padding: 3px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; }
  .table-cards td.td-main { display: block; text-align: left; margin-bottom: 6px; }
  .table-cards td.td-main::before { display: none; }
  .table-cards td.cb { position: absolute; right: 12px; top: 12px; width: auto; }
  .table-cards td.cb::before { display: none; }
  .table-cards td.td-hide-m { display: none; }
  .table-cards td.td-main { min-width: 0; }
  .table-cards .stack-badges { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .table-cards tfoot { display: block; }
  .table-cards tfoot tr { display: flex; justify-content: space-between; }
  .table-cards tfoot td { width: auto; }
  .table-cards tfoot td:empty { display: none; }
}
@media (max-width: 380px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .capture-grid { grid-template-columns: 1fr; }
}

/* Yazdırma */
@media print {
  .sidebar, .topbar, .bottomnav, .actionbar, .no-print { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
}
@media (max-width: 960px) { .only-desktop-flex { display: none !important; } }

/* =====================================================================
   v2 · Ortak ekler
   ===================================================================== */
.count.violet { background: var(--violet); }
.me-card { color: inherit; border-radius: 10px; padding: 6px; margin: 0 -2px; }
.me-card:hover { background: var(--brand-50); color: inherit; }
.notif-list { max-height: min(420px, 60vh); overflow-y: auto; }
.filters.filters-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg a span.on { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; display: grid; }
.input-affix input { padding-right: 42px; }
.dotc { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.del-form { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------------ İş takip (Kanban) */
.board-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.board-tabs::-webkit-scrollbar { display: none; }
.bt { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.bt i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.bt .count { background: var(--line-2); color: var(--text-2); }
.bt:hover { border-color: var(--brand-200); color: var(--brand-700); }
.bt.active { border-color: var(--c); box-shadow: inset 0 -3px 0 var(--c); color: var(--text); }
.kfilters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.kfilters .chip { text-decoration: none; }
.kf-search { width: 220px; margin-left: auto; padding: 7px 12px; border-radius: 99px; font-size: 13px; }
.kanban { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 16px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.klist { flex: 0 0 300px; background: #eef3f6; border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 250px); scroll-snap-align: start; }
.klist.done { background: #e9f4ef; }
.klist-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.klist-head strong { flex: 1; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.klist-head .count { background: #fff; color: var(--text-2); }
.klist-cards { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 40px; padding: 2px; border-radius: 10px; transition: background .15s; }
.klist-cards.over { background: rgba(72, 118, 144, .1); }
.klist-new { background: transparent; border: 1.5px dashed var(--line); }
.kcard { display: flex; flex-direction: column; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--text); box-shadow: var(--shadow-sm); border-left: 3px solid transparent; cursor: grab; transition: box-shadow .15s, transform .15s; }
.kcard:hover { color: var(--text); box-shadow: var(--shadow); }
.kcard.prio-acil { border-left-color: var(--red); }
.kcard.prio-yuksek { border-left-color: #d99a2b; }
.kcard.dragging { opacity: .5; transform: rotate(2deg); }
.kc-title { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.kc-tags, .kc-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kc-i { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.kc-i.ok { color: var(--green); }
.kc-av { margin-left: auto; display: flex; }
.kc-av .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.kc-board { font-size: 11px; font-weight: 700; color: var(--c); }
.kadd { display: flex; gap: 4px; }
.kadd input { background: rgba(255, 255, 255, .7); border-style: dashed; padding: 8px 10px; font-size: 13px; }
.kmenu { position: relative; }
.kmenu summary { list-style: none; width: 30px; height: 30px; }
.kmenu summary::-webkit-details-marker { display: none; }
.kmenu-pop { position: absolute; right: 0; top: 34px; width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; z-index: 5; }
.kmenu-pop input { padding: 8px 10px; font-size: 13px; }
.mygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.subtasks { list-style: none; margin: 0 0 12px; padding: 0; }
.subtasks li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.subtasks li:first-child { border-top: 0; }
.subtasks li.done .grow { text-decoration: line-through; color: var(--muted); }
.subtasks form { margin: 0; display: flex; }
.st-box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--brand-200); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: #fff; padding: 0; }
.subtasks li.done .st-box { background: var(--green); border-color: var(--green); }
.st-add { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 6px; }
.st-add input, .st-add select { padding: 8px 10px; font-size: 13px; }
.comments { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.cmt { display: flex; gap: 10px; font-size: 13.5px; }
.cmt-body { margin-top: 2px; color: var(--text-2); word-break: break-word; }
.member-chips .chip { padding: 4px 10px 4px 4px; }

/* ------------------------------------------------------------------ Sohbet */
.chat { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; height: calc(100vh - var(--topbar) - 40px); min-height: 480px; margin-top: 8px; }
.chat-list { display: flex; flex-direction: column; overflow: hidden; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.chat-list .rows { overflow-y: auto; }
.chat-list .cat-ico { font-weight: 800; font-size: 16px; }
.chat-pane { display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.chat-head small { display: block; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#fbfcfd, #f6f9fb); }
.chat-day { text-align: center; margin: 6px 0; }
.chat-day span { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; font-size: 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.msg.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.msg.mine .bubble a { color: #fff; text-decoration: underline; }
.bubble b { display: block; font-size: 12px; color: var(--brand-700); margin-bottom: 2px; }
.bubble .txt { word-break: break-word; line-height: 1.45; }
.bubble time { display: block; text-align: right; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); background: var(--surface); align-items: flex-end; }
.chat-compose textarea { min-height: 44px; max-height: 160px; resize: none; border-radius: 14px; }
.chat-compose .btn { height: 44px; width: 48px; padding: 0; flex-shrink: 0; border-radius: 14px; }

/* ------------------------------------------------------------------ Haberler */
.news-filter { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.news-filter select { width: auto; min-width: 200px; }
.news-filter input { flex: 1; min-width: 180px; }
.news-item .ri-main strong { white-space: normal; line-height: 1.4; }
.news-item .news-sum { white-space: normal; margin: 3px 0; color: var(--text-2); }

/* ------------------------------------------------------------------ Takvim */
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 17px; min-width: 130px; text-align: center; }
.cal { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; color: inherit; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); color: #b5c2cb; }
.cal-day.hol { background: #fdf6f5; }
.cal-day.has:hover { background: var(--brand-50); color: inherit; }
.cd-n { font-size: 12.5px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cd-n { background: var(--brand); color: #fff; }
.cd-ev { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-more { font-size: 11px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.cd-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cd-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cal-date { width: 46px; height: 50px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.1; }
.cal-date b { font-size: 17px; }
.cal-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cal-date.sm { width: 40px; height: 44px; }
.cal-date.sm b { font-size: 15px; }
.cal-item.now { background: var(--violet-bg); }
.cal-item:target { box-shadow: inset 3px 0 0 var(--brand); background: var(--brand-50); }

@media (max-width: 1280px) { .chat { grid-template-columns: 280px minmax(0, 1fr); } }
@media (max-width: 960px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--topbar) - 90px - var(--safe-b)); margin-top: 0; }
  .chat.has-sel .chat-list { display: none; }
  .chat:not(.has-sel) .chat-pane { display: none; }
  body.page-chat .content { padding-bottom: calc(80px + var(--safe-b)); }
  .kf-search { width: 100%; margin-left: 0; order: -1; }
  .filters.filters-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .klist { flex-basis: 84vw; max-height: none; }
  .kanban { margin: 0 -16px; padding: 0 16px 16px; scroll-padding: 16px; }
  .msg { max-width: 90%; }
  .cal-day { min-height: 54px; padding: 4px; align-items: center; }
  .cd-ev, .cd-more { display: none; }
  .cd-dots { display: flex; justify-content: center; }
  .cal-head span { padding: 8px 2px; text-align: center; font-size: 10.5px; }
  .st-add { grid-template-columns: minmax(0, 1fr) auto; }
  .st-add select { grid-column: 1 / -1; grid-row: 2; }
  .news-filter select { flex: 1; }
  .filters.filters-4 { grid-template-columns: minmax(0, 1fr); }
}
