/* =========================================================
   Theme 2: Corporate Clean (Light Mode - Stripe/LinkedIn Style)
   ========================================================= */
:root {
  --bg-main: #f7fafc;          /* Soft Off-White Background */
  --bg-card: #ffffff;          /* Pure White Cards */
  --bg-sub: #edf2f7;           /* Subtle Light Containers */
  
  --border-color: #e2e8f0;     /* Soft Divider Borders */
  --border-hover: #0a66c2;
  
  --text-main: #2d3748;        /* Dark Charcoal Text */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  
  --accent-color: #0a66c2;     /* Corporate Blue */
  --accent-dark: #084e96;
  --accent-light: rgba(10, 102, 194, 0.1);
  
  --success-color: #2f855a;
  --error-color: #c53030;
}

body { background-color: var(--bg-main) !important; color: var(--text-main) !important; }
.card, .panel, header, .app-header { background-color: var(--bg-card) !important; border: 1px solid var(--border-color) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important; }
.card-header, .preview-controls, .card-sub, .drop-zone, .stat-box, .action-footer { background-color: var(--bg-sub) !important; }
.btn-primary, .optimize-btn, button[type="submit"] { background: var(--accent-color) !important; color: #fff !important; border: none !important; }
  
 


.glow {
  position: absolute;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
}
.glow-1 {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 80%);
  top: -150px;
  left: -150px;
}
.glow-2 {
  background: radial-gradient(circle, rgba(161, 130, 55, 0.04) 0%, transparent 80%);
  bottom: -150px;
  right: -150px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(44, 53, 57, 0.08);
  border-radius: 20px;
  transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 53, 57, 0.18);
}

/* Base Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 13px;
  max-width: 1720px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  color: var(--accent-color);
  filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.15));
}
.logo-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.logo-tagline {
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  display: block;
  margin-top: -1px;
}

/* Badges */
.status-badges {
  display: flex;
  gap: 12px;
  margin-left: auto;
  align-items: center;
}
.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.badge-privacy {
  color: var(--text-secondary);
  border-color: rgba(212, 175, 55, 0.25);
  background: var(--accent-light);
}
.badge-offline {
  color: var(--success-color);
  border-color: 1px solid rgba(46, 160, 67, 0.4);
  background: rgba(46, 160, 67, 0.15);
}
.pulse-indicator {
  width: 6px;
  height: 6px;
  background-color: var(--success-color);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.4);
  animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(21, 128, 61, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

/* Premium White Cards with Sophisticated Shadow */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 35px rgba(44, 53, 57, 0.04);
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FAF8F4;
}
.card-header h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.card-sub {
  background: var(--bg-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}
.sub-header {
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* Left Column: File Queue */
.panel-left {
  display: flex;
  flex-direction: column;
}
.queue-count {
  font-size: 0.7rem;
  background: var(--bg-sub);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--text-primary);
  font-weight: 700;
}

/* Drag & Drop Zone (Hover Fix Applied) */
.drop-zone {
  margin: 20px 24px 0 24px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: #FCFBF9;      /* Warm Matte Card base color */
  transition: var(--transition);
}

.drop-zone:hover, .drop-zone.dragover {
  background: #FCFBF9;      /* Keeps the exact base color, does not turn solid white */
  border-color: var(--accent-color);
  animation: gold-pulse 1.5s infinite ease-in-out;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15); /* Soft elegant golden glow */
}

@keyframes gold-pulse {
  0% { border-color: var(--border-color); }
  50% { border-color: var(--accent-color); }
  100% { border-color: var(--border-color); }
}

.hidden-input {
  display: none;
}
.upload-icon {
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: var(--transition);
}
.drop-zone:hover .upload-icon, .drop-zone.dragover .upload-icon {
  color: var(--accent-color);
  transform: translateY(-2px);
}
.drop-zone h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.drop-zone p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.browse-link {
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: underline;
  transition: var(--transition);
}
.browse-link:hover {
  color: var(--accent-color);
}
.upload-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

/* Queue List */
.queue-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.queue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.queue-empty-state {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.queue-item {
  background: #FCFBF9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.queue-item:hover {
  border-color: #CBD5E1;
  background: #FFFFFF;
  transform: translateY(-1px);
}
.queue-item.active {
  background: var(--accent-light);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.05);
}
.queue-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.queue-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.queue-item-size {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.queue-item-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.status-dot.pending { background-color: var(--text-muted); }
.status-dot.processing { background-color: var(--accent-color); animation: pulse-ring 1.5s infinite; }
.status-dot.completed { background-color: var(--success-color); }
.status-dot.error { background-color: var(--error-color); }

.savings-tag {
  background: var(--success-light);
  color: var(--success-color);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(21, 128, 61, 0.15);
}
.queue-item-bar-bg {
  height: 3px;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
.queue-item-bar-fill {
  height: 100%;
  background: var(--gradient-gold);
  width: 0%;
  transition: width 0.3s ease;
}
.queue-item-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: var(--transition);
}
.queue-item-remove-btn:hover {
  color: var(--error-color);
  background-color: var(--error-light);
}

/* Session stats Dashboard */
.session-stats {
  margin: 0 24px 24px 24px;
}
.session-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-box {
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-box:hover {
  border-color: var(--border-hover);
  background: #FCFBF9;
}
.stat-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  font-weight: 600;
}
.stat-val {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

/* Center Panel: Preview */
.panel-center {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.preview-controls {
  padding: 14px 24px;
  background: #FAF8F4;
}
.preview-title-area {
  display: flex;
  flex-direction: column;
}
.file-name-indicator {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 3px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.preview-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.btn-group {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.btn-group:hover {
  border-color: var(--border-hover);
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover:not(:disabled) {
  background: var(--bg-sub);
  color: var(--text-primary);
}
.btn-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.zoom-level, .page-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 10px;
  min-width: 45px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.page-indicator {
  min-width: 85px;
}

/* Preview Grid & Canvases */
.preview-grid-wrapper {
  flex: 1;
  padding: 24px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EFECE0;      /* Warm Matte contrasting preview background */
  border-top: 1px solid var(--border-color);
}
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  height: 100%;
  min-height: 400px;
  max-width: 1200px;
}
.canvas-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}
.canvas-card:hover {
  border-color: var(--border-hover);
}
.canvas-tag {
  position: absolute;
  top: 16px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.tag-before {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.tag-after {
  background: var(--accent-light);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text-secondary);
}
.canvas-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 43px 12px 12px 12px;
  overflow: auto;
  position: relative;
}
.canvas-viewport canvas {
  box-shadow: 0 10px 35px rgba(44, 53, 57, 0.08);
  border-radius: 4px;
  max-width: 100%;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  background-color: #0b0f19;
 will-change: transform;
transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
   image-rendering: crisp-edges;
}

.canvas-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  z-index: 5;
  text-align: center;
  padding: 20px;
}

/* Right Panel: Settings Dashboard */
.panel-right {
  display: flex;
  flex-direction: column;
}
.settings-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  transition: var(--transition);
}
.settings-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: block;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}
.group-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.reset-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}
.reset-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Presets Selection */
.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.preset-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.preset-btn:hover {
  background: var(--bg-sub);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.preset-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-color);
  color: var(--text-secondary);
  box-shadow: var(--shadow-gold);
}
.preset-name {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.preset-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
}
.preset-btn.active .preset-desc {
  color: var(--text-secondary);
}

/* Custom Range Sliders with Gold Thumbs */
.slider-control {
  margin-bottom: 18px;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.slider-value {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 700;
}
.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #E8E2D5;      /* Light gold-gray track */
  border-radius: 4px;
  outline: none;
  margin-bottom: 6px;
  transition: var(--transition);
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-gold); /* Rich Brass Gold Gradient */
  cursor: pointer;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
  transition: var(--transition);
}
.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.6);
}
.slider-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-gold);
  cursor: pointer;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
  transition: var(--transition);
}
.slider-input::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.6);
}
.slider-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
}

/* Custom Switches & Checkboxes */
.toggle-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #E8E2D5;
  border-radius: 20px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.switch input:checked + .toggle-slider {
  background: var(--gradient-gold);
  border-color: transparent;
}
.switch input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

.ai-controls-wrapper {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}
.ai-controls-wrapper.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.checkbox-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  font-size: 0.78rem;
  user-select: none;
  color: var(--text-muted);
  transition: var(--transition);
}
.checkbox-container:hover {
  color: var(--text-primary);
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  top: 1px;
  left: 0;
  height: 15px;
  width: 15px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.checkbox-container:hover input ~ .checkmark {
  border-color: var(--border-hover);
}
.checkbox-container input:checked ~ .checkmark {
  background: var(--gradient-gold);
  border-color: transparent;
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}
.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 3px;
  height: 7px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Footer & Action Panel */
.action-footer {
  padding: 20px 24px 24px 24px;
  background: #FAF8F4;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Active File Compression Metrics */
.active-file-stats {
  animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.metrics-dashboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.metric-weight {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}
.metrics-dashboard .text-accent {
  color: var(--text-secondary);
}
.metric-savings-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.savings-circular {
  position: relative;
  width: 44px;
  height: 44px;
}
.circular-chart {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.circle-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.02);
  stroke-width: 3.2;
}
.circle {
  fill: none;
  stroke: var(--success-color);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease-out;
}
.savings-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--success-color);
}
.savings-description {
  display: flex;
  flex-direction: column;
}
.primary-saved {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success-color);
}
.secondary-info {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Premium Buttons & CTA (Brass-Gold Gradient Style) */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  color: var(--text-primary);
}

/* Gold Main CTA Button */
.btn-primary {
  background: var(--gradient-gold);
  color: #FFFFFF;
  border-color: var(--accent-color);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gradient-gold-hover);
  transform: scale(1.02); /* Smooth scale-up effect */
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-large {
  width: 100%;
  padding: 14px;
}
.btn-success {
  background-color: var(--text-primary); /* Onyx Gray for Success buttons */
  color: #FFFFFF;
}
.btn-success:hover {
  background-color: #1A2124;
  box-shadow: 0 4px 12px rgba(44, 53, 57, 0.18);
  transform: translateY(-1px);
}
.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-sub);
  border-color: var(--border-hover);
}
.post-compress-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

/* Spinner */
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.hidden {
  display: none !important;
}

/* Dropdown Overlay Menu (Light theme) */
.share-dropdown {
  position: absolute;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 185px;
  animation: fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.share-menu-item {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}
.share-menu-item:hover {
  background-color: var(--bg-sub);
  color: var(--accent-dark);
}
.share-menu-item svg {
  color: var(--text-muted);
  transition: var(--transition);
}
.share-menu-item:hover svg {
  color: var(--accent-color);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(44, 53, 57, 0.3); /* Executive Slate backdrop */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.3s ease-out;
}
.modal {
  max-width: 480px;
  width: 100%;
  background: #FFFFFF;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FAF8F4;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.modal-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 4px;
}
.btn-close:hover {
  color: var(--text-primary);
}
.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}
.form-group input, .form-group textarea {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.modal-file-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-sub);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-file-badge svg {
  color: var(--text-secondary);
}
.modal-file-badge span:first-of-type {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #FAF8F4;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}
.toast {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(44, 53, 57, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 290px;
  max-width: 380px;
  animation: slide-in-right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition);
}
@keyframes slide-in-right {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-success { border-left-color: var(--success-color); }
.toast-error { border-left-color: var(--error-color); }
.toast-info { border-left-color: var(--accent-color); }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    overflow: hidden;
  }
  .app-container {
    height: 100vh;
    overflow: auto;
    padding: 16px;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
  .panel-center, .panel-left, .panel-right {
    height: auto;
    max-height: none;
  }
  .preview-grid-wrapper {
    max-height: 500px;
  }
  .drop-zone {
    margin: 16px 16px 0 16px;
  }
  .queue-list-container {
    padding: 16px;
  }
  .session-stats {
    margin: 0 16px 16px 16px;
  }
}

/* =========================================================
   UI Polish: Professional Glows, Sliders & CTA Button Fixes
   ========================================================= */

/* 1. Subtle Professional Glow for Cards & Boxes */
.card, .panel, div[class*="panel"], div[class*="card"], .drop-zone {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card:hover, .panel:hover, div[class*="card"]:hover {
  border-color: rgba(56, 139, 253, 0.4) !important;
  box-shadow: 0 0 20px rgba(47, 129, 247, 0.12) !important;
}

.drop-zone:hover {
  border-color: #2f81f7 !important;
  box-shadow: 0 0 25px rgba(47, 129, 247, 0.2) !important;
}

/* 2. Ultra-Modern Range Slider (Image Quality / Resolution Line) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #21262d;
  border-radius: 6px;
  outline: none;
  border: 1px solid #30363d;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2f81f7;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(47, 129, 247, 0.8);
  border: 2px solid #ffffff;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(47, 129, 247, 1);
}

/* 3. Standout High-Converting Primary Button (Optimize & Compress) */
.optimize-btn, button[type="submit"], button[class*="primary"], .btn-primary {
  background: linear-gradient(135deg, #2f81f7 0%, #1f6beb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  padding: 14px 20px !important;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(47, 129, 247, 0.35) !important;
  transition: all 0.25s ease !important;
}

.optimize-btn:hover, button[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 25px rgba(47, 129, 247, 0.6) !important;
  filter: brightness(1.1);
}

/* 4. Zoom & Page Controls Layout Fix */
.btn-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
}

.btn-icon {
  background: #21262d !important;
  border: 1px solid #30363d !important;
  color: #f0f6fc !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #2f81f7 !important;
  border-color: #2f81f7 !important;
  box-shadow: 0 0 10px rgba(47, 129, 247, 0.5) !important;
}

/* =========================================================
   STRICT DASHBOARD FIT & OVERFLOW FIX
   ========================================================= */

/* Body scrollbar completely remove karein */
html, body {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* App container height lock */
.app-container {
  min-height: 100vh !important;
  max-height: 101vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  padding: 10px 15px !important;
  overflow: auto !important;
}

/* Grid height adjust */
.workspace-grid {
  flex: 1 !important;
  min-height: 0 !important; /* Critical for grid flexbox overflow */
  height: auto !important;
  overflow: hidden !important;
}

/* Center Panel Box Containment */
.panel-center, .canvas-card, .preview-grid-wrapper {
  max-height: 90vh !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}

.preview-grid-wrapper {
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Canvas Viewport Scaling */
.canvas-viewport {
  max-height: 100% !important;
  width: 100% !important;
  overflow: auto !important;
}
/* Ensure focus ring is visible for keyboard users */
button:focus-visible, 
input:focus-visible, 
select:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px !important;
}