/* almost-scan — design system herdado do assets (assets.did.lu), estendido pra 3D.
   >70% deste arquivo é cópia literal do style.css do assets. O delta é:
   brand-cube, .checker utilitário, photo-grid/edição, scan-queue/etapas, viewer-3d. */

:root {
  --bg: #0e0f12;
  --bg-1: #15171c;
  --bg-2: #1c1f26;
  --bg-3: #252932;
  --line: #2d323d;
  --line-2: #3a414f;
  --fg: #e6e8ec;
  --fg-dim: #9aa0ac;
  --fg-mute: #6a6f7a;
  --accent: #ffb454;
  --accent-2: #ff8c42;
  --ok: #6cc788;
  --warn: #ffcc66;
  --bad: #ef6f6c;
  --placeholder: #b08aff;
  --wip: #ffcc66;
  --final: #6cc788;
  --radius: 8px;
  --shadow: 0 6px 18px rgba(0,0,0,0.4);
  --font: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* --- extensões almost-scan (superfícies de captura/3D) --- */
  --checker: #1a1c20;
  --checker-bg: #0a0b0d;
  --viewer-bg: #0a0b0d;
  --viewer-grad: radial-gradient(120% 120% at 50% 30%, #16181d, #0a0b0d 70%);

  /* estados de pipeline (apontam pros herdados — reuso, não invenção) */
  --st-draft: var(--placeholder);
  --st-queued: var(--wip);
  --st-scanning: var(--wip);
  --st-ready: var(--final);
  --st-failed: var(--bad);
  --st-editing: var(--wip);
  --st-edited: var(--final);
  --st-suspect: var(--accent);

  --pulse: 1.4s;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Scrollbar custom (proibido scrollbar default) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* Focus ring custom (proibido azul default) */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* utilitário: fundo xadrez pra mídia com alpha (foto com fundo removido) */
.checker {
  background:
    linear-gradient(45deg, var(--checker) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: var(--checker-bg);
}

/* ------ topbar ------ */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; }
/* brand-cube — irmão 3D do brand-dot do assets: mesmo gradiente e glow, forma de cubo */
.brand-cube {
  width: 11px; height: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-2);
  transform: rotate(45deg);
  border-radius: 2px;
}
.brand-name { font-size: 15px; }
.brand-domain { color: var(--fg-mute); }
.spacer { flex: 1; }

.crumbs { display: flex; align-items: center; gap: 6px; color: var(--fg-dim); font-size: 13px; }
.crumbs .sep { color: var(--fg-mute); }
.crumbs a:hover { color: var(--fg); }
.crumbs .here { color: var(--fg); }

/* ------ buttons ------ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-2); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1a1a; border-color: transparent; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: var(--line-2); }
.btn-danger:hover { background: rgba(239, 111, 108, 0.12); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

/* ------ inputs ------ */
.input, .textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-1);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13px;
}
.input:focus, .textarea:focus { border-color: var(--accent); }
.textarea { resize: vertical; min-height: 64px; }

.field-label {
  display: block; margin-bottom: 4px;
  color: var(--fg-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.field-hint { margin-top: 4px; color: var(--fg-mute); font-size: 11px; font-family: var(--mono); }

.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 0; cursor: pointer; user-select: none; font-size: 13px;
}
.checkbox input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }

/* ------ main view ------ */
main { padding: 24px 18px 80px; max-width: 1280px; margin: 0 auto; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 18px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.6px; }
.muted { color: var(--fg-mute); }
.dim { color: var(--fg-dim); }

.empty {
  padding: 40px; text-align: center; color: var(--fg-mute);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
/* empty state grande (primeiro uso) */
.empty-hero {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 80px 24px; text-align: center;
}
.empty-hero .cube {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px var(--accent-2);
  transform: rotate(45deg); border-radius: 6px; opacity: 0.92;
}
.empty-hero .title { font-size: 18px; font-weight: 600; margin-top: 8px; }
.empty-hero .sub { color: var(--fg-mute); max-width: 380px; line-height: 1.5; }

.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h1 { margin: 0; flex: 1; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 240px; }

/* group header (biblioteca agrupada por projeto) */
.group-head {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.group-head .name { font-weight: 600; font-size: 14px; }
.group-head .name a:hover { color: var(--accent); }
.group-head .count { color: var(--fg-mute); font-size: 12px; }
.group-head .spacer { flex: 1; }

/* ------ grade de scans (evolui o asset-card do assets) ------ */
.scan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.scan-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.scan-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.scan-poster {
  aspect-ratio: 1 / 1;
  background: var(--viewer-grad);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.scan-poster img { width: 100%; height: 100%; object-fit: cover; }
.scan-poster .empty-thumb { color: var(--fg-mute); font-size: 26px; }
.scan-poster model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.scan-poster .badge {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 9px; font-size: 10px; border-radius: 999px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.scan-poster .badge.draft { color: var(--st-draft); }
.scan-poster .badge.queued, .scan-poster .badge.scanning { color: var(--st-queued); }
.scan-poster .badge.ready { color: var(--st-ready); }
.scan-poster .badge.failed { color: var(--st-failed); }
.scan-poster .badge.scanning::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--st-scanning); margin-right: 5px; vertical-align: middle;
  animation: pulse var(--pulse) ease-in-out infinite;
}
.scan-meta { padding: 10px 12px; }
.scan-meta .name { font-weight: 600; font-size: 13px; }
.scan-meta .row { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--fg-mute); }
.scan-card .copy-url {
  opacity: 0; transition: opacity 0.12s;
  margin-left: auto; font-family: var(--mono); color: var(--fg-dim);
  cursor: pointer; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.scan-card:hover .copy-url { opacity: 1; }
.scan-card .copy-url:hover { color: var(--fg); background: var(--bg-3); }

.stat { padding: 2px 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 11px; }
.stat.draft { color: var(--st-draft); }
.stat.scanning { color: var(--st-queued); }
.stat.ready { color: var(--st-ready); }
.stat.failed { color: var(--st-failed); }

/* ------ tela do scan: dropzone de captura (idêntica ao assets) ------ */
.dropzone {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.2);
  padding: 30px 20px; text-align: center; cursor: pointer;
  color: var(--fg-mute);
  transition: border-color 0.12s, background 0.12s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255,180,84,0.06);
  color: var(--fg-dim);
}
.dropzone .hint { font-size: 12px; margin-top: 6px; }
.dropzone-hero { padding: 70px 20px; }
.dropzone-hero .big { font-size: 16px; color: var(--fg-dim); }
.dropzone-strip { padding: 14px; margin-top: 12px; }

/* ------ barra de instrução + chips de preset ------ */
.instruction-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
  position: sticky; top: 56px; z-index: 20; margin-bottom: 16px;
}
.preset-chip {
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; cursor: pointer; user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.preset-chip:hover { background: var(--bg-3); }
.preset-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(255,180,84,0.08); }
.instruction-bar .input { width: auto; flex: 1; min-width: 200px; }
.instruction-bar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.filter-chips { display: flex; gap: 6px; }
.filter-chips .preset-chip.active { border-color: var(--line-2); color: var(--fg); background: var(--bg-3); }

.batch-progress {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-dim); margin-bottom: 14px;
}
.batch-progress .bar { flex: 1; height: 4px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.batch-progress .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s; }

/* ------ grade de fotos (o coração: edição em lote) ------ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.photo-cell {
  position: relative; aspect-ratio: 1 / 1;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cell .raw { position: absolute; inset: 0; }
.photo-cell .edited { position: absolute; inset: 0; object-fit: contain; opacity: 0; transition: opacity 0.35s; }

/* crua: ainda não processada */
.photo-cell[data-state="crua"] .raw { filter: saturate(0.7); }

/* editando: crua por baixo + shimmer âmbar varrendo */
.photo-cell[data-state="editando"]::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,180,84,0.18) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
.photo-cell[data-state="editando"] .ring {
  position: absolute; top: 8px; right: 8px; width: 14px; height: 14px;
  border: 2px solid rgba(255,204,102,0.35); border-top-color: var(--st-editing);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* editada: png sobre xadrez visível */
.photo-cell[data-state="editada"] { /* fundo xadrez aplicado via .checker no JS */ }
.photo-cell[data-state="editada"] .edited { opacity: 1; }
.photo-cell[data-state="editada"] .check {
  position: absolute; top: 7px; left: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--st-edited); color: #0e0f12;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  animation: fade-out 0.4s ease 1s forwards;
}

/* suspeita: âmbar (atenção, não erro) */
.photo-cell[data-state="suspeita"] { border-color: var(--accent); border-width: 1.5px; }
.photo-cell[data-state="suspeita"] .edited { opacity: 1; }
.photo-cell[data-state="suspeita"] .badge-warn {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 8px; font-size: 10px; border-radius: 999px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); color: var(--st-suspect);
}

/* falha: vermelho + retry */
.photo-cell[data-state="falha"] { border-color: var(--bad); }
.photo-cell[data-state="falha"]::after {
  content: ''; position: absolute; inset: 0; background: rgba(239,111,108,0.12); pointer-events: none;
}
.photo-cell[data-state="falha"] .retry {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); border-radius: 50%; color: var(--bad); font-size: 16px; cursor: pointer;
}

/* hover-peek: mostra a crua por cima (antes/depois) */
.photo-cell[data-state="editada"]:hover .edited,
.photo-cell[data-state="suspeita"]:hover .edited { opacity: 0; }
.photo-cell .cell-tools {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; gap: 4px; justify-content: center; padding: 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0; transition: opacity 0.12s;
}
.photo-cell:hover .cell-tools { opacity: 1; }
.cell-tools .btn-icon { background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.1); }

/* ------ viewer 3D ------ */
.viewer-3d {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: var(--viewer-grad); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.viewer-3d model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.viewer-poster { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.viewer-poster img { max-width: 70%; max-height: 70%; object-fit: contain; opacity: 0.8; }
.viewer-toolbar {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 999px;
}
.viewer-toolbar .btn { background: transparent; border-color: transparent; color: var(--fg-dim); }
.viewer-toolbar .btn:hover { color: var(--fg); background: rgba(255,255,255,0.08); }

.scan-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
@media (max-width: 880px) { .scan-layout { grid-template-columns: 1fr; } }
.side {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 14px; height: fit-content;
}
.side-row { display: flex; flex-direction: column; gap: 4px; }
.side-row .value { color: var(--fg); font-size: 13px; word-break: break-word; }
.side-row .value.mono { font-family: var(--mono); font-size: 11px; }

/* ------ etapas do scan (stage badge) ------ */
.stage-stepper { display: flex; gap: 6px; flex-wrap: wrap; }
.stage-badge {
  padding: 3px 9px; font-size: 10px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.4px; color: var(--fg-mute);
}
.stage-badge.done { color: var(--final); border-color: rgba(108,199,136,0.4); }
.stage-badge.active { color: var(--st-scanning); border-color: var(--st-scanning); animation: pulse var(--pulse) ease-in-out infinite; }

.scan-stages { display: flex; flex-direction: column; gap: 14px; }
.scan-stages .placeholder-stage {
  height: 360px; border-radius: var(--radius);
  background: var(--viewer-grad); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.scan-stages .placeholder-stage img { max-width: 55%; max-height: 70%; opacity: 0.35; object-fit: contain; }
.stage-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.stage-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,204,102,0.25); border-top-color: var(--st-scanning);
  animation: spin 0.9s linear infinite;
}
.stage-now { font-size: 13px; color: var(--st-scanning); letter-spacing: 0.3px; }

/* ------ fila de scans (drawer global) ------ */
.scan-queue {
  position: fixed; bottom: 16px; right: 16px; z-index: 80;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.scan-queue .q-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 600;
}
.scan-queue .q-head .count { color: var(--st-scanning); }
.scan-queue .q-head .spacer { flex: 1; }
.scan-queue .q-body { max-height: 320px; overflow-y: auto; }
.scan-queue.collapsed .q-body { display: none; }
.queue-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.queue-row:last-child { border-bottom: 0; }
.queue-row .mini { width: 38px; height: 38px; border-radius: 6px; background: var(--viewer-grad); flex-shrink: 0; overflow: hidden; }
.queue-row .mini img { width: 100%; height: 100%; object-fit: cover; }
.queue-row .info { flex: 1; min-width: 0; }
.queue-row .info .name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-row .info .stage { font-size: 11px; color: var(--st-scanning); margin-top: 2px; }
.queue-row.failed .info .stage { color: var(--bad); }

/* ------ modal (idêntico ao assets) ------ */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; min-width: 320px; max-width: 460px; box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal-fields { display: flex; flex-direction: column; gap: 12px; }
.modal-error {
  margin-top: 14px; padding: 10px 12px;
  background: rgba(239, 111, 108, 0.12); border: 1px solid var(--bad);
  border-radius: 6px; color: var(--bad); font-size: 13px; line-height: 1.4;
}

/* ------ lightbox A/B ------ */
.lightbox-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 110; padding: 40px;
}
.lightbox-stage { position: relative; max-width: 90vw; max-height: 85vh; }
.lightbox-stage .pane { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 6px; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: 1px solid var(--line-2); color: var(--fg);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px;
}
.lightbox-nav.prev { left: -56px; }
.lightbox-nav.next { right: -56px; }
.lightbox-label {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6); padding: 4px 12px; border-radius: 999px; font-size: 12px;
}

/* ------ toast ------ */
#toast-root { position: fixed; bottom: 20px; left: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow);
  animation: toast-in 0.2s ease-out;
}
.toast.error { border-color: var(--bad); }
.toast.ok { border-color: var(--ok); }

/* ------ select custom (proibido <select> nativo) ------ */
.select-custom { position: relative; display: inline-block; }
.select-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: 13px; color: var(--fg);
}
.select-trigger:hover { border-color: var(--line-2); }
.select-trigger .caret { color: var(--fg-mute); font-size: 10px; }
.select-popup {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 4px; box-shadow: var(--shadow); z-index: 60; display: none;
}
.select-popup.open { display: block; }
.select-option { padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.select-option:hover, .select-option.active { background: var(--bg-3); }

/* ------ auth slot ------ */
.auth-user { display: flex; align-items: center; gap: 8px; }
.auth-user .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #1a1a1a;
}
.auth-user .menu { position: relative; }

/* ------ keyframes ------ */
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fade-out { to { opacity: 0; } }
