/* ==========================================================================
   Review Card Generator v2 - ArtBot AI Dark Tech Theme
   ========================================================================== */

:root {
  --bg-main: #07080c;
  --bg-surface: #0e1017;
  --bg-card: rgba(16, 19, 28, 0.85);
  --bg-card-hover: rgba(22, 26, 38, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 240, 255, 0.4);
  --border-active: #00f0ff;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.25);
  --indigo: #6366f1;
  --indigo-glow: rgba(99, 102, 241, 0.25);
  --emerald: #10b981;
  --rose: #f43f5e;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body.dark-theme {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(7, 8, 12, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.header-container {
  max-width: 1720px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.brand-back-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(14, 16, 23, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

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

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #6366f1 100%);
  color: #07080c;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #38f4ff 0%, #818cf8 100%);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
  color: #000000;
}

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

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

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

.btn-ghost:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.25);
}

.btn-ghost:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

/* ==========================================================================
   Main Layout & Sidebar
   ========================================================================== */
.app-main {
  flex: 1;
  padding: 24px;
}

.layout-container {
  max-width: 1720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.settings-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.sidebar-title h2 {
  font-size: 1rem;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-text:hover {
  opacity: 0.8;
}

.sidebar-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-row {
  display: flex;
  gap: 12px;
}

.col-6 {
  flex: 1;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.value-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix .suffix {
  position: absolute;
  right: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

.form-control, .form-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(14, 16, 23, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.form-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--cyan);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.btn-preset:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-preset.active {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.preset-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
}

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

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

/* Toggle Switch */
.form-toggle-row {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.toggle-checkbox:checked + .toggle-switch {
  background: var(--cyan);
}

.toggle-checkbox:checked + .toggle-switch::after {
  transform: translateX(16px);
  background: #07080c;
}

.toggle-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
}

.webp-controls-group {
  margin-top: 10px;
  padding: 12px;
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-color {
  -webkit-appearance: none;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.form-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-color::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.color-hex {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.btn-color-preset {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-color-preset[data-color="#ffffff"] { background: #ffffff; }
.btn-color-preset[data-color="#f8fafc"] { background: #f8fafc; }
.btn-color-preset[data-color="#0f172a"] { background: #0f172a; }

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ==========================================================================
   Workspace & Dropzone
   ========================================================================== */
.workspace-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.upload-dropzone {
  position: relative;
  padding: 36px 24px;
  border: 2px dashed rgba(0, 240, 255, 0.3);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(14, 16, 23, 0.5);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
  transform: translateY(-2px);
}

.file-input-hidden {
  display: none;
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}

.dropzone-text h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.dropzone-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.btn-browse {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

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

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-title-wrap h2 {
  font-size: 1.25rem;
}

.badge-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

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

/* Empty State */
.empty-gallery-state {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--border-subtle);
}

.empty-illustration {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-gallery-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.empty-gallery-state p {
  color: var(--text-secondary);
  max-width: 48ch;
  margin: 0 auto;
  font-size: 0.875rem;
}

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

.review-card-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.review-card-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.15);
}

.review-card-item.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.review-card-item.drag-target-over {
  border-color: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
  transform: scale(1.02);
}

.card-preview-area {
  position: relative;
  aspect-ratio: 600 / 550;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
  cursor: pointer;
}

.checkerboard-bg {
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%), 
    linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%), 
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #0b0d14;
}

.card-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.review-card-item:hover .card-preview-img {
  transform: scale(1.02);
}

.card-footer-info {
  padding: 12px 14px;
  background: rgba(10, 12, 18, 0.85);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.card-file-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-file-size {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--cyan);
}

.badge-merged {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  margin-top: 2px;
}

.card-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-icon.btn-delete-single:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.drag-drop-hint-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 185, 129, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: #0e111a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

.modal-preview-dialog {
  max-width: 800px;
  width: 100%;
}

.modal-editor-dialog {
  max-width: 1100px;
  width: 100%;
  height: 85vh;
}

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

.modal-title {
  font-size: 1.15rem;
}

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

.btn-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.preview-modal-body {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.preview-large-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}

.modal-footer {
  padding: 16px 24px;
  background: rgba(7, 8, 12, 0.8);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-meta-info {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

/* Subitems Selector Tabs Bar */
.editor-subitems-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(14, 17, 26, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.subitems-bar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.editor-subitems-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-subitem-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-subitem-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-subitem-tab.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.subitem-tab-thumb {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Editor Toolbar & Canvas */
.editor-toolbar {
  padding: 12px 20px;
  background: rgba(7, 8, 12, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tool:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-tool.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

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

.brush-range {
  width: 100px;
}

.editor-workspace {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px;
  position: relative;
}

.editor-canvas-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

#editor-canvas {
  display: block;
  max-width: 100%;
  max-height: 55vh;
}

/* Crop & Blur Overlays */
.crop-box {
  position: absolute;
  border: 2px dashed var(--cyan);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  cursor: move;
}

.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid var(--cyan);
  border-radius: 2px;
}

.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.blur-selection-box {
  position: absolute;
  border: 2px solid var(--indigo);
  background: rgba(99, 102, 241, 0.25);
  pointer-events: none;
}

.brush-cursor {
  position: absolute;
  border: 2px solid var(--rose);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(244, 63, 94, 0.2);
}

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

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .layout-container {
    grid-template-columns: 1fr;
  }
  .settings-sidebar {
    position: static;
    max-height: none;
  }
}
