/* ==========================================================================
   AI VASTRA STUDIO — Luxury Light Mode Design System
   Enterprise Evaluation Dashboard • High-End Atelier Aesthetic
   ========================================================================== */

:root {
  /* Surface & Canvas System (Warm, non-straining, eye-friendly) */
  --bg-app: #F8F9FA;
  --bg-subtle: #F1F3F5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FCFCFD;
  --bg-inset: #F8F9FB;
  --bg-field: #F8FAFC;
  --bg-field-focus: #FFFFFF;

  /* Border System */
  --border-light: rgba(0, 0, 0, 0.05);
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-strong: #94A3B8;
  --border-focus: #0F172A;

  /* Typography Colors */
  --text-primary: #0F172A;   /* Rich Obsidian Slate */
  --text-secondary: #475569; /* Slate 600 */
  --text-tertiary: #64748B;  /* Slate 500 */
  --text-muted: #94A3B8;     /* Slate 400 */
  --text-inverse: #FFFFFF;

  /* Luxury Atelier Accent Accents */
  --accent-luxury: #0F172A;
  --accent-luxury-hover: #1E293B;
  --accent-gold: #B45309;
  --accent-gold-light: #FFFBEB;
  --accent-gold-border: #FDE68A;
  
  --accent-blue: #2563EB;
  --accent-blue-light: #EFF6FF;
  
  --status-success: #059669;
  --status-success-bg: #ECFDF5;
  --status-success-border: #A7F3D0;
  
  --status-warning: #D97706;
  --status-warning-bg: #FFFBEB;
  --status-warning-border: #FDE68A;
  
  --status-error: #DC2626;
  --status-error-bg: #FEF2F2;
  --status-error-border: #FECACA;

  /* Geometry & Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Luminous Multi-layered Shadows */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.07), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 24px 48px -12px rgba(15, 23, 42, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s var(--ease-spring);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(at 100% 0%, rgba(241, 245, 249, 0.8) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 50%);
}

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

code, pre {
  font-family: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   Header Component — AI VASTRA E2E Navigation Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
}

.header-container {
  max-width: 1540px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--transition-fast);
}
.brand-logo-wrap:hover {
  opacity: 0.9;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-luxury);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title-dot {
  color: var(--accent-gold);
}

.brand-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ecosystem Nav Links */
.header-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 900px) {
  .header-nav-links {
    display: none;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-inset);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Credits Balance Counter */
.credits-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px 5px 8px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}
.credits-pill:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.credits-coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.credits-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.credits-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.credits-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-refresh-credits {
  background: transparent;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform 0.3s ease;
}
.btn-refresh-credits:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* User / Atelier Workspace Avatar */
.user-avatar-pill {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-luxury) 0%, #1E293B 100%);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--accent-gold-border);
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-fast);
}
.user-avatar-pill:hover .avatar-badge {
  transform: scale(1.06);
}

/* ==========================================================================
   Sticky Section Breadcrumbs Navigator
   ========================================================================== */
.wizard-steps-nav {
  position: sticky;
  top: 57px;
  z-index: 40;
  background: rgba(248, 249, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 32px;
}

.steps-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.step-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.step-nav-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.step-status-check {
  display: none;
  color: var(--status-success);
}

.step-nav-item:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}

.step-nav-item.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}
.step-nav-item.active .step-nav-num {
  background: var(--accent-luxury);
  color: #FFFFFF;
}

.step-nav-item.completed .step-status-check {
  display: inline-flex;
}
.step-nav-item.completed .step-nav-num {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.step-nav-divider {
  width: 24px;
  height: 1px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Main Workspace Container & Hero Banner
   ========================================================================== */
.wizard-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 32px 80px;
}

.studio-hero {
  width: 100%;
  margin: 0 0 16px 0;
  padding: 0;
}

.hero-tagline {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  box-shadow: var(--shadow-subtle);
}

.hero-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 3px;
  line-height: 1.3;
}

.hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   Wizard Panels (Sections)
   ========================================================================== */
.wizard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 32px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 110px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.wizard-panel:hover {
  box-shadow: var(--shadow-hover);
}

.panel-header-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-step-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-inverse);
  background: var(--accent-luxury);
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  margin-top: 1px;
}

.panel-title-group {
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 3px;
}

.panel-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Column Grids */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 960px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

.panel-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.col-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.col-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.required-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  text-transform: uppercase;
}

.col-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Prompt Card */
.prompt-card {
  background: var(--bg-field);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}
.prompt-card:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-field-focus);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.field-textarea {
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.field-textarea::placeholder {
  color: var(--text-muted);
}

.prompt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.015);
  border-top: 1px solid var(--border-light);
}

.prompt-tips {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-clear-text {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-clear-text:hover {
  color: var(--status-error);
}

/* Prompt Suggestion Chips */
.suggestions-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}

.suggestions-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
  text-align: left;
}
.chip:hover {
  border-color: var(--accent-luxury);
  color: var(--text-primary);
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Section 2: References Grid
   ========================================================================== */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1080px) {
  .ref-grid {
    grid-template-columns: 1fr;
  }
}

.ref-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}
.ref-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.ref-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ref-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-luxury);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ref-card-titles {
  display: flex;
  flex-direction: column;
}

.ref-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.ref-card-tag {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
}

.ref-card-body {
  display: flex;
  flex-direction: column;
}

.preset-thumbs-wrap {
  margin-top: 14px;
}

.preset-micro-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.face-mode-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Section 3: Parameters Layout & Segmented Controls
   ========================================================================== */
.param-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1024px) {
  .param-layout {
    grid-template-columns: 1fr;
  }
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 680px) {
  .param-grid {
    grid-template-columns: 1fr;
  }
}

.param-block {
  display: flex;
  flex-direction: column;
}

.param-block-full {
  grid-column: 1 / -1;
}

.param-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.param-badge-info {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Segmented Control */
.segmented {
  display: inline-flex;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  flex-wrap: wrap;
}

.segmented-opt {
  flex: 1;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.segmented-opt:hover {
  color: var(--text-primary);
}

.segmented-opt.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.opt-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Aspect Ratio Visual Icons */
.aspect-icon {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.75;
}
.ratio-1-1 { width: 12px; height: 12px; }
.ratio-2-3 { width: 10px; height: 15px; }
.ratio-3-4 { width: 11px; height: 14px; }
.ratio-9-16 { width: 9px; height: 16px; }
.ratio-16-9 { width: 16px; height: 9px; }

/* Stepper Component */
.stepper-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 6px;
}

.stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}
.stepper-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
}

.stepper-val {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.stepper-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Seed Input */
.seed-row {
  display: flex;
  gap: 8px;
}

.field-input {
  background: var(--bg-field);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}
.field-input:focus {
  background: #FFFFFF;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.seed-input {
  flex: 1;
}

/* Custom Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}
.checkbox-row:hover {
  border-color: var(--border-medium);
}

.custom-checkbox {
  margin-top: 3px;
  accent-color: var(--accent-luxury);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-label-text {
  display: flex;
  flex-direction: column;
}

.checkbox-label-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.checkbox-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Credit Cost Estimator Box */
.credit-estimate-box {
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFBFB 100%);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.credit-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.credit-box-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-box-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.credit-box-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.credit-estimate-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.credit-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.03em;
}

.credit-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.credit-box-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section 4: Generation Studio & Results
   ========================================================================== */
.review-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}

.review-specs-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.review-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.review-model-tag {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}

.review-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.review-row:last-child {
  border-bottom: none;
}
.review-row span:first-child {
  color: var(--text-tertiary);
  font-weight: 500;
}
.review-row span:last-child {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  max-width: 65%;
  word-break: break-word;
}

.generate-action-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.action-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.action-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.btn-generate-main {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
}

.btn-shortcut-pill {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Generation Progress State */
.progress-state {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.progress-studio-card {
  max-width: 520px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.progress-visual-loader {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-luxury);
  opacity: 0.2;
  animation: pulseRing 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.loader-pulse-ring-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed var(--accent-gold);
  animation: spin 8s linear infinite;
}

.loader-center-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-luxury);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-info-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.progress-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.progress-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--accent-luxury) 0%, var(--accent-gold) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.progress-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Error State */
.error-state {
  padding: 30px 0;
}

.error-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.error-icon-box {
  color: var(--status-error);
}

.error-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--status-error);
  margin: 0 0 4px;
}

.error-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Result State Toolbar */
.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.result-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--status-success);
  background: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.result-meta-info {
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.result-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-main-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .result-main-grid {
    grid-template-columns: 1fr;
  }
}

.result-gallery-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.result-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 900px) {
  .result-thumbs {
    flex-direction: row;
  }
}

.result-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}
@media (max-width: 900px) {
  .result-thumbs img {
    width: 80px;
  }
}
.result-thumbs img:hover {
  border-color: var(--border-strong);
  transform: scale(1.02);
}
.result-thumbs img.selected {
  border-color: var(--accent-luxury);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.15);
}

.gallery-tip {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Developer Integration Code Block */
.code-panel {
  margin-top: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #18181B;
  padding: 6px 12px;
  border-bottom: 1px solid #27272A;
}

.code-tabs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.code-tab {
  background: transparent;
  border: none;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.code-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}
.code-tab.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

.btn-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E4E4E7;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.code-block {
  margin: 0;
  padding: 20px;
  background: #09090B;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: #F4F4F5;
  max-height: 380px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

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

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
}

.btn-xl {
  padding: 14px 28px;
  font-size: 15px;
}

.btn-primary {
  background: var(--accent-luxury);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}
.btn-primary:hover {
  background: var(--accent-luxury-hover);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-subtle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: var(--shadow-subtle);
}
.btn-outline-subtle:hover {
  border-color: var(--border-medium);
  background: var(--bg-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.btn-ghost-danger {
  background: transparent;
  color: var(--status-error);
}
.btn-ghost-danger:hover {
  background: var(--status-error-bg);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 480px;
  max-width: 90vw;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalScale 0.25s var(--ease-spring);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--accent-luxury);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.modal-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 14px 24px;
  background: var(--bg-inset);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.key-input-wrapper .field-input {
  width: 100%;
  padding-right: 38px;
}
.btn-toggle-key-visibility {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-key-visibility:hover {
  color: var(--text-primary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-live {
  background: var(--status-success);
  box-shadow: 0 0 0 2px var(--status-success-bg);
}
.dot-failed {
  background: var(--status-error);
  box-shadow: 0 0 0 2px var(--status-error-bg);
}

.text-success { color: var(--status-success); }
.text-danger { color: var(--status-error); }

/* ==========================================================================
   Login Page Styling
   ========================================================================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-modal);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: var(--radius-md);
  background: var(--accent-luxury);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.login-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.login-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.login-error-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  color: var(--status-error);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
  animation: fadeIn 0.2s ease;
}

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

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-login {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

.login-footer-info {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   History Page Styling
   ========================================================================== */
.history-main {
  padding-top: 24px;
}

.history-hero {
  margin-bottom: 24px;
}

.history-hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.history-page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.history-page-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}
.stat-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-medium);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.stat-icon-total { background: var(--bg-subtle); color: var(--text-primary); }
.stat-icon-success { background: var(--status-success-bg); color: var(--status-success); }
.stat-icon-failed { background: var(--status-error-bg); color: var(--status-error); }
.stat-icon-credits { background: var(--accent-gold-light); color: var(--accent-gold); }

.stat-card-info {
  display: flex;
  flex-direction: column;
}

.stat-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stat-card-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Filter Panel */
.history-filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.filter-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  flex: 1;
}

.filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.filter-input, .filter-select {
  width: 100%;
  padding: 7px 10px;
  font-size: 12.5px;
}

.filter-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* Results Header */
.history-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.results-count-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.btn-refresh-history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-refresh-history:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-card);
}

/* History Cards Grid */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.history-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.history-card-media {
  position: relative;
  width: 100%;
  height: 220px;
  background: #0F172A;
  overflow: hidden;
}

.history-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.history-card:hover .history-card-img {
  transform: scale(1.04);
}

.history-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  background: var(--bg-inset);
}

.history-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
}
.badge-completed {
  background: rgba(236, 253, 245, 0.9);
  color: var(--status-success);
  border: 1px solid var(--status-success-border);
}
.badge-failed {
  background: rgba(254, 242, 242, 0.9);
  color: var(--status-error);
  border: 1px solid var(--status-error-border);
}

.history-card-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.history-card-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.history-card-prompt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  margin-bottom: 12px;
}

.tag-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.tag-pill-credits {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border-color: var(--accent-gold-border);
}

.btn-inspect-card {
  width: 100%;
  justify-content: center;
}

/* Empty State */
.history-empty-state {
  background: var(--bg-card);
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-inset);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-empty-state h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.history-empty-state p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Pagination */
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}
.pagination-info {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   History Inspection Modal
   ========================================================================== */
.modal-card-history-detail {
  width: 900px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.detail-modal-body {
  overflow-y: auto;
  padding: 24px;
  gap: 24px;
}

.detail-gallery-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .detail-gallery-row {
    grid-template-columns: 1fr;
  }
}

.detail-img-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-img-col-wide {
  min-width: 0;
}

.detail-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.detail-img-box {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0F172A;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-outputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.detail-output-item {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0F172A;
  border: 1px solid var(--border-subtle);
}

.detail-output-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-output-overlay {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  gap: 6px;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.detail-output-item:hover .detail-output-overlay {
  opacity: 1;
}

.detail-no-output-box {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.error-pill-box {
  color: var(--status-error);
  font-size: 13px;
}

.detail-specs-section {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.detail-specs-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-specs-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   Scrollbars
   ========================================================================== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
