/* Otovit — satıcı yönetim paneli tasarım sistemi (satış sayfasıyla aynı marka: Geist, mürekkep siyahı kenar menü, Otovit mavisi)
   Token'lar → temel öğeler → kabuk (kenar menü, üst çubuk, sayfa başlığı) → bileşenler → modüller.
   Sınıf adları modüller (admin.js, finance.js, ledger.js) arasında ortaktır; sayfaya özel stil yazılmaz. */

/* ============================================================ 1. Token'lar */
:root {
  /* Yüzeyler */
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --line: #e6e6ea;
  --line-2: #cbd5e1;
  /* Metin */
  --text: #0f1016;
  --navy: #0f1016;          /* eski ad: güçlü metin */
  --muted: #64748b;
  --dim: #94a3b8;
  /* Marka ve anlam renkleri */
  --sidebar: #0c0d12;
  --sidebar-2: #16171e;
  --sidebar-text: #b8bac4;
  --sidebar-dim: #6c6e7a;
  --primary: #3a4cf0;
  --primary-d: #2b3bd4;
  --primary-soft: #eef0fe;
  --primary-line: #c9cffc;
  --good: #16a34a;
  --good-ink: #15803d;
  --good-soft: #ecfdf3;
  --good-line: #bbf7d0;
  --bad: #dc2626;
  --bad-ink: #b91c1c;
  --bad-soft: #fef2f2;
  --bad-line: #fecaca;
  --warn: #f59e0b;
  --warn-ink: #b45309;
  --warn-soft: #fffbeb;
  --warn-line: #fde68a;
  --brand-orange: #e86800;
  /* Eski adlar (modüllerde kullanılıyor) */
  --blue: var(--primary);
  --blue-d: var(--primary-d);
  --blue-soft: var(--primary-soft);
  --accent: var(--primary);
  --accent-d: var(--primary-d);
  --accent-soft: var(--primary-soft);
  /* Grafik serileri (dataviz referans paleti, açık mod) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  /* Tipografi */
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-page: 22px;
  --fs-section: 15px;
  --fs-body: 14px;
  --fs-table: 13.5px;
  --fs-small: 12.5px;
  --fs-micro: 11.5px;
  --fs-kpi: 24px;
  /* Boşluk ve şekil */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --h-ctl: 38px;
  --h-ctl-sm: 32px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-pop: 0 12px 32px -8px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(58, 76, 240, .18);
  --side-w: 248px;
  --side-w-min: 68px;
  --top-h: 56px;
  color-scheme: light;
}

/* ============================================================ 2. Temel öğeler */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss03'; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font); font-weight: 600; margin: 0; letter-spacing: -.01em; color: var(--text); }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic.lg { width: 20px; height: 20px; }
.ic.xl { width: 28px; height: 28px; stroke-width: 1.6; }
.ic.sm { width: 14px; height: 14px; vertical-align: -2px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: var(--fs-small); }
.up, .amt-in { color: var(--good-ink) !important; }
.down, .amt-out { color: var(--bad-ink) !important; }
.amt-warn { color: var(--warn-ink) !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.mt { margin-top: var(--sp-4); }
.stack { display: grid; gap: var(--sp-4); }
code, .code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 6px; word-break: break-all; color: var(--text); }
details > summary { color: var(--primary-d); cursor: pointer; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: var(--sp-4) 0; }

/* ============================================================ 3. Uygulama kabuğu */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
.app.collapsed { grid-template-columns: var(--side-w-min) minmax(0, 1fr); }

/* Kenar menü */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: var(--sidebar-text); z-index: 30; }
.side-head { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 14px 0 18px; border-bottom: 1px solid rgba(255,255,255,.06); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-mark { display: none; width: 30px; height: 30px; place-items: center; flex: none; } .brand-mark img { width: 30px; height: 30px; display: block; }
.brand-tag { margin-left: 2px; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: var(--sidebar-text); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.app.collapsed .brand-tag { display: none; }
.side-toggle { width: 30px; height: 30px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--sidebar-dim); display: grid; place-items: center; cursor: pointer; flex: none; }
.side-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-group { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; color: var(--sidebar-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 16px 10px 6px; cursor: pointer; white-space: nowrap; }
.nav-group:hover { color: var(--sidebar-text); }
.nav-group .ic { width: 13px; height: 13px; transition: transform .15s; }
.nav-sec.closed .nav-group .ic { transform: rotate(-90deg); }
.nav-sec.closed .nav-items { display: none; }
.nav-items { display: grid; gap: 1px; }
.side nav a { position: relative; height: 36px; padding: 0 10px; border-radius: var(--r); text-decoration: none; color: var(--sidebar-text); display: flex; align-items: center; gap: 11px; font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .12s, color .12s; }
.side nav a .ic { width: 17px; height: 17px; color: var(--sidebar-dim); transition: color .12s; }
.side nav a .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a:hover .ic { color: #dbe4ee; }
.side nav a.on { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.side nav a.on .ic { color: #9aa6ff; }
.side nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #8191ff; }
.pill { background: var(--primary); color: #fff; border-radius: 99px; font-size: 11px; line-height: 18px; min-width: 18px; text-align: center; padding: 0 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.side .pill { background: #ff6a1a; }
.side-foot { flex: none; border-top: 1px solid rgba(255,255,255,.06); padding: 10px; display: grid; gap: 1px; }
.side-foot a, .side-foot button { height: 34px; display: flex; align-items: center; gap: 11px; padding: 0 10px; border-radius: var(--r); background: none; border: 0; color: var(--sidebar-text); text-decoration: none; font-size: 13px; cursor: pointer; white-space: nowrap; width: 100%; text-align: left; }
.side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-foot .ic { width: 16px; height: 16px; color: var(--sidebar-dim); }

/* Daraltılmış kenar menü: yalnız ikonlar, ipuçları JS ile */
.app.collapsed .brand-logo, .app.collapsed .lbl, .app.collapsed .side nav a .pill, .app.collapsed .nav-group span { display: none; }
.app.collapsed .brand-mark { display: grid; }
.app.collapsed .side-head { padding: 0 0 0 18px; }
.app.collapsed .brand { flex: none; }
.app.collapsed .side-toggle { display: none; }
.app.collapsed .side nav a, .app.collapsed .side-foot a, .app.collapsed .side-foot button { justify-content: center; padding: 0; }
.app.collapsed .nav-group { justify-content: center; padding: 12px 0 4px; pointer-events: none; }
.app.collapsed .nav-group .ic { display: none; }
.app.collapsed .nav-group::after { content: ""; width: 18px; height: 1px; background: rgba(255,255,255,.1); }
.app.collapsed .nav-sec.closed .nav-items { display: grid; }
.app.collapsed .side nav a.has-badge::after { content: ""; position: absolute; top: 7px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 2px var(--sidebar); }
.side-foot .side-expand { display: none; }
.app.collapsed .side-foot .side-expand { display: flex; }

/* Üst çubuk */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); z-index: 20; }
.topbar .menu { display: none; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 36px; width: min(440px, 100%); padding: 0 10px 0 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); color: var(--dim); cursor: pointer; font-size: 13.5px; text-align: left; transition: border-color .12s, background .12s; }
.search-btn:hover { border-color: var(--line-2); background: #fff; }
.search-btn span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
kbd { font: 500 11px var(--font); color: var(--muted); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.top-spacer { flex: 1; }
.tb-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.tb-btn:hover { background: var(--surface-3); color: var(--text); }
.tb-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; padding: 0 4px; box-shadow: 0 0 0 2px #fff; }
.user-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r); border: 0; background: none; cursor: pointer; color: var(--text); font-weight: 500; font-size: 13.5px; }
.user-btn:hover { background: var(--surface-3); }
.user-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--sidebar); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; text-transform: uppercase; }

/* Açılır menüler (hızlı işlem, bildirim, profil, satır işlemleri) */
.dd { position: relative; }
.dd-menu, .quick-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 6px; min-width: 240px; z-index: 40; display: grid; gap: 1px; }
.dd-menu[hidden], .quick-menu[hidden] { display: none; }
.dd-menu button, .dd-menu a, .quick-menu button { display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--text); font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.dd-menu button:hover, .dd-menu a:hover, .quick-menu button:hover, .dd-menu .act-on { background: var(--surface-3); }
.dd-menu hr, .quick-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.dd-menu .ic { color: var(--muted); }
.dd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600; padding: 6px 10px 4px; }
.dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin: -6px -6px 6px; }
.dd-head b { display: block; font-size: 13.5px; }
.qi { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.qi .ic { width: 15px; height: 15px; color: currentColor !important; }
.qi.in, .act.in span { background: var(--good-soft); color: var(--good-ink); }
.qi.out, .act.out span { background: var(--bad-soft); color: var(--bad-ink); }
.qi.doc, .act.doc span { background: var(--primary-soft); color: var(--primary-d); }
.qi.chq, .act.chq span { background: var(--warn-soft); color: var(--warn-ink); }
.qi.neu { background: var(--surface-3); color: var(--muted); }
.qi.veh { background: #f1edff; color: #5b45c9; }
.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; }
.notif-menu .dd-head { margin: 0; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.notif-list { max-height: 420px; overflow: auto; padding: 6px; }
.notif { display: flex !important; gap: 12px !important; align-items: flex-start !important; padding: 10px !important; white-space: normal !important; }
.notif b { display: block; font-weight: 600; font-size: 13px; }
.notif small { color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* Sayfa başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 28px 0; max-width: 1640px; width: 100%; }
.page-head h1 { font-size: var(--fs-page); line-height: 1.25; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.page-head .ph-l { min-width: 0; flex: 1 1 320px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; min-height: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary-d); }
.crumbs .ic { width: 13px; height: 13px; color: var(--dim); }
#topActions .row { flex-wrap: wrap; justify-content: flex-end; }
.view { padding: 20px 28px 64px; max-width: 1640px; width: 100%; }

@media (max-width: 1280px) {
  .page-head, .view { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 960px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .25s ease; }
  .side.open { transform: none; box-shadow: 24px 0 48px -24px rgba(15,23,42,.5); }
  .app.collapsed .brand-logo, .app.collapsed .lbl, .app.collapsed .nav-group span { display: initial; }
  .app.collapsed .brand-mark { display: none; }
  .side-toggle { display: none !important; }
  .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 25; }
  .topbar { padding: 0 14px; }
  .topbar .menu { display: grid; }
  .search-btn kbd { display: none; }
  .user-btn .user-name { display: none; }
  .page-head, .view { padding-left: 16px; padding-right: 16px; }
  .page-head { padding-top: 16px; }
}
@media (max-width: 560px) {
  .search-btn { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-btn span { display: none; }
  .page-head h1 { font-size: 19px; }
  #topActions { width: 100%; }
  #topActions .row { justify-content: flex-start; }
}

/* ============================================================ 4. Bileşenler */
/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h-ctl); padding: 0 14px; border-radius: var(--r); border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; box-shadow: var(--shadow-xs); }
.btn:hover { background: var(--primary-d); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn .ic { width: 15px; height: 15px; }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); border-color: #94a3b8; }
.btn.subtle { background: transparent; color: var(--muted); box-shadow: none; }
.btn.subtle:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: var(--h-ctl-sm); padding: 0 11px; font-size: 13px; }
.btn.danger { background: #fff; border-color: var(--bad-line); color: var(--bad-ink); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.solid:hover { background: var(--bad-ink); }
.btn.success { background: var(--good); }
.btn.success:hover { background: var(--good-ink); }
.btn.icon { width: var(--h-ctl-sm); height: var(--h-ctl-sm); padding: 0; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost.loading::after { border-color: var(--line-2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.linklike { background: none; border: 0; color: var(--primary-d); cursor: pointer; padding: 0; font-weight: 500; }
.linklike:hover { text-decoration: underline; }
.icon-btn { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--dim); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--bad); border-color: var(--bad-line); }

/* Kartlar ve ızgaralar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: var(--fs-section); margin-bottom: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.card h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px 0; }
.card a:not(.btn):not(.vlink):not(.kpi):not(.grp-card):not(.vcard) { color: var(--primary-d); text-decoration: none; }
.card a:not(.btn):not(.vlink):not(.kpi):not(.grp-card):not(.vcard):hover { text-decoration: underline; }
.grid { display: grid; gap: var(--sp-4); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.auto-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .g21, .g12 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .g3, .g2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .g4 { grid-template-columns: minmax(0, 1fr); } }
.section-title { font-size: var(--fs-section); margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }

/* KPI kartları */
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; text-decoration: none; color: inherit; }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; padding-right: 34px; }
.kpi b { display: block; font: 600 var(--fs-kpi)/1.2 var(--font); letter-spacing: -.02em; margin: 6px 0 2px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .delta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kpi .kpi-ic { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.kpi .kpi-ic .ic { width: 16px; height: 16px; }
.kpi-ic.blue { background: var(--primary-soft); color: var(--primary-d); }
.kpi-ic.green { background: var(--good-soft); color: var(--good-ink); }
.kpi-ic.red { background: var(--bad-soft); color: var(--bad-ink); }
.kpi-ic.amber { background: var(--warn-soft); color: var(--warn-ink); }
.kpi-ic.violet { background: #f1edff; color: #5b45c9; }
a.kpi, .kpi.link { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
a.kpi:hover, .kpi.link:hover { border-color: var(--primary-line); box-shadow: var(--shadow), 0 0 0 3px rgba(37,99,235,.06); }
a.kpi .go { position: absolute; right: 14px; bottom: 14px; color: var(--dim); opacity: 0; transition: opacity .12s; }
a.kpi:hover .go { opacity: 1; }
.chg { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; padding: 0 6px; border-radius: 99px; line-height: 18px; }
.chg.pos { background: var(--good-soft); color: var(--good-ink); }
.chg.neg { background: var(--bad-soft); color: var(--bad-ink); }
.chg .ic { width: 12px; height: 12px; }
.kpi-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi-row { grid-template-columns: minmax(0, 1fr); } }

/* Rozetler */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-micro); font-weight: 500; line-height: 20px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); color: #475569; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before, .badge:empty::before { display: none; }
.badge.green { background: var(--good-soft); color: var(--good-ink); border-color: var(--good-line); }
.badge.red { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.badge.amber { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.badge.blue { background: var(--primary-soft); color: var(--primary-d); border-color: var(--primary-line); }
.badge.violet { background: #f5f3ff; color: #5b45c9; border-color: #ddd6fe; }

/* Sekmeler (bölümlü kontrol) */
.tabs { display: inline-flex; gap: 2px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; color: var(--muted); white-space: nowrap; font-weight: 500; font-size: 13px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.1), 0 0 0 1px rgba(15,23,42,.04); }
.tabs button .cnt { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.grp-tabs { width: auto; }
/* Alt çizgili sekmeler (çalışma alanları) */
.utabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-5); }
.utabs::-webkit-scrollbar { display: none; }
.utabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.utabs button:hover { color: var(--text); }
.utabs button.on { color: var(--text); }
.utabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.utabs .cnt { font-size: 11px; background: var(--surface-3); color: var(--muted); border-radius: 99px; padding: 0 6px; line-height: 17px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.1); }
.seg button.on.in { color: var(--good-ink); }
.seg button.on.out { color: var(--bad-ink); }

/* Tablolar */
.table-wrap { overflow: auto; max-height: min(72vh, 920px); border-radius: var(--r); }
.table-wrap.free { max-height: none; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-table); }
.t th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t thead th:first-child { border-top-left-radius: var(--r); }
.t thead th:last-child { border-top-right-radius: var(--r); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #f8fafc; }
.t .num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #f5f8ff; }
.t td .small { font-size: 12px; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--text); }
.t th .sort-ic { display: inline-block; width: 12px; margin-left: 4px; color: var(--dim); opacity: 0; }
.t th.sortable:hover .sort-ic, .t th.sorted .sort-ic { opacity: 1; }
.t th.sorted { color: var(--text); }
.t .col-hide { display: none; }
.card > .table-wrap:only-child, .card > .tbl-tools + .table-wrap { margin: 0 -4px; }
.thumb { width: 60px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-3); display: block; flex: none; }
.vlink { text-decoration: none; display: flex; gap: 12px; align-items: center; color: var(--text); min-width: 0; }
.vlink:hover b { color: var(--primary-d); }
.vlink b { font-weight: 500; display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlink small { color: var(--muted); font-size: 12px; }
/* Tablo araç çubuğu (ui.js ekler) */
.tbl-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tbl-tools .tsearch { position: relative; flex: 1 1 220px; max-width: 320px; }
.tbl-tools .tsearch .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.tbl-tools .tsearch input { width: 100%; height: var(--h-ctl-sm); padding: 0 10px 0 32px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; outline: none; font-size: 13px; }
.tbl-tools .tsearch input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.tbl-tools .tcount { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.col-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; }
.col-menu label:hover { background: var(--surface-3); }
.col-menu input { accent-color: var(--primary); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pager button { min-width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-grid; place-items: center; color: var(--text); padding: 0 6px; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-d); font-weight: 600; }

/* Formlar */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: var(--fs-small); color: #475569; font-weight: 500; }
.field input, .field select, .field textarea, .input, .combo > select, .combo > input {
  width: 100%; height: var(--h-ctl); padding: 0 11px; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s; font-size: 14px;
}
.field textarea { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.field select, select.input { appearance: none; padding-right: 32px; background: #fff 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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.field select[multiple] { height: auto; background-image: none; padding: 6px; }
.field input:hover, .field select:hover, .field textarea:hover, .input:hover { border-color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .combo > select:focus, .combo > input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field input[readonly], .input[readonly] { background: var(--surface-2); color: var(--muted); }
.field input:disabled, .field select:disabled { background: var(--surface-3); color: var(--dim); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--dim); }
.field input[type="checkbox"], .field input[type="radio"] { width: 18px; height: 18px; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.field .err-msg { font-size: 12px; color: var(--bad-ink); display: flex; align-items: center; gap: 4px; }
.field > span.req::after { content: " *"; color: var(--bad); }
input.money, input[inputmode="decimal"] { font-variant-numeric: tabular-nums; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.form3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 640px) { .form, .form3 { grid-template-columns: minmax(0, 1fr); } }
.form-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); padding-top: 6px; }
.form-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.combo { display: flex; gap: 6px; align-items: center; }
.combo > select, .combo > input { flex: 1; min-width: 0; width: auto; }
.combo > select:disabled { opacity: .45; }
.new-party { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; margin-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; min-width: 150px; height: var(--h-ctl-sm); font-size: 13px; }
.filters select.input { padding-right: 30px; }
.filters .grow { flex: 1; min-width: 200px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: var(--sp-4); }
.search-in { position: relative; flex: 1 1 240px; max-width: 360px; }
.search-in .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search-in .input { padding-left: 34px; height: 36px; }

/* Grafikler */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Boş durumlar ve iskelet yükleme */
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; color: var(--muted); }
.empty-state .es-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; color: var(--dim); margin-bottom: 6px; }
.empty-state b { color: var(--text); font-weight: 600; font-size: 14px; }
.empty-state p { margin: 0; max-width: 420px; font-size: 13px; }
.empty-state .row { justify-content: center; margin-top: 8px; }
.sk { background: linear-gradient(90deg, var(--surface-3) 0%, #e9eef5 40%, var(--surface-3) 80%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-kpi { height: 104px; border-radius: var(--r-lg); }
.sk-card { height: 300px; border-radius: var(--r-lg); }

/* Uyarı kutuları */
.notice { display: block; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--warn-line); background: var(--warn-soft); color: #78350f; font-size: 13.5px; line-height: 1.5; }
.notice:has(> .ic) { display: flex; }
.notice > .ic { margin-top: 2px; flex: none; }
.notice.info { border-color: var(--primary-line); background: var(--primary-soft); color: #1e3a8a; }
.notice.ok { border-color: var(--good-line); background: var(--good-soft); color: #14532d; }
.notice.bad { border-color: var(--bad-line); background: var(--bad-soft); color: #7f1d1d; }
.attention { border-left: 3px solid var(--warn); }
ol.steps { padding-left: 20px; margin: 8px 0 0; color: var(--muted); }
ol.steps li { margin-bottom: 6px; }

/* Pencere (modal) ve onay penceresi */
.modal, .confirm { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: none; align-items: flex-start; justify-content: center; z-index: 50; padding: 56px 16px; overflow: auto; }
.confirm { z-index: 70; align-items: center; }
.modal.open, .confirm.open { display: flex; animation: fade .12s ease-out; }
.modal-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; width: 100%; max-width: 640px; box-shadow: 0 24px 64px -16px rgba(15, 23, 42, .35); animation: pop .16s ease-out; }
.modal-card h3 { font-size: 17px; margin: 0 40px 18px 0; letter-spacing: -.01em; }
.modal-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: var(--r); border: 0; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { background: var(--surface-3); color: var(--text); }
.modal-card .form .full.row:last-child, .modal-card form > .row:last-child { padding-top: 6px; }
.confirm-card { max-width: 440px; padding: 22px; }
.confirm-card .c-head { display: flex; gap: 14px; align-items: flex-start; }
.confirm-card .c-ic { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-d); }
.confirm-card.danger .c-ic { background: var(--bad-soft); color: var(--bad); }
.confirm-card h3 { margin: 0 0 6px; font-size: 16px; }
.confirm-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.confirm-card .c-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }

/* Bildirim (toast) */
.toast { position: fixed; right: 20px; bottom: 20px; display: flex; align-items: flex-start; gap: 10px; background: #fff; color: var(--text); padding: 12px 16px 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); transform: translateY(160%); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); z-index: 80; max-width: 420px; box-shadow: var(--shadow-pop); font-size: 13.5px; font-weight: 500; }
.toast::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; }
.toast.err::before { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center/12px no-repeat; }
.toast.show { transform: none; }

/* İpucu */
.tip { position: fixed; z-index: 90; background: #0f172a; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: var(--r-sm); pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-pop); max-width: 280px; }

/* Komut paleti (genel arama) */
.cmdk { position: fixed; inset: 0; z-index: 75; background: rgba(15,23,42,.4); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .1s; }
.cmdk-card { width: 100%; max-width: 620px; background: #fff; border-radius: var(--r-xl); box-shadow: 0 32px 80px -20px rgba(15,23,42,.45); border: 1px solid var(--line); overflow: hidden; animation: pop .14s ease-out; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-in .ic { color: var(--dim); width: 18px; height: 18px; }
.cmdk-in input { flex: 1; height: 54px; border: 0; outline: none; font-size: 15.5px; background: none; }
.cmdk-list { max-height: min(56vh, 460px); overflow: auto; padding: 6px; }
.cmdk-sec { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: var(--r); border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); font-size: 13.5px; }
.cmdk-item .ci { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.cmdk-item .ci img { width: 100%; height: 100%; object-fit: cover; }
.cmdk-item .ct { flex: 1; min-width: 0; }
.cmdk-item .ct b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .ct small { color: var(--muted); font-size: 12px; }
.cmdk-item .ck { color: var(--dim); font-size: 12px; }
.cmdk-item.on { background: var(--primary-soft); }
.cmdk-item.on .ci { background: #fff; color: var(--primary-d); }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--muted); }

/* ============================================================ 5. Modüller */
/* Gösterge paneli */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.dash-head .greet { color: var(--muted); font-size: 13.5px; }
.list-rows { display: grid; }
.lr { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.lr:last-child { border-bottom: 0; }
a.lr:hover .lr-t b, button.lr:hover .lr-t b { color: var(--primary-d); }
button.lr { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font: inherit; }
.lr-ic { width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.lr-ic.in { background: var(--good-soft); color: var(--good-ink); }
.lr-ic.out { background: var(--bad-soft); color: var(--bad-ink); }
.lr-ic.tr { background: var(--primary-soft); color: var(--primary-d); }
.lr-t { flex: 1; min-width: 0; }
.lr-t b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-t small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.lr-v small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.lr .thumb { width: 52px; height: 38px; }
.split-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.split-stat > div { background: var(--surface-2); padding: 10px 12px; min-width: 0; }
.split-stat small { display: block; color: var(--muted); font-size: 12px; }
.split-stat b { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; white-space: nowrap; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; }
.meter i { display: block; height: 100%; }
.cust-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; border-radius: var(--r-sm); }
.cust-menu label:hover { background: var(--surface-3); }
.cust-menu input { accent-color: var(--primary); }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.status-line:last-child { border-bottom: 0; }

/* Araç envanteri: kart görünümü */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.vcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s, transform .12s; }
.vcard:hover { border-color: var(--primary-line); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.vcard-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.vcard-img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard-img .vbadges, .vcard-img .vdays { z-index: 2; }
.vcard-img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.vcard-img .vbadges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.vcard-img .vbadges .badge { background: rgba(255,255,255,.95); box-shadow: 0 1px 2px rgba(15,23,42,.15); }
.vcard-img .vdays { position: absolute; right: 10px; bottom: 10px; background: rgba(15,23,42,.75); color: #fff; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 99px; display: flex; gap: 4px; align-items: center; }
.vcard-body { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; }
.vcard-title { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.vcard-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; }
.vcard-meta span { display: inline-flex; align-items: center; gap: 4px; }
.plate { display: inline-flex; align-items: center; font: 600 11.5px/1 ui-monospace, Consolas, monospace; letter-spacing: .04em; padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; color: var(--text); white-space: nowrap; }
.plate::before { content: "TR"; font-size: 8.5px; background: #1d4ed8; color: #fff; padding: 2px 3px; border-radius: 2px; margin-right: 5px; letter-spacing: 0; }
.vcard-fin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: auto; }
.vcard-fin small { display: block; color: var(--muted); font-size: 11.5px; }
.vcard-fin b { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.inv-sum { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: var(--sp-4); box-shadow: var(--shadow); }
.inv-sum div { min-width: 120px; }
.inv-sum small { display: block; color: var(--muted); font-size: 12px; }
.inv-sum b { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }

/* Araç çalışma alanı */
.veh-head { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.veh-cover { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--dim); }
.veh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.veh-info h2 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.015em; }
.veh-specs { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; margin-top: 10px; }
.veh-specs span { display: inline-flex; align-items: center; gap: 5px; }
.veh-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 180px; }
@media (max-width: 1080px) { .veh-head { grid-template-columns: 160px minmax(0, 1fr); } .veh-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; } }
@media (max-width: 560px) { .veh-head { grid-template-columns: minmax(0, 1fr); } }
.fin-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.fin-strip > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.fin-strip > div:last-child { border-right: 0; }
.fin-strip small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fin-strip b { display: block; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 4px 0 2px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-strip .sub { font-size: 12px; color: var(--muted); }
.fin-strip .op { color: var(--dim); font-weight: 400; }
@media (max-width: 1200px) { .fin-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fin-strip > div:nth-child(3) { border-right: 0; } .fin-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 640px) { .fin-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fin-strip > div { border-right: 0; border-top: 1px solid var(--line); } .fin-strip > div:nth-child(-n+2) { border-top: 0; } .fin-strip > div:nth-child(odd) { border-right: 1px solid var(--line); } }
.waterfall { display: grid; gap: 2px; }
.wf-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) 130px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.wf-row .wf-bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.wf-row .wf-bar i { display: block; height: 100%; border-radius: 99px; }
.wf-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.wf-row.total { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 10px; }
@media (max-width: 640px) { .wf-row { grid-template-columns: minmax(0, 1fr) 110px; } .wf-row .wf-bar { display: none; } }
.vpanel[hidden] { display: none !important; }
.timeline { position: relative; display: grid; gap: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; }
.tl-item::before { content: ""; position: absolute; left: 16px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); position: relative; z-index: 1; border: 3px solid #fff; }
.tl-dot.in { background: var(--good-soft); color: var(--good-ink); }
.tl-dot.out { background: var(--bad-soft); color: var(--bad-ink); }
.tl-dot.doc { background: var(--primary-soft); color: var(--primary-d); }
.tl-dot.key { background: #f1edff; color: #5b45c9; }
.tl-item b { font-weight: 500; font-size: 13.5px; display: block; }
.tl-item small { color: var(--muted); font-size: 12px; }
.tl-item .tl-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }

.profit-box { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profit-box div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.profit-box small { color: var(--muted); display: block; font-size: 12.5px; }
.profit-box b { font: 600 20px var(--font); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .profit-box { grid-template-columns: 1fr 1fr; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photos .ph { position: relative; aspect-ratio: 4/3; border-radius: var(--r); overflow: hidden; background: var(--surface-3); cursor: grab; border: 1px solid var(--line); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(15,23,42,.75); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.photos .ph:hover button { opacity: 1; }
.photos .ph .first { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; background: var(--primary); color: #fff; padding: 1px 7px; border-radius: 99px; }
.drop-zone { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 20px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .12s, background .12s; display: grid; justify-items: center; gap: 6px; }
.drop-zone:hover, .drop-zone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-d); }

/* Canlı destek */
.chat-admin { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; height: calc(100vh - 170px); min-height: 480px; }
.chat-list { padding: 6px; overflow-y: auto; }
.chat-row { display: grid; gap: 4px; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--r); padding: 12px; cursor: pointer; color: inherit; border-bottom: 1px solid var(--line); }
.chat-row:hover { background: var(--surface-2); }
.chat-row.on { background: var(--primary-soft); }
.chat-row.closed { opacity: .6; }
.chat-row .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.chat-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-back { display: none; }
.thread-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.amsg { max-width: 75%; display: flex; flex-direction: column; }
.amsg p { margin: 0; padding: 9px 13px; border-radius: 14px; line-height: 1.45; word-wrap: break-word; }
.amsg small { font-size: 11px; color: var(--dim); margin-top: 3px; padding: 0 4px; }
.amsg.me { align-self: flex-end; align-items: flex-end; }
.amsg.me p { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.amsg.them p { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.amsg.bot p { background: var(--warn-soft); border: 1px dashed var(--warn-line); color: #78350f; }
.thread-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; background: #fff; }
.thread-input textarea { flex: 1; resize: none; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; outline: none; }
.thread-input textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
@media (max-width: 960px) {
  .chat-admin { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); }
  .chat-admin .chat-thread { display: none; }
  .chat-admin.has-active .chat-list { display: none; }
  .chat-admin.has-active .chat-thread { display: flex; }
  .thread-back { display: inline-flex; }
}

/* Ön muhasebe */
.party-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--sidebar); color: #fff; display: grid; place-items: center; font: 600 20px var(--font); flex: none; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.balance-big { text-align: right; }
.balance-big small { display: block; font-size: 12.5px; color: var(--muted); }
.balance-big b { font: 600 28px/1.2 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.action-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.act { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; text-align: left; }
.act:hover { border-color: var(--primary-line); box-shadow: var(--shadow-pop); }
.act span { width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; font-weight: 600; flex: none; }
@media (max-width: 1200px) { .action-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .balance-big { text-align: left; } }
.lines th { padding: 8px 4px; }
.lines td { padding: 6px 4px; }
.lines input, .lines select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--text); outline: none; }
.lines input:focus, .lines select:focus { border-color: var(--primary); box-shadow: var(--ring); }
.lines tr:hover td { background: transparent !important; }
.totals { min-width: 300px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.totals .row-t { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font: 600 20px var(--font); color: var(--text); border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 10px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.acc-card { cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, box-shadow .12s; text-align: left; font: inherit; }
.acc-card:hover { border-color: var(--primary-line); box-shadow: var(--shadow-pop); }
.acc-card h3 { font-size: 15px; margin-top: 10px; }
.acc-card.arch { opacity: .55; }
.acc-bal { font: 600 24px var(--font); margin: 10px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.acc-card.add { align-items: center; justify-content: center; border: 1.5px dashed var(--line-2); box-shadow: none; color: var(--muted); font-weight: 500; min-height: 170px; background: transparent; }
.acc-card.add span { font-size: 26px; color: var(--primary); }
.acc-ic { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary-d); }
.acc-ic.cash { background: var(--good-soft); color: var(--good-ink); }
.acc-ic.card { background: var(--warn-soft); color: var(--warn-ink); }
.acc-ic.sm { width: 26px; height: 26px; border-radius: 7px; vertical-align: middle; margin-right: 6px; }
.acc-ic.sm .ic { width: 14px; height: 14px; }
.more { position: relative; display: inline-block; }
.more-menu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 4px; display: grid; z-index: 10; min-width: 160px; }
.more-menu button { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--text); font-size: 13.5px; }
.more-menu button:hover { background: var(--surface-3); }

/* Gelir-gider */
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.grp-card { display: grid; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
.grp-card:hover { border-color: var(--primary-line); box-shadow: var(--shadow-pop); }
.grp-ic { width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-3); color: var(--muted); margin-bottom: 4px; }
.grp-name { font-weight: 500; font-size: 13px; color: var(--muted); }
.grp-card b { font: 600 20px var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.grp-card .delta { font-size: 12px; }
.grp-dot { margin-right: 6px; color: var(--muted); }
.gi { display: inline-grid; place-items: center; color: var(--muted); vertical-align: -3px; }
.gi .ic { width: 15px; height: 15px; }
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-chips button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; border-radius: 99px; height: 32px; padding: 0 12px; cursor: pointer; font-weight: 500; color: var(--text); font-size: 13px; }
.grp-chips button:hover { border-color: var(--primary); }
.grp-chips button.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-d); }
.grp-chips button.on .gi { color: var(--primary-d); }
.field.hl select { border-color: var(--warn); }
.cat-bars { display: grid; gap: 12px; margin-bottom: 12px; }
.cat-bar .row { flex-wrap: nowrap; gap: 8px; }
.cat-bar span { font-size: 13.5px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--series-1); border-radius: 99px; }
.bar.inc i { background: var(--series-3); }
.bar.over i { background: var(--bad); }
.bar.sm { height: 5px; width: 90px; margin-left: auto; }
.num-in { width: 120px !important; text-align: right; height: 34px !important; padding: 0 9px !important; font-variant-numeric: tabular-nums; }
.pay-t td { vertical-align: middle; }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.emp.arch { opacity: .6; }
.vc-detail td { background: var(--surface-2) !important; }
.vc-box { padding: 6px 4px; }
.vc-row { display: grid; grid-template-columns: 110px 220px minmax(0, 1fr) 120px; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; align-items: center; }
.vc-row:hover { background: #fff; }
.vc-row b { text-align: right; font-variant-numeric: tabular-nums; }
.quick-grp { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-grp button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: var(--r); height: 30px; padding: 0 10px; cursor: pointer; font-size: 12.5px; color: var(--text); font-weight: 500; }
.quick-grp button:hover { border-color: var(--primary); color: var(--primary-d); }
.grp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.grp-pills span { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
@media (max-width: 700px) { .vc-row { grid-template-columns: 1fr auto; } .vc-row .small { grid-column: 1 / -1; } }

/* ============================================================ 6. Giriş sayfası */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(800px 400px at 85% -10%, rgba(37,99,235,.35), transparent 60%), var(--sidebar); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: var(--r-xl); padding: 32px; display: grid; gap: 16px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.login-card .brand { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.login-card .brand-logo { height: auto; width: 170px; }
.login-card .brand small { color: var(--muted); font-size: 12.5px; }
.login-card .btn { height: 42px; }
.msg.err { color: var(--bad); margin: 0; min-height: 1em; font-size: 13.5px; }
.muted-link { color: var(--muted); text-decoration: none; font-size: 13px; text-align: center; }
.muted-link:hover { color: var(--text); }

/* ============================================================ 7. Yazdırma */
#printArea { display: none; }
@media print {
  .side, .topbar, .page-head .crumbs, .no-print, .tbl-tools, .pager, .utabs, .scrim { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
  .card { border-color: #ddd; background: #fff; box-shadow: none; break-inside: avoid; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  .t th { position: static; }
  body.print-doc .app, body.print-doc .modal, body.print-doc .toast { display: none !important; }
  body.print-doc #printArea { display: block; }
}
#printArea .doc { font: 12.5px/1.5 var(--font); color: #111; padding: 10px; }
#printArea .doc h1 { font-size: 20px; margin: 0 0 6px; }
#printArea .doc table { width: 100%; border-collapse: collapse; }
#printArea .doc th, #printArea .doc td { padding: 6px 8px; border-bottom: 1px solid #ddd; text-align: left; }
#printArea .doc .num { text-align: right; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #14243a; padding-bottom: 12px; margin-bottom: 14px; }
.doc-head p { margin: 6px 0 0; color: #444; }
.doc-title { text-align: right; }
.doc-title table td { border: 0; padding: 2px 0 2px 14px; text-align: right; }
.doc-party { border: 1px solid #ccc; border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; }
.doc-party small { display: block; color: #666; letter-spacing: .08em; }
.doc-lines th { background: #f1f4f7; }
.doc-lines td:nth-child(n+3), .doc-lines th:nth-child(n+3) { text-align: right; }
.doc-totals { width: 340px !important; margin: 14px 0 0 auto; }
.doc-totals td:last-child { text-align: right; }
.doc-totals tr.g td { font-weight: 700; font-size: 15px; border-top: 2px solid #14243a; }
.doc-note { color: #555; font-size: 11.5px; margin-top: 12px; }
.print-table { font: 12px/1.45 var(--font); }
.print-table h1 { font-size: 17px; margin: 0 0 4px; }
.print-table table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.print-table th, .print-table td { border-bottom: 1px solid #ddd; padding: 5px 6px; text-align: left; }
.print-table .num { text-align: right; }
.toolbar > .row { flex: 1 1 560px; justify-content: flex-end; flex-wrap: nowrap; }
.toolbar .search-in { min-width: 160px; }
@media (max-width: 720px) { .toolbar > .row { flex-wrap: wrap; justify-content: flex-start; } }
.toolbar .seg, .toolbar select.input { flex: none; flex-wrap: nowrap; }

/* Galerici görünümü: entegrasyon durumu (yeşil başarılı, kırmızı hata, sarı bekliyor, gri kapalı) */
.integ-list { margin-top: 14px; display: grid; gap: 10px; }
.integ-st { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.integ-st .integ-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--dim); }
.integ-st.ok { border-color: var(--good-line); background: var(--good-soft); } .integ-st.ok .integ-ic { background: var(--good); color: #fff; }
.integ-st.bad { border-color: var(--bad-line); background: var(--bad-soft); } .integ-st.bad .integ-ic { background: var(--bad); color: #fff; }
.integ-st.wait .integ-ic { background: var(--warn-soft); color: var(--warn-ink); }
.integ-tx { flex: 1; min-width: 0; display: grid; gap: 2px; } .integ-tx b { font-weight: 600; } .integ-tx small { color: var(--muted); font-size: 12.5px; }
.integ-err { color: var(--bad-ink) !important; }
.integ-cell { display: flex; gap: 8px; align-items: flex-start; } .integ-cell > svg, .integ-cell > i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--dim); }
.integ-cell.ok > svg, .integ-cell.ok > i { color: var(--good); } .integ-cell.bad > svg, .integ-cell.bad > i { color: var(--bad); } .integ-cell.wait > svg, .integ-cell.wait > i { color: var(--warn); }
.integ-cell a { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integ-cell > div { min-width: 0; }

/* Zamanlanmış görevler */
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; width: fit-content; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 14px; border-radius: 7px; font-weight: 500; font-size: 13.5px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.lbl-s { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-d); border: 1px solid var(--primary-line); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip button:hover { background: rgba(37,99,235,.12); }
.chip.sm { padding: 1px 8px; font-size: 12px; font-weight: 500; margin: 2px 2px 0 0; }
.chip-t { cursor: pointer; } .chip-t input { position: absolute; opacity: 0; pointer-events: none; }
.chip-t span { display: inline-block; min-width: 46px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 13px; color: var(--muted); }
.chip-t input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-t input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.preview-box { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--good); } .switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.t.tasks tr.cont td { border-top-color: transparent; } .t.tasks tr.paused td { opacity: .6; } .t.tasks tr.paused td:nth-last-child(-n+2) { opacity: 1; }
.timeline { display: grid; gap: 2px; }
.tl-day { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); margin: 10px 0 4px; } .tl-day:first-child { margin-top: 0; }
.tl-row { display: grid; grid-template-columns: 46px 12px 1fr; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.tl-row.first { background: var(--primary-soft); }
.tl-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); } .tl-dot.browser { background: #7c5cff; }
.tl-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Referans galeri kayıtları */
.logbox { margin: 0; max-height: 560px; overflow: auto; padding: 12px; border-radius: 10px; background: #0f172a; color: #cbd5e1; font: 12px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

/* Ayarlar ve tema yönetimi */
.pv-card { padding: 14px; }
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.pv-name { display: grid; line-height: 1.25; margin-right: 6px; } .pv-name b { font-size: 16px; }
.seg-s { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.seg-s button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg-s button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.pv-stage { display: grid; place-items: start center; min-height: 300px; padding: 14px; border-radius: 12px; background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 10px, var(--surface-3, #eef1f6) 10px, var(--surface-3, #eef1f6) 20px); overflow: hidden; }
.pv-frame { position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .45); background: #fff; }
.pv-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.pv-frame.phone { border-radius: 26px; outline: 8px solid #111827; outline-offset: -1px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 18px; }
.tcard { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .4); }
.tcard.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tmini { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.tmini iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.tmeta { display: grid; gap: 4px; padding: 12px 14px; } .tmeta b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.tswatch { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; } .tswatch i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, .12); } .tswatch b { width: 1px; height: 14px; background: var(--line); margin: 0 4px; }
.logo-up { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.logo-prev { width: 140px; height: 70px; display: grid; place-items: center; border-radius: 8px; flex: none; padding: 8px; }
.logo-up.light .logo-prev { background: #fff; border: 1px solid var(--line); } .logo-up.dark .logo-prev { background: #111827; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }


/* ============================================================ Giriş sayfası (Otovit) */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 0; place-items: stretch; background: #fff; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 52px; color: #ededf0; background: #0a0a0c; isolation: isolate; }
.login-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url(/img/foto-showroom.webp) center / cover; opacity: .26; filter: saturate(.85); }
.login-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,10,12,.55), #0a0a0c 88%), radial-gradient(60% 50% at 20% 0%, rgba(91,61,245,.35), transparent 70%); }
.login-art .la-logo { height: 30px; width: auto; display: block; }
.login-art h2 { color: #fff; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; max-width: 520px; }
.login-art h2 em { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; color: #c9cdff; }
.login-art p { margin: 16px 0 0; color: #a9abb4; font-size: 15.5px; max-width: 460px; }
.la-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: #d7d8dd; font-size: 14px; }
.la-points li { display: flex; gap: 10px; align-items: center; } .la-points .ic { color: #4ed08a; }
.la-foot { font: 12px 'Geist Mono', ui-monospace, monospace; color: #6e7079; letter-spacing: .02em; }
.login-side { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 380px; background: transparent; border-radius: 0; padding: 0; display: grid; gap: 16px; box-shadow: none; }
.login-card .lc-mark { width: 44px; height: 44px; display: block; }
.login-card h1 { font-size: 26px; letter-spacing: -.03em; margin-top: 8px; }
.login-card .lc-sub { color: var(--muted); margin: -8px 0 6px; }
.login-card .field input { height: 44px; border-radius: 10px; }
.login-card .btn { height: 44px; border-radius: 10px; background: #0b0b0f; border-color: #0b0b0f; font-weight: 500; }
.login-card .btn:hover { background: #2a2b31; }
.login-card .muted-link { color: var(--muted); font-size: 13px; text-decoration: none; justify-self: center; } .login-card .muted-link:hover { color: var(--text); }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-art { padding: 24px; } .login-art h2, .login-art p, .la-points, .la-foot { display: none; } }

/* ============================================================ Canlı destek */
.chat-app { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; height: calc(100vh - 170px); min-height: 520px; }
.chat-list, .chat-thread { padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-list-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.chat-items { flex: 1; overflow-y: auto; padding: 6px; }
.chat-item { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 0; border-radius: var(--r-lg); background: none; text-align: left; cursor: pointer; }
.chat-item:hover { background: var(--surface-3); } .chat-item.on { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-line); }
.chat-item-b { flex: 1; min-width: 0; display: grid; gap: 2px; } .chat-item-b b { font-weight: 600; font-size: 13.5px; } .chat-item-b small { font-size: 11.5px; white-space: nowrap; }
.chat-prev { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.new .chat-prev { color: var(--text); font-weight: 500; }
.chat-item .pill { margin-top: 2px; background: #ff6a1a; }
.chat-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 600; font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--line); }
.chat-ava.lg { width: 40px; height: 40px; font-size: 14px; background: var(--primary-soft); color: var(--primary-d); box-shadow: none; }
.chat-th { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-th b { font-size: 15px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.bub { max-width: min(72%, 560px); padding: 9px 13px 6px; border-radius: 14px; box-shadow: var(--shadow-xs); }
.bub p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.bub small { display: block; margin-top: 3px; font-size: 11px; opacity: .65; text-align: right; }
.bub.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bub.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-sys { align-self: center; max-width: 80%; text-align: center; font-size: 12px; color: var(--muted); padding: 4px 10px; }
.chat-day { align-self: center; margin: 6px 0; font-size: 11.5px; color: var(--dim); } .chat-day span { padding: 3px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.chat-reply { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--surface); }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chat-quick button { flex: none; border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 4px 11px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chat-quick button:hover { color: var(--text); border-color: var(--line-2); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; } .chat-input textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; padding: 10px 12px; }
.chat-input .btn { height: 44px; }
.chat-empty { flex: 1; display: grid; place-items: center; padding: 24px; }
@media (max-width: 960px) { .chat-app { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 280px; } .chat-thread { height: 70vh; } .bub { max-width: 86%; } }
