/* ═══════════════════════════════════════════════════════════
   GENESIS — Off-White / Hype Aesthetic
   Typography-driven, industrial, minimal
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Core palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --bg-input: #0f0f0f;
  --bg-modal: #111111;

  /* Off-white tones */
  --off-white: #f5f0eb;
  --cream: #e8e0d8;
  --warm-gray: #a09890;
  --mid-gray: #666060;

  /* Text */
  --text-primary: #f5f0eb;
  --text-secondary: #a09890;
  --text-muted: #5a5550;
  --text-accent: #f5f0eb;

  /* Accent */
  --accent-primary: #f5f0eb;
  --accent-hover: #ffffff;
  --accent-muted: rgba(245, 240, 235, 0.1);
  --accent-border: rgba(245, 240, 235, 0.15);

  /* Alert */
  --success: #4a9e6e;
  --error: #c44040;
  --warning: #c4a040;

  /* Border */
  --border-color: rgba(245, 240, 235, 0.08);
  --border-hover: rgba(245, 240, 235, 0.15);
  --border-active: rgba(245, 240, 235, 0.25);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Sidebar */
  --sidebar-width: 280px;
  --topbar-height: 56px;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

::selection {
  background: var(--off-white);
  color: var(--bg-primary);
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1rem;
}

.mono {
  font-family: 'Space Mono', monospace;
}

/* ── Label Style (uppercase tracking) ── */
.label,
label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

/* ── Inputs ── */
.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

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

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09890' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.textarea {
  resize: vertical;
  min-height: 60px;
}

.input-group {
  margin-bottom: var(--spacing-md);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
  color: var(--text-primary);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--text-primary);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--off-white);
  color: var(--bg-primary);
  border-color: var(--off-white);
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary:hover {
  background: var(--accent-muted);
  border-color: var(--text-primary);
}

.btn-danger {
  color: var(--error);
  border-color: rgba(196, 64, 64, 0.3);
}

.btn-danger:hover {
  background: rgba(196, 64, 64, 0.1);
  border-color: var(--error);
}

.btn-ghost {
  border: none;
  padding: 6px 10px;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.7rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-accent {
  border-color: var(--off-white);
  color: var(--off-white);
}

.badge-coming-soon {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

/* ═══ AUTH PAGE ═══ */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: var(--spacing-2xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.auth-logo h1 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--off-white);
  margin-bottom: 6px;
}

.auth-logo p {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.auth-error {
  display: none;
  padding: 10px 12px;
  background: rgba(196, 64, 64, 0.1);
  border: 1px solid rgba(196, 64, 64, 0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.8rem;
}

.auth-error.show {
  display: block;
}

/* ═══ APP LAYOUT ═══ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ── */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: 0 var(--spacing-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
}

.topbar-brand {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--off-white);
  flex-shrink: 0;
}

.topbar-profile-select {
  flex-shrink: 0;
}

.topbar-profile-select .select {
  padding: 6px 32px 6px 10px;
  font-size: 0.75rem;
  background-color: var(--bg-primary);
  min-width: 140px;
}

.topbar-slots {
  display: flex;
  gap: var(--spacing-md);
  margin-left: auto;
}

.topbar-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.topbar-slot:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.topbar-slot-label {
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar-slot-empty {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.topbar-slot-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
}

/* ── Main Content ── */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--spacing-lg);
}

.sidebar-section {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

/* Profile list items */
.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-item:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
}

.profile-item.active {
  border-color: var(--border-active);
  background: var(--accent-muted);
  color: var(--text-primary);
}

/* Profile form */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.profile-form .input,
.profile-form .select,
.profile-form .textarea {
  font-size: 0.8rem;
  padding: 8px 10px;
}

/* Outfit items */
.outfit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.outfit-item:hover {
  background: var(--accent-muted);
}

.outfit-item.active {
  border-color: var(--border-active);
}

.outfit-item-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.outfit-item-info {
  flex: 1;
  min-width: 0;
}

.outfit-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outfit-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Content Area ── */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg-primary);
}

/* ── Tab Navigation ── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--spacing-lg);
  flex-shrink: 0;
}

.tab-btn {
  padding: 14px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover:not(:disabled) {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--off-white);
}

.tab-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Tab Panels ── */
.tab-panel {
  display: none;
  padding: var(--spacing-xl) var(--spacing-2xl);
  flex: 1;
}

.tab-panel.active {
  display: block;
}

/* ── Generate Tab ── */
.generate-prompt-area {
  max-width: 720px;
}

.generate-prompt-area h2 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

.generate-prompt-area p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* Situations grid */
.situations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  transition: all var(--transition-fast);
}

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

.card-selected {
  border-color: var(--off-white) !important;
  background: rgba(245, 240, 235, 0.03);
}

.situation-card {
  cursor: pointer;
  position: relative;
}

.situation-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--off-white);
}

.card-selected .situation-check {
  border-color: var(--off-white);
  background: var(--off-white);
  color: var(--bg-primary);
}

.card-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-right: 28px;
}

.card-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.card-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.card-caption-edit {
  margin-top: 8px;
  font-size: 0.8rem;
}

/* ── Variants ── */
.variants-section {
  margin-top: var(--spacing-xl);
}

.variant-group {
  margin-bottom: var(--spacing-xl);
}

.variant-group-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.variant-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.variant-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.variant-card-footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* ── Archive ── */
.archive-filters {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.archive-filters .select {
  width: auto;
  min-width: 160px;
  font-size: 0.8rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--spacing-md);
}

.archive-card {
  padding: 0;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.archive-card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(245, 240, 235, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--off-white);
  z-index: 2;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.archive-card-checkbox.checked {
  background: var(--off-white);
  border-color: var(--off-white);
  color: var(--bg-primary);
}

.archive-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.archive-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.archive-card:hover .archive-card-overlay {
  opacity: 1;
}

.archive-card-overlay .caption {
  font-size: 0.75rem;
  color: var(--off-white);
  margin-bottom: 8px;
  line-height: 1.4;
}

.archive-card-actions {
  display: flex;
  gap: 4px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-lg);
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  backdrop-filter: blur(4px);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

/* ── Upload Area ── */
.upload-area {
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: var(--spacing-2xl) var(--spacing-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--off-white);
  background: var(--accent-muted);
}

.upload-area-icon {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-muted);
}

.upload-area-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.upload-preview {
  margin-top: var(--spacing-md);
}

.upload-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--spacing-2xl);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.lightbox.show {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(245, 240, 235, 0.3);
  border-radius: var(--radius-sm);
  color: var(--off-white);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  border-color: var(--off-white);
}

.lightbox img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  cursor: default;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  margin-top: var(--spacing-md);
  color: var(--cream);
  font-size: 0.85rem;
  text-align: center;
  max-width: 600px;
}

.lightbox-actions {
  margin-top: var(--spacing-md);
}

/* ── Batch Action Bar ── */
.batch-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transition: transform var(--transition-normal);
}

.batch-bar.show {
  transform: translateX(-50%) translateY(0);
}

.batch-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 300ms ease;
}

.toast-success {
  border-color: var(--success);
}

.toast-error {
  border-color: var(--error);
}

.toast-warning {
  border-color: var(--warning);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Loading ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--off-white);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  z-index: 10;
  border-radius: inherit;
  backdrop-filter: blur(4px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .topbar-slots {
    display: none;
  }

  .tab-panel {
    padding: var(--spacing-md);
  }
}