:root {
  --bg-primary: #0a0b0e;
  --bg-secondary: #12141a;
  --bg-card: rgba(22, 25, 33, 0.85);
  --bg-card-hover: rgba(28, 32, 42, 0.95);
  --bg-input: #171a23;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(212, 175, 55, 0.4);
  
  --accent-gold: #d4af37;
  --accent-gold-light: #f3e5ab;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  
  --text-main: #f0f2f5;
  --text-muted: #8e95a5;
  --text-dim: #5c6375;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--accent-gold-glow);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 11, 14, 0.8);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1f232e, #13151c);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 60%, var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.status-indicator.connected {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
}

.status-indicator.missing {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.status-indicator.connected .pulse-dot {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-indicator.missing .pulse-dot {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

/* LAYOUT */
.main-layout {
  padding: 2rem 1.5rem 4rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.hero-heading {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, #e2e8f0 70%, var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subheading {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
}

.hero-subheading strong {
  color: var(--text-main);
}

/* WORKSPACE GRID */
.workspace-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.75rem;
  align-items: start;
}

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

/* CARDS */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.section-card {
  margin-bottom: 1.25rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* DROPZONE */
.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  background: rgba(18, 20, 26, 0.6);
  border-radius: var(--radius-md);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.04);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.08);
}

.upload-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  transition: var(--transition);
}

.upload-dropzone:hover .upload-icon-circle {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.1);
}

.dropzone-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dropzone-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Preview Inside Dropzone */
.dropzone-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0f14;
}

.dropzone-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(to top, rgba(10, 11, 14, 0.95), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

#previewFileName {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

#previewFileSize {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* SAMPLES */
.samples-wrapper {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.samples-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.samples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.sample-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.sample-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--text-main);
}

.sample-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.label-muted {
  font-weight: 400;
  color: var(--text-dim);
}

.form-select,
.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

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

.form-help {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.form-help a {
  color: var(--accent-gold);
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

/* ACCORDION */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.accordion-header:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.accordion-content {
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b89325 100%);
  color: #0b0c10;
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5c04b 0%, #c9a436 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-block {
  margin-top: 1.25rem;
}

.terms-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.5rem;
}

/* RIGHT PANEL: RESULT */
.result-card {
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  min-height: 36px;
}

.result-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* VIEW MODE TABS */
.view-mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 1rem;
}

.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab.active {
  background: var(--bg-card-hover);
  color: #fff;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* RESULT VIEWPORT */
.result-viewport {
  flex: 1;
  background: #090a0d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 360px;
}

.empty-graphic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* LOADING STATE */
.loading-state {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 400px;
}

.fashion-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.spinner-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, 0.15);
  border-top-color: var(--accent-gold);
  animation: spin 1s linear infinite;
}

.spinner-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-gold);
}

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

.loading-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #fff;
}

.step-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: var(--transition);
}

.progress-step.active {
  color: var(--accent-gold);
  font-weight: 600;
}

.progress-step.done {
  color: #34d399;
}

.progress-step.done .step-icon {
  color: #34d399;
}

/* SINGLE IMAGE VIEW */
.image-display-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.image-display-wrap img {
  max-width: 100%;
  max-height: 580px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* INTERACTIVE SPLIT COMPARISON */
.split-comparison-container {
  position: relative;
  width: 100%;
  height: 580px;
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  background: #000;
}

.split-image-before,
.split-image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.split-image-before img,
.split-image-after img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.split-image-after {
  width: 50%;
  border-right: 2px solid var(--accent-gold);
}

.split-label {
  position: absolute;
  top: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(10, 11, 14, 0.8);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid var(--border-color);
  z-index: 5;
}

.before-label { right: 1rem; }
.after-label { left: 1rem; }

.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent-gold);
  z-index: 10;
  transform: translateX(-50%);
}

.divider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #0b0c10;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RESULT DETAILS CARD */
.result-details-card {
  margin-top: 1rem;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-label {
  color: var(--text-dim);
  font-weight: 600;
  min-width: 130px;
}

.meta-value {
  color: var(--text-main);
  font-weight: 500;
}

.meta-analysis {
  color: var(--text-muted);
  line-height: 1.4;
}

/* SESSION GALLERY */
.history-card {
  margin-top: 1.5rem;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.history-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.history-count {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.history-thumbnails {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.history-empty {
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
}

.thumb-item {
  width: 76px;
  height: 98px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  background: #000;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* MODALS */
.modal-backdrop,
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.modal-close,
.lightbox-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover,
.lightbox-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.input-password-wrap {
  position: relative;
}

.input-password-wrap input {
  padding-right: 60px;
}

.btn-toggle-vis {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-toggle-vis:hover {
  color: var(--text-main);
}

.api-key-test-feedback {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.4;
}

.api-key-test-feedback.success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.api-key-test-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* LIGHTBOX */
.lightbox-backdrop {
  flex-direction: column;
  padding: 1rem;
}

.lightbox-toolbar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lightbox-img-wrap {
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.15rem;
  background: rgba(22, 25, 33, 0.95);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }

@keyframes slideIn {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* UTILITIES */
.hidden { display: none !important; }

