/* BYZ MANAGEMENT – arayüz stilleri (koyu cam tema)
   Marka renkleri :root bloğundan değiştirilir (bkz. js/brand.js). */

/* Inter yazı tipi (SIL Open Font License 1.1, bkz. fonts/OFL.txt) – sunucudan verilir */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* BYZ MANAGEMENT – koyu cam tema, kurumsal mavi vurgu */
  --brand: #0b4ea2;
  --k-50: rgba(61, 139, 255, .10);
  --k-100: rgba(61, 139, 255, .18);
  --k-400: #6aa8ff;
  --k-500: #3d8bff;
  --k-600: #1d6fe0;
  --hdr-1: #0b4ea2;
  --hdr-2: #3d8bff;
  --accent: #ff8a3d;
  --accent-ink: #2a1200;

  --bg: #0a0f2e;
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .11);
  --glass-border: rgba(255, 255, 255, .11);
  --surface: var(--glass);
  --surface-2: rgba(255, 255, 255, .04);
  --solid: #141a44;
  --border: rgba(255, 255, 255, .10);
  --line: rgba(255, 255, 255, .16);
  --text: #dbe3f5;
  --heading: #ffffff;
  --value: #ffffff;
  --muted: rgba(219, 227, 245, .62);
  --primary: #3d8bff;
  --primary-dark: #8dbbff;
  --primary-soft: rgba(61, 139, 255, .16);
  --blue: #3d8bff;
  --yellow: var(--accent);
  --amber: #ff9f43;
  --danger: #ff5c7a;
  --danger-soft: rgba(255, 92, 122, .16);
  --warn: #ffc15a;
  --warn-soft: rgba(255, 193, 90, .16);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .16);
  --info: #5cc8ff;
  --info-soft: rgba(92, 200, 255, .16);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .18);
  --btn-shadow: none;
  --blur: blur(16px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
/* Arka plandaki bulanık renk lekeleri */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 22%, rgba(29, 111, 224, .55), transparent 70%),
    radial-gradient(34% 40% at 82% 18%, rgba(124, 58, 237, .45), transparent 70%),
    radial-gradient(40% 45% at 70% 85%, rgba(219, 39, 119, .30), transparent 70%),
    radial-gradient(35% 40% at 12% 88%, rgba(14, 165, 233, .28), transparent 70%),
    linear-gradient(160deg, #0a0f2e 0%, #121a4d 55%, #0a0f2e 100%);
  filter: blur(30px);
}
a { color: var(--primary-dark); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.3; color: var(--heading); }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.glass, .card, .stat, .sidebar, .modal {
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* ---------- Yerleşim: sol cam menü + içerik ---------- */
.app { display: flex; gap: 18px; padding: 16px; padding-top: calc(16px + var(--safe-top)); min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; position: sticky; top: 16px; height: calc(100vh - 32px);
  border-radius: 30px; display: flex; flex-direction: column; overflow: hidden; z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 16px; color: #fff; }
.brand-logo { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; box-shadow: 0 6px 18px rgba(11, 78, 162, .55); }
.brand-logo svg { width: 42px; height: 42px; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .4px; white-space: nowrap; }
.brand-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; letter-spacing: .3px; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; }
.side-nav .nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; font-weight: 600; }
.nav-link, .nav-toggle {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 6px; border-radius: 50px; color: #fff; font: inherit;
  font-size: 13.5px; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; margin: 1px 0;
}
.nav-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.nav-ic svg.i { width: 16px; height: 16px; }
.nav-link:hover, .nav-toggle:hover { background: rgba(255, 255, 255, .06); }
.nav-link.active { background: rgba(255, 255, 255, .12); }
.nav-link.active .nav-ic { background: linear-gradient(135deg, var(--k-500), var(--brand)); box-shadow: 0 4px 12px rgba(61, 139, 255, .45); }
.nav-link .lbl, .nav-toggle .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle .plus { width: 22px; text-align: center; font-size: 17px; opacity: .8; transition: transform .2s; }
.nav-sub { display: none; padding: 2px 0 6px 22px; }
.nav-sub.open { display: block; }
.nav-toggle.open .plus { transform: rotate(45deg); }
.nav-toggle.has-active { background: rgba(255, 255, 255, .06); }
.nav-sub .nav-link { font-size: 13px; padding: 5px 8px; color: var(--text); }
.nav-sub .nav-link .nav-ic { width: 8px; height: 8px; background: rgba(255, 255, 255, .25); box-shadow: none; }
.nav-sub .nav-link .nav-ic svg { display: none; }
.nav-sub .nav-link.active { color: #fff; background: rgba(255, 255, 255, .10); }
.nav-sub .nav-link.active .nav-ic { background: var(--k-500); }
.nav-link .badge { margin-left: auto; }
.side-foot { padding: 12px 20px 18px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); }
.side-foot a { color: var(--muted); font-weight: 600; }
.side-foot a:hover { color: #fff; }

/* Masaüstünde daraltılmış menü */
body.side-mini .sidebar { width: 76px; }
body.side-mini .brand-text, body.side-mini .nav-link .lbl, body.side-mini .nav-toggle .lbl, body.side-mini .plus, body.side-mini .nav-group,
body.side-mini .side-foot, body.side-mini .nav-sub, body.side-mini .nav-link .badge { display: none !important; }
body.side-mini .side-brand { justify-content: center; padding: 20px 0 14px; }
body.side-mini .nav-link, body.side-mini .nav-toggle { justify-content: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; position: relative; z-index: 30; }
.sq-btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; cursor: pointer; color: #fff;
  background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.sq-btn:hover { background: var(--glass-2); }
.crumb { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13.5px; min-width: 0; white-space: nowrap; }
.crumb .sep { opacity: .5; }
.crumb .cur { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.crumb svg.i { width: 17px; height: 17px; }
.site-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--primary-soft); color: #cfe2ff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.hdr-search {
  display: flex; align-items: center; gap: 8px; margin-left: auto; width: 240px; height: 38px; padding: 0 14px; border-radius: 999px; cursor: text;
  background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--muted);
}
.hdr-search input { background: transparent; border: 0; color: #fff; padding: 0; min-height: 0; height: 36px; font-size: 13px; box-shadow: none !important; }
.hdr-search input::placeholder { color: var(--muted); }
.hdr-actions { display: flex; gap: 8px; align-items: center; }
.hbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--glass-border); color: #fff; font: inherit; font-size: 12.5px; font-weight: 500;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.hbtn:hover { background: var(--glass-2); }
.hbtn svg.i { width: 16px; height: 16px; }
.hbtn.yellow { background: linear-gradient(135deg, var(--k-500), var(--brand)); border-color: transparent; box-shadow: 0 6px 16px rgba(61, 139, 255, .35); }
.hbtn.icon-only span { display: none; }
.hbtn.icon-only { width: 38px; padding: 0; justify-content: center; }
.user-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #7c3aed, var(--k-500)); border: 2px solid rgba(255, 255, 255, .35); }

.pagehead { display: flex; align-items: center; gap: 12px; padding: 0 0 4px; }
.pagehead h1 { font-size: 20px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view { padding: 12px 0 30px; width: 100%; }

.backdrop { display: none; }
.backdrop.show { display: block; position: fixed; inset: 0; background: rgba(3, 6, 25, .55); z-index: 55; }
.bottomnav { display: none; }

@media (max-width: 1250px) { .hdr-search { width: 180px; } .hdr-actions .hbtn:not(.yellow) span { display: none; } .hdr-actions .hbtn:not(.yellow) { width: 38px; padding: 0; justify-content: center; } }
@media (max-width: 900px) {
  .app { padding: 0; padding-top: var(--safe-top); gap: 0; }
  .sidebar { position: fixed; left: 10px; top: calc(10px + var(--safe-top)); bottom: 10px; height: auto; transform: translateX(-120%); transition: transform .22s ease; z-index: 60; background: rgba(20, 26, 68, .92); }
  .sidebar.open { transform: none; }
  .topbar { padding: 10px 12px; gap: 8px; position: sticky; top: 0; background: rgba(10, 15, 46, .72); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--border); }
  .crumb .home-lbl, .crumb .sep, .site-chip, .hdr-search { display: none; }
  .hdr-actions .hbtn:not(.yellow):not([data-h=ayarlar]):not([data-h=plaka]) { display: none; }
  .hdr-actions .hbtn.yellow span { display: none; }
  .hdr-actions .hbtn.yellow { width: 38px; padding: 0; justify-content: center; }
  .user-av { width: 36px; height: 36px; }
  .pagehead { padding: 12px 14px 0; }
  .pagehead h1 { font-size: 17px; }
  .view { padding: 10px 14px calc(84px + var(--safe-bottom)); }
  .bottomnav {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(8px + var(--safe-bottom)); z-index: 30; border-radius: 22px;
    background: rgba(20, 26, 68, .85); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .bottomnav a.active { color: #fff; }
  .bottomnav a.active svg.i { color: var(--k-500); }
  .hide-sm { display: none !important; }
}

/* ---------- Kartlar ---------- */
.card { border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.split > .side { position: sticky; top: 16px; }
@media (max-width: 1250px) { .split { grid-template-columns: 1fr; } .split > .side { position: static; } }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .split > .side { position: static; } }

/* Özet kartları – yuvarlak degrade ikonlu */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 16px; }
.stat {
  position: relative; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; min-height: 104px;
  display: flex; flex-direction: column; justify-content: center; font: inherit; color: inherit; text-align: left;
}
.stat:has(.stat-ic) { padding-left: 94px; }
.stat-ic {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--c1, var(--k-500)); background-image: linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); box-shadow: 0 8px 20px -6px var(--c1, var(--k-500));
}
.stat-ic svg.i { width: 24px; height: 24px; }
.stats > .stat:nth-child(6n+1) { --c1: #2d8cf0; }
.stats > .stat:nth-child(6n+2) { --c1: #1d6fe0; }
.stats > .stat:nth-child(6n+3) { --c1: #7c5cff; }
.stats > .stat:nth-child(6n+4) { --c1: #f2557a; }
.stats > .stat:nth-child(6n+5) { --c1: #12b886; }
.stats > .stat:nth-child(6n+6) { --c1: #f59f3a; }
.stat-value { font-size: 23px; font-weight: 600; letter-spacing: -.3px; color: var(--value); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.stat-sub { align-self: flex-start; font-size: 11px; font-weight: 600; margin-top: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .progress { width: 100%; }
.stat-value.neg { color: var(--danger); }
.stat-value.pos { color: var(--ok); }
.split .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1500px) { .split .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .split .stats, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 14px; min-height: 0; } .stat:has(.stat-ic) { padding-left: 14px; padding-top: 62px; } .stat-ic { left: 14px; top: 14px; transform: none; width: 40px; height: 40px; } .stat-ic svg.i { width: 18px; height: 18px; } .stat-value { font-size: 17px; } }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--glass-border); background: var(--glass); color: #fff;
  border-radius: 999px; padding: 7px 15px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; min-height: 36px;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--glass-2); }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary, .btn-primary:hover { background: linear-gradient(135deg, var(--k-500), var(--brand)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -4px rgba(61, 139, 255, .6); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-blue, .btn-blue:hover { background: linear-gradient(135deg, #ffa94d, var(--accent)); border-color: transparent; color: var(--accent-ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-wa, .btn-wa:hover { background: #22a95a; border-color: #22a95a; color: #fff; }
.btn-sm { padding: 4px 11px; font-size: 12px; min-height: 30px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; color: var(--text); padding: 6px; border-radius: 10px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .10); color: var(--text); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary-dark); }

.pos { color: var(--ok); }
.neg { color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 700; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- Araç çubuğu & sekmeler ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar input, .toolbar select { border-radius: 999px; padding: 6px 14px; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); width: max-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; padding: 7px 15px; border-radius: 999px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: #fff; }
.tabs button.active { font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--k-500), var(--brand)); }

/* ---------- Formlar ---------- */
input, select, textarea {
  font: inherit; font-size: 13px; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; width: 100%; min-height: 40px;
}
input::placeholder, textarea::placeholder { color: rgba(219, 227, 245, .4); }
select option { background: var(--solid); color: #fff; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--k-500); box-shadow: 0 0 0 3px rgba(61, 139, 255, .22); background: rgba(255, 255, 255, .09); }
input[type=checkbox] { width: 17px; height: 17px; min-height: 0; accent-color: var(--k-500); }
input[type=file] { padding: 7px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check label { font-weight: 500; font-size: 13px; color: var(--text); }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th { text-align: left; font-size: 12px; color: #fff; font-weight: 600; padding: 11px 12px; background: rgba(255, 255, 255, .06); white-space: nowrap; }
th:first-child { border-radius: 12px 0 0 12px; }
th:last-child { border-radius: 0 12px 12px 0; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tbody tr:hover td { background: rgba(255, 255, 255, .04); }
tfoot td { font-weight: 700; border-top: 1px solid var(--line); color: #fff; }
@media (max-width: 700px) {
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; margin-bottom: 10px; background: rgba(255, 255, 255, .04); }
  table.cards td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; background: transparent !important; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; font-weight: 500; }
  table.cards tfoot { display: block; }
  table.cards tfoot tr { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  table.cards tfoot td { width: auto; display: block; padding: 2px 0; }
  table.cards tfoot td:empty { display: none; }
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
}

/* ---------- Listeler ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; color: inherit; }
.list-item .title { font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: #cfe2ff; font-weight: 700; flex: none; font-size: 12px; }
.avatar svg.i { width: 16px; height: 16px; }
.avatar.danger { background: var(--danger-soft); color: var(--danger); }
.avatar.ok { background: var(--ok-soft); color: var(--ok); }
.avatar.warn { background: var(--warn-soft); color: var(--warn); }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty > svg.i { width: 38px; height: 38px; opacity: .45; margin-bottom: 6px; }
.empty h3 { margin-bottom: 4px; }

/* ---------- Grafikler ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.hbar .track { height: 7px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--k-500)); border-radius: 6px; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--k-500)); }

/* ---------- Hızlı işlem paneli ---------- */
.quick { padding: 0; }
.quick .tabs { margin: 14px 14px 0; }
.quick .qbody { padding: 16px; }
.quick .qfoot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.quick .qinfo { font-size: 12px; color: var(--muted); margin-top: 10px; min-height: 16px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(3, 6, 25, .6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: rgba(20, 26, 68, .96); border-radius: 22px; overflow: hidden; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { color: #fff; }
.modal-head .icon-btn { color: #fff; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); padding-bottom: calc(12px + var(--safe-bottom)); }
@media (max-width: 560px) { .modal-bg { align-items: flex-end; padding: 0; } .modal { border-radius: 22px 22px 0 0; max-height: 92vh; } }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 900px) { .toasts { bottom: calc(86px + var(--safe-bottom)); } }
.toast { background: rgba(20, 26, 68, .96); border: 1px solid var(--glass-border); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: fade .2s; max-width: 90vw; }
.toast.err { background: #b3263f; border-color: transparent; }

/* ---------- Detay & makbuz ---------- */
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .grow { flex: 1; min-width: 220px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13px; margin-top: 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.balance-box { text-align: right; }
.balance-box .v { font-size: 26px; font-weight: 600; }
.receipt { border: 1px dashed var(--line); border-radius: 14px; padding: 18px; }
.receipt h3 { text-align: center; margin-bottom: 4px; }
.receipt .row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted var(--line); gap: 12px; }
.receipt .total { font-size: 22px; font-weight: 700; text-align: center; margin: 12px 0 4px; color: var(--value); }

/* ---------- Yasal metinler ---------- */
.legal { line-height: 1.65; font-size: 14px; }
.legal h2 { font-size: 17px; }
.legal h4 { margin: 18px 0 6px; font-size: 14px; color: var(--heading); }
.legal p { margin: 6px 0; }
.legal ul { margin: 6px 0; padding-left: 20px; }
.legal li { margin: 3px 0; }

/* ---------- Yazdırma: açık renkli, sade ---------- */
@media print {
  :root { --text: #222; --heading: #000; --value: #000; --muted: #555; --border: #ddd; --line: #ccc; --glass: #fff; --glass-border: #ddd; color-scheme: light; }
  body { background: #fff !important; color: #000; }
  body::before { display: none; }
  .sidebar, .topbar, .pagehead .top-actions, .bottomnav, .toasts, .no-print, .modal-head, .modal-foot, .backdrop { display: none !important; }
  .app { display: block; padding: 0; }
  .view { padding: 0; }
  .card, .stat, .modal { background: #fff !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 0; }
  th { background: #f1f1f1 !important; color: #000; }
  td, .list-item .title, tfoot td, a { color: #000 !important; }
  .badge { border: 1px solid #ccc; background: none !important; color: #000 !important; }
  .split { display: block; }
  .split > .side { display: none; }
  .modal-bg { position: static; background: none; padding: 0; display: block; }
  .modal { max-height: none; }
  body.printing-modal .app { display: none; }
}

/* Özet kartında önce değer, sonra başlık */
.stat-value { order: 1; }
.stat-label { order: 2; }
.stat-sub { order: 3; }
.stat .progress { order: 4; }

/* ---------- Canlı Chat ---------- */
.chat-layout { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 14px; min-height: calc(100vh - 200px); }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; min-height: 0; } }
.chat-sidebar { display: flex; flex-direction: column; max-height: calc(100vh - 200px); padding-bottom: 8px; }
.chat-thread-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.chat-thread { text-align: left; border: 0; background: transparent; color: inherit; padding: 10px 8px; border-radius: 10px; cursor: pointer; font: inherit; }
.chat-thread:hover { background: rgba(255,255,255,.06); }
.chat-thread.active { background: var(--primary-soft, rgba(61,139,255,.18)); }
.chat-thread .title { font-weight: 600; font-size: 13px; }
.chat-thread .sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.chat-main { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 200px); padding-bottom: 10px; }
.chat-main-head { flex-shrink: 0; }
.chat-bubbles { flex: 1; overflow-y: auto; padding: 8px 4px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.chat-bubble.in { align-self: flex-start; background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); }
.chat-bubble.out { align-self: flex-end; background: rgba(34,169,90,.22); border: 1px solid rgba(34,169,90,.35); }
.chat-bubble-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.chat-compose { display: flex; gap: 8px; flex-shrink: 0; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.chat-compose input { flex: 1; }
.wa-qr-box { text-align: center; margin-bottom: 12px; padding: 12px; background: rgba(255,255,255,.06); border-radius: 12px; }
.wa-qr-box img { display: inline-block; border-radius: 8px; background: #fff; }
.toast.warn { background: #8a6a12; border-color: transparent; }
.danger { color: var(--danger); }
