:root {
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2.5rem 1rem;
  line-height: 1.5;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


.app-header {
  text-align: center;
  padding: 0.5rem 0;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.app-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.subtitle {
  font-size: 0.925rem;
  color: var(--text-secondary);
}


.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

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

.card-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}


.tab-switcher {
  display: flex;
  background: var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.tab-btn.active {
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}


.tab-content {
  display: none;
}

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


.source-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.source-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.source-tab-btn.active {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.online-search-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  margin: 0;
}

.search-btn {
  padding: 0 1.25rem;
  white-space: nowrap;
  margin-top: 0;
  height: auto;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.search-results-box {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: #f8fafc;
}

.search-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  padding-right: 0.75rem;
}

.search-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-subtle);
}

.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

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

.search-item-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.search-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
  font-size: 0.85rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: #fafcff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.dropzone-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dropzone-text strong {
  color: var(--primary);
}

.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}


.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.file-icon-box {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--border-subtle);
}

.file-icon-box svg {
  color: var(--primary);
}

.file-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.file-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-icon-danger {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-icon-danger:hover {
  color: var(--danger);
}


.progress-container {
  margin-top: 1rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

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

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}


.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.925rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}


.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.mode-tab-btn.active {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}


.settings-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.preset-info-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-top: 0.5rem;
}

.preset-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: block;
}

.settings-section .form-group {
  margin-bottom: 1.15rem;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}


.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
}

.segment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.segment-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.segment-btn.active {
  background: var(--card-bg);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.segment-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.segment-btn.active .segment-title {
  color: var(--primary);
}

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


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-block {
  width: 100%;
  margin-top: 1.5rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--border-subtle);
  color: var(--text-secondary);
}

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

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}


.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}


.status-badge, .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-success, .status-badge.complete {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.running {
  background: var(--primary-light);
  color: var(--primary);
  animation: pulse 2s infinite ease-in-out;
}

.status-badge.queued {
  background: var(--warning-light);
  color: var(--warning);
}

.status-badge.error {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-expired, .status-badge.expired {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.history-retention-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.history-item.expired {
  opacity: 0.65;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}


.job-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  background: var(--border-subtle);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.font-mono {
  font-family: var(--font-mono);
}

.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 0.75rem 0;
  position: relative;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
  flex: 1;
}

.stepper-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.stepper-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.stepper-item.active .stepper-circle {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.stepper-item.active .stepper-label {
  color: var(--primary);
}

.stepper-item.completed .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.stepper-item.completed .stepper-label {
  color: var(--text-primary);
}

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 -4px;
  position: relative;
  top: -10px;
  z-index: 1;
  transition: background 0.25s ease;
}

.stepper-line.completed {
  background: var(--primary);
}

.job-progress-container {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.job-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.job-progress-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.job-progress-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}



.master-player-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: var(--border-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.master-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.master-play-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.master-play-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

.master-play-btn:active {
  transform: scale(0.96);
}

.master-stop-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.master-stop-btn:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.master-time-display {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: auto;
}

.time-current {
  color: var(--text-primary);
}

.time-divider {
  color: var(--text-muted);
}

.stems-waveform-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stem-track-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.vocal-track {
  border-left: 4px solid #6366f1;
}

.inst-track {
  border-left: 4px solid #06b6d4;
}

.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.track-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.track-labels h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stem-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.vocal-icon {
  background: #eef2ff;
  color: #4f46e5;
}

.inst-icon {
  background: #ecfeff;
  color: #0891b2;
}

.stem-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.track-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-track-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.6rem;
  font-size: 0.775rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-track-tool:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.solo-btn.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
}

.mute-btn.active {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

.volume-slider-box {
  display: flex;
  align-items: center;
  width: 65px;
  margin: 0 0.25rem;
}

.volume-slider {
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border);
  appearance: none;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.download-stem-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  gap: 0.35rem;
}

.waveform-box {
  position: relative;
  width: 100%;
  height: 64px;
  background: #fafcff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.waveform-surface {
  width: 100%;
  height: 64px;
  cursor: pointer;
}

.waveform-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.9);
  color: var(--text-muted);
  font-size: 0.75rem;
  z-index: 2;
  pointer-events: none;
}

.new-job-btn-container {
  padding-top: 0.5rem;
}


.history-card {
  margin-top: 0.5rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.history-item:hover {
  background: #f1f5f9;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  padding-right: 0.75rem;
}

.history-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-subtle);
}

.history-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.history-filename {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}


.app-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}


.hidden {
  display: none !important;
}
