/* Bay-Moto Yanımda — yönetim paneli. WordPress/Sanity tarzı: koyu kenar menü + sade içerik alanı. */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --brand: #d71a28;
  --brand-hover: #b9141f;
  --brand-soft: #fde8ea;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #16181d;
  --text-2: #4b5260;
  --muted: #7a8291;
  --hover: #f1f3f6;
  --selected: #fff4f5;

  --success: #127a3e; --success-soft: #e3f5ea;
  --danger: #c4202e;  --danger-soft: #fdeaec;
  --warn: #a35a00;    --warn-soft: #fff1dc;
  --info: #1f5fbf;    --info-soft: #e6effd;

  --nav-bg: #15171c;
  --nav-bg-2: #1d2027;
  --nav-text: #c3c8d2;
  --nav-muted: #7d8492;
  --nav-active: #ffffff;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --sidebar-w: 252px;
  --pane-w: 600px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-soft: #3a1418;
    --bg: #0e1013;
    --surface: #16191e;
    --surface-2: #1b1f25;
    --border: #262b33;
    --border-strong: #353b45;
    --text: #eceef2;
    --text-2: #b7bdc8;
    --muted: #868e9c;
    --hover: #1e232a;
    --selected: #2a1619;
    --success: #4ccb7f; --success-soft: #12301f;
    --danger: #ff6b76;  --danger-soft: #3a1418;
    --warn: #ffb84d;    --warn-soft: #36270d;
    --info: #7aa7ff;    --info-soft: #14233d;
    --nav-bg: #0a0b0e;
    --nav-bg-2: #14161b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--danger); min-height: 1.25em; font-size: 13px; }
.spacer { flex: 1; }
.icon { display: inline-flex; flex: none; }

/* ---------- Form kontrolleri ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1;
  padding: 9px 14px; min-height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { min-height: 30px; padding: 6px 10px; font-size: 12.5px; }
.btn.lg { min-height: 42px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn.icon-only { padding: 0; width: 36px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.success:hover:not(:disabled) { filter: brightness(1.08); }
.btn.subtle { background: var(--surface-2); border-color: var(--border); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: var(--danger); background: transparent; border-color: transparent; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.primary.subtle-primary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn.confirming, .btn.confirming:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.on-dark { color: var(--nav-text); }
.btn.on-dark:hover { background: var(--nav-bg-2); color: #fff; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.success { background: var(--success-soft); color: var(--success); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.neutral { background: var(--hover); color: var(--text-2); }

.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px;
}

/* ---------- Giriş ekranları ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; }
.auth-logo { width: 100%; max-width: 220px; height: 64px; object-fit: contain; background: #000; border-radius: 10px; justify-self: center; margin-bottom: 8px; }
.auth h1 { font-size: 22px; text-align: center; }
.auth .muted { text-align: center; }
.stack { display: grid; gap: 6px; }
.stack .btn { margin-top: 8px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 6px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--nav-bg); color: var(--nav-text); display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--nav-bg-2); color: #fff; font-weight: 700; letter-spacing: .02em; }
.sidebar-brand img { height: 34px; width: auto; border-radius: 6px; }
.sidebar-brand span { font-size: 13px; color: var(--nav-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav-group { display: grid; gap: 2px; margin-bottom: 14px; }
.nav-heading { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--nav-muted); padding: 10px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--nav-text); font-weight: 500; position: relative; }
.nav-item:hover { background: var(--nav-bg-2); color: #fff; }
.nav-item.active { background: var(--nav-bg-2); color: var(--nav-active); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item.active .icon { color: var(--brand); }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge.quiet { background: var(--nav-bg-2); color: var(--nav-muted); }
.nav-item.active .nav-badge.quiet { background: #2a2e37; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--nav-bg-2); }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sidebar-user .cell-title { color: #fff; }
.sidebar-user .cell-meta { color: var(--nav-muted); }
.sidebar .avatar { background: #2a2e37; color: #fff; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.view { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }

/* ---------- Sayfa başlığı ---------- */
.page-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px; margin-bottom: 20px; }
.page-title { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.page-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--brand); flex: none; box-shadow: var(--shadow); }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-desc { color: var(--muted); margin-top: 3px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; }
.subtabs { grid-column: 1 / -1; display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.subtab { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--text); border-bottom-color: var(--brand); }
.subtab .count { background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }

/* ---------- Liste + panel ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.split.has-pane { grid-template-columns: minmax(0, 1fr) minmax(360px, var(--pane-w)); }
.split-pane:empty { display: none; }
.split-pane { position: sticky; top: 20px; height: calc(100vh - 136px); min-height: 420px; display: flex; }

.list-wrap { display: grid; gap: 14px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; }
.search .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px; background: var(--surface); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--surface); }

/* Tablo (WordPress list table) */
.table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tr { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); }
.tr:first-child { border-top: 0; }
a.tr:hover { background: var(--hover); }
.tr.selected { background: var(--selected); box-shadow: inset 3px 0 0 var(--brand); }
.th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding-top: 10px; padding-bottom: 10px; }
.cols-users .tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 100px 130px; }
.cols-history .tr { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 90px minmax(0, .8fr); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-text { display: grid; min-width: 0; gap: 1px; }
.cell-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-meta { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-desc { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--muted); background: var(--surface-2); border-radius: 6px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }

.empty { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 48px 24px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty .icon { color: var(--border-strong); }

/* ---------- Belge paneli (Sanity tarzı) ---------- */
.doc { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.doc-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--border); }
.doc-title { flex: 1; min-width: 0; display: grid; }
.doc-title h2 { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-sub { color: var(--muted); font-size: 12px; }
.doc-body { flex: 1; overflow-y: auto; padding: 20px; }
.doc-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }

.fields { display: flex; flex-wrap: wrap; gap: 18px 14px; }
.field { display: grid; gap: 6px; flex: 1 1 100%; min-width: 0; align-content: start; }
.field.w-narrow { flex: 1 1 120px; }
.field.w-auto { flex: 1 1 160px; }
.field.w-wide, .field.w-full { flex: 1 1 100%; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.required-mark { color: var(--brand); margin-left: 3px; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.counter { font-variant-numeric: tabular-nums; white-space: nowrap; }
.image-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; height: 180px; display: grid; place-items: center; overflow: hidden; }
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-empty { display: grid; justify-items: center; gap: 6px; color: #9aa1ad; font-size: 12.5px; }
.form-row-end { flex-basis: 100%; display: flex; justify-content: flex-end; }

/* Kullanıcı detayı */
.detail { display: grid; gap: 10px; }
.detail h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 12px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.kv span { color: var(--muted); }
.balance-card { display: flex; justify-content: space-between; align-items: baseline; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand), #8c0f18); color: #fff; }
.balance-card strong { font-size: 22px; }

/* ---------- Talepler ---------- */
.req-list { display: grid; gap: 10px; }
.req { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 12px; }
.req.short { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.req-main { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 320px) 170px; gap: 14px; align-items: center; }
.req-title { font-weight: 600; }
.req-amount { display: grid; justify-items: end; gap: 2px; }
.req-actions { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px dashed var(--border); }
.req-actions .note { flex: 1; max-width: 420px; padding: 7px 10px; }
.req-actions .note + .btn { margin-left: auto; }
.kind { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.kind-earn { background: var(--success-soft); color: var(--success); }
.kind-spend { background: var(--info-soft); color: var(--info); }
.amt { font-variant-numeric: tabular-nums; font-size: 16px; }
.amt.earn { color: var(--success); }
.amt.spend { color: var(--info); }
.balance { font-size: 12px; color: var(--muted); }
.balance.warn { color: var(--danger); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; border-radius: 8px; }
.who:hover .cell-title { color: var(--brand); }

/* ---------- Pano ---------- */
.dash { display: grid; gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 4px; position: relative; transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.stat-icon { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.stat-label { color: var(--muted); font-weight: 500; font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--muted); font-size: 12.5px; }
.stat.attention { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.stat.attention .stat-icon { background: var(--brand); color: #fff; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; }
.panel .empty { border: 0; padding: 28px 12px; background: transparent; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel-head h3 { font-size: 15px; }
.link { color: var(--brand); font-weight: 600; font-size: 13px; }
.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--border); }
.mini-row:first-child { border-top: 0; }
a.mini-row:hover { background: var(--hover); border-radius: 8px; }
.mini-row .cell-text { flex: 1; }
.quick-list { display: grid; gap: 6px; }
.quick { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 500; }
.quick > span:nth-child(2) { flex: 1; }
.quick:hover { border-color: var(--brand); color: var(--brand); }
.quick .icon:last-child { color: var(--muted); }

/* ---------- Şubeler ---------- */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.branch { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 14px; }
.branch.inactive { opacity: .65; }
.branch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qr-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qr-box { min-width: 0; margin: 0; display: grid; justify-items: center; gap: 8px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); text-align: center; }
.qr { background: #fff; padding: 8px; border-radius: 6px; }
.qr { width: 100%; max-width: 148px; }
.qr img, .qr canvas { display: block; width: 100% !important; height: auto !important; }
.qr-box figcaption { display: grid; font-size: 12px; color: var(--muted); min-width: 0; }
.qr-box figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-box figcaption strong { color: var(--text); font-size: 13px; }
.branch-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Ayarlar ---------- */
.settings { max-width: 760px; display: grid; gap: 16px; }
.logo-preview { height: 72px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; justify-content: center; padding: 8px; color: #9aa1ad; }
.logo-preview.dark { background: #000; }
.logo-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--text); color: var(--surface); padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; max-width: calc(100% - 32px); }
.toast[data-tone="success"] { background: var(--success); color: #fff; }
.toast[data-tone="danger"] { background: var(--danger); color: #fff; }
.toast[data-tone="warn"] { background: var(--warn); color: #fff; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1180px) {
  .split.has-pane { grid-template-columns: minmax(0, 1fr); }
  .split.has-pane .split-pane { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); height: auto; min-height: 0; max-height: none; top: 0; z-index: 40; padding: 12px; background: color-mix(in srgb, var(--bg) 40%, transparent); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; display: none; }
  .shell.nav-open .scrim { display: block; }
  .topbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--nav-bg); color: #fff; position: sticky; top: 0; z-index: 20; }
  .topbar .btn { color: #fff; }
  .topbar .btn:hover { background: var(--nav-bg-2); }
  .topbar-logo { height: 30px; border-radius: 5px; }
  .view { padding: 18px 16px 40px; }
  .page-header { grid-template-columns: minmax(0, 1fr); }
  .page-icon { display: none; }
  .tr, .cols-users .tr, .cols-history .tr { grid-template-columns: minmax(0, 1fr) auto; }
  .tr > :nth-child(3), .cols-users .tr > :nth-child(2), .cols-history .tr > :nth-child(2) { display: none; }
  .cols-users .tr > :nth-child(4), .cols-history .tr > :nth-child(4) { display: none; }
  .req-main { grid-template-columns: auto minmax(0, 1fr) auto; }
  .req-main .who { grid-column: 2 / -1; grid-row: 2; }
  .req-actions { flex-wrap: wrap; }
  .req-actions .note { max-width: none; flex-basis: 100%; }
  .req-actions .note + .btn { margin-left: 0; }
  .split.has-pane .split-pane { width: 100%; padding: 0; }
  .split.has-pane .split-pane .doc { border-radius: 0; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .qr-pair { grid-template-columns: 1fr; }
}

}

/* ---------- Fotoğraf yükleme ---------- */
.upload-field { display: grid; gap: 8px; }
.uploader { position: relative; height: 200px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.uploader:hover, .uploader:focus-visible, .uploader.drag { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface-2)); }
.uploader.busy { cursor: progress; }
.uploader-preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
.uploader-preview:has(img) { background: #fff; }
.uploader-preview.dark:has(img) { background: #000; }
.uploader-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.uploader .image-empty { display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--muted); font-size: 12.5px; }
.uploader .image-empty strong { color: var(--text); font-size: 14px; }
.upload-progress { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 15%, transparent); overflow: hidden; }
.upload-bar { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.uploader.busy .uploader-preview { opacity: .55; }
.upload-actions { display: flex; gap: 8px; }
.upload-actions { flex-wrap: wrap; align-items: center; }
.format-label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.format-select { width: auto; padding: 5px 28px 5px 9px; font-size: 12.5px; min-height: 30px; }
.upload-info { flex-basis: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.upload-info:empty { display: none; }

/* Marka logosu Storage'dan (settings/app) gelir; adres gelene kadar kırık görsel gösterme. */
img[data-brand-logo]:not([src]) { visibility: hidden; }
.avatar-img { object-fit: cover; background: var(--surface-2); padding: 0; }
.req-actions .points-input { width: 110px; flex: none; padding: 7px 10px; font-variant-numeric: tabular-nums; }
.req-title .inline-pill { margin-left: 8px; vertical-align: 1px; }

/* Yeni deploy uyarısı (js/version.js) */
.update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border, rgba(127,127,127,.3)); box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 13.5px; }
/* Kullanıcıya bildirim (views/users.js) */
.message-form { display: grid; gap: 10px; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inbox-head h4 { margin-top: 12px; }
.mini-row .cell-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Motor yaşı indirim kademeleri (Ayarlar) */
.tier-rows { display: grid; gap: 8px; }
.tier-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .tier-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Motor kartı fotoğrafları (Kullanıcılar → detay) */
.motor-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.motor-photo { display: grid; gap: 4px; width: 96px; font-size: 12px; color: var(--muted); text-decoration: none; }
.motor-photo img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }

/* Randevular */
.appt-days { display: grid; gap: 16px; }
.appt-time { font-size: 18px; font-variant-numeric: tabular-nums; min-width: 56px; }
.checks { display: flex; gap: 10px; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }

/* Personel satırı: rol seçimi + işlem butonları */
.row-actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions select { padding: 5px 8px; }

/* ---------- Görev kartları (Randevular, Aramalar, Yol yardımı): sol bilgi, sağ özet ---------- */
.task-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.task-main.with-time { grid-template-columns: 64px minmax(0, 1fr) auto; }
.task-time { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.task-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.task-side { display: grid; justify-items: end; gap: 4px; text-align: right; }
/* Etiketli bilgi satırları: "Telefon: 0532 …" — uzun metinler alt satıra sarılır, kesilmez. */
.facts { display: grid; gap: 4px; margin-top: 6px; font-size: 13.5px; }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.big-link { font-weight: 600; color: var(--brand); text-decoration: none; }
.big-link:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .task-main, .task-main.with-time { grid-template-columns: minmax(0, 1fr); }
  .task-side { justify-items: start; text-align: left; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Pasif birincil butonlar gerçekten pasif görünsün (soluk yeşil "basılır mı?" sorusu yaratıyordu). */
.btn.success:disabled, .btn.primary:disabled { background: var(--surface-2); border-color: var(--border); color: var(--muted); opacity: 1; }

/* Fotoğraf alanındaki teknik dosya biçimi seçimi "Gelişmiş" altında */
.format-details { font-size: 12.5px; color: var(--muted); }
.format-details summary { cursor: pointer; }
.format-details[open] .format-label { margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; }

/* Ana sayfa: bugün yapılacaklar */
.todo { color: inherit; text-decoration: none; }
.todo-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.todo.attention .todo-icon { background: var(--warn-soft, var(--surface-2)); color: var(--warn, var(--brand)); }
.todo.danger .todo-icon { background: var(--danger-soft); color: var(--danger); }

/* Müşteri sayfası: katlanır işlem bölümleri */
.action-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.action-section + .action-section { margin-top: 8px; }
.action-section summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: revert; }
.action-section[open] summary { border-bottom: 1px solid var(--border); }
.action-body { padding: 14px; display: grid; gap: 12px; }

/* Onay kartı: puan açıklaması sağ sütunda alt satıra sarılır (müşteri bilgisinin üstüne binmesin). */
.req-main { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 300px) 210px; }
.req-amount .cell-meta, .req-amount .balance { white-space: normal; text-align: right; overflow-wrap: anywhere; }
/* Panel formlarının son alanı alt çubuğun arkasında kalmasın. */
.doc-body { padding-bottom: 40px; }
