:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-input: #252836;
  --border: #2e3245;
  --text: #e4e6ef;
  --text-muted: #8b8fa3;
  --primary: #6c5ce7;
  --primary-hover: #7c6ff7;
  --primary-rgb: 108, 92, 231;
  --success: #00b894;
  --danger: #e17055;
  --warning: #fdcb6e;
  --info: #74b9ff;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --header-h: 57px;
  --sidebar-w: 320px;
}

/* ===== Scrollbar ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 100vw;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.3s,
    transform 0.3s;
  max-width: 380px;
}
.toast--visible {
  opacity: 1;
  transform: translateX(0);
}
.toast--success {
  border-left: 3px solid var(--success);
}
.toast--error {
  border-left: 3px solid var(--danger);
}
.toast--warning {
  border-left: 3px solid var(--warning);
}
.toast--info {
  border-left: 3px solid var(--info);
}
.toast__text {
  flex: 1;
}
.toast__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

/* ===== Confirm Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay--visible {
  opacity: 1;
}
.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.modal-dialog__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}
.modal-dialog__text {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.modal-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-dialog__cancel {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.modal-dialog__cancel:hover {
  color: var(--text);
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow: hidden;
}

/* ===== Header (legacy, hidden when nav-bar present) ===== */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
}
.nav-bar + .header {
  display: none;
}

.header__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.sidebar-toggle {
  display: none;
}

/* ===== App Layout ===== */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--header-h));
}
.nav-bar ~ .app-layout {
  height: calc(100vh - 50px);
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar__inner {
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Sidebar sections (accordion panels) */
.sidebar-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.sidebar-section__title {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 12px;
  margin: 0;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-section__title:hover {
  color: var(--primary);
}

.sidebar-section .collapse-body {
  padding: 0 12px 12px;
}

.sidebar-section.collapsed .collapse-body {
  max-height: 0 !important;
  padding: 0 12px;
  overflow: hidden;
}

.sidebar-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

/* Sidebar form grid (2 cols) */
.sidebar-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.sidebar-form-grid .filter-group label {
  font-size: 0.75rem;
}

/* Providers in sidebar: vertical stack */
.providers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Sidebar presets controls */
.sidebar-presets-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.sidebar-presets-controls .select-sm {
  flex: 1;
  min-width: 0;
}

/* Sidebar sticky search button */
.sidebar-action {
  margin-top: auto;
  padding: 12px 0 2px;
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.sidebar-search-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== Main Content ===== */
.main-content {
  padding: 16px 20px;
  overflow-y: auto;
  min-width: 0;
}

/* Empty state */
.empty-main-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-muted);
}

.empty-main-state__content {
  text-align: center;
}
.empty-main-state__icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* ===== Inputs ===== */
.textarea,
.input-sm,
.select-sm,
.file-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.2s;
}

.textarea:focus,
.input-sm:focus,
.select-sm:focus {
  outline: none;
  border-color: var(--primary);
}

.textarea {
  resize: vertical;
  font-family: inherit;
  overflow-y: hidden;
}
.textarea.has-scroll {
  overflow-y: auto;
}
.input-sm,
.select-sm {
  width: auto;
  min-width: 80px;
}

/* Inside sidebar, inputs take full width */
.sidebar-section .input-sm,
.sidebar-section .select-sm {
  width: 100%;
  min-width: unset;
  font-size: 0.8rem;
  padding: 6px 8px;
}

.sidebar-section .textarea {
  font-size: 0.8rem;
  padding: 6px 8px;
  max-height: 150px;
  min-height: 2.4em;
}

/* Keywords toggle */
.keywords-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.file-result {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Badges */
.badge {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

.badge--api {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
}
.badge--scraper {
  background: rgba(253, 203, 110, 0.15);
  color: var(--warning);
}
.badge--beta {
  background: rgba(116, 185, 255, 0.15);
  color: var(--info);
}

/* Filter group */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checkbox-row {
  display: flex;
  gap: 10px;
}
.checkbox-row label {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Collapsible */
.card__title--toggle {
  cursor: pointer;
  user-select: none;
}
.collapse-icon {
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.collapse-body {
  overflow: hidden;
  transition: max-height 0.3s;
}
.collapsible.collapsed .collapse-body {
  max-height: 0 !important;
  padding: 0;
}
.collapsible.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

/* ===== Buttons ===== */
.btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--text-muted);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-hover);
}
.btn--primary:disabled {
  background: var(--primary);
  opacity: 0.4;
}

.btn--secondary {
  background: transparent;
}
.btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn--sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}
.btn--lg {
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
}

/* ===== Progress ===== */
.progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}

.progress-log {
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-muted);
}

.progress-log .log-line {
  padding: 2px 0;
  border-bottom: 1px solid rgba(46, 50, 69, 0.5);
}

.progress-log .log-line--success {
  color: var(--success);
}
.progress-log .log-line--skip {
  color: var(--warning);
}
.progress-log .log-line--error {
  color: var(--danger);
}

.progress-stats {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* ===== Gallery ===== */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.gallery-header .card__title {
  margin-bottom: 0;
}

.gallery-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.gallery-tab {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-tab:hover {
  color: var(--text);
}
.gallery-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.gallery-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.selected-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-card {
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.gallery-card:hover {
  border-color: var(--border);
}
.gallery-card.selected {
  border-color: var(--primary);
}

.gallery-card__checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.gallery-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: var(--bg);
}

.gallery-card__img[data-src] {
  background: linear-gradient(
    110deg,
    var(--bg) 30%,
    var(--bg-input) 50%,
    var(--bg) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.gallery-card__info {
  padding: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-card__source {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
}

/* ===== Download Popup ===== */
.download-popup {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.download-popup__content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 560px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

.download-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.download-popup__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.download-popup__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.download-popup__close:hover {
  color: var(--text);
}

.download-popup__content .progress-log {
  flex: 1;
  max-height: 300px;
  overflow-y: auto;
}

.download-popup__content .progress-stats {
  margin-bottom: 10px;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__info {
  text-align: center;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== History (compact sidebar) ===== */
.history-list {
  width: 100%;
}

.history-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.history-item__body {
  flex: 1;
  min-width: 0;
}
.history-item__keywords {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== Presets list ===== */
.presets-list {
  width: 100%;
}

.preset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.preset-item__name {
  font-weight: 500;
  font-size: 0.85rem;
}
.preset-item__date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.preset-item__actions {
  display: flex;
  gap: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 8px;
  font-size: 0.8rem;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 360px;
  max-width: 90vw;
}

.modal__title {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ===== Mobile Sidebar ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
}

.sidebar-overlay.active {
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - var(--header-h));
  }

  .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-w));
    top: 50px;
    width: var(--sidebar-w);
    height: calc(100vh - 50px);
    z-index: 200;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
    gap: 6px;
    align-items: center;
  }

  .main-content {
    padding: 12px;
    min-height: calc(100vh - var(--header-h));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 100%;
    left: -100%;
  }
  .sidebar.open {
    left: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================================
   NAV BAR (shared across dashboard/parser/admin)
   ================================================ */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-bar__brand {
  text-decoration: none;
  margin-right: auto;
  display: flex;
  align-items: center;
}
.nav-bar__logo {
  height: 28px;
}

.nav-bar__links {
  display: flex;
  gap: 4px;
}

.nav-bar__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-bar__link:hover {
  background: var(--bg-input);
  color: var(--text);
}
.nav-bar__link--active {
  background: var(--primary);
  color: #fff;
}
.nav-bar__link--active:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* ================================================
   LANDING PAGE
   ================================================ */
.landing-body {
  overflow: auto;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(var(--primary-rgb), 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(116, 185, 255, 0.05) 0%, transparent 40%),
    var(--bg);
  position: relative;
}
.landing-body::before,
.landing-body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}
.landing-body::before {
  width: 340px;
  height: 340px;
  top: -5%;
  left: -5%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.25) 0%, transparent 70%);
  animation: landing-orb-1 16s ease-in-out infinite;
}
.landing-body::after {
  width: 300px;
  height: 300px;
  bottom: 0;
  right: -5%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.18) 0%, transparent 70%);
  animation: landing-orb-2 20s ease-in-out infinite;
}
@keyframes landing-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(25vw, 15vh) scale(1.15); }
  50% { transform: translate(10vw, 40vh) scale(0.9); }
  75% { transform: translate(35vw, 10vh) scale(1.05); }
}
@keyframes landing-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-15vw, -20vh) scale(1.1); }
  50% { transform: translate(-25vw, -5vh) scale(0.85); }
  75% { transform: translate(-10vw, -30vh) scale(1.15); }
}
.landing-orb {
  position: fixed;
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 185, 255, 0.15) 0%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  z-index: 0;
  animation: landing-orb-3 22s ease-in-out infinite;
}
@keyframes landing-orb-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  25% { transform: translate(-20vw, -30vh) scale(1.2); }
  50% { transform: translate(15vw, 10vh) scale(0.9); }
  75% { transform: translate(-5vw, 20vh) scale(1.1); }
}

.landing {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 60px 0;
}

.landing-hero__logo {
  height: 83px;
  margin-bottom: 20px;
}
.landing-hero__title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 16px;
}

.landing-hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.landing-hero__actions {
  display: flex;
  gap: 12px;
}

/* Mockup visual */
.landing-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.landing-mockup__header {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
}
.landing-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.landing-mockup__body {
  display: flex;
  padding: 12px;
  gap: 12px;
  min-height: 260px;
}
.landing-mockup__sidebar {
  width: 80px;
  background: var(--bg-input);
  border-radius: 6px;
}
.landing-mockup__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.landing-mockup__img {
  background: linear-gradient(135deg, var(--bg-input), var(--border));
  border-radius: 4px;
  animation: pulse-mock 2s ease-in-out infinite alternate;
}
@keyframes pulse-mock {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* Features */
.landing-features {
  padding: 80px 0;
}
.landing-features__title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
}
.landing-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.landing-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.landing-feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.landing-feature-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.landing-feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.landing-feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.landing-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  && a {
    color: inherit;
    text-decoration: none;
    font-style: italic;
    transition: 0.2s all linear;
    color: var(--primary);
    -webkit-transition: 0.2s all linear;
    -moz-transition: 0.2s all linear;
    -ms-transition: 0.2s all linear;
    -o-transition: 0.2s all linear;

    &&:hover {
      text-decoration: underline;
    }
  }
}

@media (max-width: 768px) {
  .landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 0;
    gap: 0;
    flex: 1;
    align-content: center;
  }
  .landing-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-hero__actions {
    justify-content: flex-start;
  }
  .landing-hero__visual {
    display: none;
  }
  .landing-hero__subtitle {
    font-size: 1rem;
    margin-bottom: 28px;
  }
  .landing-features__grid {
    grid-template-columns: 1fr 1fr;
  }
  .landing-footer {
    padding: 20px 0;
    gap: 8px;
    font-size: 0.78rem;
  }
}
@media (max-width: 480px) {
  .landing { padding: 0 16px; }
  .landing-features__grid {
    grid-template-columns: 1fr;
  }
  .landing-hero__logo {
    height: 72px;
  }
  .landing-hero__subtitle {
    font-size: 0.9rem;
  }
}

/* ================================================
   AUTH PAGES (login / register)
   ================================================ */
.auth-body {
  overflow: auto;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.auth-input:focus {
  border-color: var(--primary);
}

.auth-error {
  background: rgba(225, 112, 85, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.auth-success {
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-link a {
  color: var(--primary);
  text-decoration: none;
}
.auth-link a:hover {
  text-decoration: underline;
}

/* ================================================
   DASHBOARD
   ================================================ */
.dash-body {
  overflow: auto;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(108, 92, 231, 0.06) 0%,
      transparent 60%
    ),
    var(--bg);
}

/* Background orbs */
.dash-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.dash-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.dash-orb--1 {
  width: 280px;
  height: 280px;
  background: radial-gradient(
    circle,
    rgba(var(--primary-rgb), 0.45) 0%,
    rgba(108, 92, 231, 0.1) 50%,
    transparent 70%
  );
  filter: blur(40px);
  animation: orb-fly-1 20s ease-in-out infinite;
}

.dash-orb--2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(116, 185, 255, 0.4) 0%,
    rgba(116, 185, 255, 0.08) 50%,
    transparent 70%
  );
  filter: blur(35px);
  animation: orb-fly-2 25s ease-in-out infinite;
}

.dash-orb--3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(var(--primary-rgb), 0.35) 0%,
    rgba(162, 155, 254, 0.1) 50%,
    transparent 70%
  );
  filter: blur(30px);
  animation: orb-fly-3 18s ease-in-out infinite;
}

.dash-orb--4 {
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(0, 184, 148, 0.35) 0%,
    rgba(0, 184, 148, 0.08) 50%,
    transparent 70%
  );
  filter: blur(30px);
  animation: orb-fly-4 22s ease-in-out infinite;
}

.dash-orb--5 {
  width: 240px;
  height: 240px;
  background: radial-gradient(
    circle,
    rgba(225, 112, 85, 0.25) 0%,
    rgba(225, 112, 85, 0.05) 50%,
    transparent 70%
  );
  filter: blur(35px);
  animation: orb-fly-5 28s ease-in-out infinite;
}

@keyframes orb-fly-1 {
  0% {
    top: -10%;
    left: -10%;
    transform: scale(1);
  }
  25% {
    top: 20%;
    left: 70%;
    transform: scale(1.1);
  }
  50% {
    top: 60%;
    left: 40%;
    transform: scale(0.9);
  }
  75% {
    top: 30%;
    left: 10%;
    transform: scale(1.05);
  }
  100% {
    top: -10%;
    left: -10%;
    transform: scale(1);
  }
}

@keyframes orb-fly-2 {
  0% {
    top: 80%;
    left: 80%;
    transform: scale(1);
  }
  25% {
    top: 40%;
    left: 20%;
    transform: scale(0.9);
  }
  50% {
    top: 10%;
    left: 60%;
    transform: scale(1.15);
  }
  75% {
    top: 60%;
    left: 50%;
    transform: scale(0.95);
  }
  100% {
    top: 80%;
    left: 80%;
    transform: scale(1);
  }
}

@keyframes orb-fly-3 {
  0% {
    top: 50%;
    left: 90%;
    transform: scale(1);
  }
  33% {
    top: 10%;
    left: 30%;
    transform: scale(1.1);
  }
  66% {
    top: 70%;
    left: 10%;
    transform: scale(0.85);
  }
  100% {
    top: 50%;
    left: 90%;
    transform: scale(1);
  }
}

@keyframes orb-fly-4 {
  0% {
    top: 10%;
    left: 50%;
    transform: scale(1);
  }
  25% {
    top: 70%;
    left: 80%;
    transform: scale(1.2);
  }
  50% {
    top: 50%;
    left: 10%;
    transform: scale(0.9);
  }
  75% {
    top: 20%;
    left: 60%;
    transform: scale(1.05);
  }
  100% {
    top: 10%;
    left: 50%;
    transform: scale(1);
  }
}

@keyframes orb-fly-5 {
  0% {
    top: 70%;
    left: 20%;
    transform: scale(1);
  }
  33% {
    top: 20%;
    left: 80%;
    transform: scale(1.1);
  }
  66% {
    top: 50%;
    left: 50%;
    transform: scale(0.9);
  }
  100% {
    top: 70%;
    left: 20%;
    transform: scale(1);
  }
}

.dash-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  margin: auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: center;
  min-height: calc(100vh - 50px);
}

.dash-hero__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 4px;
}
.dash-hero__action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.dash-hero__action-btn:hover {
  color: var(--primary);
}
.dash-hero__action-btn--danger:hover {
  color: var(--danger);
}

/* Theme color popover */
.theme-wrap { position: relative; }
.theme-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 50;
}
.theme-popover--open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.theme-swatch:hover { transform: scale(1.2); }
.theme-swatch--active { border-color: #fff; }

/* Password modal */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dashModalFadeIn 0.2s;
}
@keyframes dashModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.dash-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
  animation: dashModalSlideIn 0.2s;
}
@keyframes dashModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dash-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.dash-modal__close:hover {
  color: var(--text);
}
.dash-modal__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dash-modal__title i {
  opacity: 0.7;
  font-size: 0.95rem;
}
.dash-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-modal__submit {
  width: 100%;
}

/* Dashboard Hero — avatar + name */
.dash-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px 36px;
  width: 100%;
  background: linear-gradient(
    160deg,
    rgba(26, 29, 39, 0.9) 0%,
    rgba(108, 92, 231, 0.08) 50%,
    rgba(26, 29, 39, 0.9) 100%
  );
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}

.dash-avatar-wrap {
  position: relative;
  width: 240px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.dash-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  cursor: pointer;
}
.dash-avatar::after {
  display: none;
}

.dash-avatar__img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 30px rgba(var(--primary-rgb, 108,92,231), 0.25);
}

.dash-avatar__placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.dash-avatar__overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  color: #fff;
}
.dash-avatar:hover .dash-avatar__overlay {
  opacity: 1;
}

.dash-hero__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dash-hero__name {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Info cards grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.dash-info-card {
  background: rgba(26, 29, 39, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  position: relative;
  text-align: center;
  transition:
    border-color 0.3s,
    transform 0.2s,
    box-shadow 0.3s;
}
.dash-info-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.dash-info-card__icon {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 10px;
  opacity: 0.7;
}

.dash-info-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.dash-info-card__value {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.dash-info-card__value--mono {
  font-family: monospace;
  font-size: 0.8rem;
}

.dash-info-card__action {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.dash-info-card__action:hover {
  color: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 600px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-banner {
  background: rgba(108, 92, 231, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* ===== Casino Games Widget ===== */
.dash-games {
  background: rgba(26, 29, 39, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.dash-games__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-games__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.dash-games__icon {
  color: var(--primary);
  opacity: 0.8;
}

.dash-games__help {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 2px;
}
.dash-games__help:hover {
  color: var(--primary);
}

.dash-games__tooltip {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  width: 260px;
  white-space: normal;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.dash-games__help:hover .dash-games__tooltip {
  display: block;
}

.dash-games__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-games__select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8rem;
  padding: 4px 8px;
  cursor: pointer;
}

.dash-games__refresh {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.dash-games__refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.dash-games__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-games__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-games__stat strong {
  color: var(--text);
}
.dash-games__stat--error {
  color: var(--danger);
}

.dash-games__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.dash-games__loading,
.dash-games__empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.dash-games__empty i {
  margin-right: 6px;
}

.dash-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(37, 40, 54, 0.5);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.dash-game:hover {
  background: rgba(37, 40, 54, 0.9);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.dash-game__img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.dash-game__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.dash-game__info {
  flex: 1;
  min-width: 0;
}

.dash-game__name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-game__meta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dash-game__provider {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  opacity: 0.8;
}

.dash-game__rtp {
  color: var(--success);
}

.dash-game__vol {
  text-transform: capitalize;
}

.dash-game__date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .dash-games__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-game__date {
    display: none;
  }
  .dash-game__img {
    width: 40px;
    height: 40px;
  }
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}
.role-badge--free {
  background: var(--bg-input);
  color: var(--text-muted);
}
.role-badge--premium {
  background: rgba(108, 92, 231, 0.2);
  color: var(--primary);
}
.role-badge--admin {
  background: rgba(225, 112, 85, 0.2);
  color: var(--danger);
}

/* ================================================
   ADMIN PANEL
   ================================================ */
/* Admin reuses dash-container but needs full-width children, not centered */
.admin-body .dash-container {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 32px;
}
.admin-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.admin-search .auth-input {
  flex: 1;
}

.admin-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-list__header,
.admin-list__row {
  display: grid;
  grid-template-columns: 48px 1fr 110px 120px 64px;
  align-items: center;
  gap: 0;
  font-size: 0.9rem;
}
.admin-list__header {
  padding: 10px 14px;
  background: var(--bg-input);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.admin-list__row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-list__row:last-child {
  border-bottom: none;
}
.admin-list__row:hover {
  background: rgba(108, 92, 231, 0.05);
}
.admin-list__empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

.uuid-eye {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  transition: color 0.2s;
}
.uuid-eye:hover,
.uuid-eye.active {
  color: var(--primary);
}
.uuid-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  z-index: 100;
  align-items: center;
  gap: 8px;
}
.uuid-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}
.uuid-eye.active .uuid-popup {
  display: flex;
}
.uuid-popup__text {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text);
}
.uuid-popup__copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  transition: color 0.2s;
}
.uuid-popup__copy:hover {
  color: var(--primary);
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-user-cell__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-user-cell__placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.admin-role-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 4px 8px;
  font-size: 0.85rem;
}

.admin-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  align-items: center;
  justify-content: space-evenly;
}

.admin-icon-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}
.admin-icon-btn--save:hover {
  color: var(--primary);
}
.admin-icon-btn--delete:hover {
  color: var(--danger);
}

.admin-pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
}

/* ================================================
   BUTTON EXTENSIONS
   ================================================ */
.btn--lg {
  padding: 12px 28px;
  font-size: 1rem;
}
.btn--full {
  width: 100%;
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 26px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition:
    background 0.2s,
    color 0.2s;
}
.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ================================================
   BOTTOM TAB BAR (mobile/tablet dashboard nav)
   ================================================ */
.tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 6px 0 env(safe-area-inset-bottom, 0);
}
.tab-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 6px 0;
  flex: 1;
  transition: color 0.2s;
}
.tab-bar__item i {
  font-size: 1.15rem;
}
.tab-bar__item--active {
  color: var(--primary);
}
.tab-bar__item:not(.tab-bar__item--active):hover {
  color: var(--text);
}

/* ================================================
   DASHBOARD RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  /* Show tab bar, hide header nav links on all pages */
  .tab-bar {
    display: flex;
  }
  .nav-bar__links {
    display: none;
  }

  /* Dashboard-specific */
  .dash-body {
    padding-bottom: 64px;
  }
  .dash-container {
    padding: 0 16px;
    min-height: calc(100vh - 50px - 64px);
  }
  .dash-hero {
    padding: 36px 20px 28px;
  }
  .dash-hero__action-btn {
    font-size: 1.1rem;
    padding: 6px;
  }

  /* Admin panel */
  .admin-list__header,
  .admin-list__row {
    grid-template-columns: 40px 1fr 100px 56px;
  }
  .admin-list__header > :nth-child(4),
  .admin-list__row > :nth-child(4) {
    display: none;
  }
  .admin-list__row {
    padding: 10px 12px;
  }
  .admin-list__header {
    padding: 10px 12px;
  }

  /* Builder projects */
  .bp-body {
    padding-bottom: 64px;
  }

  /* Parser */
  .app-layout {
    padding-bottom: 64px;
  }
  .sidebar {
    height: calc(100vh - 50px);
    padding-bottom: 56px;
  }
  .sidebar-overlay {
    z-index: 199;
  }
  .tab-bar {
    z-index: 201;
  }
  .main-content .card {
    padding: 14px;
  }
  .gallery-card__img {
    height: 130px;
  }
  .gallery-header {
    margin-bottom: 8px;
  }
  .gallery-actions {
    gap: 6px;
    margin-bottom: 10px;
  }
  .download-popup__content {
    padding: 16px;
  }
  .lightbox__close {
    top: -30px;
    font-size: 1.5rem;
  }

  /* Checker */
  .ck-body {
    padding-bottom: 64px;
  }
}

@media (max-width: 480px) {
  .dash-container {
    padding: 0 12px;
  }

  /* Hero */
  .dash-hero {
    padding: 32px 16px 24px;
  }
  .dash-hero__name {
    font-size: 1.25rem;
  }

  /* Smaller avatar */
  .dash-avatar-wrap {
    width: 200px;
    height: 140px;
  }
  .dash-avatar {
    width: 100px;
    height: 100px;
  }
  .dash-avatar__img {
    width: 100px;
    height: 100px;
  }
  .dash-avatar__placeholder {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }

  /* Info cards */
  .dash-info-card {
    padding: 14px;
  }

  /* Modal */
  .dash-modal {
    padding: 24px;
    margin: 0 12px;
  }

  /* Hide some orbs for performance */
  .dash-orb--4,
  .dash-orb--5 {
    display: none;
  }

  /* Admin — card layout */
  .admin-title {
    font-size: 1.15rem;
    margin-bottom: 14px;
  }
  .admin-list__header {
    display: none;
  }
  .admin-list {
    border: none;
    background: none;
  }
  .admin-list__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .admin-list__row:last-child {
    border-bottom: 1px solid var(--border);
  }
  /* Row 1: eye | login | role */
  .admin-list__row > :nth-child(1) {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
  }
  .admin-list__row > :nth-child(2) {
    grid-row: 1;
    grid-column: 2;
  }
  .admin-list__row > :nth-child(3) {
    grid-row: 1;
    grid-column: 3;
  }
  /* Row 2: date | actions */
  .admin-list__row > :nth-child(4) {
    display: block;
    grid-row: 2;
    grid-column: 1 / 3;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: 2px;
  }
  .admin-list__row > :nth-child(5) {
    grid-row: 2;
    grid-column: 3;
  }
  .admin-role-select {
    font-size: 0.8rem;
    padding: 3px 6px;
  }
  .uuid-popup {
    left: 0;
    transform: none;
  }
  .uuid-popup::after {
    left: 12px;
    transform: none;
  }

  /* Parser — compact mobile */
  .main-content {
    padding: 8px;
  }
  .main-content .card {
    padding: 12px;
  }
  .gallery-card__img {
    height: 100px;
  }
  .gallery-card__info {
    padding: 6px;
    font-size: 0.7rem;
  }
  .gallery-actions .btn--sm {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  .selected-count {
    font-size: 0.75rem;
  }
  .gallery-tabs {
    gap: 3px;
  }
  .gallery-tab {
    padding: 3px 8px;
    font-size: 0.72rem;
  }
  .download-popup__content {
    padding: 14px;
    width: 95vw;
  }
  .lightbox__img {
    max-width: 95vw;
    max-height: 75vh;
  }
  .lightbox__info {
    font-size: 0.75rem;
  }
  .progress-log {
    font-size: 0.72rem;
    max-height: 150px;
  }
}
