:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #0f1d2b;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e6f4f2;
  --side: #0b1f2a;
  --side-ink: #b9c7d1;
  --danger: #c2410c;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 10px;
  /* Koyu temada değişen yüzeyler (html.dark, dosyanın sonunda) */
  --panel-2: #fafbfc;
  --hover: #f8fafc;
  --soft: #eef2f6;
  --ink-2: #334155;
  --line-2: #cbd5e1;
  --tabbar-h: 62px;
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--link, var(--brand)); text-decoration: none; }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Layout */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; padding: 0 8px 22px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(25, 230, 200, .35), 0 6px 16px -6px rgba(25, 230, 200, .45); }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--side-ink); padding: 10px 10px; border-radius: 8px; margin-bottom: 2px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(20,184,166,.16); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; font-size: 12px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot b { color: #fff; display: block; font-size: 13px; }
.main { padding: 24px 28px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.mobile-bar { display: none; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ai { background: linear-gradient(135deg, #4f46e5, #0f766e); color: #fff; border: 0; }
.btn:disabled { opacity: .6; cursor: progress; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(15,118,110,.25); border-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid .span2 { grid-column: span 2; }
.search { max-width: 280px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink-2); }
.badge.taslak { background: var(--soft); }
.badge.gonderildi { background: #e0ecff; color: #1d4ed8; }
.badge.onaylandi { background: #dcfce7; color: var(--ok); }
.badge.reddedildi { background: #ffedd5; color: var(--danger); }
.badge.parasut { background: #ede9fe; color: #6d28d9; }
.badge.err { background: #ffedd5; color: var(--danger); }
.pos { color: var(--danger); font-weight: 600; }
.neg { color: var(--ok); font-weight: 600; }

/* Item editor */
.items td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.items input, .items select { padding: 6px 8px; }
.items .w-qty { width: 80px; } .items .w-unit { width: 80px; } .items .w-price { width: 120px; } .items .w-pct { width: 70px; } .items .w-total { width: 120px; }
.totals { margin-left: auto; width: 320px; max-width: 100%; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { font-size: 18px; font-weight: 700; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--link, var(--brand)); border-color: var(--link, var(--brand)); }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 46px; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 3px; }
.bar span { font-size: 11px; color: var(--muted); }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: var(--side); color: #dbe7ee; padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-hero h1 { color: #fff; font-size: 38px; line-height: 1.15; margin: 18px 0 14px; }
.auth-hero ul { padding: 0; list-style: none; margin: 18px 0 0; line-height: 2; }
.auth-hero li::before { content: "✓"; color: #2dd4bf; margin-right: 10px; font-weight: 700; }
.auth-box { display: grid; place-items: center; padding: 32px; }
.auth-box form { width: 100%; max-width: 380px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 140px); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,29,43,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 22px; }
.confirm-bg { z-index: 60; }
.confirm-box { max-width: 380px; }
.confirm-msg { white-space: pre-wrap; line-height: 1.5; font-size: 15px; margin: 0 0 6px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.error { background: var(--danger); }

.ai-box { background: linear-gradient(135deg, #eef2ff, #e6f4f2); border: 1px solid #c7d2fe; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }

/* Mobile */
.side-scrim { display: none; }
@media (max-width: 900px) { .side-scrim { display: block; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; width: 260px; max-width: 82vw; z-index: 40; transform: translateX(-105%); transition: transform .22s ease; will-change: transform; overflow-y: auto; }
  .side.open { transform: none; box-shadow: 8px 0 24px rgba(0,0,0,.25); }
  /* Menünün yanındaki karartma: dokununca ya da sola kaydırınca menü kapanır (menu-swipe.js) */
  .side-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(15,29,43,.45); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .side.open + .side-scrim { opacity: 1; pointer-events: auto; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--side); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
  .mobile-bar button { background: none; border: 0; color: #fff; font-size: 22px; }
  .main { padding: 16px 14px 60px; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .g2, .g3, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .topbar .row .btn { flex: 1 1 auto; justify-content: center; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; }
  .auth-hero h1 { font-size: 28px; }
  .stat .value { font-size: 19px; }
  .search { max-width: none; }
  .msg { max-width: 90%; }
}

/* Cari türleri */
.role-alici { background: #e0f2fe; color: #0369a1; }
.role-satici { background: #fef3c7; color: #92400e; }
.role-ikisi { background: #ede9fe; color: #6d28d9; }
.neg-debt { color: #b45309; font-weight: 600; }
.k-tahsilat { background: #dcfce7; color: #15803d; }
.k-satis { background: #e0f2fe; color: #0369a1; }
.k-alis { background: #fef3c7; color: #92400e; }
.k-odeme { background: #fee2e2; color: #b91c1c; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; }
.seg input { display: none; }
.seg span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Teklif: özel fiyat, görseller, ürün fotoğrafları */
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); font-weight: 500; margin: 4px 0 0; cursor: pointer; }
.check input { width: auto; }
.special { margin-top: 14px; max-width: 360px; background: #fefce8; border: 1px solid #fde047; border-radius: 8px; padding: 10px 12px; }
.special label { color: #854d0e; }
.vis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.vis-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.vis-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--hover); }
.vis-grid figcaption { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--panel); }
.thumb.lg { width: 72px; height: 72px; }
.empty-thumb { display: grid; place-items: center; color: var(--muted); background: var(--hover); font-size: 18px; }
.hint { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.brand-up img { height: 72px; max-width: 200px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }

/* Fatura aktarma sihirbazı */
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps div { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; min-width: 0; }
.steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); flex: none; font-size: 12px; }
.steps span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .active { border-color: var(--brand); color: var(--ink); }
.steps .active b { background: var(--brand); color: #fff; }
.steps .done b { background: var(--brand-soft); color: var(--brand); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2px dashed #cbd5e1; border-radius: 12px; padding: 32px 16px; cursor: pointer; color: var(--ink); font-size: 14px; margin: 0; background: var(--panel-2); }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input { display: none; }
.drop .muted { font-weight: 400; font-size: 13px; }
.map-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
table.mini th, table.mini td { padding: 6px 8px; font-size: 12px; white-space: nowrap; }
table.pv td { vertical-align: top; }
table.pv input[type=checkbox], table.pv th input { width: 18px; height: 18px; }
tr.dim td { opacity: .55; }
.errs { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.errs summary { cursor: pointer; font-weight: 600; }
.errs ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; word-break: break-word; }
.sticky-foot { justify-content: space-between; margin-top: 14px; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 5; }

@media (max-width: 900px) {
  .map-grid { grid-template-columns: 1fr 1fr; }
  .steps span { display: none; }
  .steps .active span { display: inline; }
  .steps div { justify-content: center; }
  .sticky-foot #selsum { order: -1; width: 100%; text-align: center; }
  .sticky-foot .btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
  .g4 { gap: 10px; }
  .card { padding: 14px; }
  .topbar h1 { font-size: 19px; }
  td, th { padding: 9px 8px; }
}
.m-only { display: none; }
.inv-no { word-break: break-all; }
@media (max-width: 600px) {
  table.pv .c-st { display: none; }
  table.pv .m-only { display: inline-block; }
  table.pv td, table.pv th { padding: 9px 6px; font-size: 13px; }
  table.pv .num { white-space: normal; }
  .steps .active { flex: 2.2; }
  .steps .active span { overflow: visible; }
}

/* Üyelik / giriş / marka */
.logo-img { height: 32px; max-width: 120px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.auth-alert { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.code-input { font-size: 18px; letter-spacing: .12em; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.code-pill { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: var(--brand-soft); color: var(--brand); padding: 1px 8px; border-radius: 6px; letter-spacing: .04em; }
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin: 4px 0 12px; }
.perm-grid label { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: 13px; margin: 0; cursor: pointer; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.perm-grid input { width: auto; }
@media (max-width: 900px) { .hide-m { display: none; } .perm-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .auth-box { order: -1; padding: 28px 18px 20px; }
  .auth-hero { padding: 24px 20px 32px; }
  .auth-hero h1 { font-size: 22px; }
  .auth-hero ul { display: none; }
}

/* AI tanışma (işletme hafızası) */
.onb-banner { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.onb-banner > div { flex: 1; min-width: 0; }
.progress { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: -6px 0 14px; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.chat.onb { height: calc(100vh - 190px); min-height: 420px; }
.msg.user.skipped { background: var(--soft); color: var(--muted); font-style: italic; }
.onb-chips { margin: 10px 0 0; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.onb-input { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.onb-input textarea { resize: vertical; min-height: 52px; }
@media (max-width: 900px) {
  .chat.onb { height: calc(100dvh - 200px); min-height: 360px; }
  .onb-input .row .btn { flex: 1 1 auto; justify-content: center; }
  .onb-banner .btn { display: none; }
}

/* Yapay zeka paketi kapalıysa AI düğmeleri gizli */
body.no-ai .ai-only { display: none !important; }
body:not(.no-ai) .ai-off-only { display: none !important; }
.ai-usage { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 10px; margin: 6px 0 10px; }
.ai-usage > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ai-usage span { display: block; font-size: 12px; }
.ai-usage b { font-size: 20px; }

/* ---------- Mobil uygulama ---------- */
.row.nowrap { flex-wrap: nowrap; }
.barcode-txt { font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3px; }
.install-steps { line-height: 1.9; padding-left: 20px; }
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; } /* iPhone'da odaklanınca sayfa yakınlaşmasın */
  .mobile-bar { padding-top: calc(12px + env(safe-area-inset-top)); }
  .side { padding-top: env(safe-area-inset-top); }
  .main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
/* Barkod okuyucu */
.scan-bg { position: fixed; inset: 0; z-index: 70; background: rgba(8,15,22,.82); display: grid; place-items: center; padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); }
.scan { background: var(--panel); border-radius: 14px; width: 100%; max-width: 480px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 100%; overflow-y: auto; }
.scan-head { display: flex; justify-content: space-between; align-items: center; }
.scan-view { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 22% 10%; border: 3px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
.scan-msg { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; color: #fff; font-size: 13px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.scan.no-cam .scan-view, .scan-bg.no-cam .scan-view { aspect-ratio: auto; min-height: 90px; display: grid; place-items: center; background: #f1f5f9; }
.scan-bg.no-cam .scan-frame, .scan-bg.no-cam video { display: none; }
.scan-bg.no-cam .scan-msg { position: static; color: var(--ink); background: none; padding: 14px; }
.scan-hint { font-size: 13px; }
.scan-count { background: #dcfce7; color: #15803d; border-radius: 8px; padding: 8px 10px; font-weight: 600; font-size: 13px; }
.scan-manual { display: flex; gap: 8px; }
.scan-tools { justify-content: flex-start; }
@media (prefers-reduced-motion: reduce) { .scan-frame i { animation: none; } }
.scan [hidden] { display: none !important; }

/* Bildirimler, destek talepleri, uygulama güncelleme */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; font-style: normal; display: inline-grid; place-items: center; line-height: 1; }
.nav-badge[hidden], .menu-dot[hidden] { display: none; }
.mobile-bar #menu-btn { position: relative; }
.menu-dot { position: absolute; top: 2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; font-size: 0; }
.bell-btn { position: relative; color: #fff; display: grid; place-items: center; width: 34px; height: 34px; }
.bell-btn svg { width: 22px; height: 22px; }
.bell-btn .nav-badge { position: absolute; top: -2px; right: -6px; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.notif.unread { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.notif.lvl-uyari.unread { border-color: #f59e0b; box-shadow: inset 3px 0 0 #f59e0b; }
.notif-icon { font-size: 22px; line-height: 1.2; flex: none; }
.notif-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.notif-head .muted { font-size: 12px; }
.notif-body { white-space: pre-wrap; line-height: 1.5; margin-top: 4px; overflow-wrap: anywhere; }
.ticket-list { display: flex; flex-direction: column; }
.ticket-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--hover); }
.ticket-row.unread .ticket-subject { font-weight: 700; }
.ticket-subject { font-weight: 600; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.ticket-last { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; flex: none; display: inline-block; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tmsg { max-width: 82%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.tmsg.from-me { align-self: flex-end; background: var(--brand-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.tmsg.from-them { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.msg-body { white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.msg-img { display: block; max-width: 220px; max-height: 260px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--line); object-fit: cover; }
.attach { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.attach img { height: 56px; max-width: 100px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.update-gate { position: fixed; inset: 0; z-index: 1000; background: var(--side); display: grid; place-items: center; padding: 24px; }
.update-box { background: var(--panel); border-radius: 16px; padding: 28px 22px; max-width: 360px; width: 100%; text-align: center; }
.update-box h2 { margin: 8px 0; }
.update-box p { color: var(--muted); line-height: 1.5; }
.update-strip { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 900; background: var(--side); color: #fff; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.update-strip span { flex: 1; font-size: 13px; }
.update-strip .btn.ghost { color: #fff; }
@media (max-width: 600px) { .tmsg { max-width: 92%; } }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* Şifre göster / gizle (password-toggle.js) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 40px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; padding: 0; }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); }

/* ---------- Açılış ekranı (telefon uygulaması / ana ekrana eklenmiş uygulama) ----------
   Telefonun açılış görseliyle (mobile/scripts/hazirla.js → splash) aynı zemin ve logoyla başlar, panel hazır olunca söner. */
#boot { display: none; }
html.booting, html.booting body { overflow: hidden; background: #011823; }
html.booting #boot { display: flex; }
#boot { position: fixed; inset: 0; z-index: 9999; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #011823 0%, #00101d 100%); /* logonun zemini = telefonun açılış görseli (make-icons.js SPLASH_BG) */
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  transition: opacity .45s ease, transform .45s ease; -webkit-user-select: none; user-select: none; }
#boot.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
/* Defter çizgileri: ön muhasebenin kâğıdı */
.boot-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 70%);
  animation: boot-fade 1.2s ease both; }
/* Alttan yükselen ciro grafiği */
.boot-chart { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 120vw); height: 30vh; display: flex; align-items: flex-end; gap: 4%; padding: 0 4%; opacity: .16; }
.boot-chart i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #19e6c8, transparent); transform-origin: bottom; animation: boot-rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.boot-chart i:nth-child(1) { height: 28%; animation-delay: .15s; } .boot-chart i:nth-child(2) { height: 42%; animation-delay: .22s; }
.boot-chart i:nth-child(3) { height: 36%; animation-delay: .29s; } .boot-chart i:nth-child(4) { height: 58%; animation-delay: .36s; }
.boot-chart i:nth-child(5) { height: 50%; animation-delay: .43s; } .boot-chart i:nth-child(6) { height: 74%; animation-delay: .5s; }
.boot-chart i:nth-child(7) { height: 92%; animation-delay: .57s; }
/* Logo tam ortada durur (telefonun açılış görseliyle aynı yerde); yazılar onun altına yerleşir */
.boot-core { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.boot-text { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; display: flex; flex-direction: column; align-items: center; gap: 14px; white-space: nowrap; }
/* Işıltılı karo (karonun kendisi görselin ~%76'sı, gerisi ışıma). Telefonun açılış görselindeki yerinde ve boyutunda başlar, sonra hafifçe nefes alır */
.boot-logo { width: 150px; height: 150px; position: relative; animation: boot-breathe 2.4s ease-in-out .3s infinite; }
.boot-logo img { width: 100%; height: 100%; display: block; }
.boot-logo::after { content: ""; position: absolute; inset: 12px; border-radius: 36px; border: 1.5px solid rgba(25, 230, 200, .7); opacity: 0; animation: boot-ring 1.8s ease-out .4s infinite; }
.boot-name { font: 800 30px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.01em; animation: boot-name .8s cubic-bezier(.2,.8,.2,1) .25s both; }
.boot-tag { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #9fd9cf; display: flex; gap: 8px; align-items: center;
  animation: boot-up .7s ease .5s both; }
.boot-tag b { color: #19e6c8; font-weight: 800; }
.boot-bar { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 56px); transform: translateX(-50%); width: 132px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden;
  animation: boot-fade .5s ease .7s both; }
.boot-bar i { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: linear-gradient(90deg, transparent, #19e6c8, #fff); animation: boot-load 1.1s ease-in-out infinite; }
@keyframes boot-fade { from { opacity: 0; } }
@keyframes boot-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes boot-name { from { opacity: 0; transform: translateY(12px); letter-spacing: .2em; } }
@keyframes boot-breathe { 50% { transform: scale(1.035); } }
@keyframes boot-ring { 0% { opacity: .7; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes boot-rise { from { transform: scaleY(0); } }
@keyframes boot-load { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { #boot *, #boot *::after { animation: none !important; } #boot { transition: opacity .2s; } }

/* Giriş ekranı: marka logosu (telefonda formun üstünde, geniş ekranda soldaki tanıtım alanında büyük) */
.auth-hero { background: radial-gradient(circle at 18% 12%, rgba(25, 230, 200, .13), transparent 46%), radial-gradient(circle at 90% 100%, rgba(3, 85, 80, .45), transparent 50%), var(--side); }
.auth-hero .logo { font-size: 24px; gap: 14px; letter-spacing: -.01em; }
.auth-hero .logo-mark { width: 56px; height: 56px; border-radius: 15px; }
.auth-brand { display: none; }
@media (max-width: 900px) {
  .auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.01em; }
  .auth-brand img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; box-shadow: 0 10px 24px -10px rgba(3, 85, 80, .7); }
  .auth-brand img.logo-img { width: auto; max-width: 140px; box-shadow: none; }
  .auth-hero .logo { display: none; }
}

/* Mobil uygulamada görsel önizleme (viewImage) */
.img-view { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 10, 16, .94); display: grid; place-items: center; padding: calc(env(safe-area-inset-top, 0px) + 56px) 12px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.img-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.img-view button { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; }

/* ================= Mobil deneyim: alt sekmeler, hızlı işlem, kart listeler, koyu tema ================= */
/* Alt sekme çubuğu (telefonda): 4 bölüm + ortada ⊕ hızlı işlem */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: var(--panel); border-top: 1px solid var(--line); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tabbar { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px); }
    html.dark .tabbar { background: rgba(17, 28, 36, .82); }
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted);
    font-size: 10.5px; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
  .tabbar a svg { width: 23px; height: 23px; transition: transform .15s ease; }
  .tabbar a:active svg { transform: scale(.86); }
  .tabbar a.active { color: var(--brand); }
  .tabbar a.active::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
  .tabbar a.active svg { stroke-width: 2.4; }
  .tab-plus { display: grid; place-items: center; }
  .tab-plus button { width: 54px; height: 54px; border-radius: 18px; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: #fff;
    background: var(--brand); box-shadow: 0 10px 22px -8px rgba(15, 118, 110, .75), 0 0 0 4px var(--bg); transform: translateY(-13px);
    -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
  .tab-plus button:active { transform: translateY(-13px) scale(.92); }
  .tab-plus svg { width: 26px; height: 26px; transition: transform .22s ease; }
  body.sheet-open .tab-plus svg { transform: rotate(45deg); }
  body.has-tabbar .main { padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar #toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: calc(100vw - 32px); }
  body.has-tabbar .update-strip { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .sticky-foot { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  /* Klavye açıkken alt çubuk gizlenir (yazı alanını kapatmasın) */
  body.kb .tabbar { display: none; }
  body.kb.has-tabbar .main { padding-bottom: 60px; }
  /* Android Chrome'un kendi "çekip yenile"si yerine panelinki çalışsın (sayfa baştan yüklenmez) */
  html, body { overscroll-behavior-y: contain; }
}

/* Hızlı işlem penceresi (alttan açılır) */
.sheet-bg { position: fixed; inset: 0; z-index: 45; background: rgba(5, 12, 18, .5); display: flex; align-items: flex-end; opacity: 0; transition: opacity .2s ease; }
.sheet-bg.in { opacity: 1; }
.sheet { width: 100%; max-width: 640px; margin: 0 auto; background: var(--panel); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .22);
  padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-bg.in .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 14px; font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 16px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; line-height: 1.25;
  -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.quick-grid button:active { transform: scale(.95); }
.quick-grid i { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--c, var(--brand));
  box-shadow: 0 8px 16px -8px var(--c, var(--brand)); }
.quick-grid i svg { width: 23px; height: 23px; }

/* Telefonda tablolar yerine kart listesi (table.mlist):
   c-t başlık · c-s alt satır · c-a tutar (sağ) · c-b rozet (sağ alt) · c-m bilgi satırı · c-p fotoğraf · c-x telefonda gizli */
@media (max-width: 600px) {
  table.mlist, table.mlist tbody { display: block; }
  table.mlist tr:has(> th) { display: none; }
  table.mlist tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "s b" "m m"; column-gap: 12px; row-gap: 2px;
    align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); -webkit-tap-highlight-color: transparent; }
  table.mlist tr:last-child { border-bottom: 0; }
  table.mlist.thumbs tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "p t a" "p s b" "p m m"; }
  table.mlist td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  table.mlist td.c-x, table.mlist td.hide-m { display: none; }
  table.mlist td.m-only { display: block; }
  table.mlist .c-t { grid-area: t; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
  table.mlist .c-s { grid-area: s; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.mlist .c-a { grid-area: a; text-align: right; font-weight: 700; white-space: nowrap; }
  table.mlist .c-b { grid-area: b; justify-self: end; text-align: right; }
  table.mlist .c-m { grid-area: m; color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
  table.mlist .c-p { grid-area: p; align-self: center; margin-right: 12px; }
  table.mlist .c-p .thumb { width: 54px; height: 54px; border-radius: 12px; }
  table.mlist tr.click:active { background: var(--hover); }
  table.mlist tr.click:hover td { background: none; }
}

/* Cari: hızlı iletişim (ara / WhatsApp / e-posta / yol tarifi) */
.contact-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 16px; }
.contact-bar a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; font-size: 13px; -webkit-tap-highlight-color: transparent; }
.contact-bar a:active { transform: scale(.96); }
.contact-bar svg { width: 17px; height: 17px; color: var(--c); flex: none; }
@media (max-width: 600px) {
  .contact-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .contact-bar a { flex-direction: column; gap: 5px; border-radius: 14px; padding: 11px 4px 9px; font-size: 12px; }
  .contact-bar svg { width: 22px; height: 22px; }
}

/* Çekip yenile göstergesi */
.ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 54px); left: 50%; z-index: 31; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%;
  background: var(--panel); color: var(--muted); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); display: grid; place-items: center; opacity: 0; pointer-events: none;
  transform: translateY(-48px); }
.ptr svg { width: 20px; height: 20px; }
.ptr.ready { color: var(--brand); }
.ptr.back { transition: transform .25s ease, opacity .25s ease; }
.ptr.spin svg { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Face ID / parmak izi kilidi */
.bio-lock { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #fff;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(circle at 50% 30%, rgba(25, 230, 200, .14), transparent 55%), linear-gradient(180deg, #011823, #00101d); }
.bio-lock img { width: 88px; height: 88px; border-radius: 24px; box-shadow: 0 0 0 1px rgba(25, 230, 200, .35), 0 14px 34px -12px rgba(25, 230, 200, .55); }
.bio-lock b { font-size: 22px; margin-top: 8px; }
.bio-lock p { color: #9fd9cf; margin: 0 0 22px; }
.bio-lock .btn.primary { padding: 12px 24px; font-size: 15px; }
.bio-lock .btn.ghost { color: #9fb3bf; margin-top: 4px; }
/* Uygulama arka plana geçerken (son uygulamalar ekranındaki görüntü) içerik gizlenir */
html.privacy #app, html.privacy #modal-root { filter: blur(22px); }

/* Bu cihaz: görünüm / kilit tercihleri (Ayarlar → Profilim) */
.device-prefs .seg span { min-width: 84px; text-align: center; }
.device-prefs .check { margin-top: 14px; font-size: 14px; }
.device-prefs .check input { width: 20px; height: 20px; }

/* ---------- Koyu tema: html.dark (telefon koyu moddaysa ya da Ayarlar → Profilim → Görünüm: Koyu) ---------- */
html.dark {
  color-scheme: dark;
  --bg: #0a131a; --panel: #111c24; --panel-2: #15212b; --hover: #18262f; --soft: #1d2b36;
  --ink: #e5ecf1; --ink-2: #c5d2dc; --muted: #8da0af; --line: #22323e; --line-2: #34485a;
  --brand-soft: rgba(20, 184, 166, .14); --danger: #fb923c; --ok: #4ade80; --warn: #fbbf24;
}
html.dark .code-pill, html.dark .chip.on, html.dark .steps .done b { color: #2dd4bf; }
html.dark .tabbar a.active { color: #2dd4bf; }
html.dark .tabbar a.active::before { background: #2dd4bf; }
html.dark { --link: #2dd4bf; }
html.dark .tabbar a { color: var(--muted); }
html.dark .btn:not(.primary):not(.danger):not(.ai), html.dark .quick-grid button, html.dark .contact-bar a { color: var(--ink); }
html.dark .btn.primary, html.dark .bio-lock .btn.primary { color: #fff; }
html.dark .btn.danger { color: var(--danger); }
html.dark .toast { background: #22323e; color: #e5ecf1; border: 1px solid #34485a; }
html.dark .toast.error { background: #7c2d12; border-color: #9a3412; }
html.dark .hint { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .3); color: #93c5fd; }
html.dark .ai-box { background: linear-gradient(135deg, rgba(79, 70, 229, .16), rgba(15, 118, 110, .16)); border-color: rgba(129, 140, 248, .3); }
html.dark .special { background: rgba(250, 204, 21, .08); border-color: rgba(250, 204, 21, .35); }
html.dark .special label { color: #fde68a; }
html.dark .errs { background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .3); color: #fdba74; }
html.dark .auth-alert { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }
html.dark .scan-count { background: rgba(34, 197, 94, .16); color: #86efac; }
html.dark .drop { border-color: var(--line-2); }
html.dark .neg-debt { color: #fbbf24; }
html.dark .badge.gonderildi, html.dark .role-alici, html.dark .k-satis { background: rgba(56, 189, 248, .16); color: #7dd3fc; }
html.dark .badge.onaylandi, html.dark .k-tahsilat { background: rgba(34, 197, 94, .16); color: #86efac; }
html.dark .badge.reddedildi, html.dark .badge.err { background: rgba(249, 115, 22, .16); color: #fdba74; }
html.dark .badge.parasut, html.dark .role-ikisi { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
html.dark .role-satici, html.dark .k-alis { background: rgba(245, 158, 11, .16); color: #fcd34d; }
html.dark .k-odeme { background: rgba(239, 68, 68, .16); color: #fca5a5; }
html.dark .modal-bg { background: rgba(0, 0, 0, .6); }
html.dark .tab-plus button { box-shadow: 0 10px 22px -8px rgba(20, 184, 166, .55), 0 0 0 4px var(--bg); }
html.dark .vis-grid img, html.dark .thumb { border-color: var(--line); }
html.dark .msg.bot, html.dark .tmsg.from-them { border-color: var(--line); }
html.dark .tmsg.from-me { color: var(--ink); }
@media (max-width: 600px) { .card > .table-wrap.flush { margin: 0 -18px -18px; } }
@media (max-width: 480px) { .card > .table-wrap.flush { margin: 0 -14px -14px; } }

/* Giriş ekranı: Gizlilik / KVKK / Çerezler / Koşullar */
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.auth-legal a { color: var(--muted); }
.auth-legal a:hover { color: var(--link, var(--brand)); }
.auth-legal-note { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.auth-legal-note a { color: inherit; text-decoration: underline; }

/* Face ID / parmak izi ile giriş (app.js → bioLogin, bioOffer) */
.bio-lock .btn.primary svg, .bio-btn svg { width: 22px; height: 22px; flex: none; }
.bio-lock .btn.primary { display: inline-flex; align-items: center; gap: 8px; }
.bio-login { margin: 4px 0 6px; }
.bio-btn { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, var(--panel, #fff)); color: var(--ink); cursor: pointer; font: inherit; transition: transform .15s, background .2s; }
.bio-btn:active { transform: scale(.985); }
.bio-btn:disabled { opacity: .6; }
.bio-btn svg { width: 34px; height: 34px; color: var(--brand); }
.bio-btn b { display: block; font-size: 15.5px; }
.bio-btn small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bio-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; color: var(--muted); font-size: 12.5px; }
.bio-or::before, .bio-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bio-off { text-align: center; margin: 12px 0 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bio-offer { text-align: center; padding: 4px 4px 2px; }
.bio-offer-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--panel, #fff)); color: var(--brand); }
.bio-offer-ico svg { width: 36px; height: 36px; }
.bio-offer-q { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.bio-offer .muted { font-size: 13.5px; line-height: 1.55; margin: 0; }

/* İşler (app.js → viewJobs, viewJob, jobForm) */
.badge.pri-acil { background: #fee2e2; color: #b91c1c; }
.badge.pri-normal { background: #dbeafe; color: #1d4ed8; }
.badge.pri-sonra { background: var(--soft); color: var(--muted); }
.badge.st-bekliyor { background: #fef3c7; color: #92400e; }
.badge.st-yapiliyor { background: #e0e7ff; color: #3730a3; }
.badge.st-tamam { background: #dcfce7; color: #166534; }
.badge.st-iptal { background: var(--soft); color: var(--muted); text-decoration: line-through; }
html.dark .badge.pri-acil { background: #4c1d1d; color: #fca5a5; }
html.dark .badge.pri-normal { background: #1e2f4d; color: #93c5fd; }
html.dark .badge.st-bekliyor { background: #43330f; color: #fcd34d; }
html.dark .badge.st-yapiliyor { background: #2a2c5a; color: #c7d2fe; }
html.dark .badge.st-tamam { background: #12391f; color: #86efac; }
.jobs-list tr.pri-row-acil td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.jobs-list tr.done { opacity: .62; }
.due-late { color: #dc2626; }
.due-today { color: #d97706; }
.job-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.job-actions .btn { justify-content: center; padding: 13px 10px; font-size: 15px; }
.job-info { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.job-info .ji { display: grid; grid-template-columns: 110px 1fr; gap: 10px; width: 100%; }
.job-info .ji > span { color: var(--muted); font-size: 13px; }
.job-info .ji.block { grid-template-columns: 1fr; gap: 4px; }
.job-info .btn svg { width: 16px; height: 16px; }
.job-desc { white-space: pre-wrap; line-height: 1.55; }
.jnotes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.jnote { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.jnote.mine { background: var(--brand-soft); border-color: transparent; }
.jnote.is-status { background: var(--soft); border-style: dashed; }
.jnote .msg-body { white-space: pre-wrap; }
.jnote-form textarea { width: 100%; margin-bottom: 8px; }
.jnote-form .attach img, .modal .attach img { max-height: 90px; border-radius: 8px; vertical-align: middle; margin-right: 6px; }
.assign-box { border: 1px solid var(--line); border-radius: 12px; max-height: 300px; overflow-y: auto; }
.assign-group { padding: 8px 12px; border-top: 1px solid var(--line); }
.assign-group:first-child { border-top: 0; }
.assign-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.assign-user { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-weight: 400; cursor: pointer; }
.assign-user input { width: 18px; height: 18px; }
.assign-user.off { opacity: .55; cursor: not-allowed; }
.pri-seg input[value="acil"]:checked + span { background: #dc2626; color: #fff; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.tab-badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #dc2626; color: #fff; font: 700 10.5px/17px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
@media (max-width: 600px) {
  .job-info .ji { grid-template-columns: 1fr; gap: 2px; }
  .jobs-list tr.pri-row-acil td:first-child { box-shadow: none; }
  .jobs-list tr.pri-row-acil { box-shadow: inset 4px 0 0 #dc2626; }
}

/* Ürünleri toplu aktar (#/urunler/aktar) */
.hint.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
html.dark .hint.warn { background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .3); color: #fdba74; }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 6px; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; cursor: pointer; }
.pim-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
.pim-map .field { min-width: 0; }
.pim-opts { display: flex; flex-direction: column; gap: 6px; }
.pim-opts .check .muted { font-weight: 400; }
.pim-sel { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; margin-top: 8px; }
.pim-sel .field { margin-bottom: 0; }
.pim-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pim-foot .btn.primary { margin-left: auto; }
.pim-run { text-align: center; padding: 28px 18px; }
.pim-run .progress { margin: 14px auto 8px; max-width: 420px; height: 8px; }
.pim-url { display: flex; gap: 8px; }
.pim-url input { flex: 1; min-width: 0; }
.pim-url .btn { flex: none; }
.pim-scan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.pim-spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--brand); animation: ptr-spin .8s linear infinite; }
.pim-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pim-list { border: 1px solid var(--line); border-radius: 10px; max-height: 460px; overflow-y: auto; background: var(--panel); }
.pim-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; font-weight: 400; }
.pim-item:last-child { border-bottom: 0; }
.pim-item:hover { background: var(--hover); }
.pim-item input { width: 18px; height: 18px; flex: none; margin: 0; }
.pim-item .thumb { width: 44px; height: 44px; flex: none; }
.pim-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pim-name b { overflow-wrap: anywhere; font-size: 14px; color: var(--ink); }
.pim-name .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pim-price { flex: none; font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--ink); }
@media (max-width: 600px) {
  .pim-url { flex-direction: column; }
  .pim-list { max-height: 55vh; }
}

/* Cari formu: vergi no ile bul */
.tax-find { display: flex; gap: 6px; }
.tax-find input { flex: 1; min-width: 0; }
.tax-find .btn { flex: none; padding-left: 10px; padding-right: 10px; }
.tax-msg { font-size: 12px; margin-top: 4px; line-height: 1.4; }
.tax-msg:empty { display: none; }
.tax-msg.ok { color: var(--ok); }
.tax-msg.warn, .tax-msg.err { color: var(--danger); }

/* Teklif e-postası: onay / yanıt geçmişi, Ayarlar → E-posta */
.hint.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
html.dark .hint.ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .3); color: #86efac; }
.qmail-card { margin-bottom: 16px; }
.qmail-card h3 { font-size: 14px; margin: 4px 0 6px; }
.qmail-card .hint:last-child { margin-bottom: 0; }
.qmail-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.qmail-list li { overflow-wrap: anywhere; }
.qmail-snip { margin-top: 3px; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--soft); border-radius: 4px; white-space: pre-wrap; color: var(--muted, #475569); font-size: 12.5px; }
.err-text { color: #b91c1c; }
html.dark .err-text { color: #fca5a5; }
.mail-adv { margin-top: 4px; }
.mail-adv summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted, #475569); }

/* Teklif kalemi görseli (düzenleyicide satır başı küçük kutu) */
.it-img { width: 42px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; color: var(--muted); overflow: hidden; }
.it-img.empty { border-style: dashed; opacity: .75; }
.it-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.it-img-pre { display: flex; align-items: center; justify-content: center; min-height: 120px; max-height: 240px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 8px; }
.it-img-pre img { max-width: 100%; max-height: 220px; object-fit: contain; }

/* Teklif koşulları: seçimler + PDF maddeleri önizlemesi */
.terms-box { grid-column: 1 / -1; min-width: 0; }
.terms-pre { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel-2); }
.terms-pre ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.terms-pre .en { color: #2563eb; }
html.dark .terms-pre .en { color: #93c5fd; }
.terms-box .linkbtn { margin-top: 8px; }

/* Kalem görseli: boşken "+ Görsel", bilgisayarda sürükle-bırak */
.it-img { position: relative; flex-direction: column; gap: 0; line-height: 1; }
.it-img.empty { border-style: dashed; opacity: 1; color: var(--brand, #0f766e); border-color: currentColor; background: var(--brand-soft); }
.it-img-plus { font-size: 16px; font-weight: 700; }
.it-img-txt { font-size: 9px; font-weight: 600; margin-top: 1px; }
.it-img-edit { position: absolute; right: 1px; bottom: 1px; font-size: 10px; background: var(--panel); border-radius: 4px; padding: 0 2px; opacity: 0; transition: opacity .15s; }
.it-img:hover .it-img-edit { opacity: 1; }
.it-img:hover { border-color: var(--brand, #0f766e); }
.it-img-pre { flex-direction: column; gap: 8px; text-align: center; }
.drop-hint { font-size: 12px; color: var(--muted); }
.drop-on { outline: 2px dashed var(--brand, #0f766e); outline-offset: 2px; background: var(--hover) !important; }
.loading { opacity: .5; pointer-events: none; }
@media (hover: none) { .hide-touch { display: none !important; } }

/* Koşullar: İngilizce alanlar yalnızca iki dilli teklifte */
.terms-box .bi-only { display: none; }
.terms-box.bi .bi-only { display: block; }
.terms-pre .no-en { font-size: 11px; color: var(--warn, #b45309); border: 1px dashed currentColor; border-radius: 4px; padding: 0 4px; margin-left: 4px; }

/* Açılış bildirimi: köşeden kayan kart (bilgisayarda sağ üst, telefonda üstten iner) */
#notif-stack { position: fixed; z-index: 90; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); width: 360px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.notif-pop { pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 10px; align-items: flex-start; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 34px 12px 12px; box-shadow: 0 12px 32px rgba(15, 29, 43, .18), 0 2px 6px rgba(15, 29, 43, .08); touch-action: none; user-select: none;
  opacity: 0; transform: translateX(calc(100% + 24px)); transition: transform .42s cubic-bezier(.2, .9, .25, 1.15), opacity .3s ease; }
.notif-pop.in { opacity: 1; transform: none; }
.notif-pop.out { opacity: 0; transform: translateX(calc(100% + 24px)); transition: transform .3s ease-in, opacity .25s ease-in; }
.notif-pop.out-side { transition: transform .25s ease-in, opacity .25s ease-in; }
.notif-pop.dragging { transition: none; }
.notif-pop.lv-onemli { border-left-color: var(--ok); }
.notif-pop.lv-uyari { border-left-color: var(--warn); }
.notif-pop.has-link .np-main { cursor: pointer; }
.np-ico { font-size: 20px; line-height: 1.2; flex: none; }
.np-main { flex: 1; min-width: 0; }
.np-title { font-weight: 700; font-size: 14px; line-height: 1.35; }
.np-body { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; overflow-wrap: anywhere; }
.np-link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.np-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.np-x:hover { background: var(--hover); color: var(--ink); }
.np-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand); opacity: .35; transform-origin: left; animation: np-bar var(--np-left, 15000ms) linear forwards; }
.notif-pop.paused .np-bar { animation-play-state: paused; }
@keyframes np-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 600px) {
  #notif-stack { left: 50%; right: auto; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top, 0px)); width: calc(100vw - 24px); max-width: 480px; }
  .notif-pop { transform: translateY(calc(-100% - 24px)); }
  .notif-pop.out { transform: translateY(calc(-100% - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .notif-pop, .notif-pop.out { transition: opacity .2s; transform: none; }
}
html.dark .notif-pop { box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }

/* Sol menüdeki tema şalteri (app.js → themeSwitch): açıkta güneş, koyuda ay */
.theme-sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: 0; padding: 0 0 12px; margin: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--side-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.tsw-track { position: relative; flex: none; width: 50px; height: 26px; border-radius: 999px; background: #3b5566; box-shadow: inset 0 1px 3px rgba(0,0,0,.35); transition: background .25s; }
.tsw-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #f59e0b; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); transition: transform .28s cubic-bezier(.4,1.4,.6,1), color .25s, background .25s; }
.tsw-knob i { grid-area: 1 / 1; display: grid; transition: opacity .2s, transform .28s; }
.tsw-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
.theme-sw[aria-checked="true"] .tsw-track { background: #1d6a62; }
.theme-sw[aria-checked="true"] .tsw-knob { transform: translateX(24px); background: #0f2532; color: #fde68a; }
.theme-sw[aria-checked="true"] .tsw-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
.theme-sw[aria-checked="true"] .tsw-moon { opacity: 1; transform: none; }
.theme-sw:focus-visible .tsw-track { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tsw-knob, .tsw-knob i, .tsw-track { transition: none; } }

/* Ayarlar → E-posta: kurulum rehberi kutusu */
.guide-link { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.guide-link .gl-ico { font-size: 22px; line-height: 1; }
.guide-link div { flex: 1; min-width: 0; font-size: 13px; }
.guide-link div b { display: block; color: var(--ink); }
.guide-link div span { color: var(--muted); }
.guide-link .btn { flex: none; white-space: nowrap; }
.pw-note { display: block; font-size: 11.5px; margin-top: 4px; line-height: 1.4; }
@media (max-width: 480px) { .guide-link { flex-wrap: wrap; } .guide-link .btn { width: 100%; text-align: center; } }

/* Ödeme planı (cari + onaylanan teklif) */
.pay-card .pay-list td.c-act { white-space: nowrap; }
.pay-card .pay-list td.c-act .btn + .btn { margin-left: 4px; }
.pay-card .pay-list tr.pay-done td { color: var(--muted); }
.pay-card .pay-rem { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pay-card div.pay-rem span + span::before { content: ' · '; }
.pay-card .pay-sum { font-size: 13px; margin-top: 8px; text-align: right; }
.pp-rows { margin: 4px 0 6px; max-height: 300px; overflow-y: auto; }
.pp-rows input { padding: 6px 8px; }
#qpay-card { margin-top: 16px; }
@media (max-width: 600px) {
  table.mlist.pay-list td.c-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; text-align: left; white-space: normal; }
  table.mlist.pay-list td.c-act .btn + .btn { margin-left: 0; }
  .pay-card .pay-rem-d { display: none; }
}
