:root {
  --bg: #0a1020;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #eef2f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #6b7a90;
  --line: #e4e9f2;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --accent: #06b6d4;
  --accent-2: #0891b2;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --err: #dc2626;
  --err-bg: #fee2e2;
  --info-bg: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow: 0 6px 16px rgba(15,23,42,.09), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg: 0 24px 60px rgba(2,6,23,.28);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  --grad-dark: linear-gradient(135deg, #0a1020 0%, #15223c 55%, #1e3a8a 150%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Segoe UI', Inter, Roboto, system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink); background: var(--surface-2);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c6d0e0; border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #9fb0c8; background-clip: padding-box; }

/* ============ BUTTONS ============ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; padding: 12px 18px;
  border-radius: var(--r-sm); font-size: 14.5px; font-weight: 650; line-height: 1;
  transition: transform .09s ease, box-shadow .2s ease, filter .2s; box-shadow: var(--shadow-sm);
}
.btn::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--x,50%) var(--y,50%), rgba(255,255,255,.35), transparent 45%); opacity: 0; transition: opacity .3s; }
.btn:hover::after { opacity: 1; }
.btn:hover { filter: brightness(1.05); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; transform: none; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 20px; font-size: 15.5px; }
.btn.sm { padding: 9px 13px; font-size: 13.5px; }
.btn.grad { background: var(--grad); }
.btn.dark { background: #0f172a; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.subtle { background: var(--info-bg); color: var(--brand-2); box-shadow: none; }
.btn.subtle:hover { background: #cfe0fd; filter: none; }
.btn.warn { background: var(--warn); }
.icon { width: 18px; height: 18px; flex: none; }

/* ============ LOGIN ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--grad-dark); position: relative; overflow: hidden; }
.login-wrap::before, .login-wrap::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.login-wrap::before { width: 500px; height: 500px; background: #2563eb; opacity: .5; top: -150px; right: -120px; animation: float1 14s ease-in-out infinite; }
.login-wrap::after { width: 440px; height: 440px; background: #06b6d4; opacity: .33; bottom: -170px; left: -120px; animation: float2 17s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,20px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(25px,-20px)} }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 410px; background: rgba(255,255,255,.98); backdrop-filter: blur(8px); border-radius: var(--r-lg); padding: 36px 32px 28px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.5); animation: pop .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.login-logo-img { display: block; width: 80%; max-width: 250px; height: auto; margin: 4px auto 14px; }
.login-card .sub { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; text-align: center; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field input { width: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 15px; outline: none; background: #fff; transition: border .15s, box-shadow .15s; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.err-msg { color: var(--err); font-size: 13.5px; margin: 10px 0 0; min-height: 18px; text-align: center; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }

/* ============ APP SHELL ============ */
.topbar { height: 64px; background: rgba(10,16,32,.95); backdrop-filter: blur(12px); color: #fff; display: flex; align-items: center; padding: 0 18px; gap: 14px; position: sticky; top: 0; z-index: 1200; border-bottom: 1px solid rgba(255,255,255,.07); }
.topbar-logo { background: #fff; border-radius: 11px; padding: 6px 13px; display: flex; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.topbar-logo img { height: 40px; width: auto; display: block; }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #cdd7e6; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); padding: 8px 13px; border-radius: 999px; white-space: nowrap; }
.chip b { color: #fff; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.25); animation: blink 2s infinite; }
.chip.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(217,119,6,.25); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }
.hamburger { display: none; width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.1); border: 0; color: #fff; align-items: center; justify-content: center; }
.hamburger svg { width: 22px; height: 22px; }

.layout { display: grid; grid-template-columns: 372px 1fr; height: calc(100vh - 64px); }

/* ============ SIDEBAR ============ */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); }
.card.hero { background: var(--grad-soft); border-color: #d6e4fb; }
.card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.card-title svg { width: 16px; height: 16px; color: var(--brand); }
.card-title .count-tag { margin-left: auto; background: #fff; border: 1px solid var(--line); color: var(--brand-2); font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.ctrl { margin-bottom: 13px; }
.ctrl:last-child { margin-bottom: 0; }
.ctrl > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.ctrl .muted { color: var(--muted); font-weight: 500; }

/* combobox (searchable dropdown) */
.combo { position: relative; }
.combo-trigger { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 14px; color: var(--ink); text-align: left; transition: border .15s, box-shadow .15s; }
.combo-trigger:hover { border-color: #c3d0e6; }
.combo.open .combo-trigger { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.combo-trigger .cv { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-trigger .cv.placeholder { color: var(--muted); }
.combo-trigger .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.combo.open .combo-trigger .chev { transform: rotate(180deg); }
.combo-trigger[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.combo-panel { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; display: none; animation: dropIn .16s ease; }
.combo.open .combo-panel { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.combo-search { position: relative; padding: 9px; border-bottom: 1px solid var(--line); }
.combo-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.combo-search input { width: 100%; padding: 9px 11px 9px 36px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; outline: none; }
.combo-search input:focus { border-color: var(--brand); }
.combo-list { max-height: 240px; overflow-y: auto; padding: 5px; }
.combo-opt { padding: 9px 11px; border-radius: 9px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.combo-opt:hover, .combo-opt.active { background: var(--info-bg); color: var(--brand-2); }
.combo-opt.selected { font-weight: 700; }
.combo-opt .check { width: 15px; height: 15px; opacity: 0; color: var(--brand); }
.combo-opt.selected .check { opacity: 1; }
.combo-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

.txt { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; }
.txt:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }

.seg { display: flex; gap: 6px; background: var(--surface-3); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--muted); transition: all .15s; }
.seg button.active { background: #fff; color: var(--brand-2); box-shadow: var(--shadow-sm); }

.hint { font-size: 12px; color: var(--muted); margin: 12px 2px 0; line-height: 1.55; }
.hint svg { width: 13px; height: 13px; vertical-align: -2px; }

/* jobs */
.jobs-list { display: flex; flex-direction: column; gap: 9px; }
.job { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; transition: border .15s, transform .1s; position: relative; overflow: hidden; }
.job:hover { border-color: #c3d0e6; transform: translateX(2px); }
.job::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.job.done::before { background: var(--ok); }
.job.paused_quota::before { background: var(--warn); }
.job.error::before { background: var(--err); }
.job .j-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job .j-title { font-weight: 700; font-size: 13.5px; }
.job .j-msg { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.job .j-stat { font-size: 11.5px; color: var(--ink-2); margin-top: 6px; display: flex; gap: 10px; }
.job .j-stat b { color: var(--brand-2); }
.empty-note { font-size: 13px; color: var(--muted); text-align: center; padding: 14px 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.queued { background: var(--surface-3); color: #64748b; }
.badge.running { background: var(--info-bg); color: var(--brand-2); }
.badge.running::before { animation: pulse 1s infinite; }
.badge.done { background: var(--ok-bg); color: #166534; }
.badge.paused_quota { background: var(--warn-bg); color: #92400e; }
.badge.error { background: var(--err-bg); color: #991b1b; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ============ MAIN ============ */
.main { display: flex; min-width: 0; min-height: 0; }
.main .results { flex: 1; }

/* Harita karti (sol panelde, kare) */
.map-card .map-box { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: #e8edf3; }
.map-card #map { position: absolute; inset: 0; width: 100%; height: 100%; background: #e8edf3; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; }
.mini-stat .num { display: block; font-size: 18px; font-weight: 800; color: var(--brand-2); line-height: 1; font-variant-numeric: tabular-nums; }
.mini-stat .lbl { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; margin-top: 4px; }
.map-badge { position: absolute; left: 10px; top: 10px; z-index: 500; background: rgba(10,16,32,.85); color: #fff; backdrop-filter: blur(6px); padding: 6px 11px; border-radius: 9px; font-size: 11.5px; font-weight: 600; display: none; align-items: center; gap: 6px; max-width: calc(100% - 20px); }
.map-badge.show { display: inline-flex; }
.map-badge svg { width: 13px; height: 13px; flex: none; }
.map-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* results */
.results { background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 180px; max-width: 380px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search-box input { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; outline: none; transition: border .15s, box-shadow .15s; }
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.filter-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; user-select: none; transition: all .15s; font-weight: 600; }
.filter-toggle:hover { background: var(--surface-2); }
.filter-toggle input { accent-color: var(--brand); width: 15px; height: 15px; }
.filter-toggle.on { border-color: var(--brand); color: var(--brand-2); background: var(--info-bg); }
.count-pill { background: var(--surface-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.count-pill b { color: var(--brand-2); }
.table-scroll { overflow: auto; flex: 1; min-height: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); text-align: left; padding: 11px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; animation: rowIn .25s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
tbody tr:hover td { background: #f3f8ff; }
.firm { display: flex; align-items: center; gap: 11px; }
.firm .avatar { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--grad); box-shadow: 0 3px 8px rgba(37,99,235,.3); }
.firm .f-name { font-weight: 650; color: var(--ink); line-height: 1.2; }
.firm .f-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.phone-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.phone-cell a { color: var(--ink); font-weight: 600; }
.phone-cell a:hover { color: var(--brand-2); text-decoration: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 8px; border-radius: 7px; font-weight: 700; }
.tag.google { background: #e8f0fe; color: #1a73e8; }
.tag.osm { background: #e6f4ea; color: #137333; }
.web-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--brand-2); font-weight: 600; }
.web-btn svg { width: 14px; height: 14px; }
.muted { color: var(--muted); }
.dash { color: #c6d0e0; }
.table-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.table-empty svg { width: 56px; height: 56px; color: #c6d0e0; margin-bottom: 12px; }
.table-empty h4 { margin: 0 0 6px; color: var(--ink-2); font-size: 16px; }
.table-empty p { margin: 0; font-size: 13.5px; }

/* ============ MODAL (template) ============ */
.modal-back { position: fixed; inset: 0; background: rgba(2,6,23,.6); backdrop-filter: blur(3px); display: none; z-index: 2000; padding: 20px; overflow-y: auto; }
.modal-back.open { display: grid; place-items: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 980px; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.2,.9,.3,1.1); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-head .m-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex: none; }
.modal-head .m-ico svg { width: 21px; height: 21px; color: #fff; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; overflow-y: auto; }
.modal-body .pane { display: flex; flex-direction: column; gap: 13px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; font-family: inherit; outline: none; transition: border .15s, box-shadow .15s; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.preview-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.preview-label label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; flex: 1; min-height: 360px; background: #f1f5f9; }
.preview iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-foot { padding: 15px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.modal-foot .note { margin-right: auto; font-size: 12.5px; color: var(--muted); max-width: 52%; line-height: 1.4; }

/* ============ SCANNING OVERLAY ============ */
.scan-overlay { position: fixed; inset: 0; z-index: 2500; display: none; place-items: center; padding: 24px; background: rgba(8,13,27,.72); backdrop-filter: blur(6px); }
.scan-overlay.open { display: grid; animation: fade .25s ease; }
.scan-card { width: 100%; max-width: 480px; background: #fff; border-radius: 24px; padding: 34px 30px 28px; box-shadow: var(--shadow-lg); text-align: center; animation: pop .35s cubic-bezier(.2,.9,.3,1.1); }
.radar { width: 150px; height: 150px; margin: 0 auto 18px; position: relative; border-radius: 50%; background: radial-gradient(circle, #eff6ff 0%, #dbeafe 70%); border: 2px solid #c7dbfd; overflow: hidden; }
.radar::before, .radar::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid #bcd2fb; }
.radar::before { inset: 28px; }
.radar::after { inset: 56px; }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(37,99,235,.45), transparent 60deg); animation: spin 1.5s linear infinite; }
.radar .dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(37,99,235,.5); animation: ping 1.6s ease-out infinite; }
.radar .pin { position: absolute; inset: 0; display: grid; place-items: center; }
.radar .pin svg { width: 34px; height: 34px; color: var(--brand-2); filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); } 100% { box-shadow: 0 0 0 16px rgba(37,99,235,0); } }
.scan-card h2 { margin: 0 0 4px; font-size: 21px; }
.scan-card .region { color: var(--brand-2); font-weight: 800; }
.scan-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.scan-counter { font-size: 54px; font-weight: 800; line-height: 1; color: var(--ink); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.scan-counter.done { color: var(--ok); }
.scan-counter-label { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 20px; }
.scan-steps { display: flex; justify-content: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.scan-step { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; }
.scan-step .s-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.scan-step.active { color: var(--brand-2); border-color: #bcd2fb; background: var(--info-bg); }
.scan-step.active .s-dot { background: var(--brand); animation: pulse 1s infinite; }
.scan-step.ok { color: #166534; border-color: #bbf7d0; background: var(--ok-bg); }
.scan-step.ok .s-dot { background: var(--ok); }
.scan-actions { display: flex; gap: 10px; }
.scan-actions .btn { flex: 1; }
.scan-bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.scan-bar > span { display: block; height: 100%; width: 30%; background: var(--grad); border-radius: 999px; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

/* ============ CONFIRM DIALOG ============ */
.confirm-back { position: fixed; inset: 0; z-index: 2600; display: none; place-items: center; padding: 24px; background: rgba(8,13,27,.6); backdrop-filter: blur(4px); }
.confirm-back.open { display: grid; animation: fade .2s ease; }
.confirm-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 26px 26px 22px; box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.2,.9,.3,1.1); }
.confirm-card .c-ico { width: 52px; height: 52px; border-radius: 15px; background: var(--warn-bg); display: grid; place-items: center; margin: 0 auto 14px; }
.confirm-card .c-ico svg { width: 26px; height: 26px; color: var(--warn); }
.confirm-card h3 { margin: 0 0 8px; text-align: center; font-size: 18px; }
.confirm-card p { margin: 0 0 20px; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.confirm-card p b { color: var(--ink); }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; }

/* ============ TOAST ============ */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #0f172a; color: #fff; padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; align-items: center; gap: 10px; max-width: 350px; animation: slideIn .25s cubic-bezier(.2,.9,.3,1.1); }
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
.toast svg { width: 18px; height: 18px; flex: none; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ============ MOBILE ============ */
.backdrop { display: none; }
@media (max-width: 1024px) { .layout { grid-template-columns: 320px 1fr; } }
@media (max-width: 860px) {
  .hamburger { display: inline-flex; }
  .chip.usage-chip { display: none; }
  .layout { grid-template-columns: 1fr; height: calc(100vh - 64px); }
  .sidebar { position: fixed; top: 64px; left: 0; bottom: 0; width: 88%; max-width: 360px; z-index: 1300; transform: translateX(-105%); transition: transform .28s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .backdrop { position: fixed; inset: 64px 0 0; background: rgba(2,6,23,.45); z-index: 1250; display: none; }
  .backdrop.show { display: block; }
  .modal-body { grid-template-columns: 1fr; }
  .preview { min-height: 300px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .note { max-width: 100%; order: 3; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 12px; height: 60px; }
  .topbar-logo img { height: 34px; }
  .layout { height: calc(100vh - 60px); }
  .toolbar { padding: 10px 12px; gap: 8px; }
  .search-box { max-width: none; order: 3; flex-basis: 100%; }
  .count-pill { order: 1; }
  .hide-sm { display: none !important; }
  tbody td, thead th { padding: 10px 10px; }
  .scan-counter { font-size: 44px; }
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}
