:root {
    --bg: #F6F6F9;
    --surface: #FFFFFF;
    --surface-2: #F1F1F6;
    --surface-3: #E9E9F1;
    --ink: #111322;
    --ink-2: #3B3F56;
    --muted: #6E7289;
    --line: #E6E6EF;
    --line-2: #D9D9E5;
    --brand: #2463EB;
    --brand-2: #38A8F8;
    --brand-ink: #FFFFFF;
    --brand-soft: #E8F0FE;
    --ok: #12A150;
    --ok-soft: #E5F6EC;
    --warn: #C77700;
    --warn-soft: #FDF3E1;
    --bad: #D63B3B;
    --bad-soft: #FCEBEB;
    --info: #2F6FE0;
    --info-soft: #E8F0FD;
    --shadow-sm: 0 1px 2px rgb(17 19 34 / .05);
    --shadow: 0 1px 2px rgb(17 19 34 / .04), 0 8px 24px -8px rgb(17 19 34 / .10);
    --shadow-lg: 0 24px 60px -20px rgb(17 19 34 / .28);
    --r: 12px;
    --r-lg: 16px;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0C0D14;
    --surface: #13141D;
    --surface-2: #1A1B26;
    --surface-3: #232433;
    --ink: #ECECF4;
    --ink-2: #C3C4D6;
    --muted: #8D8FA8;
    --line: #23243300;
    --line: #242536;
    --line-2: #2F3044;
    --brand: #5B9BFF;
    --brand-2: #7DD3FC;
    --brand-ink: #0C0D14;
    --brand-soft: #102240;
    --ok: #3DD17E;
    --ok-soft: #10291C;
    --warn: #F0A63A;
    --warn-soft: #2D2110;
    --bad: #F27474;
    --bad-soft: #321718;
    --info: #6DA1FF;
    --info-soft: #14213A;
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgb(255 255 255 / .02);
    --shadow-lg: 0 30px 80px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 450 14px/1.5 Geist, Inter, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.icon { flex: none; display: block; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Uygulama iskeleti ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
    padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; display: block; flex: none; box-shadow: 0 0 0 1px rgb(11 31 92 / .08), 0 4px 12px -4px rgb(11 31 92 / .25); }
.brand-360 { color: var(--brand); font-weight: 750; }
.auth-side .brand-360, .cta .brand-360 { color: #7DD3FC; }
.tenant-switch {
    display: flex; align-items: center; gap: 10px; margin: 0 2px 14px; padding: 9px 10px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
}
.tenant-switch b { display: block; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-switch small { color: var(--muted); font-size: 11.5px; }
.tenant-switch > div { min-width: 0; flex: 1; }
.avatar {
    flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px;
}
.avatar.round { border-radius: 50%; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; border-radius: 12px; }
.nav-label { padding: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav a {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
    color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.nav a .count { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.nav a.on .count { background: var(--brand); color: var(--brand-ink); }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.plan-card {
    padding: 14px; border-radius: var(--r); color: #fff;
    background: radial-gradient(120% 140% at 0% 0%, #3B82F6 0%, #1D4ED8 45%, #0B1F5C 100%);
}
.plan-card b { display: block; font-size: 13.5px; }
.plan-card p { font-size: 12px; opacity: .85; margin: 3px 0 10px; }
.plan-meter { height: 5px; border-radius: 3px; background: rgb(255 255 255 / .25); overflow: hidden; }
.plan-meter i { display: block; height: 100%; width: 62%; background: #fff; border-radius: inherit; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); }
.me b { display: block; font-size: 13px; line-height: 1.2; }
.me small { color: var(--muted); font-size: 11.5px; }
.me > div { flex: 1; min-width: 0; }

.main { min-width: 0; }
.top {
    position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.crumbs b { color: var(--ink); font-weight: 600; }
.search {
    margin-left: auto; display: flex; align-items: center; gap: 8px; width: 320px; height: 36px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
}
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.search kbd { font: 500 11px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.icon-btn {
    position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
.page { padding: 26px 28px 80px; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -.03em; }
.page-head p { color: var(--muted); margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Bileşenler ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
    border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    font-weight: 550; font-size: 13.5px; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .1), inset 0 1px 0 rgb(255 255 255 / .15); }
:root[data-theme="dark"] .btn.primary { color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-h h2 { font-size: 14.5px; font-weight: 620; letter-spacing: -.01em; }
.card-h .muted { font-size: 12.5px; }
.card-b { padding: 16px 18px 18px; }
.card-link { font-size: 12.5px; font-weight: 550; color: var(--brand); display: inline-flex; align-items: center; gap: 3px; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }

.kpi { padding: 16px 18px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.kpi-val { margin-top: 10px; font: 600 26px/1.1 var(--mono); letter-spacing: -.04em; }
.kpi-val small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.kpi-sub { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; padding: 1px 7px; border-radius: 999px; font-size: 12px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }

.badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.muted { color: var(--muted); }

.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); width: fit-content; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 550; font-size: 13px; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tabs a .n { font: 500 11.5px var(--mono); color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { margin-left: 0; width: 280px; }
.toolbar .spacer { flex: 1; }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th {
    text-align: left; font-weight: 550; font-size: 12px; color: var(--muted); padding: 10px 14px; white-space: nowrap;
    background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.t th:first-child { border-top-left-radius: 0; }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.t .num { white-space: nowrap; }
.t td.right, .t th.right { text-align: right; }
.cell-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-main b { display: block; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.cell-main small { display: block; color: var(--muted); font-size: 12px; }
.row-link { position: relative; }
.row-link a.cover::after { content: ""; position: absolute; inset: 0; }
.card > .table-wrap { border-radius: inherit; }
.card > .table-wrap table.t th:first-child { border-top-left-radius: var(--r-lg); }
.card > .table-wrap table.t th:last-child { border-top-right-radius: var(--r-lg); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pager .actions { gap: 6px; }
.swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.thumb { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }

.meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.meter.warn i { background: var(--warn); }
.meter.bad i { background: var(--bad); }

/* Listeler */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 2px; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: 550; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .grow small { color: var(--muted); font-size: 12px; }
.act-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.act-ic.in { background: var(--ok-soft); color: var(--ok); }
.act-ic.out { background: var(--surface-2); color: var(--ink-2); }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

/* Grafik */
.chart-box { position: relative; height: 270px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.stack-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 4px 0 16px; }
.stack-bar i { display: block; height: 100%; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.spark i { flex: 1; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .85; min-height: 2px; }
.spark i.neg { background: var(--surface-3); }

/* Formlar */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
label.f { display: grid; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.input, select.input, textarea.input {
    width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
    color: var(--ink); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input.num { text-align: right; }
.hint { font-size: 12px; color: var(--muted); font-weight: 450; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; margin-bottom: 16px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--info-soft); color: var(--info); }

/* Fatura editörü */
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 550; padding: 0 6px 8px; }
.lines td { padding: 4px 6px; vertical-align: top; }
.lines .input { height: 36px; }
.lines .del { width: 32px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 8px; }
.lines .del:hover { color: var(--bad); background: var(--bad-soft); }
.totals { margin-left: auto; width: min(340px, 100%); display: grid; gap: 8px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 650; }
.picker { position: relative; }
.picker-menu {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto; padding: 4px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.picker-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; }
.picker-menu button:hover, .picker-menu button.on { background: var(--surface-2); }
.picker-menu b { font-weight: 550; font-size: 13.5px; }
.picker-menu small { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* Fatura görünümü */
.doc { padding: 36px 40px; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-head h2 { font-size: 22px; letter-spacing: -.02em; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0; }
.doc-parties h3 { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.doc-parties p { color: var(--ink-2); font-size: 13.5px; }
.doc .t th { background: transparent; border-bottom: 1px solid var(--line-2); padding-left: 0; }
.doc .t td { padding-left: 0; }

/* Bildirim paneli */
.pop {
    position: absolute; right: 0; top: calc(100% + 8px); width: 360px; padding: 6px; z-index: 40;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.pop-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px; }
.pop-h b { font-size: 14px; }
.pop a.n { display: flex; gap: 11px; padding: 10px; border-radius: 10px; }
.pop a.n:hover { background: var(--surface-2); }
.pop a.n b { display: block; font-size: 13px; font-weight: 560; }
.pop a.n small { color: var(--muted); font-size: 12px; }
.pop a.n.unread b::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.n-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.n-ic.warning { background: var(--warn-soft); color: var(--warn); }
.n-ic.success { background: var(--ok-soft); color: var(--ok); }
.n-ic.info { background: var(--info-soft); color: var(--info); }

/* Toast */
.toasts { position: fixed; z-index: 90; right: 24px; bottom: 24px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
    display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px;
    background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); animation: toast-in .28s cubic-bezier(.2, .8, .2, 1);
}
.toast b { display: block; font-size: 13.5px; }
.toast small { opacity: .75; font-size: 12.5px; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Canlı destek balonu ---------- */
.chat-fab {
    position: fixed; z-index: 60; right: 24px; bottom: 24px; height: 52px; padding: 0 20px 0 16px; display: flex; align-items: center; gap: 10px;
    border: 0; border-radius: 999px; color: #fff; font-weight: 600; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 30px -10px var(--brand), 0 2px 6px rgb(0 0 0 / .12); transition: transform .2s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab .badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--brand); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.chat {
    position: fixed; z-index: 61; right: 24px; bottom: 24px; width: 380px; height: min(620px, calc(100vh - 48px));
    display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform-origin: bottom right;
    animation: chat-in .28s cubic-bezier(.2, .8, .2, 1);
}
.chat[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.chat-head { padding: 18px 18px 16px; color: #fff; background: radial-gradient(140% 160% at 0% 0%, #3B82F6, #1D4ED8 50%, #0B1F5C); }
.chat-head .row { display: flex; align-items: center; gap: 10px; }
.chat-head b { font-size: 15px; }
.chat-head p { font-size: 12.5px; opacity: .85; margin-top: 8px; }
.chat-head .close { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgb(255 255 255 / .14); color: #fff; display: grid; place-items: center; }
.agents { display: flex; }
.agents .avatar { border: 2px solid #1D4ED8; background: #fff; color: #1D4ED8; margin-left: -8px; }
.agents .avatar:first-child { margin-left: 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgb(52 211 153 / .25); margin-right: 6px; }
.status-dot.off { background: #CBD5E1; box-shadow: none; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; }
.msg .bubble { padding: 9px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg .meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
:root[data-theme="dark"] .msg.me .bubble { color: var(--brand-ink); }
.msg.them .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.sys { align-self: center; max-width: 92%; }
.msg.sys .bubble { background: transparent; color: var(--muted); font-size: 12px; text-align: center; padding: 4px 8px; }
.msg .read { color: var(--brand); }
.msg + .msg.me, .msg + .msg.them { margin-top: 2px; }
.day-sep { align-self: center; font-size: 11px; color: var(--muted); padding: 6px 0; }
.typing { display: inline-flex; gap: 3px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); width: fit-content; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.chat-empty { margin: auto; text-align: center; color: var(--muted); padding: 20px; }
.chat-empty .big { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--brand-soft); color: var(--brand); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.quick button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); }
.quick button:hover { border-color: var(--brand); color: var(--brand); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea {
    flex: 1; resize: none; max-height: 120px; min-height: 40px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2);
    background: var(--bg); outline: none; font-size: 13.5px; line-height: 1.4;
}
.composer textarea:focus { border-color: var(--brand); }
.send { width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.send:disabled { opacity: .4; }
.chat-foot { text-align: center; font-size: 11px; color: var(--muted); padding: 0 0 10px; background: var(--surface); }

/* ---------- Destek masası ---------- */
.desk { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; height: calc(100vh - 60px); }
.desk-list { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.desk-list-h { padding: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.desk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.desk-stats div { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.desk-stats b { display: block; font: 600 17px var(--mono); }
.desk-stats small { color: var(--muted); font-size: 11.5px; }
.conv-list { flex: 1; overflow-y: auto; }
.conv {
    display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative;
    transition: background .12s;
}
.conv:hover { background: var(--surface-2); }
.conv.on { background: var(--brand-soft); }
.conv.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.conv .grow { flex: 1; min-width: 0; }
.conv .l1 { display: flex; align-items: center; gap: 6px; }
.conv .l1 b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .l1 time { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.conv .l2 { font-size: 12px; color: var(--muted); }
.conv .l3 { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.conv .l3 p { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.conv.closed { opacity: .6; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.av-wrap { position: relative; flex: none; height: fit-content; }
.desk-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.desk-chat-h { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.desk-chat-h b { display: block; font-size: 14.5px; }
.desk-chat-h small { color: var(--muted); font-size: 12.5px; }
.desk-chat-h .actions { margin-left: auto; }
.desk-chat .chat-body { padding: 22px 28px; }
.desk-chat .msg { max-width: 68%; }
.desk-chat .composer { padding: 14px 20px; flex-direction: column; align-items: stretch; }
.canned { display: flex; gap: 6px; flex-wrap: wrap; }
.canned button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--ink-2); }
.canned button:hover { border-color: var(--brand); color: var(--brand); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.desk-info { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 20px 18px; display: grid; gap: 20px; align-content: start; }
.desk-info h3 { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.kv { display: grid; gap: 8px; font-size: 13px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 550; text-align: right; }
.desk-empty { margin: auto; text-align: center; color: var(--muted); }

/* ---------- Tanıtım sitesi ---------- */
.site { background: var(--surface); }
.site-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.site-nav nav { display: flex; gap: 22px; color: var(--ink-2); font-weight: 500; }
.site-nav nav a:hover { color: var(--ink); }
.site-nav .actions { margin-left: auto; }
.hero { position: relative; overflow: hidden; padding: 84px 0 0; text-align: center; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto; height: 720px; z-index: 0; pointer-events: none;
    background: radial-gradient(40% 50% at 50% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
                radial-gradient(30% 35% at 78% 20%, rgb(56 189 248 / .14), transparent 70%),
                radial-gradient(30% 35% at 20% 25%, rgb(11 31 92 / .08), transparent 70%);
}
.hero > * { position: relative; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.pill b { background: var(--brand-soft); color: var(--brand); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.045em; font-weight: 680; margin: 22px auto 0; max-width: 900px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #0B1F5C, var(--brand) 45%, #38BDF8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18.5px; color: var(--muted); max-width: 640px; margin: 20px auto 0; line-height: 1.55; }
.hero .actions { justify-content: center; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.hero-shot { margin: 56px auto 0; max-width: 1120px; padding: 10px; border-radius: 22px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.hero-shot .frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.hero-shot img { display: block; width: 100%; height: auto; }
.logos { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; padding: 56px 0 10px; color: var(--muted); font-weight: 650; font-size: 17px; letter-spacing: -.02em; opacity: .75; }
.section { padding: 96px 0; }
.section-h { text-align: center; max-width: 700px; margin: 0 auto 48px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .02em; }
.section-h h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; line-height: 1.08; margin-top: 10px; font-weight: 660; }
.section-h p { color: var(--muted); font-size: 17px; margin-top: 14px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature h3 { font-size: 16px; letter-spacing: -.01em; }
.feature p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.split h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.04em; line-height: 1.1; margin-top: 10px; font-weight: 660; }
.split p { color: var(--muted); font-size: 16.5px; margin-top: 14px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.checks .icon { color: var(--ok); margin-top: 2px; }
.shot { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; background: var(--bg); }
.shot img { display: block; width: 100%; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price { padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.price.hot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); position: relative; }
.price.hot::before { content: "En çok tercih edilen"; position: absolute; top: -12px; left: 28px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.price h3 { font-size: 15px; }
.price .amount { font: 600 40px/1 var(--mono); letter-spacing: -.05em; margin: 16px 0 4px; }
.price .amount small { font: 500 14px Geist, sans-serif; color: var(--muted); letter-spacing: 0; }
.price p { color: var(--muted); font-size: 13.5px; }
.price .checks { margin: 22px 0 26px; flex: 1; }
.cta { margin: 0 auto; max-width: 1120px; border-radius: 28px; padding: 64px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3B82F6, #1D4ED8 45%, #0B1F5C); }
.cta h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
.cta p { opacity: .85; margin-top: 10px; font-size: 17px; }
.cta .btn { margin-top: 26px; }
.cta .btn.white { background: #fff; color: #0B1F5C; border: 0; }
.site-foot { padding: 48px 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 96px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: min(400px, 100%); }
.auth-form h1 { font-size: 28px; letter-spacing: -.035em; margin: 26px 0 6px; }
.auth-form .muted { margin-bottom: 26px; }
.auth-form form { display: grid; gap: 14px; }
.auth-side { padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 120% at 100% 0%, #3B82F6, #1D4ED8 45%, #0B1F5C); }
.auth-side blockquote { margin: 0; font-size: 22px; line-height: 1.4; letter-spacing: -.02em; max-width: 460px; }
.auth-side cite { display: block; font-style: normal; margin-top: 18px; opacity: .8; font-size: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 4px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.demo-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-box form { display: block; }
.demo-box button { width: 100%; height: auto; padding: 12px; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.demo-box small { color: var(--muted); font-weight: 450; font-size: 12px; }

@media (max-width: 1180px) {
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .desk { grid-template-columns: 300px minmax(0, 1fr); }
    .desk-info { display: none; }
}
@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .side { display: none; }
    .g-main, .g-3, .g-2, .features, .pricing, .split { grid-template-columns: 1fr; }
    .search { display: none; }
    .page, .top { padding-left: 16px; padding-right: 16px; }
    .auth { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .site-nav nav { display: none; }
    .cta { padding: 40px 24px; }
}

@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
}
.input.mono { font-family: var(--mono); letter-spacing: -.01em; }
.desk-info { grid-template-columns: minmax(0, 1fr); }
.desk-info .kv b { min-width: 0; overflow-wrap: anywhere; }
.desk-info .list .grow b { white-space: normal; }
.menu-btn { display: none; }
@media (max-width: 960px) {
    .site-nav .actions { flex-wrap: nowrap; }
    .site-nav .actions .btn.ghost, .site-nav .actions .icon-btn { display: none; }
    .menu-btn { display: grid; }
    .side { display: flex; position: fixed; z-index: 70; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
    .side.open { transform: none; }
    .top .btn.primary { display: none; }
    .chat { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); }
    .chat-fab { right: 16px; bottom: 16px; }
    .desk { grid-template-columns: 1fr; height: auto; }
    .desk-chat { min-height: 70vh; }
}
@media (max-width: 960px) { .crumbs { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; } }
@media (max-width: 600px) {
    .kpi { padding: 14px; }
    .kpi-val { font-size: 19px; }
    .kpi-sub { flex-wrap: wrap; font-size: 12px; }
    .page-head h1 { font-size: 21px; }
    .page-head .actions .btn:not(.primary) { display: none; }
}
