*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #202020;
  --border:  #2a2a2a;
  --accent:  #e1306c;
  --green:   #22c55e;
  --red:     #ef4444;
  --yellow:  #f59e0b;
  --text:    #f0f0f0;
  --muted:   #666;
  --r:       10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header {
  margin-bottom: 28px;
}
header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}
header p { color: var(--muted); font-size: 13px; }

/* ── Drop zone ── */
.drop-zone {
  border: 1px dashed var(--border);
  border-radius: var(--r);
  background: var(--surface);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--muted);
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--accent);
  background: rgba(225,48,108,.04);
}
.drop-zone svg { margin-bottom: 10px; }
.dz-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.dz-sub   { font-size: 12px; }
.browse   { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ── Card ── */
.card {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

/* ── Queue ── */
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.queue-list { max-height: 200px; overflow-y: auto; }
.qi {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.qi:last-child { border-bottom: none; }
.qi img  { width: 32px; height: 32px; border-radius: 5px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.qi .nm  { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .sz  { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.tag-pending  { background: rgba(102,102,102,.15); color: var(--muted); }
.tag-ocr      { background: rgba(245,158,11,.12);  color: var(--yellow); }
.tag-lookup   { background: rgba(99,102,241,.12);  color: #818cf8; }
.tag-done     { background: rgba(34,197,94,.12);   color: var(--green); }
.tag-error    { background: rgba(239,68,68,.12);   color: var(--red); }

/* ── Progress ── */
.progress-card { padding: 14px 16px; }
.prog-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
#progressPct { font-weight: 700; color: var(--text); }
.prog-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.prog-fill  { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width .25s; }

/* ── Results header ── */
.results-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  margin: 24px 0 12px;
}
.results-header h2 { font-size: 15px; font-weight: 700; }
.badge {
  background: rgba(225,48,108,.12);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; background: var(--accent); color: #fff;
  border: none; border-radius: 7px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-ghost {
  background: none; border: 1px solid var(--border);
  color: var(--muted); padding: 6px 13px;
  border-radius: 7px; cursor: pointer; font-size: 13px;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: #555; color: var(--text); }

.btn-excel { background: #166534; color: #fff; border: none; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.btn-csv   { background: #1d4ed8; color: #fff; border: none; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.btn-excel:hover, .btn-csv:hover { opacity: .85; }

/* ── Table ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--surface2); }
th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

.c-sn   { color: var(--muted); font-size: 12px; width: 40px; }
.c-name { font-weight: 600; }
.c-id   { font-family: monospace; font-size: 12px; color: var(--muted); }
.c-phone { }
.c-brand { }

/* Status pill */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap;
}
.status-found   { background: rgba(34,197,94,.12);  color: var(--green); }
.status-private { background: rgba(245,158,11,.12); color: var(--yellow); }
.status-error   { background: rgba(239,68,68,.12);  color: var(--red); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
