/* ==========================================================================
   SVGPixel Pro - Design System & Stylesheet
   Designed under Claude Frontend Design Guidelines
   ========================================================================== */

:root {
  /* Dark Theme Tokens (Default) */
  --bg-app: #090B10;
  --bg-surface: #11141E;
  --bg-surface-elevated: #181C2B;
  --bg-surface-subtle: #1C2237;
  --bg-input: #131724;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(99, 102, 241, 0.45);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-primary: #6366F1;
  --accent-primary-hover: #4F46E5;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --accent-glow: rgba(99, 102, 241, 0.35);
  
  --badge-bg: rgba(99, 102, 241, 0.12);
  --badge-border: rgba(99, 102, 241, 0.3);
  --badge-text: #A5B4FC;
  
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #F59E0B;
  --danger: #EF4444;
  
  --checker-light: #161A26;
  --checker-dark: #10131D;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-surface-subtle: #E2E8F0;
  --bg-input: #FFFFFF;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.15);
  --border-accent: rgba(79, 70, 229, 0.35);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --accent-primary: #4F46E5;
  --accent-primary-hover: #4338CA;
  --accent-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #DB2777 100%);
  --accent-glow: rgba(79, 70, 229, 0.2);
  
  --badge-bg: rgba(79, 70, 229, 0.08);
  --badge-border: rgba(79, 70, 229, 0.2);
  --badge-text: #4338CA;
  
  --checker-light: #FFFFFF;
  --checker-dark: #E2E8F0;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(var(--bg-app), 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.edge-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.theme-btn, .icon-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-btn:hover, .icon-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-subtle);
  transform: translateY(-1px);
}

/* Main Layout */
.app-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Studio Workspace Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.75rem;
  align-items: start;
}

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

/* Panel Card */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

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

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Drop Zone */
.dropzone {
  border: 2px dashed var(--border-medium);
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone.dragover {
  transform: scale(1.01);
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--badge-bg);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  transition: var(--transition);
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-2px);
  background: var(--accent-primary);
  color: #FFFFFF;
}

.dropzone h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

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

.dropzone-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Sample Bar */
.sample-bar {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.sample-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sample-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sample-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.sample-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: var(--badge-bg);
}

/* Control Sections */
.control-group {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-mono);
}

/* Quality Preset Cards */
.quality-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.quality-card {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quality-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.quality-card.active {
  border-color: var(--accent-primary);
  background: var(--badge-bg);
  box-shadow: 0 0 16px var(--accent-glow);
}

.quality-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.quality-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.quality-card.active .quality-badge {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.quality-dim {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Background selector */
.bg-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.bg-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.bg-opt.active {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: var(--badge-bg);
}

.bg-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
}

.swatch-transparent {
  background-image: 
    linear-gradient(45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(-45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, var(--checker-dark) 75%), 
    linear-gradient(-45deg, transparent 75%, var(--checker-dark) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
  background-color: var(--checker-light);
}

.swatch-white { background-color: #FFFFFF; }
.swatch-black { background-color: #090B10; }
.swatch-custom {
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
}

/* Color picker popover */
.custom-color-input {
  display: none;
  margin-top: 0.75rem;
  align-items: center;
  gap: 0.75rem;
}

.custom-color-input.show {
  display: flex;
}

.color-picker-input {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
}

.color-hex-text {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Primary Convert Button */
.btn-primary {
  width: 100%;
  margin-top: 1.5rem;
  background: var(--accent-gradient);
  border: none;
  color: #FFFFFF;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

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

/* Right Studio Panel (Preview & Inspector) */
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.canvas-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.canvas-toolbar {
  padding: 0.75rem 1.25rem;
  background: rgba(var(--bg-surface), 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-tab {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tool-tab.active {
  background: var(--bg-surface-subtle);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.viewport-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  min-height: 400px;
  padding: 2rem;
  user-select: none;
}

.viewport-stage.checkerboard {
  background-image: 
    linear-gradient(45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(-45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, var(--checker-dark) 75%), 
    linear-gradient(-45deg, transparent 75%, var(--checker-dark) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: var(--checker-light);
}

.empty-state {
  text-align: center;
  max-width: 360px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem auto;
  opacity: 0.4;
}

.viewport-image {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  transition: transform 0.2s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Comparison Split Slider */
.split-slider-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 420px;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.split-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-layer.after {
  clip-path: inset(0 0 0 50%);
}

.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 20;
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-size: 14px;
}

/* Specs & Telemetry Bar */
.specs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

@media (max-width: 768px) {
  .specs-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.spec-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Action Buttons Bar */
.action-deck {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.action-btn:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: var(--bg-surface-subtle);
  transform: translateY(-1px);
}

.action-btn.primary {
  background: var(--accent-gradient);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.action-btn.primary:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 6px 22px var(--accent-glow);
}

.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Batch Queue */
.batch-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

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

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

.batch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.batch-row:hover {
  border-color: var(--border-medium);
}

.batch-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.batch-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.batch-thumb svg, .batch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.batch-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.status-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.status-badge.ready {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

.status-badge.converting {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  animation: pulse 1.5s infinite;
}

.status-badge.done {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Modal for SVG raw paste */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-textarea {
  width: 100%;
  height: 240px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: vertical;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
}

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
  animation: slideIn 0.3s ease;
}

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

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spin 0.8s linear infinite;
}

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

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}
