/* =====================================================================
   DEMSOFT MOBİL v5 — TASARIM SİSTEMİ
   ---------------------------------------------------------------------
   Bu dosya tüm ekranların ortak görünümünü belirler.
   - Renkleri değiştirmek için sadece :root içindeki değişkenleri değiştirin.
   - Koyu tema: [data-theme="dark"] bloğu (kullanıcı menüden seçer).
   - Bölümler: Temel > Buton > Form > İskelet (menü/üst bar/alt bar) >
     Kart & KPI > Liste & Tablo > Dashboard widget > Takvim > Modal >
     Komut paleti (arama) > Tarayıcı (kamera) > Giriş ekranı >
     Cari kart > Sihirbaz (adım adım form) > Mobil ayarlar > Yazdırma
   ===================================================================== */

/* ---------------- 1. TEMA DEĞİŞKENLERİ ---------------- */
:root {
  --bg: #f1f4fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eaeef6;
  --line: #e0e6f0;
  --line-strong: #c9d3e2;
  --text: #0e1630;
  --text-2: #36425c;
  --muted: #66728a;

  /* Ana marka rengi (butonlar, seçili menü, vurgu) */
  --brand: #2f5bea;
  --brand-600: #2449c8;
  --brand-700: #1b399f;
  --brand-50: #edf2ff;
  --brand-100: #d9e3ff;
  --brand-grad: linear-gradient(135deg, #3b6cff 0%, #2f5bea 45%, #6a3df0 100%);

  /* Sol menü (koyu lacivert) */
  --nav: #0d1530;
  --nav-2: #18234a;
  --nav-text: #c3cbe3;

  /* Durum renkleri */
  --ok: #0f9d58;      --ok-bg: #defbea;     --ok-line: #8fe3b4;
  --warn: #b26a00;    --warn-bg: #fff3d6;   --warn-line: #ffd27a;
  --danger: #d0352b;  --danger-bg: #ffe6e3; --danger-line: #ffaaa2;
  --info: #0b7fc7;    --info-bg: #dff1ff;   --info-line: #98d2fa;
  --violet: #7a3ff2;  --violet-bg: #efe7ff; --violet-line: #c9b1ff;
  --pink: #e0457b;    --pink-bg: #ffe6ef;
  --teal: #0b9e95;    --teal-bg: #d9f7f4;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --tap: 52px;               /* parmak dostu minimum yükseklik */
  --shadow-sm: 0 1px 2px rgba(14, 22, 48, .05), 0 1px 3px rgba(14, 22, 48, .07);
  --shadow: 0 8px 24px rgba(14, 22, 48, .08), 0 2px 6px rgba(14, 22, 48, .05);
  --shadow-lg: 0 24px 60px rgba(14, 22, 48, .24);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --top-h: 66px;
  --bottom-h: 72px;
  --rail-w: 252px;
  color-scheme: light;
}

/* Koyu tema — kullanıcı menüsünden açılır (localStorage: dm5_tema) */
[data-theme="dark"] {
  --bg: #0a0f1f;
  --surface: #121a31;
  --surface-2: #17203b;
  --surface-3: #1d2847;
  --line: #26325a;
  --line-strong: #34426f;
  --text: #e8edfb;
  --text-2: #c2cbe4;
  --muted: #8d99bb;
  --brand-50: #1a2650;
  --brand-100: #253a7a;
  --nav: #070b18;
  --nav-2: #141d3a;
  --ok-bg: #0e3324; --warn-bg: #3a2a07; --danger-bg: #3d1513; --info-bg: #0c2a42; --violet-bg: #29184f;
  --pink-bg: #3d1424; --teal-bg: #083633;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

/* ---------------- 2. TEMEL ---------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: 15.5px; line-height: 1.45;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--brand); }
img, svg { display: block; }
.hidden { display: none !important; }
.ic { width: 21px; height: 21px; flex: none; }
.ic-sm { width: 17px; height: 17px; }
.ic-lg { width: 28px; height: 28px; }
.ic-xl { width: 40px; height: 40px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.bold { font-weight: 800; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; }
.t-ok { color: var(--ok) !important; } .t-danger { color: var(--danger) !important; } .t-warn { color: var(--warn) !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 3. BUTONLAR ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--tap); padding: 0 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15.5px; border: 1px solid transparent;
  transition: background .15s, box-shadow .15s, transform .06s, border-color .15s;
  white-space: nowrap; text-decoration: none; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 18px rgba(47, 91, 234, .28); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-light:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
[data-theme="dark"] .btn-soft { color: #b9c9ff; }
.btn-soft:hover { background: var(--brand-100); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { min-height: 42px; padding: 0 14px; font-size: 14.5px; border-radius: 10px; }
.btn-lg { min-height: 60px; font-size: 17px; padding: 0 26px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--tap); padding: 0; }
.btn-icon.btn-sm { width: 42px; }

/* Yuvarlak iletişim butonları (Ara / SMS / WhatsApp / E-posta / Konum) */
.qa { display: flex; gap: 10px; flex-wrap: wrap; }
.qa a, .qa button {
  flex: 1 1 70px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 16px; text-decoration: none; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700;
  transition: transform .08s, border-color .15s;
}
.qa a:hover, .qa button:hover { border-color: var(--brand-100); transform: translateY(-1px); }
.qa .ci { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.ci.c-call { background: #0f9d58; } .ci.c-sms { background: #0b7fc7; } .ci.c-wa { background: #25a244; }
.ci.c-mail { background: #e0457b; } .ci.c-map { background: #b26a00; } .ci.c-share { background: #7a3ff2; }
.ci.c-qr { background: #0d1530; } .ci.c-pdf { background: #d0352b; } .ci.c-cal { background: #0b9e95; }

/* ---------------- 4. FORM ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.field > label { font-size: 13.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field > label .req { color: var(--danger); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err-msg { font-size: 12.5px; color: var(--danger); font-weight: 700; display: none; }
.field.invalid .err-msg { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger) !important; }
.field.valid input { border-color: var(--ok) !important; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea {
  width: 100%; min-height: var(--tap); padding: 0 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { padding: 12px 15px; min-height: 92px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 91, 234, .15);
}
::placeholder { color: #93a0b8; }
select, .field select {
  -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600; padding-right: 44px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232f5bea' stroke-width='2.5' 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 13px center;
}
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 46px !important; }
.input-act { position: relative; }
.input-act input { padding-right: 56px !important; }
.input-act > button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); }
.input-act > button:hover { background: var(--brand-50); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

/* Seçim düğmeleri (select yerine dokunmatik) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1 1 auto; min-height: 46px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(47, 91, 234, .25); }

/* Anahtar (switch) */
.switch { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 700; user-select: none; }
.switch input { display: none; }
.switch i { width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; margin-left: auto; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + span + i { background: var(--ok); }
.switch input:checked + span + i::after { transform: translateX(18px); }

/* Çip filtreler (liste üstü) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px;
  border-radius: 20px; border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); font-weight: 700; font-size: 14px;
}
.chip .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 11.5px; background: var(--surface-3); }
.chip.on { background: var(--nav); border-color: var(--nav); color: #fff; }
.chip.on .n { background: rgba(255, 255, 255, .18); }
[data-theme="dark"] .chip.on { background: var(--brand); border-color: var(--brand); }

/* ---------------- 5. UYGULAMA İSKELETİ ---------------- */
.shell { min-height: 100vh; padding-left: var(--rail-w); padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
@media (min-width: 761px) { .shell { padding-bottom: 0; } }

/* Sol menü */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 30;
  background: var(--nav); color: var(--nav-text); display: flex; flex-direction: column;
  padding: 14px 12px 16px; overflow-y: auto; scrollbar-width: thin;
}
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; color: #fff; text-decoration: none; }
.logo { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; color: #fff; background: var(--brand-grad); box-shadow: 0 8px 20px rgba(59, 108, 255, .4); font-weight: 800; font-size: 19px; }
.rail-brand b { display: block; font-size: 18px; letter-spacing: -.01em; }
.rail-brand small { display: block; font-size: 11.5px; color: #8796c4; font-weight: 600; }
.rail-co { margin: 0 4px 10px; padding: 10px 12px; border-radius: 14px; background: var(--nav-2); display: flex; gap: 10px; align-items: center; color: #fff; text-align: left; width: calc(100% - 8px); }
.rail-co small { display: block; color: #8796c4; font-size: 11.5px; font-weight: 600; }
.rail-co b { display: block; font-size: 13.5px; }
.rail-group { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6876a6; padding: 14px 12px 6px; }
.rail a { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 0 13px; border-radius: 12px; color: var(--nav-text); text-decoration: none; font-weight: 600; font-size: 14.5px; position: relative; }
.rail a:hover { background: var(--nav-2); color: #fff; }
.rail a.on { background: #fff; color: var(--nav); font-weight: 800; }
.rail a.on .ic { color: var(--brand); }
.rail a.lock { opacity: .45; }
.rail a .cnt { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: #ff5d7a; color: #fff; }
.rail a .soon { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .05em; color: #6876a6; }

/* Üst bar */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; gap: 10px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.topbar .title .pic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.topbar h1 { font-size: 19px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbox {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; min-width: 260px;
  border-radius: 12px; background: var(--surface-3); color: var(--muted); font-weight: 600; font-size: 14px;
}
.searchbox kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.tbtn { position: relative; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--text-2); }
.tbtn:hover { background: var(--surface-3); }
.tbtn .dot { position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #ff5d7a; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface); margin-left: 4px; }
.userchip b { font-size: 13.5px; display: block; line-height: 1.1; }
.userchip small { font-size: 11.5px; color: var(--muted); display: block; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--brand-100); color: var(--brand-700); }
.avatar.sq { border-radius: 14px; }
.menu-btn { display: none; }
.content { padding: 22px 24px 34px; max-width: 1560px; margin: 0 auto; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; max-width: 1560px; margin: 0 auto; padding: 4px 24px 18px; color: var(--muted); font-size: 12px; font-weight: 600; }

/* Alt menü (yalnız mobil) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none;
  height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14, 22, 48, .06);
}
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700; position: relative; }
.bottom-nav a .ic, .bottom-nav button .ic { width: 24px; height: 24px; }
.bottom-nav a.on { color: var(--brand); }
.bottom-nav a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--brand); border-radius: 0 0 3px 3px; }
.bottom-nav .fab { width: 62px; height: 62px; margin-top: -24px; border-radius: 20px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(47, 91, 234, .45); border: 4px solid var(--surface); }
.bottom-nav .fab .ic { width: 30px; height: 30px; }
.scrim { position: fixed; inset: 0; background: rgba(8, 12, 30, .5); z-index: 25; }

/* Tablet: menü daralır, sadece ikon */
@media (max-width: 1180px) and (min-width: 761px) {
  :root { --rail-w: 92px; }
  .rail { padding: 12px 8px; }
  .rail-brand { justify-content: center; padding: 4px 0 12px; }
  .rail-brand > div:not(.logo), .rail-group, .rail-co > div, .rail a .soon { display: none; }
  .rail-co { justify-content: center; padding: 8px; }
  .rail a { flex-direction: column; justify-content: center; gap: 3px; min-height: 62px; padding: 6px 4px; font-size: 11px; text-align: center; line-height: 1.15; }
  .rail a .cnt { position: absolute; top: 4px; right: 8px; margin: 0; min-width: 18px; height: 18px; font-size: 10px; padding: 0 4px; }
  .searchbox { min-width: 0; } .searchbox span, .searchbox kbd { display: none; }
}
/* Telefon: menü çekmece olur, alt bar görünür */
@media (max-width: 760px) {
  :root { --rail-w: 0px; --top-h: 60px; }
  .rail { width: 286px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .rail.open { transform: none; }
  .menu-btn { display: grid; }
  .bottom-nav { display: flex; }
  .topbar { padding: 0 8px; gap: 4px; }
  .topbar .title .pic, .searchbox, .userchip > div, .hide-sm { display: none !important; }
  .userchip { padding: 3px; border: 0; }
  .topbar h1 { font-size: 17.5px; }
  .content { padding: 14px 12px 24px; }
  .app-foot { padding: 4px 12px 14px; }
}

/* ---------------- 6. KART & KPI ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }
.card-h h2 .ic, .card-h h3 .ic { color: var(--brand); }
.card-h .sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 26px; letter-spacing: -.025em; }
.page-head p { color: var(--muted); font-weight: 600; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* KPI kutuları (renkli, mini grafikli) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 16px 18px 12px; color: #fff;
  min-height: 136px; display: flex; flex-direction: column; text-decoration: none; box-shadow: var(--shadow);
}
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.kpi .top { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; opacity: .95; }
.kpi .top .ki { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.kpi .top .ki .ic { width: 18px; height: 18px; }
.kpi .v { font-size: clamp(21px, 2vw, 27px); font-weight: 800; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .d { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; opacity: .95; }
.kpi .d .ic { width: 15px; height: 15px; }
.kpi .spark { margin-top: auto; height: 34px; margin-left: -4px; margin-right: -4px; }
.kpi.k1 { background: linear-gradient(135deg, #3b6cff, #6a3df0); }
.kpi.k2 { background: linear-gradient(135deg, #10b981, #0b8f74); }
.kpi.k3 { background: linear-gradient(135deg, #ff8a3d, #e5533b); }
.kpi.k4 { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.kpi.k5 { background: linear-gradient(135deg, #ec4899, #9333ea); }

/* Sade istatistik kutusu */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.stat .si { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.stat .v { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .l { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat.ok .si { background: var(--ok-bg); color: var(--ok); } .stat.ok .v { color: var(--ok); }
.stat.danger .si { background: var(--danger-bg); color: var(--danger); } .stat.danger .v { color: var(--danger); }
.stat.warn .si { background: var(--warn-bg); color: var(--warn); }
.stat.violet .si { background: var(--violet-bg); color: var(--violet); }
.stat.info .si { background: var(--info-bg); color: var(--info); }

/* Modül bilgi kartları (info-grafik) */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mod {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .1s, border-color .15s, box-shadow .15s; position: relative;
}
.mod:hover { transform: translateY(-2px); border-color: var(--brand-100); box-shadow: var(--shadow); }
.mod .mh { display: flex; align-items: center; gap: 10px; }
.mod .mi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }
.mod .mt { font-weight: 800; font-size: 15px; }
.mod .ms { font-size: 12px; color: var(--muted); font-weight: 600; }
.mod .mv { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mod .bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.mod .bar i { display: block; height: 100%; border-radius: 4px; }
.mod .mf { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.mod.lock { opacity: .55; }
.mod.lock::after { content: "Yetki yok"; position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 8px; background: var(--surface-3); color: var(--muted); }

/* Rozetler */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); }
.badge .ic { width: 14px; height: 14px; }
.b-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.b-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.b-violet { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-line); }
.b-brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
[data-theme="dark"] .badge { border-color: transparent; }

/* Sekmeler */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 14px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }
.tabs button { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; }
.tabs button.on { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .tabs button.on { color: #b9c9ff; }

/* ---------------- 7. LİSTE & TABLO ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 280px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ccard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .08s;
}
.ccard:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.ccard:active { transform: scale(.995); }
.ccard .hd { display: flex; gap: 12px; align-items: center; }
.ccard .nm { font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.ccard .sb { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ccard .bal { text-align: right; flex: none; }
.ccard .bal b { display: block; font-size: 16.5px; font-variant-numeric: tabular-nums; }
.ccard .bal small { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ccard .ft { display: flex; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.ccard .ft a, .ccard .ft button { flex: 1; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); background: var(--surface-2); }
.ccard .ft a:hover, .ccard .ft button:hover { background: var(--brand-50); color: var(--brand); }
.ccard .ft .ic { width: 18px; height: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--brand-50); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 800; background: var(--surface-2); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.empty .ic { width: 46px; height: 46px; margin: 0 auto 10px; color: var(--line-strong); }

/* Yükleniyor iskeleti */
.sk { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------- 8. DASHBOARD WIDGETLARI (sürükle-bırak) ---------------- */
.widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.w { grid-column: span 6; min-width: 0; }
.w.w-4 { grid-column: span 4; } .w.w-8 { grid-column: span 8; } .w.w-12 { grid-column: span 12; }
@media (max-width: 1180px) { .w, .w.w-4, .w.w-8 { grid-column: span 6; } .w.w-12 { grid-column: span 12; } }
@media (max-width: 860px) { .w, .w.w-4, .w.w-8, .w.w-12 { grid-column: span 12; } }
.w > .card { height: 100%; }
.w .grip { cursor: grab; color: var(--muted); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; touch-action: none; }
.w .grip:hover { background: var(--surface-3); }
.w.dragging { opacity: .4; }
.w.drop-before > .card { box-shadow: -4px 0 0 var(--brand), var(--shadow); }
.w.drop-after > .card { box-shadow: 4px 0 0 var(--brand), var(--shadow); }
body.edit-mode .w > .card { outline: 2px dashed var(--brand-100); outline-offset: 3px; }
.w-ghost { position: fixed; pointer-events: none; z-index: 300; opacity: .9; transform: rotate(1.5deg); box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }

/* Liste satırı (yaklaşan vadeler, son işlemler) */
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.lrow:last-child { border-bottom: 0; }
.lrow .li-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.lrow .t { font-weight: 700; font-size: 14.5px; }
.lrow .s { font-size: 12px; color: var(--muted); font-weight: 600; }
.lrow .a { margin-left: auto; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Yatay çubuk (en çok borçlu cariler) */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar .tp { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.hbar .tp span:last-child { font-variant-numeric: tabular-nums; }
.hbar .tr { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.hbar .tr i { display: block; height: 100%; border-radius: 5px; background: var(--brand-grad); }

/* ---------------- 9. TAKVİM ---------------- */
.cal-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-h b { flex: 1; text-align: center; font-size: 15px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dn { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal .d {
  aspect-ratio: 1 / .86; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-weight: 700; font-size: 13.5px; position: relative; border: 1px solid transparent; background: var(--surface-2);
}
.cal .d.out { opacity: .35; background: transparent; }
.cal .d.today { border-color: var(--brand); color: var(--brand); }
.cal .d.sel { background: var(--brand); color: #fff; }
.cal .d .dots { display: flex; gap: 3px; height: 6px; }
.cal .d .dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal .d.drop { outline: 2px dashed var(--brand); }
.ev { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--brand); cursor: grab; }
.ev + .ev { margin-top: 6px; }
.ev .t { font-weight: 700; font-size: 13.5px; }
.ev .s { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------------- 10. MODAL / ALT SAYFA ---------------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 30, .55); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .15s ease; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal.wide { width: min(960px, 100%); } .modal.narrow { width: min(440px, 100%); }
.modal-h { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17.5px; font-weight: 800; flex: 1; min-width: 0; }
.modal-h .pic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.modal-b { padding: 16px; }
.modal-f { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.modal-f .btn { flex: 1 1 130px; }
@media (max-width: 640px) {
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 22px 22px 0 0; width: 100% !important; }
  .modal::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto -4px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }

/* Bildirim (toast) */
.toast { position: fixed; left: 50%; transform: translateX(-50%); z-index: 200; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 14px; font-weight: 700; background: #0e1630; color: #fff; box-shadow: var(--shadow-lg); max-width: calc(100vw - 24px); animation: pop .2s ease; }
@media (max-width: 760px) { .toast { bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom)); } }
.toast.ok { background: #0b6b3f; } .toast.err { background: #8e1f19; } .toast.warn { background: #b45309; }

/* Seçenek listesi (paylaş menüsü vb.) */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: 13px; text-align: center; color: var(--text); text-decoration: none; }
.opt:hover { border-color: var(--brand-100); background: var(--brand-50); }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.linkbox input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--mono); font-size: 13px; outline: none; color: var(--text); }
.qr-wrap { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr-wrap svg, .qr-wrap img { width: 220px; height: 220px; }

/* ---------------- 11. KOMUT PALETİ (genel arama, Ctrl+K) ---------------- */
.cmd { position: fixed; inset: 0; z-index: 150; background: rgba(8, 12, 30, .5); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 14px 14px; animation: fade .12s; }
.cmd-box { width: min(640px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .15s; }
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.cmd-in input { flex: 1; height: 54px; border: 0; outline: none; background: transparent; font-size: 17px; color: var(--text); }
.cmd-list { max-height: 56vh; overflow: auto; padding: 8px; }
.cmd-g { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.cmd-i { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border-radius: 12px; }
.cmd-i.on, .cmd-i:hover { background: var(--brand-50); }
.cmd-i .t { font-weight: 700; } .cmd-i .s { font-size: 12px; color: var(--muted); }
.cmd-i .k { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); }
@media (max-width: 640px) { .cmd { padding-top: 12px; } }

/* ---------------- 12. KAMERA / QR OKUYUCU ---------------- */
.scanbox { position: relative; border-radius: var(--radius); overflow: hidden; background: #070b18; aspect-ratio: 4 / 3; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox .frame { position: absolute; inset: 16% 22%; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .38); border: 4px solid rgba(110, 160, 255, .95); }
.scanbox .laser { position: absolute; left: 24%; right: 24%; height: 3px; background: #7aa2ff; top: 50%; animation: laser 1.8s ease-in-out infinite; box-shadow: 0 0 12px #7aa2ff; }
.scanbox .msg { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-weight: 700; text-shadow: 0 1px 4px #000; }
@keyframes laser { 0%, 100% { top: 22%; } 50% { top: 76%; } }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); font-weight: 600; transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .fx { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; padding: 6px; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.thumb button .ic { width: 15px; height: 15px; }

/* ---------------- 13. GİRİŞ EKRANI ---------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 34px 44px; display: flex; flex-direction: column;
  background:
    radial-gradient(700px 420px at 10% 0%, rgba(106, 61, 240, .55), transparent 60%),
    radial-gradient(800px 520px at 100% 100%, rgba(59, 108, 255, .6), transparent 60%),
    linear-gradient(160deg, #0d1530, #121c44);
}
.login-art .top { display: flex; align-items: center; gap: 14px; }
.login-art .top b { font-size: 22px; letter-spacing: -.02em; }
.login-art .top small { display: block; color: #a7b4e6; font-weight: 600; }
.login-art .clock { margin-left: auto; text-align: right; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.login-art .clock small { display: block; font-size: 12.5px; color: #a7b4e6; font-weight: 600; }
.login-art .mid { margin: auto 0; padding: 26px 0; }
.login-art h2 { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.08; letter-spacing: -.03em; max-width: 15ch; }
.login-art h2 em { font-style: normal; background: linear-gradient(90deg, #8fb0ff, #d6a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-art p { color: #c1cbef; font-size: 17px; margin-top: 12px; max-width: 42ch; }
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; max-width: 620px; }
.feat div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-weight: 700; font-size: 14.5px; }
.feat .ic { color: #9db7ff; }
/* Uçan mini grafik kartı (görsel süs) */
.float-card { position: absolute; right: 44px; top: 120px; width: 230px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); animation: float 6s ease-in-out infinite; }
.float-card small { color: #b8c4f0; font-weight: 700; font-size: 12px; } .float-card b { display: block; font-size: 22px; margin: 2px 0 6px; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 1250px) { .float-card { display: none; } }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 34px clamp(18px, 5vw, 70px); position: relative; }
.login-card { width: 100%; max-width: 480px; margin: 0 auto; }
.login-card .logo { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 18px; font-size: 26px; }
.login-card h1 { font-size: 30px; letter-spacing: -.025em; }
.login-card .lead { color: var(--muted); font-size: 16px; margin: 4px 0 22px; }
.login-card .field input { min-height: 60px; font-size: 17px; border-radius: 15px; }
.login-card .btn-login { min-height: 62px; font-size: 18px; border-radius: 16px; width: 100%; margin-top: 4px; }
.vt-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--brand-50); border: 1px solid var(--brand-100); margin-bottom: 16px; }
.vt-card b { display: block; font-size: 14.5px; } .vt-card small { color: var(--muted); font-weight: 600; font-size: 12px; font-family: var(--mono); }
.login-err { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--danger-bg); color: var(--danger); font-weight: 700; margin-bottom: 14px; }
.login-foot { display: flex; justify-content: center; gap: 22px; margin-top: 26px; }
.login-foot a, .login-foot button { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.login-foot span.i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--brand); box-shadow: var(--shadow-sm); }
.co-list { display: flex; flex-direction: column; gap: 10px; }
.co-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.co-item:hover { border-color: var(--brand); background: var(--brand-50); }
.co-item .t { font-weight: 800; } .co-item .s { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.demo-note { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 13.5px; display: flex; gap: 10px; }
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 20px 18px 24px; }
  .login-art .mid { padding: 18px 0 0; }
  .login-art .mid p, .feat { display: none; }
  .login-art h2 { font-size: 25px; max-width: none; }
  .login-form { padding: 22px 16px 36px; justify-content: flex-start; }
}

/* ---------------- 14. CARİ KART (profil başlığı) ---------------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 20px; color: #fff; margin-bottom: 16px;
  background: radial-gradient(500px 260px at 100% 0%, rgba(160, 120, 255, .45), transparent 60%), linear-gradient(135deg, #18234a, #2f5bea);
  box-shadow: var(--shadow);
}
.hero .hd { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero .avatar { width: 64px; height: 64px; font-size: 24px; border-radius: 20px; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.hero h2 { font-size: 23px; letter-spacing: -.02em; line-height: 1.2; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hero .meta .badge { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .2); }
.hero .balance { margin-left: auto; text-align: right; }
.hero .balance small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c8d4ff; }
.hero .balance b { font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .risk { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hero .risk > div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .1); }
.hero .risk small { display: block; font-size: 11.5px; color: #c8d4ff; font-weight: 700; }
.hero .risk b { font-size: 16px; font-variant-numeric: tabular-nums; }
.gauge-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin-top: 6px; overflow: hidden; }
.gauge-track i { display: block; height: 100%; border-radius: 4px; background: #7ef0c1; }
.gauge-track i.w { background: #ffd27a; } .gauge-track i.d { background: #ff8a80; }
@media (max-width: 760px) {
  .hero .balance { margin-left: 0; text-align: left; width: 100%; }
  .hero .risk { grid-template-columns: 1fr 1fr; }
}
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { font-weight: 700; word-break: break-word; }
.kv dd a { text-decoration: none; }
@media (max-width: 640px) { .kv { grid-template-columns: 116px 1fr; } }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
.tl { list-style: none; position: relative; }
.tl li { position: relative; padding: 0 0 16px 34px; }
.tl li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.tl .dot .ic { width: 13px; height: 13px; }
.tl .t { font-weight: 700; font-size: 14px; } .tl .s { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Sabit alt eylem çubuğu (mobilde Kaydet vb.) */
.actionbar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (max-width: 760px) { .actionbar { bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding: 10px 0; } }
.actionbar .btn { flex: 1; }

/* Yüzen ekle butonu (liste ekranı) */
.fab-add { position: fixed; right: 22px; bottom: 26px; z-index: 30; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--brand-grad); box-shadow: 0 12px 28px rgba(47, 91, 234, .45); }
.fab-add .ic { width: 28px; height: 28px; }
@media (max-width: 760px) { .fab-add { bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); right: 16px; } }

/* ---------------- 15. SİHİRBAZ (adım adım form) ---------------- */
.wiz { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.wiz > * { min-width: 0; }
.wiz-steps { position: sticky; top: calc(var(--top-h) + 16px); display: flex; flex-direction: column; gap: 6px; }
.wiz-steps button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; color: var(--text-2); font-weight: 700; }
.wiz-steps button .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; flex: none; }
.wiz-steps button small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wiz-steps button.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); }
.wiz-steps button.on .n { background: var(--brand-grad); color: #fff; }
.wiz-steps button.done .n { background: var(--ok); color: #fff; }
.wiz-steps button.bad .n { background: var(--danger); color: #fff; }
.wiz-prog { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 4px 0 8px; }
.wiz-prog i { display: block; height: 100%; background: var(--brand-grad); transition: width .2s; }
.wiz-sec { display: none; } .wiz-sec.on { display: block; animation: fade .15s; }
@media (max-width: 900px) {
  .wiz { grid-template-columns: 1fr; }
  .wiz-steps { position: static; flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .wiz-steps::-webkit-scrollbar { display: none; }
  .wiz-steps button { flex: none; padding: 8px 10px; }
  .wiz-steps button small { display: none; }
}
.preview-card { border-radius: var(--radius); border: 1px dashed var(--line-strong); padding: 14px; display: flex; gap: 12px; align-items: center; background: var(--surface-2); }

/* ---------------- 16. KÜÇÜK EKRAN İNCE AYARLARI ---------------- */
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { min-height: 118px; padding: 12px 12px 8px; border-radius: 18px; }
  .kpi .top { font-size: 12px; } .kpi .top .ki { width: 28px; height: 28px; }
  .kpi .v { font-size: 18px !important; margin-top: 6px; }
  .card { padding: 15px; border-radius: 18px; }
  .page-head h2 { font-size: 21px; }
  .cards { grid-template-columns: 1fr; }
  .mods { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; } .stat .v { font-size: 16px; } .stat .si { width: 38px; height: 38px; }
  .stat.genis { grid-column: 1 / -1; }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .qa { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px 2px; }
  .qa::-webkit-scrollbar { display: none; }
  .qa a, .qa button { flex: 0 0 76px; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar select { flex: 1; }
  .toolbar .gorunum [data-g="tablo"] { display: none; }
}

/* ---------------- 17. YAZDIRMA ---------------- */
@media print {
  body { background: #fff !important; }
  .rail, .topbar, .bottom-nav, .toast, .modal-back, .fab-add, .actionbar, .no-print { display: none !important; }
  .shell { padding: 0 !important; } .content { padding: 0 !important; max-width: none; }
}
.qr-wrap.qr-sm svg { width: 150px; height: 150px; }

/* ---------------- 18. BÜYÜK TAKVİM (servis, çek/senet vade) ---------------- */
.takvim-buyuk { gap: 6px; }
.takvim-buyuk .d.tg { aspect-ratio: auto; min-height: 104px; align-items: stretch; justify-content: flex-start; padding: 6px; gap: 4px; text-align: left; overflow: hidden; }
.takvim-buyuk .d.tg .gn { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.takvim-buyuk .d.today .gn { color: var(--brand); }
.tev { font-size: 11.5px; font-weight: 700; padding: 3px 6px; border-radius: 6px; background: var(--surface); border-left: 3px solid var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; box-shadow: var(--shadow-sm); }
.tev:hover { background: var(--brand-50); }
@media (max-width: 760px) { .takvim-buyuk .d.tg { min-height: 64px; padding: 3px; } .tev { font-size: 0; padding: 0; height: 6px; border-left-width: 6px; border-radius: 3px; } }

/* ---------------- 19. BELGE EDİTÖRÜ (fatura, sipariş, irsaliye, teklif) ---------------- */
.kalemler { display: flex; flex-direction: column; gap: 8px; }
.kalem { display: grid; grid-template-columns: 26px minmax(180px, 1fr) 124px 160px 66px 66px 78px 112px 34px; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.kalem.drag { opacity: .4; }
.kalem .tut { cursor: grab; color: var(--muted); display: grid; place-items: center; touch-action: none; }
.kalem input, .kalem select { min-height: 42px !important; height: 42px; padding: 0 10px !important; border-radius: 10px !important; font-size: 15px !important; width: 100%; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); }
.kalem .ad small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.kalem .mk { display: flex; align-items: center; gap: 2px; }
.kalem .mk button { width: 32px; height: 42px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; flex: none; }
.kalem .mk input { text-align: center; padding: 0 4px !important; }
.kalem .tt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.kalem .lbl { display: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.kalem-bas { display: grid; grid-template-columns: 26px minmax(180px, 1fr) 124px 160px 66px 66px 78px 112px 34px; gap: 8px; padding: 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) {
  .kalem-bas { display: none; }
  .kalem { grid-template-columns: 22px 1fr 1fr 1fr 36px; grid-template-areas: "t a a a x" "t m m f f" "t i j k k" "t s s s s"; }
  .kalem .tut { grid-area: t; align-self: start; padding-top: 10px; } .kalem .ad { grid-area: a; } .kalem .mk-w { grid-area: m; } .kalem .fy { grid-area: f; } .kalem .is { grid-area: i; } .kalem .is2 { grid-area: j; } .kalem .kd { grid-area: k; } .kalem .tt { grid-area: s; text-align: left; display: flex; gap: 10px; align-items: baseline; } .kalem .sil, .kalem .menu-b { grid-area: x; justify-self: end; align-self: start; }
  .kalem .lbl { display: block; margin-bottom: 2px; }
}
.toplam-kutu { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.toplam-kutu .r { display: flex; justify-content: space-between; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.toplam-kutu .g { font-size: 22px; font-weight: 800; color: var(--text); padding-top: 6px; border-top: 1px dashed var(--line-strong); }
.belge-alt { position: sticky; bottom: 0; z-index: 14; display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 0 -2px; border-radius: 16px; background: var(--nav); color: #fff; box-shadow: var(--shadow-lg); }
.belge-alt .tp { margin-right: auto; } .belge-alt .tp small { display: block; color: #a7b4e6; font-size: 11.5px; font-weight: 700; } .belge-alt .tp b { font-size: 20px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .belge-alt { bottom: calc(var(--bottom-h) + 6px + env(safe-area-inset-bottom)); } }
.adim-bag { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adim-bag a { text-decoration: none; }
.ozet-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-3); margin-top: 8px; }
.ozet-bar i { display: block; height: 100%; }

/* ---------------- Yönetim ekranları (kullanıcı, ayarlar, profil, e-belge) ---------------- */
.two-dar { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
.two-dar > *, .two > * { min-width: 0; }
@media (max-width: 1100px) { .two-dar { grid-template-columns: 1fr; } }
#mx td, #mx th { padding: 8px 6px; }
#mx td:first-child { min-width: 150px; }
.param-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.param-row:last-child { border-bottom: 0; }
@media (max-width: 640px) { .param-row { grid-template-columns: 1fr auto; } .param-row > :first-child { grid-column: 1 / -1; } }
/* Taşma koruması: ızgara çocukları içerik genişliğine göre büyümesin (telefonda yatay kayma olmasın) */
.grid-2 > *, .grid-3 > *, .mods > *, .stats > * { min-width: 0; }
.mod .ms, .mod .mt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .seg button { flex: 1 1 40%; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: normal; text-align: center; } }

/* ---------------- Menü altı kullanıcı bölümü (sadece telefonda çekmecede) ---------------- */
.rail-user { display: none; margin-top: 14px; padding: 14px 6px 4px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; }
.rail-user small { color: #8796c4; font-size: 12px; }
@media (max-width: 760px) {
  .rail-user { display: block; padding-bottom: 96px; }
  .tbtn { width: 40px; height: 40px; }
  .topbar { gap: 2px; }
  .userchip .avatar { width: 34px; height: 34px; font-size: 13px; }
}

/* ---------------- Yatay kart sırası (banka hesapları, kasalar) ---------------- */
.yatay-kap { position: relative; }
.yatay { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 6px; outline: none; }
.yatay::-webkit-scrollbar { display: none; }
.yatay > * { flex: 0 0 236px; scroll-snap-align: start; min-width: 0; }
.yatay > .on { outline: 2px solid var(--brand); outline-offset: -2px; }
.yatay-ok { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 2; }
.yatay-ok.sol { left: -10px; } .yatay-ok.sag { right: -10px; }
.yatay-ok[hidden] { display: none; }
@media (max-width: 760px) { .yatay > * { flex-basis: 78%; } .yatay-ok { display: none; } }

/* ---------------- Taşma düzeltmeleri (liste/kart) ---------------- */
.nowrap { white-space: nowrap; }
.row.nowrap { flex-wrap: nowrap !important; }
.tbl td:last-child .row { flex-wrap: nowrap; }
.tbl td.r .btn-icon, .tbl .btn-icon.btn-sm { width: 32px; height: 32px; min-height: 32px; padding: 0; }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.ccard, .ccard .hd > .grow, .ccard .hd > div:not(.avatar):not(.bal) { min-width: 0; }
.ccard .nm { overflow-wrap: anywhere; }
.ccard .bal { max-width: 46%; }
.ccard .bal b { white-space: nowrap; }
.ccard .row { flex-wrap: wrap; }
@media (max-width: 760px) {
  .ccard { padding: 12px; }
  .ccard .bal b { font-size: 15px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* Geniş takvim (servis / iş programı) */
.takvim-buyuk .d.tg { min-height: 128px; }
.takvim-buyuk .tev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.takvim-buyuk.hafta .d.tg { min-height: 380px; }
.takvim-buyuk.hafta .tev { -webkit-line-clamp: 4; font-size: 12.5px; padding: 6px 8px; }
.cal-h .seg button { min-height: 34px; padding: 0 12px; }
@media (max-width: 760px) { .takvim-buyuk.hafta { grid-template-columns: 1fr; } .takvim-buyuk.hafta .dn { display: none; } .takvim-buyuk.hafta .d.tg { min-height: 60px; } .takvim-buyuk.hafta .tev { font-size: 13px; height: auto; padding: 6px 8px; border-left-width: 3px; } }

/* Üst bar döviz kuru çipi (kurlar.html) — telefonda gizli */
.kurchip { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.kurchip[hidden] { display: none; }
.kurchip small { color: var(--muted); font-weight: 700; margin-right: 3px; }
.kurchip b { font-family: "JetBrains Mono", monospace; font-weight: 700; }
@media (max-width: 1100px) { .kurchip { display: none !important; } }
.tbtn[hidden] { display: none; }

/* Notlar & Dokümanlar zaman akışı (notlar.html) */
.nt-liste { display: flex; flex-direction: column; gap: 8px; }
.nt-gun { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 2px 2px; }
.nt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.nt-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.nt-res { width: 56px; height: 56px; border-radius: 11px; object-fit: cover; flex: none; cursor: zoom-in; background: var(--bg); }
.nt-b { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.nt-m { font-size: 13.5px; color: var(--text-2, var(--muted)); margin-top: 3px; overflow-wrap: anywhere; max-height: 8.5em; overflow: hidden; }
.nt-e { display: flex; gap: 2px; flex: none; }
.nt-bag { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .nt { padding: 10px; gap: 10px; } .nt-e { flex-direction: column; } }

/* ---------------- 19. BELGE FORMU EKLERİ (detay grupları, dip toplam, satır menüsü) ---------------- */
.kalem .tt small { display: block; font-size: 11px; font-weight: 700; }
.kalem-arac { flex-wrap: wrap; justify-content: flex-end; }
.bgrup { border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--surface-2); }
.bgrup > summary { cursor: pointer; padding: 12px 14px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--text-2); list-style: none; }
.bgrup > summary::-webkit-details-marker { display: none; }
.bgrup > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--muted); }
.bgrup[open] > summary::after { content: "−"; }
.bgrup > div { padding: 0 14px 6px; }
#kurAlan.kur-tl > .field:nth-child(1), #kurAlan.kur-tl > .field:nth-child(2) { opacity: .55; }
.dip { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.dip-sol { display: flex; flex-direction: column; gap: 10px; }
.kar-kutu { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.kar-kutu b { color: var(--text); }
.menu-liste { display: flex; flex-direction: column; gap: 4px; }
.menu-liste button { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; font-weight: 700; text-align: left; }
.menu-liste button:hover { background: var(--surface-3); }
.fiyat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fiyat-b { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.fiyat-b:hover:not([disabled]) { border-color: var(--brand); }
.fiyat-b[disabled] { opacity: .45; }
.fiyat-b small { color: var(--muted); font-weight: 700; font-size: 12px; }
.sg-belge { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.t-brand { color: var(--brand); }

/* ---------------- 20. BELGE GÖRÜNÜMÜ (kâğıt belge) ---------------- */
.evrak-ust { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.evrak-ust .qa { flex: 1 1 auto; }
.evrak-duzen { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.evrak-kap { overflow-x: auto; }
.evrak { background: #fff; color: #1b2133; max-width: 900px; margin: 0 auto; padding: 36px 40px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px rgba(15,23,42,.12); font-size: 13.5px; line-height: 1.45; }
.evrak .muted, .evrak .tiny.muted { color: #6b7385; }
.ev-bas { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid #1b2133; }
.ev-firma { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ev-firma b { display: block; font-size: 16px; }
.ev-firma small { display: block; color: #5b6478; font-size: 12px; }
.ev-logo { width: 48px; height: 48px; border-radius: 12px; background: #1b2133; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.ev-baslik { text-align: right; flex: none; }
.ev-baslik h2 { font-size: 20px; letter-spacing: .04em; margin: 0 0 4px; }
.ev-baslik .mono { font-size: 13px; color: #5b6478; }
.ev-ust { display: grid; grid-template-columns: 1fr 260px; gap: 18px; margin: 18px 0; }
.ev-muhatap { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #d9dde6; border-radius: 8px; }
.ev-muhatap small { font-weight: 800; color: #6b7385; font-size: 11px; letter-spacing: .08em; }
.ev-muhatap b { font-size: 15px; }
.ev-muhatap span { color: #3b4357; font-size: 12.5px; }
.ev-sevk { margin-top: 4px; font-style: italic; }
.ev-bilgi { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; padding: 12px 14px; border: 1px solid #d9dde6; border-radius: 8px; font-size: 12.5px; align-content: start; }
.ev-bilgi dt { color: #6b7385; font-weight: 700; }
.ev-bilgi dd { margin: 0; font-weight: 700; text-align: right; }
.ev-konu { margin: -6px 0 12px; }
.ev-tablo { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ev-tablo th { background: #1b2133; color: #fff; text-align: left; padding: 8px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.ev-tablo td { padding: 8px; border-bottom: 1px solid #e6e9ef; vertical-align: top; }
.ev-tablo tr:nth-child(even) td { background: #f7f8fb; }
.ev-tablo .r { text-align: right; }
.ev-alt { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-top: 16px; align-items: start; }
.ev-notlar p { margin: 0 0 8px; }
.ev-yazi { font-style: italic; }
.ev-sart ol { margin: 4px 0 8px 18px; padding: 0; }
.ev-uzun { white-space: normal; color: #3b4357; }
.evrak .toplam-kutu { background: #f7f8fb; border-color: #d9dde6; color: #1b2133; }
.evrak .toplam-kutu .r { color: #3b4357; }
.evrak .toplam-kutu .g { color: #1b2133; border-color: #b9bfcc; }
.ev-imza { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.ev-imza div { border-top: 1px solid #b9bfcc; padding-top: 6px; min-height: 48px; }
.ev-imza small { display: block; color: #6b7385; font-weight: 700; font-size: 11.5px; }
@media (max-width: 1100px) { .evrak-duzen { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .evrak { padding: 18px 14px; border-radius: 14px; font-size: 13px; }
  .ev-bas { flex-direction: column; gap: 10px; }
  .ev-baslik { text-align: left; }
  .ev-ust, .ev-alt { grid-template-columns: 1fr; }
  .ev-tablo thead { display: none; }
  .ev-tablo, .ev-tablo tbody, .ev-tablo tr, .ev-tablo td { display: block; width: 100%; }
  .ev-tablo tr { border-bottom: 1px solid #e6e9ef; padding: 6px 0; }
  .ev-tablo td { border: 0; padding: 2px 0; background: none !important; }
  .ev-tablo td:first-child { display: none; }
  .ev-tablo td.r { text-align: left; display: inline-block; width: auto; margin-right: 12px; }
  .ev-imza { gap: 16px; }
}

/* Paylaşım sayfası onay / mutabakat kutusu */
.onay-kutu.ok { display: flex; gap: 12px; align-items: center; background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.onay-kutu.ok b { color: var(--ok); }

/* ---------------- 21. HIZLI SATIŞ ---------------- */
.hs { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.hs-okut { display: flex; gap: 8px; margin-bottom: 12px; }
.hs-okut .input { height: 56px; font-size: 18px; }
.hs-sepet { padding: 8px; min-height: 360px; }
.hs-satirlar { display: flex; flex-direction: column; gap: 6px; }
.hs-satir { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.hs-satir.son { border-color: var(--brand); background: var(--brand-50); }
.hs-satir b { display: block; }
.hs-satir small { display: block; font-size: 12px; }
.hs-satir .mk { display: flex; align-items: center; gap: 2px; flex: none; }
.hs-satir .mk button { width: 34px; height: 38px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; }
.hs-satir .mk input { width: 64px; height: 38px; text-align: center; border: 1.5px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); font-weight: 700; }
.hs-tutar { display: flex; align-items: center; gap: 2px; min-width: 150px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.hs-sag { position: sticky; top: 80px; }
.hs-toplam { padding: 16px; border-radius: 16px; background: var(--nav); color: #fff; display: flex; flex-direction: column; }
.hs-toplam small { opacity: .75; font-weight: 700; }
.hs-toplam b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hs-toplam span { color: rgba(255,255,255,.7) !important; }
.hs-ustu-b { padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.hs-ustu-b.ok { background: var(--ok-bg); color: var(--ok); }
.hs-odeme { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hs-odeme .btn { min-height: 64px; font-size: 17px; font-weight: 800; color: #fff; flex-direction: column; gap: 2px; }
.hs-odeme .btn kbd { font-size: 10.5px; opacity: .8; background: rgba(255,255,255,.18); border-radius: 5px; padding: 1px 6px; font-family: inherit; }
.hs-nakit { background: #0b8a52; grid-column: 1 / -1; } .hs-kart { background: #2f5bea; } .hs-veresiye { background: #b45309; }
.hs-odeme .btn[disabled] { opacity: .4; }
@media (max-width: 980px) { .hs { grid-template-columns: 1fr; } .hs-sag { position: static; } .hs-tutar { min-width: 0; } .hs-satir { flex-wrap: wrap; } .hs-satir > .grow { flex-basis: 100%; } }

/* ---------------- 22. RAPORLAR ---------------- */
.rp { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-menu { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
.rp-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--text-2); text-align: left; font-size: 14px; }
.rp-menu button.on { background: var(--brand-50); color: var(--brand-700); }
.rp-tablo { max-height: 68vh; overflow: auto; }
.rp-tablo thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.rp-tablo tfoot td { position: sticky; bottom: 0; background: var(--surface-2); border-top: 2px solid var(--line-strong); }
.rp-tablo th.sirala { cursor: pointer; user-select: none; white-space: nowrap; }
@media (max-width: 900px) { .rp { grid-template-columns: 1fr; } .rp-menu { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; } .rp-menu button { flex: none; } }

/* ===== 23. SMS (sms.html) ===== */
.sms-liste { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.sms-satir { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.sms-satir:last-child { border-bottom: 0; }
.sms-satir:hover { background: var(--surface-2); }
.sms-onizleme { background: var(--surface-2); border-radius: 14px; padding: 14px; min-height: 90px; }
.sms-balon { background: #0b7fc7; color: #fff; padding: 10px 14px; border-radius: 16px 16px 16px 4px; max-width: 90%; font-size: 14px; line-height: 1.45; word-break: break-word; }
.sms-gec { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sms-gec .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 9px; background: var(--ok); }
.sms-gec .dot.err { background: var(--danger); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ===== 24. Dönem devri (devir.html) ===== */
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dv-kalem { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.dv-kalem:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.dv-kalem input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 20px; }
.dv-kalem b { display: block; }
.dv-kalem .tiny { margin-top: 3px; }
.dv-sonuc li { padding: 4px 0; }
/* Kart resmi (cari / stok ana resim) */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.hero .avatar:has(img) { background: #fff; overflow: hidden; }
.thumb button.ana { right: auto; left: 4px; }
.thumb button.ana.on { background: #f5b301; }
/* Pasif cari: kırmızı */
.ccard.pasif { border-color: rgba(239, 68, 68, .55); background: linear-gradient(0deg, rgba(239, 68, 68, .05), rgba(239, 68, 68, .05)), var(--surface); }
.ccard.pasif .nm, tr.pasif td b { color: var(--danger) !important; }
select.sel-pasif { color: #fff; background-color: var(--danger) !important; border-color: var(--danger) !important; font-weight: 800; }
/* Gelir / giriş yeşil, gider / çıkış kırmızı (kasa, banka) */
.seg button.seg-ok { color: var(--ok); } .seg button.seg-danger { color: var(--danger); }
.seg button.seg-ok.on { background: var(--ok); color: #fff; } .seg button.seg-danger.on { background: var(--danger); color: #fff; }
.fatura-al { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--brand); border-radius: 12px; margin-bottom: 14px; background: var(--brand-50); }
.duyuru-html img { max-width: 100%; height: auto; border-radius: 8px; }
.duyuru-html p { margin: 0 0 4px; } .duyuru-html ul, .duyuru-html ol { padding-left: 18px; margin: 4px 0; }
.duyuru-html table { border-collapse: collapse; font-size: 12px; } .duyuru-html td, .duyuru-html th { border: 1px solid var(--line); padding: 2px 6px; }

/* Şablondan yazdır penceresi (js/yazdir.js) */
.yz-liste { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.yz-sab { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 2px 4px 2px 2px; background: var(--surface); }
.yz-sab.son { border-color: var(--brand); }
.yz-sab:hover { border-color: var(--brand); }
.yz-bas { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.yz-bas .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
