/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg: #111210;
  --bg2: #191917;
  --bg3: #222220;
  --border: #2e2e2c;
  --border-light: #3a3a38;
  --text: #e8e4dc;
  --text-muted: #8a8780;
  --text-dim: #5a5855;
  --gold: #c9a84c;
  --gold-dim: #8a7030;
  --gold-light: #e8c87c;
  --accent: #c9a84c;
  --danger: #c45a4a;
  --success: #5a9a6a;
  --sidebar-w: 240px;
  --radius: 6px;
  --radius-lg: 12px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
a { cursor: pointer; text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
textarea { resize: vertical; }

/* ── App Layout ─────────────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-header { padding: 28px 20px 20px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 22px; color: var(--gold); }
.logo-title { font-family: var(--font-serif); font-size: 18px; font-weight: 500; letter-spacing: .03em; }
.logo-sub { font-size: 11px; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; }

.sidebar-stats {
  display: flex;
  padding: 16px 20px;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.stat-item { flex: 1; text-align: center; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-num { display: block; font-family: var(--font-serif); font-size: 20px; color: var(--gold); font-weight: 400; }
.stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

.nav-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.nav-section:last-child { border-bottom: none; }
.nav-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; padding: 0 20px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all .15s;
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--gold); border-left-color: var(--gold); background: rgba(201,168,76,.06); }
.nav-icon { font-size: 12px; width: 16px; text-align: center; }

/* ── Mobile Header ───────────────────────────────────────────────────────── */
#mobileHeader {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 200;
}
.hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text); border-radius: 2px; transition: .2s;
}
.mobile-logo { flex: 1; font-family: var(--font-serif); font-size: 17px; color: var(--gold); text-align: center; }
.mobile-add-btn {
  background: var(--gold); color: var(--bg); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-weight: 300;
}

/* ── Main ─────────────────────────────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.main-title-area { display: flex; align-items: baseline; gap: 12px; }
h1 { font-family: var(--font-serif); font-size: 32px; font-weight: 400; letter-spacing: .02em; }
.item-count { font-size: 12px; color: var(--text-dim); letter-spacing: .06em; }

.main-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; }
.search-wrap input {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px 8px 32px;
  color: var(--text); width: 220px;
  transition: border-color .2s;
}
.search-wrap input:focus { outline: none; border-color: var(--gold-dim); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 16px; pointer-events: none; }

.view-toggle { display: flex; gap: 4px; align-self: flex-start; }
.view-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-dim); width: 32px; height: 32px;
  border-radius: var(--radius); cursor: pointer; font-size: 15px;
  transition: all .15s;
}
.view-btn.active { border-color: var(--gold-dim); color: var(--gold); background: rgba(201,168,76,.08); }

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.gallery.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery.list-view { display: flex; flex-direction: column; gap: 1px; }

/* ── Card (Grid) ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
  position: relative;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-light); box-shadow: var(--shadow); }

.card-image {
  aspect-ratio: 4/3;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.card:hover .card-image img { transform: scale(1.04); }
.card-no-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--text-dim);
}
.card-type-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.65); color: var(--gold);
  font-size: 10px; padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .1em; backdrop-filter: blur(4px);
}

.card-body { padding: 14px 16px 16px; }
.card-title { font-family: var(--font-serif); font-size: 16px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.card-artist { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.card-price { font-family: var(--font-serif); font-size: 15px; color: var(--gold); }
.card-year { font-size: 11px; color: var(--text-dim); }
.card-img-count {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.65); color: var(--text-muted);
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  backdrop-filter: blur(4px);
}

/* ── List Row ──────────────────────────────────────────────────────────────── */
.list-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.list-row:hover { border-color: var(--border-light); background: var(--bg3); }
.list-thumb {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--bg3); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-dim);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-info { flex: 1; min-width: 0; }
.list-title { font-family: var(--font-serif); font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { font-size: 12px; color: var(--text-muted); }
.list-type { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em; }
.list-price { font-family: var(--font-serif); font-size: 16px; color: var(--gold); white-space: nowrap; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; gap: 12px; text-align: center; color: var(--text-muted);
}
.empty-icon { font-size: 48px; color: var(--text-dim); margin-bottom: 8px; }
.empty-state h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 400; color: var(--text); }
.empty-state p { font-size: 14px; max-width: 320px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold); color: var(--bg);
  border: none; border-radius: var(--radius);
  padding: 9px 20px; font-weight: 500; cursor: pointer;
  font-size: 13px; letter-spacing: .03em;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 20px; cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--border-light); color: var(--text); }
.btn-danger {
  background: transparent; color: var(--danger);
  border: 1px solid rgba(196,90,74,.3); border-radius: var(--radius);
  padding: 8px 16px; cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.btn-danger:hover { background: rgba(196,90,74,.12); border-color: var(--danger); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%; max-width: 580px;
  max-height: 92dvh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
.modal-large { max-width: 780px; }
.modal-small { max-width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; z-index: 2;
}
.modal-close:hover { color: var(--text); border-color: var(--border-light); }
.modal-heading { font-family: var(--font-serif); font-size: 24px; font-weight: 400; padding: 24px 28px 0; }
.modal-text { padding: 10px 28px 0; color: var(--text-muted); }
.modal-footer { padding: 16px 28px 24px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); margin-top: 8px; }

/* ── Form ─────────────────────────────────────────────────────────────────── */
.form-body { padding: 20px 28px 0; display: flex; flex-direction: column; gap: 0; }
.form-row { margin-bottom: 16px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
input[type="text"], input[type="number"], input[type="search"], select, textarea {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
  color: var(--text); width: 100%;
  transition: border-color .2s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-dim); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8780' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; cursor: pointer; }
select option { background: var(--bg2); }

/* ── Type selector ───────────────────────────────────────────────────────── */
.type-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.type-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
  transition: all .15s; letter-spacing: .03em;
}
.type-btn:hover { border-color: var(--border-light); color: var(--text); }
.type-btn.active { background: rgba(201,168,76,.15); border-color: var(--gold-dim); color: var(--gold); }

/* ── Upload zone ─────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.upload-zone.drag-over { border-color: var(--gold); background: rgba(201,168,76,.08); }
.upload-hint { font-size: 12px; color: var(--text-dim); margin-top: 12px; }

.upload-buttons { display: flex; gap: 10px; }
.upload-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 10px;
  color: var(--text-muted); cursor: pointer; font-size: 12px;
  transition: all .15s; letter-spacing: .03em;
  -webkit-tap-highlight-color: transparent;
}
.upload-btn:hover { border-color: var(--gold-dim); color: var(--text); background: rgba(201,168,76,.06); }
.upload-btn-icon { font-size: 22px; }

.image-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preview-item {
  width: 80px; height: 80px; border-radius: var(--radius);
  overflow: hidden; position: relative; border: 1px solid var(--border);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.7); border: none; color: white;
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.preview-remove:hover { background: var(--danger); }

/* ── Detail Modal ────────────────────────────────────────────────────────── */
.detail-header { padding: 28px 28px 0; }
.detail-type { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 8px; }
.detail-title { font-family: var(--font-serif); font-size: 32px; font-weight: 400; line-height: 1.2; }
.detail-artist { font-size: 16px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-serif); font-style: italic; }
.detail-body { padding: 20px 28px; }
.detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; margin-bottom: 20px;
}
.detail-img-wrap {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; position: relative;
}
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.detail-img-wrap:hover img { transform: scale(1.05); }
.detail-img-wrap.primary-img { border-color: var(--gold-dim); }

.detail-main-image {
  width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; margin-bottom: 12px; border: 1px solid var(--border);
}
.detail-main-image img { width: 100%; height: 100%; object-fit: contain; background: var(--bg3); }

.detail-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.meta-item { padding: 12px 14px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }
.meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-bottom: 4px; }
.meta-value { font-size: 14px; color: var(--text); }
.meta-value.price { font-family: var(--font-serif); font-size: 18px; color: var(--gold); }

.detail-notes { font-size: 14px; color: var(--text-muted); line-height: 1.7; padding: 14px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }
.detail-actions { padding: 0 28px 24px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }

/* ── Import Options ──────────────────────────────────────────────────────── */
.import-options { display: flex; flex-direction: column; gap: 10px; padding: 16px 28px; }
.import-option {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; text-align: left; color: var(--text);
  transition: all .15s;
}
.import-option:hover { border-color: var(--gold-dim); }
.import-option-icon { font-size: 20px; color: var(--gold); flex-shrink: 0; }
.import-option strong { display: block; margin-bottom: 2px; }
.import-option span { font-size: 12px; color: var(--text-muted); }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.93); display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
#lightbox img { max-width: 95vw; max-height: 95dvh; object-fit: contain; border-radius: var(--radius); }
.lb-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,.1); border: none; color: white;
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: white;
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 20px; border-radius: 20px;
  font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; transition: all .3s; pointer-events: none;
  white-space: nowrap; z-index: 3000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: #8fcc9f; }
.toast.error { border-color: var(--danger); color: #e08070; }

/* ── Overlay ─────────────────────────────────────────────────────────────── */
#overlay {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.5);
}

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading { text-align: center; padding: 60px; color: var(--text-dim); font-family: var(--font-serif); font-size: 18px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #mobileHeader { display: flex; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    z-index: 300;
  }
  #sidebar.open { transform: translateX(0); }
  #overlay.show { display: block; }
  #app { flex-direction: column; }
  #main { padding: 20px 16px; padding-top: 72px; }
  h1 { font-size: 24px; }
  .main-header { flex-direction: column; align-items: stretch; }
  .main-actions { flex-direction: column; }
  .search-wrap input { width: 100%; }
  .btn-primary.desktop-only { display: none; }
  .gallery.grid-view { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .modal-panel { width: 95%; max-height: 96dvh; }
  .detail-meta-grid { grid-template-columns: 1fr 1fr; }
  .detail-images { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 480px) {
  .gallery.grid-view { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .type-selector { gap: 6px; }
  .type-btn { padding: 5px 10px; font-size: 11px; }
}

/* ── About modal ─────────────────────────────────────────────────────────── */
.about-content {
  padding: 32px 28px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.about-logo { font-size: 40px; color: var(--gold); margin-bottom: 8px; }
.about-title { font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.about-sub { font-size: 12px; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.about-info { width: 100%; border-top: 1px solid var(--border); }
.about-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.about-row span:first-child { color: var(--text-muted); }
.about-row span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }

/* ── Login Screen ────────────────────────────────────────────────────────── */
#loginScreen {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}

.auth-card .auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1; background: none; border: none;
  padding: 10px; color: var(--text-muted);
  font-size: 13px; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
  font-family: var(--font-sans); letter-spacing: .03em;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.auth-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.auth-field input {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  color: var(--text); width: 100%; font-size: 14px;
  transition: border-color .2s; -webkit-appearance: none;
}
.auth-field input:focus { outline: none; border-color: var(--gold-dim); }

.auth-submit { width: 100%; padding: 11px; margin-top: 6px; font-size: 14px; }

.auth-error {
  font-size: 12px; color: #e08070;
  background: rgba(196,90,74,.1);
  border: 1px solid rgba(196,90,74,.2);
  border-radius: var(--radius); padding: 8px 12px;
  margin-bottom: 8px;
}

.auth-notice {
  font-size: 13px; color: var(--text-muted);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; line-height: 1.6;
}
.auth-notice.auth-notice-success {
  color: #8fcc9f;
  background: rgba(90,154,106,.08);
  border-color: rgba(90,154,106,.25);
}

.auth-user-info {
  padding: 8px 20px 4px;
  font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Admin Panel ─────────────────────────────────────────────────────────── */
.pending-badge {
  margin-left: auto;
  background: var(--gold); color: var(--bg);
  font-size: 10px; font-weight: 600;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

.admin-users-list { padding: 16px 28px 0; overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.status-badge, .role-badge {
  font-size: 11px; padding: 3px 8px;
  border-radius: 20px; letter-spacing: .04em; display: inline-block;
}
.status-pending { background: rgba(201,168,76,.15);    color: var(--gold);    border: 1px solid rgba(201,168,76,.3); }
.status-verify  { background: rgba(100,140,200,.15);   color: #8ab0e0;        border: 1px solid rgba(100,140,200,.3); }
.status-active  { background: rgba(90,154,106,.15);    color: #8fcc9f;        border: 1px solid rgba(90,154,106,.3); }
.role-admin     { background: rgba(201,168,76,.12); color: var(--gold-light); border: 1px solid var(--gold-dim); }

@media (max-width: 580px) {
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
