/* ═══════════════════════════════════════════════════════════════
   Yorum Tarama — tasarım sistemi (2026-10-06 yenileme)
   Tüm renk/boşluk/köşe/gölge değerleri aşağıdaki değişkenlerden gelir.
   Sınıf adları eski sürümle aynıdır (app.js/index.html bunlara bağlı).
   ═══════════════════════════════════════════════════════════════ */
:root {
  --primary: #5b5fe6;
  --primary-600: #4b4fd4;
  --primary-50: #eef0ff;
  --primary-100: #dfe2ff;
  --brand-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --text: #161a2b;
  --text-2: #4a5068;
  --text-3: #8a90a6;
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e4e6ef;
  --border-strong: #d3d6e3;

  --success: #16a34a; --success-50: #ecfdf3; --success-700: #166534;
  --danger: #dc2626;  --danger-50: #fef2f2;  --danger-700: #b91c1c;
  --warning: #d97706; --warning-50: #fffbeb; --warning-700: #92400e;
  --info: #2563eb;    --info-50: #eff6ff;    --info-700: #1d4ed8;
  --wa: #22c55e;      --wa-600: #16a34a;     --wa-50: #f0fdf4;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(22, 26, 43, .05);
  --shadow: 0 1px 3px rgba(22, 26, 43, .06), 0 4px 12px rgba(22, 26, 43, .04);
  --shadow-lg: 0 12px 40px rgba(22, 26, 43, .16);
  --ring: 0 0 0 3px rgba(91, 95, 230, .22);
  --row-hover: #fafbff;
  --border-hover: #c2c6d6;
  --success-100: #d9f7e5; --warning-100: #fdf0d2; --danger-100: #fee2e2;
  --violet-50: #f3efff; --violet-700: #5b21b6;
  --wa-border: #c8f0d4;
  --toast-bg: #161a2b;
  --header-bg: rgba(255, 255, 255, .92);
  color-scheme: light;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Consolas', 'Fira Code', ui-monospace, monospace;
  --header-h: 60px;
}

/* ═══ Reset & Base ═══ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h3, h4 { color: var(--text); letter-spacing: -.01em; }
h4 { font-size: 15px; font-weight: 600; }
::selection { background: var(--primary-100); }

/* ═══ Pages ═══ */
.page { display: none; }
.page.active { display: block; }
.hidden { display: none !important; }

/* ═══ Login ═══ */
/* Giriş arka planı (2026-10-12, kullanıcı seçimi): gece mavisi + köşelerde yumuşak mor-mavi ve logo turuncusu ışık */
#login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; position: relative; overflow: hidden;
  background: radial-gradient(60% 70% at 12% 18%, rgba(102,126,234,.50), transparent 70%), radial-gradient(55% 65% at 88% 88%, rgba(118,75,162,.55), transparent 70%), radial-gradient(28% 34% at 72% 12%, rgba(245,158,11,.18), transparent 70%), #0d1124; }
#login-page::before, #login-page::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.035); pointer-events: none; }
#login-page::before { width: 520px; height: 520px; top: -160px; right: -120px; }
#login-page::after { width: 380px; height: 380px; bottom: -140px; left: -100px; }
/* Giriş (2026-10-12): masaüstünde solda tanıtım, sağda kart; dar ekranda yalnız kart */
.login-shell { position: relative; z-index: 1; display: flex; align-items: center; gap: 64px; width: 100%; max-width: 980px; }
.login-hero { flex: 1 1 0; color: #fff; min-width: 0; }
.login-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; margin-bottom: 26px; }
.login-wf-logo { display: block; height: 60px; width: auto; }
.login-logo { width: 40px; height: 40px; border-radius: 11px; background: none center/28px no-repeat, rgba(255,255,255,.95); box-shadow: 0 6px 18px rgba(30, 20, 80, .25); }
.login-quote { margin: 0; max-width: 470px; }
.login-quote blockquote { position: relative; margin: 0 0 16px; font-size: 30px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
.login-quote blockquote::before { content: '\201C'; display: block; height: 38px; font-size: 84px; line-height: .9; font-family: Georgia, serif; color: rgba(255,255,255,.3); }
.login-quote figcaption { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); }
.login-quote figcaption::before { content: ''; display: inline-block; width: 22px; height: 2px; background: rgba(255,255,255,.6); vertical-align: middle; margin-right: 10px; }
.login-box { position: relative; flex: 0 0 400px; background: var(--surface); padding: 36px 34px 26px; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .07); width: 400px; max-width: 100%; }
.login-box h1 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -.02em; }
.login-box .subtitle { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }
.login-field { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.login-input { position: relative; margin-bottom: 16px; }
.login-input > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.login-box .login-input input { height: 48px; font-size: 15px; padding-left: 42px; margin: 0; }
.login-box .login-input input[type="password"], .login-box .login-input input#login-pass { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle svg { width: 19px; height: 19px; }
.pw-toggle .ic-eye-off, .pw-toggle.on .ic-eye { display: none; }
.pw-toggle.on .ic-eye-off { display: block; }
.login-caps { font-size: 12px; font-weight: 600; color: #b45309; margin: -8px 0 12px; }
.login-remember { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 14px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; user-select: none; }
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.login-box .btn { height: 48px; font-size: 15px; margin-top: 6px; }
.login-box .btn.loading { opacity: .8; cursor: progress; }
.login-foot { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 860px) {
  .login-hero { display: none; }
  .login-shell { justify-content: center; }
  .login-box { flex-basis: auto; text-align: left; }
  .login-box::before { content: ''; display: block; width: 52px; height: 52px; margin: 0 0 16px; border-radius: 14px;
    background: none center/36px no-repeat, var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
}
@media (max-width: 440px) { .login-box { padding: 28px 22px 22px; } }
.error-msg { color: var(--danger-700); background: var(--danger-50); border-radius: var(--radius-sm); font-size: 13px; padding: 8px 10px; margin-top: 12px; }

/* ═══ Buttons ═══ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 1px 2px rgba(91,95,230,.3); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-700); border-color: var(--danger-700); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: var(--success-700); border-color: var(--success-700); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: var(--warning-700); border-color: var(--warning-700); }
.btn-ghost { background: var(--surface); color: var(--primary); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--primary-50); border-color: var(--primary-100); }
.btn-wa { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn-wa:hover { background: var(--wa-600); border-color: var(--wa-600); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
form > .btn-block, #scan-form .btn-block { margin-top: 20px; height: 44px; }

/* ═══ Header ═══ */
.app-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); padding: 0 24px; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-left::before { content: ''; flex: 0 0 32px; height: 32px; border-radius: 9px;
  background: none center/24px no-repeat, var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); } /* Webfinity ikonu */
.app-header h2 { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.02em; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
#user-display { font-size: 13px; color: var(--text-2); font-weight: 500; padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
#user-display:empty { display: none; }
#btn-logout { height: 34px; }

/* ═══ Tabs (ana menü) ═══ */
.tabs { position: sticky; top: var(--header-h); z-index: 40; display: flex; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 38px; padding: 0 14px; border: none; border-radius: 10px; background: transparent; font: 600 14px/1 var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; }
.tab::before { content: ''; width: 17px; height: 17px; background: currentColor; opacity: .85; -webkit-mask: var(--icon) center/contain no-repeat; mask: var(--icon) center/contain no-repeat; }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--primary-50); color: var(--primary); }
.tab:focus-visible { outline: none; box-shadow: var(--ring); }
.tab[data-tab="scan"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E"); }
.tab[data-tab="scans"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.tab[data-tab="batches"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5 9-5z'/%3E%3Cpath d='m3 13 9 5 9-5'/%3E%3C/svg%3E"); }
.tab[data-tab="orders"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E"); }
.tab[data-tab="watches"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.7 21a2 2 0 0 1-3.4 0'/%3E%3C/svg%3E"); }
.tab[data-tab="reviewcheck"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
.tab[data-tab="users"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21c0-4 3-6 7-6s7 2 7 6M16 4a4 4 0 0 1 0 8M22 21c0-3-1.5-5-4-6'/%3E%3C/svg%3E"); }

/* Menü sekmesi rozeti (Takip: yeni yorum / yeni WhatsApp cevabı) */
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.tab-badge-wa { background: var(--wa-600); }

/* Tarama panelindeki Tek/Toplu mod geçişi (segment kontrol) — .tab'den ayrı sınıf
   (JS'te $$('.tab') genel sekme geçiş dinleyicisiyle çakışmasın diye). */
.scan-mode-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.scan-mode-tab { height: 34px; padding: 0 16px; border: none; border-radius: 9px; background: transparent; font: 600 14px/1 var(--font); color: var(--text-2); cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s; }
.scan-mode-tab:hover { color: var(--text); }
.scan-mode-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* ═══ Panels ═══ */
.panel { display: none; }
.panel.active { display: block; animation: panel-in .12s ease-out; }
@keyframes panel-in { from { opacity: .4; } to { opacity: 1; } }
.panel-content { max-width: 1040px; margin: 0 auto; padding: 28px 24px 48px; }
.panel-content > h3 { font-size: 22px; font-weight: 700; margin-bottom: 18px; letter-spacing: -.02em; }
#panel-scan .panel-content { max-width: 760px; }
#panel-scan #scan-form, #scan-progress, #bulk-progress { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
#scan-progress, #bulk-progress { margin-top: 16px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
#rc-progress { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }

/* ═══ Forms ═══ */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; margin-top: 16px; }
#scan-form > div:first-child > label:first-child, #scan-form > label:first-child { margin-top: 0; }
input[type="url"], input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text);
  font: 400 14px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a90a6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input[type="date"] { min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: 400 14px/1.4 var(--font); }
input[type="date"]:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
/* Tablo içi küçük girdiler (limit, fiyat, rol, tarih filtresi) */
input.input-sm, select.input-sm { width: auto; min-height: 32px; height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
select.input-sm { padding-right: 28px; background-position: right 6px center; background-size: 14px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
/* Yıldız filtresi: seçilebilir kapsüller */
.star-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.star-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 12px; height: 34px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; transition: background-color .15s, border-color .15s, color .15s; }
.star-checks label:hover { border-color: var(--primary); }
.star-checks label:has(input:checked) { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
/* Telefonda 5 yıldız tek satırda, eşit genişlikte (2026-10-28) */
@media (max-width: 640px) {
  .star-checks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .star-checks label { justify-content: center; gap: 4px; padding: 0 4px; }
}

/* ═══ Progress ═══ */
.progress-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.progress-bar { height: 8px; background: var(--primary-50); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: var(--brand-grad); border-radius: 999px; transition: width .3s; width: 0%; }
.progress-info { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.progress-log { max-height: 220px; overflow-y: auto; background: #12152a; color: #b5bdd8; padding: 12px 14px; border-radius: var(--radius); font: 12px/1.65 var(--mono); }
.progress-log .log-line { white-space: pre-wrap; word-break: break-word; }
.progress-log a { color: #a5b4fc; }

/* ═══ Kart listeleri ═══ */
.scans-list { display: flex; flex-direction: column; gap: 12px; }
.scan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.scan-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.scan-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.scan-card-header > span:last-child { flex-shrink: 0; }
.scan-card-title { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.scan-card-meta { font-size: 13px; color: var(--text-3); line-height: 1.7; margin-bottom: 14px; }
.scan-card-meta strong { color: var(--text-2); }
.scan-card-meta a { color: var(--primary); }
.scan-card-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.scan-card .progress-log { margin-top: 12px; }
/* Kart butonlarında görsel sıra: ilk ana buton dolu, diğerleri yumuşak ton; silme kırmızı ve sağda */
.scan-card-actions .btn-primary:not(:first-child) { background: var(--primary-50); color: var(--primary); border-color: transparent; box-shadow: none; }
.scan-card-actions .btn-primary:not(:first-child):hover { background: var(--primary-100); }
.scan-card-actions .btn-success { background: var(--success-50); color: var(--success-700); border-color: transparent; }
.scan-card-actions .btn-success:hover { background: var(--success-100); }
.scan-card-actions .btn-warning { background: var(--warning-50); color: var(--warning-700); border-color: transparent; }
.scan-card-actions .btn-warning:hover { background: var(--warning-100); }
.scan-card-actions .btn-wa { background: var(--wa-50); color: var(--success-700); border-color: transparent; }
.scan-card-actions .btn-wa:hover { background: var(--success-100); }
.scan-card-actions .btn-ghost { color: var(--text-2); }
.scan-card-actions .btn-ghost:hover { color: var(--primary); }
.btn-ghost[onclick^="delete"], .btn-ghost[onclick^="waDeleteLine"] { color: var(--danger-700); }
.btn-ghost[onclick^="delete"]:hover { background: var(--danger-50); border-color: var(--danger-100); color: var(--danger-700); }
.scan-card-actions .btn[onclick^="delete"] { margin-left: auto; }

/* Durum rozetleri */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-running { background: var(--info-50); color: var(--info-700); }
.badge-running::before { animation: pulse 1.4s ease-in-out infinite; }
.badge-completed { background: var(--success-50); color: var(--success-700); }
.badge-failed { background: var(--danger-50); color: var(--danger-700); }
.badge-cancelled { background: var(--warning-50); color: var(--warning-700); }
.badge-queued { background: var(--surface-2); color: var(--text-3); }
.badge-new { background: var(--danger); color: #fff; font-weight: 700; }
.badge-new::before { display: none; }
.badge-init { background: var(--violet-50); color: var(--violet-700); }
.badge-init::before { animation: pulse 1.4s ease-in-out infinite; }
.badge-wa { background: var(--wa-50); color: var(--success-700); }
.badge-wa::before { display: none; }
@keyframes pulse { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }

/* ═══ Modal ═══ */
.modal { position: fixed; inset: 0; background: rgba(18, 21, 42, .48); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; animation: fade-in .15s ease-out; }
.modal-content { background: var(--surface); border-radius: 18px; width: 520px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: modal-in .18s ease-out; }
.modal-large { width: 960px; }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; font-weight: 700; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.modal-close { flex: 0 0 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 9px; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-3); }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 20px; }
.modal-body > label:first-child, .modal-body form > label:first-child { margin-top: 0; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ═══ Tablolar ═══ */
.review-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.review-table th { background: var(--surface-2); padding: 10px 12px; text-align: left; font-weight: 600; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.review-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.review-table tr:last-child td { border-bottom: none; }
.review-table tbody tr:hover td { background: var(--row-hover); }
.stars-col { color: #f59e0b; white-space: nowrap; letter-spacing: 1px; }
#panel-users .panel-content { max-width: 1320px; }
.users-table-wrap { overflow-x: auto; border-radius: var(--radius); }
.users-table td.users-actions { white-space: nowrap; }
.users-table td.users-actions .btn { margin: 2px 2px 2px 0; }
#panel-users .users-table td, #panel-users .users-table th { padding-left: 10px; padding-right: 10px; }
.users-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.users-table th { background: var(--surface-2); padding: 11px 14px; text-align: left; font-weight: 600; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); }
.users-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.users-table tr:last-child td { border-bottom: none; }
#users-list, #orders-list .rc-table-wrap { overflow-x: auto; }
.users-table .btn { margin: 2px 2px 2px 0; }
.users-table .btn-danger, .review-table .btn-danger { background: var(--danger-50); color: var(--danger-700); border-color: transparent; }
.users-table .btn-danger:hover, .review-table .btn-danger:hover { background: var(--danger-100); }
.users-table tbody tr:hover td { background: var(--row-hover); }

/* ═══ Bilgi kartı ═══ */
.info-card { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: 14px 16px 14px 44px; margin-bottom: 20px; font-size: 13px; color: var(--text-2); line-height: 1.65; position: relative; }
.info-card::before { content: 'i'; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 12px/20px Georgia, serif; text-align: center; }
.info-card strong { color: var(--text); }

/* ═══ İstatistik kutuları (Yorum Durum Kontrolü) ═══ */
.status-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.status-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.status-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border-strong); }
.status-stat .label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.status-stat .value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.status-stat.stat-active::before { background: var(--success); }
.status-stat.stat-active .value { color: var(--success-700); }
.status-stat.stat-deleted::before { background: var(--danger); }
.status-stat.stat-deleted .value { color: var(--danger-700); }
.status-stat.stat-unknown .value { color: var(--text-3); }

/* ═══ Yorum Durum Kontrolü sonuç tablosu ═══ */
.rc-table-wrap { max-height: 480px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.rc-table-wrap .review-table thead th { position: sticky; top: 0; z-index: 1; }
.rc-url { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ═══ Yardımcılar ═══ */
.muted { color: var(--text-3); font-size: 14px; }
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.gap-8 { gap: 8px; }
/* Boş / yükleniyor durumları ("Henüz ... yok", "Yükleniyor...") */
.scans-list > p.muted, #users-list > p.muted { padding: 40px 16px; text-align: center; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }

.list-more { display: flex; justify-content: center; padding: 8px 0 4px; }

/* ═══ Takip ═══ */
/* Araç çubuğu: 1. satır arama + işlemler, 2. satır filtreler (2026-10-28) */
.watch-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.wt-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wt-search { position: relative; flex: 1 1 320px; min-width: 0; }
.wt-search > svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.wt-search input[type="text"] { width: 100%; margin: 0; padding-left: 40px; }
.wt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-actions .btn { white-space: nowrap; }
.wt-filters { padding-top: 10px; border-top: 1px solid var(--border); }
.wt-filters select { width: auto; min-width: 0; flex: 0 1 auto; margin: 0; }
.wt-filters .watch-check { margin-left: auto; }
.scans-toolbar { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.scans-toolbar input[type="text"] { flex: 1 1 260px; margin: 0; }
.watch-check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; margin: 0; font-size: 13px; color: var(--text-2); cursor: pointer; }
.watch-toolbar .watch-check { padding: 0 6px; }
/* Pencere ve formlarda açıklamalı onay kutuları: metin tek akışta sarsın (iki sütuna bölünmesin) */
.modal-body .watch-check, form .watch-check { display: block; line-height: 1.5; }
.modal-body .watch-check input, form .watch-check input { vertical-align: -3px; margin-right: 7px; }
.watch-row-new td { background: var(--warning-50) !important; }
.watch-info { display: grid; grid-template-columns: 130px 1fr; row-gap: 8px; column-gap: 14px; font-size: 13px; margin-bottom: 16px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.watch-info .k { color: var(--text-3); font-weight: 500; }
.watch-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 14px 0 10px; font-size: 13px; }
.watch-filters input[type="text"] { width: auto; min-width: 180px; margin: 0; flex: 1 1 180px; }
#watch-summary:empty { display: none; }

/* Kopyala ikonu (ör. takip kartında telefonun yanında) */
.btn-copy { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 6px; padding: 0; vertical-align: middle; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 13px; line-height: 1; transition: background-color .15s, color .15s, border-color .15s; }
.btn-copy:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.btn-copy.copied { color: var(--success); border-color: var(--success); background: var(--success-50); }

/* ═══ Otomatik WhatsApp paneli (yalnız admin) ═══ */
.wa-panel { background: linear-gradient(180deg, var(--wa-50) 0%, var(--surface) 100%); border: 1px solid var(--wa-border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.wa-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wa-line { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.wa-qr { display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.wa-qr img { width: 200px; height: 200px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.wa-qr > div { flex: 1 1 240px; }
.wa-recent, .wa-history { margin-top: 10px; font-size: 13px; }
.wa-history { background: var(--wa-50); border: 1px solid var(--wa-border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.wa-recent summary, .wa-history summary { cursor: pointer; font-weight: 600; color: var(--text-2); padding: 4px 0; }
.wa-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--border); border-radius: 8px; }
.wa-row-unseen { background: var(--warning-50); }
.wa-row-actions { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; flex-wrap: wrap; }
.wa-msg { white-space: pre-wrap; font-family: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin: 6px 0 0; }
.wa-assign-list { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.wa-assign-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14px; font-weight: 400; color: var(--text); margin: 0; }
.wa-assign-row:last-child { border-bottom: none; }
.wa-assign-row:hover { background: var(--surface-2); }
.wa-assign-row input { margin-top: 3px; }

/* ═══ Bildirimler (tarayıcı alert() yerine) ═══ */
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--toast-bg); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.45; white-space: pre-line; animation: toast-in .2s ease-out; border-left: 4px solid var(--primary); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { background: none; border: none; color: rgba(255,255,255,.6); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-close:hover { color: #fff; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ═══ Duyarlı (tablet / telefon) ═══ */
@media (max-width: 860px) {
  .app-header { padding: 0 16px; }
  .tabs { padding: 8px 12px; }
  .panel-content { padding: 20px 16px 40px; }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  body { font-size: 14px; }
  .app-header h2 { font-size: 16px; }
  #user-display { max-width: 140px; padding: 5px 10px; }
  .tab { height: 36px; padding: 0 12px; font-size: 13px; }
  .panel-content > h3 { font-size: 19px; margin-bottom: 14px; }
  #panel-scan #scan-form, #scan-progress, #bulk-progress { padding: 16px; border-radius: var(--radius); }
  .scan-card { padding: 14px 16px; border-radius: var(--radius); }
  .scan-card-header { flex-wrap: wrap; }
  .scan-card-header > span:last-child { flex-shrink: 1; min-width: 0; } /* etiketler dar ekranda alt satıra geçsin */
  .scan-card-actions .btn { flex: 1 1 calc(50% - 4px); }
  .watch-toolbar { padding: 10px; gap: 8px; }
  .wt-search, .wt-actions { flex: 1 1 100%; }
  .wt-actions .btn { flex: 1 1 0; }
  .wt-filters { padding-top: 8px; }
  .wt-filters select { flex: 1 1 100%; }
  .wt-filters .watch-check { flex: 1 1 100%; margin-left: 0; padding: 2px 4px; }
  .watch-detail-top { flex-direction: column-reverse; align-items: stretch !important; }
  .watch-detail-top > div:last-child { flex-direction: row !important; flex-wrap: wrap; min-width: 0 !important; }
  .watch-detail-top > div:last-child .btn { flex: 1 1 calc(50% - 4px); }
  .watch-info { grid-template-columns: 1fr; row-gap: 2px; }
  .watch-info .k { margin-top: 8px; }
  .watch-info .k:first-child { margin-top: 0; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-content, .modal-large { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .wa-row { flex-direction: column; }
  .rc-url { max-width: 200px; }
  .summary { grid-template-columns: 1fr; }
  .toast-stack { left: 16px; right: 16px; max-width: none; }
  /* menü yana kayıyor: sağ kenarda "devamı var" geçişi */
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; }
}
@media (max-width: 440px) {
  #user-display { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══ Karanlık tema ═══
   Sağ üstteki düğmeyle seçilir (tarayıcıda hatırlanır). Seçim yoksa cihazın ayarı izlenir. */
:root[data-theme="dark"] {
  --primary: #8a8dff; --primary-600: #a2a5ff; --primary-50: rgba(138, 141, 255, .14); --primary-100: rgba(138, 141, 255, .26);
  --text: #eceef4; --text-2: #c0c6d6; --text-3: #949cb3;
  --bg: #1c2230; --surface: #262d3e; --surface-2: #2e3649; --border: #384258; --border-strong: #46516b; --border-hover: #5a6684;
  --success: #22c55e; --success-50: rgba(34, 197, 94, .14); --success-100: rgba(34, 197, 94, .24); --success-700: #4ade80;
  --danger: #ef4444;  --danger-50: rgba(239, 68, 68, .14);  --danger-100: rgba(239, 68, 68, .24);  --danger-700: #f87171;
  --warning: #f59e0b; --warning-50: rgba(245, 158, 11, .14); --warning-100: rgba(245, 158, 11, .24); --warning-700: #fbbf24;
  --info: #3b82f6;    --info-50: rgba(59, 130, 246, .16);   --info-700: #93c5fd;
  --wa: #22c55e;      --wa-600: #16a34a;     --wa-50: rgba(34, 197, 94, .08); --wa-border: rgba(34, 197, 94, .28);
  --violet-50: rgba(167, 139, 250, .16); --violet-700: #c4b5fd;
  --row-hover: rgba(138, 141, 255, .06);
  --toast-bg: #343d53;
  --header-bg: rgba(35, 42, 58, .92);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 4px 14px rgba(0, 0, 0, .18);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(138, 141, 255, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #8a8dff; --primary-600: #a2a5ff; --primary-50: rgba(138, 141, 255, .14); --primary-100: rgba(138, 141, 255, .26);
    --text: #eceef4; --text-2: #c0c6d6; --text-3: #949cb3;
    --bg: #1c2230; --surface: #262d3e; --surface-2: #2e3649; --border: #384258; --border-strong: #46516b; --border-hover: #5a6684;
    --success: #22c55e; --success-50: rgba(34, 197, 94, .14); --success-100: rgba(34, 197, 94, .24); --success-700: #4ade80;
    --danger: #ef4444;  --danger-50: rgba(239, 68, 68, .14);  --danger-100: rgba(239, 68, 68, .24);  --danger-700: #f87171;
    --warning: #f59e0b; --warning-50: rgba(245, 158, 11, .14); --warning-100: rgba(245, 158, 11, .24); --warning-700: #fbbf24;
    --info: #3b82f6;    --info-50: rgba(59, 130, 246, .16);   --info-700: #93c5fd;
    --wa: #22c55e;      --wa-600: #16a34a;     --wa-50: rgba(34, 197, 94, .08); --wa-border: rgba(34, 197, 94, .28);
    --violet-50: rgba(167, 139, 250, .16); --violet-700: #c4b5fd;
    --row-hover: rgba(138, 141, 255, .06);
    --toast-bg: #343d53;
    --header-bg: rgba(35, 42, 58, .92);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
    --shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 4px 14px rgba(0, 0, 0, .18);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px rgba(138, 141, 255, .3);
    color-scheme: dark;
  }
}
/* Karanlıkta dolu butonlar biraz koyu mor (beyaz yazı okunur kalsın); logo/menü rozetleri aynı */
:root[data-theme="dark"] .btn-primary { background: #5b5fe6; border-color: #5b5fe6; }
:root[data-theme="dark"] .btn-primary:hover { background: #6c70f0; border-color: #6c70f0; }
:root[data-theme="dark"] .scan-card-actions .btn-primary:not(:first-child) { background: var(--primary-50); color: var(--primary); border-color: transparent; }
:root[data-theme="dark"] .btn-success, :root[data-theme="dark"] .btn-wa { background: #15803d; border-color: #15803d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: #5b5fe6; border-color: #5b5fe6; }
  :root:not([data-theme="light"]) .btn-primary:hover { background: #6c70f0; border-color: #6c70f0; }
  :root:not([data-theme="light"]) .scan-card-actions .btn-primary:not(:first-child) { background: var(--primary-50); color: var(--primary); border-color: transparent; }
  :root:not([data-theme="light"]) .btn-success, :root:not([data-theme="light"]) .btn-wa { background: #15803d; border-color: #15803d; }
}
/* Tema düğmesi (başlıkta) */
.theme-toggle { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
}
:root[data-theme="dark"] .scan-card-actions .btn-success, :root[data-theme="dark"] .scan-card-actions .btn-wa { background: var(--success-50); color: var(--success-700); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scan-card-actions .btn-success, :root:not([data-theme="light"]) .scan-card-actions .btn-wa { background: var(--success-50); color: var(--success-700); border-color: transparent; }
}

/* ═══ Marka Ayarları ═══ */
.tab[data-tab="brand"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l2.4 4.9 5.4.8-3.9 3.8.9 5.4-4.8-2.5-4.8 2.5.9-5.4-3.9-3.8 5.4-.8z'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E"); }
.brand-logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand-logo-preview { width: 200px; height: 72px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: #fff; padding: 8px; }
.brand-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
input[type="color"] { border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; flex-shrink: 0; }
@media (max-width: 640px) { .brand-grid { grid-template-columns: 1fr; } }

/* ═══ İstatistikler ═══ */
.tab[data-tab="stats"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.stats-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
#stats-table th.sortable { cursor: pointer; user-select: none; }
#stats-table th.sortable:hover { color: var(--primary); }
#stats-table th.sorted { color: var(--primary); }
#stats-table th small, .review-table th small { font-weight: 500; text-transform: none; letter-spacing: 0; }
.review-table td.num { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.review-table td.num.zero { color: var(--text-3); font-weight: 400; }
.stats-row { cursor: pointer; }
.stats-row.idle td { opacity: .55; }
.stats-bar { height: 8px; background: var(--primary-50); border-radius: 999px; overflow: hidden; }
.stats-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* İstatistikler tablosu tek ekrana sığsın (yatay kaydırma olmadan) */
#stats-table { table-layout: auto; }
#stats-table th { white-space: normal; padding: 9px 6px; font-size: 11px; line-height: 1.25; vertical-align: bottom; text-align: center; }
#stats-table th:first-child { text-align: left; }
#stats-table td { padding: 9px 6px; }
#stats-table td:first-child { min-width: 130px; }
#stats-table .stats-seen { font-size: 12px; white-space: nowrap; line-height: 1.35; }

/* ── İşletme arama (Yeni Tarama) — 2026-10-12 ── */
.place-search { margin-bottom: 18px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.place-search label { margin-top: 0; }
.place-search-row { display: flex; gap: 8px; }
.place-search-row input { flex: 1; min-width: 0; }
.place-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.place-result-main { min-width: 0; }
.place-result-name { font-weight: 600; color: var(--text); }
.place-result-meta { font-size: 13px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-result-rating { color: var(--warning); font-weight: 600; }
.place-result-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) { .place-result { flex-direction: column; align-items: stretch; } .place-result-meta { white-space: normal; } }
.place-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.place-chip { height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 500 13px/1 var(--font); cursor: pointer; }
.place-chip:hover { border-color: var(--border-hover); color: var(--text); }
.place-status { margin: 8px 0 0; font-size: 13px; }
.place-picked { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--success-50); color: var(--text); font-size: 14px; }
#place-results:empty { display: none; }
#place-results { margin-bottom: 4px; }
/* Tarama detayı: yorum metni en fazla 2 satır; dokununca tamamı (2026-10-12) */
.review-text-col { width: 300px; max-width: 300px; word-break: break-word; }
.review-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; line-height: 1.45; }
.review-snippet.open { display: block; -webkit-line-clamp: unset; overflow: visible; }
@media (max-width: 640px) {
  .review-text-col { width: auto; max-width: 180px; }
  .review-table td { padding: 8px 8px; }
}
/* Teslim sonrası silinmeler (2026-10-12) */
.late-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; height: 24px; padding: 0 10px; border: none; border-radius: 999px;
  background: var(--danger-50); color: var(--danger-700); font: 700 12px/1 var(--font); cursor: pointer; vertical-align: middle; }
.late-badge:hover { background: var(--danger-100); }
#late-modal tr.late-billed td { opacity: .6; }

/* Sistem Durumu / Hareketler / alarm şeridi (2026-10-12) */
.sys-alert { background: var(--danger-50); color: var(--danger-700); border-bottom: 1px solid var(--danger-100); padding: 10px 24px; font-size: 14px; font-weight: 600; }
.sys-alert a { color: inherit; text-decoration: underline; margin-left: 6px; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.sys-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.sys-card h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.sys-card p { margin: 3px 0; font-size: 14px; }
.sys-card .muted { font-size: 12.5px; }
.sys-card.bad { border-color: var(--danger-700); background: var(--danger-50); }
.sys-card.warn { border-color: #d97706; }
.sys-ok { color: #16a34a; font-weight: 700; }
.sys-bad { color: var(--danger-700); font-weight: 700; }
.sys-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sys-chip { font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.act-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.act-ic { display: inline-block; width: 18px; text-align: center; }
/* Sipariş kartı: dış işlem durumu (MapSYorum, 2026-11-03) */
.ord-ext { margin-top: 6px; font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ord-ext-err { color: var(--danger-700); }
/* Müşteri Bildirimleri (2026-11-03) */
.push-form { max-width: 560px; margin-top: 4px; }
.push-form select, .push-form input, .push-form textarea { width: 100%; }
.push-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Zil / bildirimler (2026-10-13) */
.bell-wrap { position: relative; }
.bell-btn { position: relative; }
.bell-btn svg { width: 18px; height: 18px; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--header-bg); }
.notif-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 18, 40, .28); overflow: hidden; z-index: 200; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.notif-actions { display: flex; gap: 6px; }
.notif-act { width: 32px; height: 30px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.notif-act:hover { color: var(--text); }
.notif-act svg { width: 16px; height: 16px; }
.notif-list { max-height: min(60vh, 460px); overflow-y: auto; }
.notif-list-full { max-height: 65vh; }
.notif-item { display: flex; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.notif-item:hover { background: var(--row-hover); }
.notif-item.unread { background: var(--primary-50); }
.notif-item.unread .notif-txt b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-left: 7px; vertical-align: 2px; }
.notif-ic { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 16px; }
.notif-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.4; }
.notif-body { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item.expanded .notif-body { -webkit-line-clamp: unset; display: block; }
.notif-time { font-size: 12px; color: var(--text-3); }
.notif-empty { padding: 26px 14px; text-align: center; color: var(--text-3); font-size: 14px; }
.notif-all { display: block; width: 100%; padding: 12px; border: 0; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.notif-all:hover { filter: brightness(1.08); }
.an-past { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.an-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; }
.an-row .muted { font-size: 12px; }
@media (max-width: 640px) { .notif-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); width: auto; } }

/* WhatsApp'tan gelen müşteriler (onay listesi) */
.wa-leads-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.wa-leads-toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text); margin: 0; cursor: pointer; }
.wa-leads-toggle input { width: 16px; height: 16px; accent-color: var(--primary); }
.wa-leads-count { background: #fff; color: var(--success-700); border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-size: 12px; font-weight: 700; }
.lead-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.lead-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.lead-tab.active { background: var(--primary-50); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.lead-list { display: flex; flex-direction: column; gap: 10px; }
.lead-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.lead-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.lead-top .badge { margin-left: auto; }
.lead-kind { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; }
.lead-body { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
.lead-img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.lead-content { font-size: 14px; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.lead-read { margin-top: 8px; font-size: 13.5px; }
.lead-warn { color: var(--warning-700); font-weight: 600; }
.lead-note { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.lead-cands { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lead-cand { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; font-size: 14px; }
.lead-cand a { overflow-wrap: anywhere; min-width: 0; }
.lead-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lead-link { flex: 1 1 220px; min-width: 0; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit; font-size: 13.5px; background: var(--surface); color: var(--text); }
.lead-done { margin-top: 8px; font-size: 13.5px; }
@media (max-width: 520px) { .lead-img { width: 72px; height: 72px; } .lead-top .badge { margin-left: 0; } }

/* Takip filtreleri */
.wa-leads-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-add { display: flex; gap: 6px; margin-bottom: 10px; }
.filter-add input { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.filter-h { margin: 16px 0 8px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; color: var(--text); max-width: 100%; overflow-wrap: anywhere; }
.filter-x { border: 0; background: transparent; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; }
.filter-x:hover { background: var(--danger-50); color: var(--danger-700); }
.filter-confirm { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); font-size: 14px; margin-bottom: 4px; }
.filter-list { margin: 8px 0 0; padding-left: 18px; max-height: 220px; overflow: auto; font-size: 13.5px; }
.filter-confirm-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }

/* Teklif listesi */
.offer-list { display: flex; flex-direction: column; gap: 10px; }
.offer-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); transition: opacity .2s; }
.offer-row.offer-done { opacity: .6; }
.offer-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14.5px; }
.offer-head a { font-size: 13px; }
.offer-who { font-size: 13px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.offer-nums { font-size: 14px; margin-top: 6px; }
.offer-msg { margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 13.5px; color: var(--text); }
.offer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.offer-today { display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px; background: var(--success-50); color: var(--success-700); font-size: 13px; }
.offer-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 12px; font-size: 13px; color: var(--text-2); }

.offer-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.offer-top .offer-today { margin: 0; }
.offer-auto { font-size: 13px; }

/* Takip sayfası alt sekmeleri (admin) */
.watch-subnav { display: flex; gap: 2px; overflow-x: auto; margin: 2px 0 16px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.watch-subnav::-webkit-scrollbar { display: none; }
.watch-subtab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; padding: 10px 12px; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.watch-subtab:hover { color: var(--text); background: var(--surface-2); }
.watch-subtab.active { color: var(--primary); border-bottom-color: var(--primary); }
.watch-subtab:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.sub-count { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.sub-count:empty { display: none; }
.watch-subtab.active .sub-count { background: var(--primary-50); color: var(--primary); }
.sub-count.hot { background: var(--success-700); color: #fff; }
.sub-count.warn { background: var(--warning-50); color: var(--warning-700); }
.watch-sub { display: none; }
.watch-sub.active { display: block; }
.watch-view-body > p.muted:first-child { margin-top: 0; }

/* Tarama seçimi + bayiye atama */
.scan-pick { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -2px; accent-color: var(--primary); cursor: pointer; }
.scan-card.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.select-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; color: var(--text); }
#assign-modal select { width: 100%; }

/* Bayiye ata: sahip bilgisinin yanında küçük bağlantı (düğme satırını taşırmasın) */
.owner-assign { background: none; border: 0; padding: 0 2px; margin-left: 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--primary); cursor: pointer; white-space: nowrap; border-radius: 4px; }
.owner-assign:hover { text-decoration: underline; }
.owner-assign:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Teklif kabul edildi: harita taraması satırı */
.offer-scan { font-size: 13px; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--primary-50); color: var(--text-2); }
.offer-scan.muted { background: transparent; padding-left: 0; }

/* Toplu tarama: Google puanı önce → şimdi */
.rate-up { color: var(--success-700); }
.rate-down { color: var(--danger-700); }
.batch-rate { font-size: 13px; margin-top: 6px; color: var(--text-2); }
.batch-rate-sum { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13.5px; }
.batch-rate-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* Takip komut kutusu (admin, API'siz) */
.assistant-box { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.assistant-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.assistant-form input { flex: 1 1 320px; min-width: 0; margin: 0; }
.assistant-out { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.assistant-q { color: var(--text-3); font-size: 13px; }
.assistant-lines { margin: 0; padding-left: 18px; color: var(--text-2); }
.assistant-items { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.assistant-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; margin: 0; cursor: default; }
.assistant-item input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--primary); cursor: pointer; }
.assistant-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-action { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--primary-50); }
.assistant-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* Teklif kartı: WhatsApp hattı */
.offer-line { font-weight: 600; color: var(--text-2); white-space: nowrap; }

/* Komut kutusu: bul sonucundaki hızlı işlem düğmeleri */
.assistant-found { flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.assistant-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-quick .lead-tab { font-size: 12.5px; }
.assistant-quick .quick-danger { color: var(--danger-700); }

/* Bayi API anahtarları penceresi */
.apikey-create { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.apikey-create input[name="label"] { flex: 1 1 200px; min-width: 0; margin: 0; }
.apikey-create label, .apikey-limits label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; font-weight: 500; }
.apikey-create .input-sm, .apikey-limits .input-sm { width: 80px; margin: 0; }
.apikey-list { display: flex; flex-direction: column; gap: 8px; }
.apikey-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.apikey-row.revoked { opacity: .6; }
.apikey-limits { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.apikey-once { padding: 10px 12px; border-radius: 10px; background: var(--success-50); border: 1px solid var(--success); margin-bottom: 12px; font-size: 13.5px; }
.apikey-value { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.apikey-value code { word-break: break-all; font-size: 13px; }

/* ═══ Telefonda alt menü (2026-10-17): üstteki sekmeler gizlenir, gezinme ekranın altında ═══ */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  :root { --bn-h: 62px; }
  .tabs { display: none; }
  #btn-theme, #btn-logout { display: none; } /* Menü'ye taşındı */
  #app-page { padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(18, 21, 42, .06); }
  .bn-item { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px 4px; border: none; background: transparent; color: var(--text-3); font: 600 11px/1.1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bn-item.active { color: var(--primary); }
  .bn-item:focus-visible { outline: none; box-shadow: inset var(--ring); border-radius: 12px; }
  .bn-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bn-new { gap: 3px; }
  .bn-plus { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-top: -18px; border-radius: 15px; background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(91, 95, 230, .38); transition: transform .15s; }
  .bn-plus svg { width: 24px; height: 24px; }
  .bn-new:active .bn-plus { transform: scale(.94); }
  .bn-new.active .bn-plus { box-shadow: 0 0 0 4px var(--primary-50), 0 6px 16px rgba(91, 95, 230, .38); }
  .toast-stack { bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  .select-bar { bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  /* pencereler alt menünün üstünde biter: alt menü görünür ve dokunulabilir kalır (dokununca pencere kapanır) */
  .app-on .modal { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); }
  .app-on .modal-content, .app-on .modal-large { max-height: calc(100% - 16px); padding-bottom: 20px; } /* ortadaki + son satırı örtmesin */
}
.bn-ic { width: 22px; height: 22px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--icon) center/contain no-repeat; mask: var(--icon) center/contain no-repeat; }
.bn-ic-menu { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E"); }
.bn-badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; border: 2px solid var(--surface); font: 700 10.5px/14px var(--font); text-align: center; box-sizing: border-box; }
.bn-badge-wa { background: var(--wa-600); }
.bn-badge.bn-dot { min-width: 12px; width: 12px; height: 12px; padding: 0; top: 6px; left: calc(50% + 7px); }
/* Menü: sağdan kayan yan panel */
.bn-drawer-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(18, 21, 42, .48); backdrop-filter: blur(2px); animation: fade-in .18s ease-out; }
.bn-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 84vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-lg); animation: bn-drawer-in .22s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
.bn-drawer-wrap.closing { animation: bn-fade-out .18s ease-in forwards; }
.bn-drawer-wrap.closing .bn-drawer { animation: bn-drawer-out .18s ease-in forwards; }
@keyframes bn-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes bn-drawer-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes bn-fade-out { to { opacity: 0; } }
.bn-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px 18px; border-bottom: 1px solid var(--border); font-size: 15.5px; min-height: var(--header-h); box-sizing: border-box; }
.bn-drawer-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-list { flex: 1 1 auto; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.bn-drawer-foot { padding: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.bn-list-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: none; border-radius: 12px; background: transparent; color: var(--text-2); font: 600 14.5px/1.2 var(--font); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bn-list-item:hover, .bn-list-item:active { background: var(--surface-2); color: var(--text); }
.bn-list-item.active { background: var(--primary-50); color: var(--primary); }
.bn-list-item:focus-visible { outline: none; box-shadow: var(--ring); }
.bn-list-label { flex: 1 1 auto; min-width: 0; }
.bn-list-item .bn-badge { position: static; border: none; margin-left: auto; height: 20px; min-width: 20px; line-height: 20px; font-size: 11px; }
.bn-emoji { width: 22px; text-align: center; font-size: 17px; line-height: 1; }
.bn-logout { color: var(--danger-700); }
.bn-ic-logout { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .bn-drawer, .bn-drawer-wrap, .bn-drawer-wrap.closing, .bn-drawer-wrap.closing .bn-drawer { animation-duration: .01s; } }

/* Tarama detayı: üstte özet kartları + bağlantı düğmeleri (2026-10-17) */
.sd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sd-stats.sd-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sd-stats.sd-n1 { grid-template-columns: minmax(0, 1fr); }
.sd-stat { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.sd-k { font-size: 12px; font-weight: 600; color: var(--text-3); }
.sd-v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin-top: 2px; line-height: 1.15; }
.sd-delta { font-size: 13px; font-weight: 700; color: var(--success-700); vertical-align: middle; }
.sd-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.sd-stars { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sd-star { white-space: nowrap; font-weight: 600; }
.sd-star > span { color: #f59e0b; }
.sd-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
@media (max-width: 520px) {
  .sd-stats, .sd-stats.sd-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sd-stats.sd-n3 .sd-stat:last-child, .sd-stats.sd-n1 .sd-stat { grid-column: 1 / -1; }
  .sd-stat { padding: 10px 12px; }
  .sd-v { font-size: 21px; }
}
/* Telefonda detaydaki yorum tablosu kart gibi: yıldız + ad + Aç üstte, metin altta, tarih en altta */
@media (max-width: 640px) {
  #detail-body .review-table thead { display: none; }
  #detail-body .review-table, #detail-body .review-table tbody { display: block; }
  #detail-body .review-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "stars user link" "text text text" "date date date"; column-gap: 10px; row-gap: 4px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
  #detail-body .review-table tr:last-child { border-bottom: none; }
  #detail-body .review-table td { display: block; padding: 0; border: none; background: none !important; }
  #detail-body .review-table td:nth-child(1) { display: none; }
  #detail-body .review-table td:nth-child(2) { grid-area: stars; align-self: center; }
  #detail-body .review-table td:nth-child(3) { grid-area: user; align-self: center; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #detail-body .review-table td:nth-child(4) { grid-area: text; width: auto; max-width: none; color: var(--text-2); }
  #detail-body .review-table td:nth-child(5) { grid-area: date; font-size: 12px; color: var(--text-3); }
  #detail-body .review-table td:nth-child(6) { grid-area: link; align-self: center; }
  #detail-body .review-table td[colspan] { display: block; grid-column: 1 / -1; grid-area: auto; }
}

/* Müşterinin seçip siparişe verdiği yorumlar (bayi API, 2026-10-17) */
.ordered-note { display: block; width: 100%; text-align: left; margin: 10px 0 6px; padding: 8px 12px; border: 1px solid var(--primary-50); border-radius: 10px; background: var(--primary-50); color: var(--primary); font: 600 13px/1.35 var(--font); cursor: pointer; }
.ordered-note:hover { border-color: var(--primary); }
.ord-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.ord-chip.ord-deleted { background: var(--success-50); color: var(--success-700); }
.ord-chip.ord-new { background: var(--warning-50); color: var(--warning-700); } /* siparişten sonra gelen yorum (2026-10-28) */
#detail-body .review-table.only-ord tbody tr:not(.row-ord) { display: none !important; }
.sd-links .btn.active { background: var(--primary-50); color: var(--primary); border-color: var(--primary); }
@media (max-width: 640px) { #detail-body .review-table td:nth-child(3) { white-space: normal; } }

/* API ile verilen sipariş etiketi */
.badge-api { background: var(--info-50); color: var(--info-700); }
.badge-api::before { display: none; }

/* API anahtarı kotaları (18.10.2026) */
.apikey-quota { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.apikey-quota label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.apikey-quota .input-sm { width: 100%; }
.apikey-quota small { font-weight: 500; color: var(--text-3); font-size: 11.5px; }
.apikey-quota small.quota-full { color: var(--danger-700); font-weight: 700; }
@media (max-width: 640px) { .apikey-quota { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apikey-quota label > span { min-height: 2.6em; display: flex; align-items: flex-end; line-height: 1.25; }

/* Tarama detayında silinen yorumlar (2026-10-18) */
.sd-stats.sd-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sd-stat.sd-del .sd-v { color: var(--danger-700); }
.del-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--danger-50); color: var(--danger-700); font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.del-chip.del-late { box-shadow: inset 0 0 0 1px var(--danger-700); }
.del-chip.del-paid { background: var(--success-50); color: var(--success-700); }
.del-chip.del-paid.del-late { box-shadow: inset 0 0 0 1px var(--success-700); }
.del-chip.del-unpaid { background: var(--warning-50); color: var(--warning-700); }
.del-chip.del-unpaid.del-late { box-shadow: inset 0 0 0 1px var(--warning-700); }
/* Dar ekranda uzun etiket (tarih · 7 gün sonra · ücretlenmedi) kesilmesin, alt satıra geçsin */
@media (max-width: 640px) { #detail-body .review-table :is(.del-chip, .ord-chip) { white-space: normal; border-radius: 10px; max-width: 100%; } }
#detail-body .review-table tr.row-del td { background: color-mix(in srgb, var(--danger-50) 55%, transparent); }
#detail-body .review-table tr.row-del .review-snippet { color: var(--text-2); }
#detail-body .review-table.only-del tbody tr:not(.row-del) { display: none !important; }
@media (max-width: 520px) { .sd-stats.sd-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { #detail-body .review-table tr.row-del { background: color-mix(in srgb, var(--danger-50) 55%, transparent); border-radius: 10px; padding: 12px 8px; margin-bottom: 4px; } }

/* Teklif düzenleme penceresi (2026-10-18) */
.offer-edit-form { display: flex; flex-direction: column; gap: 12px; }
.offer-edit-form label { display: flex; flex-direction: column; gap: 5px; margin: 0; font-size: 13px; font-weight: 600; }
.offer-edit-form input { margin: 0; }
.offer-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Tarama kartı: sil düğmesi simge, satırın sonunda (2026-10-18) */
.scan-card-actions .scan-del { margin-left: auto; color: var(--danger-700); }
@media (max-width: 640px) { .scan-card-actions .scan-del { margin-left: 0; } }

/* Seçerek sipariş (2026-10-19) */
.review-table:not(.picking) .pick-rv { display: none; }
.pick-rv { width: 17px; height: 17px; margin: 0 9px 0 0; vertical-align: -3px; accent-color: var(--primary); cursor: pointer; }
#detail-body .review-table.picking tr:has(.pick-rv:checked) td { background: var(--primary-50) !important; }
@media (max-width: 640px) { #detail-body .review-table.picking tr:has(.pick-rv:checked) { background: var(--primary-50); border-radius: 10px; } }
.pick-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.pick-bar .pk { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 4px 11px; font: 600 12.5px var(--font); color: var(--text-2); cursor: pointer; }
.pick-bar .pk:hover { background: var(--surface-2); color: var(--text); }
.pick-bar #pick-send { margin-left: auto; }
@media (max-width: 640px) { .pick-bar #pick-send { margin-left: 0; width: 100%; } }

/* Siparişler sayfası (2026-10-19) */
.ord-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ord-summary .sd-v { font-size: 22px; }
.sd-stat.ord-del .sd-v { color: var(--danger-700); }
.sd-stat.ord-money .sd-v, .sd-stat.ord-money .sd-v { color: var(--success-700); }
.ord-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ord-toolbar input[type="text"] { flex: 1 1 240px; min-width: 0; margin: 0; }
.ord-toolbar select { width: auto; margin: 0; }
.ord-toolbar .ord-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; color: var(--text-2); }
.ord-toolbar .ord-date input { width: auto; margin: 0; min-height: 32px; padding: 4px 8px; }
.ord-tb-right { margin-left: auto; display: inline-flex; gap: 8px; }
.ord-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.ord-chip-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.ord-badges { display: inline-flex; gap: 6px; align-items: center; }
.ord-progress { margin-top: 10px; }
.ord-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.ord-bar .b-del { background: var(--danger); } .ord-bar .b-act { background: var(--success); opacity: .45; }
.ord-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); align-items: center; }
.ord-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.ord-legend .d-del { background: var(--danger); } .ord-legend .d-act { background: var(--success); opacity: .6; } .ord-legend .d-pend { background: var(--text-3); }
.ord-legend .ord-total { color: var(--text-3); }
.ord-legend .ord-money { margin-left: auto; font-weight: 800; color: var(--success-700); font-size: 14px; }
@media (max-width: 760px) { .ord-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ord-tb-right { margin-left: 0; width: 100%; } .ord-tb-right .btn { flex: 1 1 0; } }
