/* ═══════════════════════════════════════════════════════════
   Translate Tool — Design System
   Aesthetic: Industrial/Editorial · IBM Plex · Amber accents
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --cream:        #F5F0E8;
  --cream-dark:   #EDE7D9;
  --cream-border: #D8D0C0;
  --charcoal:     #1A1916;
  --charcoal-mid: #2E2C27;
  --charcoal-lt:  #4A4840;
  --amber:        #C8791A;
  --amber-lt:     #E89A3C;
  --amber-bg:     #FFF4E0;
  --amber-border: #F0C57A;
  --red:          #C0392B;
  --red-lt:       #E74C3C;
  --red-bg:       #FFF0EE;
  --green:        #27AE60;
  --green-lt:     #2ECC71;
  --green-bg:     #EDFAF3;
  --blue:         #2980B9;
  --blue-bg:      #EEF6FC;
  --cell-changed: #FFFAED;
  --cell-empty:   #FFF8F8;

  --font-ui:   'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 3px rgba(26,25,22,0.08);
  --shadow:    0 4px 16px rgba(26,25,22,0.10);
  --shadow-lg: 0 12px 40px rgba(26,25,22,0.15);

  --transition: 150ms ease;
}

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

html, body {
  height: 100%;
  font-family: var(--font-ui);
  font-size: 14px;
  background: var(--cream);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Grain texture overlay ──────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════
   LANDING SCREEN
═══════════════════════════════════════════════════════════ */

.landing-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.landing-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--cream-border);
  background: var(--cream);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-icon {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: -1px;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 13px;
  color: var(--charcoal-lt);
  font-weight: 300;
}

/* Draft banner */
.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-border);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.draft-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.draft-banner-icon {
  font-size: 20px;
  color: var(--amber);
  flex-shrink: 0;
}

.draft-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.draft-banner-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}

.draft-banner-text span {
  font-size: 12px;
  color: var(--charcoal-lt);
}

.draft-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-restore {
  padding: 7px 16px;
  background: var(--amber);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-restore:hover { background: var(--charcoal); }

.btn-discard {
  padding: 7px 16px;
  background: transparent;
  color: var(--charcoal-lt);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-discard:hover { border-color: var(--charcoal-lt); color: var(--charcoal); }

/* Main upload area */
.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  gap: 40px;
}

.upload-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  border: 1.5px dashed var(--cream-border);
  border-radius: var(--radius-lg);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.upload-card:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow);
}

.upload-card.drag-over {
  border-color: var(--amber);
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(200,121,26,0.12);
}

.upload-card.drag-over .drop-overlay {
  display: flex;
}

.upload-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 32px;
  text-align: center;
}

.upload-glyph {
  color: var(--cream-border);
  transition: color var(--transition);
}
.upload-card:hover .upload-glyph { color: var(--amber); }

.upload-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.3px;
}

.upload-desc {
  font-size: 14px;
  color: var(--charcoal-lt);
  line-height: 1.5;
}

.upload-desc code {
  font-family: var(--font-mono);
  background: var(--cream-dark);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.upload-hint {
  font-size: 11px;
  color: var(--charcoal-lt);
  opacity: 0.7;
  letter-spacing: 0.2px;
}

.drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(200,121,26,0.06);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--amber);
  pointer-events: none;
}

/* Feature list */
.landing-features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--charcoal-lt);
}

.feature-icon {
  color: var(--amber);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   EDITOR SCREEN
═══════════════════════════════════════════════════════════ */

.editor-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top bar */
.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 44px;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-sm {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  font-weight: 500;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* File badges (replaces tabs) */
.file-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245,240,232,0.55);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Save status */
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(245,240,232,0.6);
}

.save-label { font-size: 12px; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); }
.dot-amber  { background: var(--amber-lt); }
.dot-red    { background: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.anim-pulse { animation: pulse 1.2s ease infinite; }

/* Meta bar (progress) */
.editor-metabar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--cream-dark);
  border-bottom: 1px solid var(--cream-border);
  flex-shrink: 0;
  gap: 16px;
}

.metabar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.progress-bar-wrap {
  width: 160px;
  height: 5px;
  background: var(--cream-border);
  border-radius: 99px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 99px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-label {
  font-size: 11px;
  color: var(--charcoal-lt);
  white-space: nowrap;
  font-family: var(--font-mono);
}

.metabar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.change-count {
  font-size: 11px;
  color: var(--amber);
  font-weight: 500;
}

.save-time {
  font-size: 11px;
  color: var(--charcoal-lt);
}

/* Filter bar */
.editor-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid var(--cream-border);
  flex-shrink: 0;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 9px;
  font-size: 15px;
  color: var(--charcoal-lt);
  pointer-events: none;
  line-height: 1;
}

.search-input {
  padding: 6px 28px 6px 28px;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  background: var(--cream);
  color: var(--charcoal);
  outline: none;
  width: 240px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,121,26,0.1);
}

.search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--charcoal-lt);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.filter-pills {
  display: flex;
  gap: 4px;
}

.filter-pill {
  padding: 4px 10px;
  border: 1px solid var(--cream-border);
  border-radius: 99px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--charcoal-lt);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-pill:hover { border-color: var(--amber); color: var(--amber); }

.filter-pill-active {
  background: var(--amber);
  border-color: var(--amber);
  color: white;
}

.filterbar-right { margin-left: auto; }

.row-count {
  font-size: 11px;
  color: var(--charcoal-lt);
  font-family: var(--font-mono);
}

/* Table */
.editor-table-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  background: white;
}

.editor-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Column widths are set dynamically via inline styles in buildColgroup() */

.table-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--charcoal-mid);
}

.table-head th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: rgba(245,240,232,0.7);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.table-head th:last-child { border-right: none; }

.th-file {
  /* same styling as other ths — inherited */
}

.th-edit-hint {
  font-weight: 300;
  opacity: 0.5;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
}

.table-row {
  border-bottom: 1px solid var(--cream-border);
  transition: background var(--transition);
  height: 1px; /* allows cells to use min-height; shrinks to content */
}

.table-row:hover { background: var(--cream); }

/* Key cell */
.cell-key {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--charcoal-lt);
  border-right: 1px solid var(--cream-border);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: top;
  user-select: all;
}

.key-prefix {
  opacity: 0.45;
}

.key-leaf {
  color: var(--charcoal);
  font-weight: 500;
}

/* File cell (all file columns share this base via cell-target) */
.cell-target {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--charcoal);
  vertical-align: top;
  word-break: break-word;
  line-height: 1.5;
  position: relative;
}

.cell-target:hover { background: #FFFBF5; }

.cell-changed {
  background: var(--cell-changed) !important;
  border-left: 2px solid var(--amber-lt);
}

.cell-empty { background: var(--cell-empty) !important; }

.cell-badge-changed {
  font-size: 8px;
  color: var(--amber);
  vertical-align: super;
  margin-right: 4px;
}

.cell-placeholder {
  color: rgba(26,25,22,0.25);
  font-style: italic;
  font-size: 12px;
}

.cell-editing {
  padding: 0 !important;
  background: white !important;
  box-shadow: inset 0 0 0 2px var(--amber);
}

/* Inline textarea */
.cell-textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--charcoal);
  background: white;
  line-height: 1.5;
  display: block;
  overflow: hidden;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  color: var(--charcoal-lt);
  font-size: 14px;
  gap: 8px;
}

/* Bottom toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--cream-dark);
  border-top: 1px solid var(--cream-border);
  flex-shrink: 0;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */

.btn-primary {
  padding: 8px 18px;
  background: var(--amber);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--charcoal); }

.btn-ghost {
  padding: 7px 14px;
  background: transparent;
  color: var(--charcoal-lt);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--charcoal-lt);
  color: var(--charcoal);
  background: var(--cream);
}

.btn-ghost-danger:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-bg);
}

.btn-danger {
  padding: 8px 18px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-danger:hover { background: #922B21; }

/* ═══════════════════════════════════════════════════════════
   TOASTS
═══════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-ui);
  background: var(--charcoal);
  color: var(--cream);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  min-width: 200px;
  max-width: 360px;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.toast-success .toast-icon { color: var(--green-lt); }
.toast-error   .toast-icon { color: #E74C3C; }
.toast-warning .toast-icon { color: var(--amber-lt); }
.toast-info    .toast-icon { color: #5DADE2; }

.toast-icon { font-size: 14px; flex-shrink: 0; }
.toast-msg  { line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,25,22,0.55);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.modal-visible { opacity: 1; }

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.97);
  transition: transform 0.2s ease;
}

.modal-visible .modal-box { transform: scale(1); }

.modal-box-wide { max-width: 820px; }

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

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

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
}

.modal-title code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

.diff-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  border-radius: 99px;
  padding: 1px 7px;
  font-weight: 500;
  vertical-align: middle;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--charcoal-lt);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1;
}
.modal-close:hover { background: var(--cream); color: var(--charcoal); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-body-diff {
  padding: 0;
}

.modal-storage-info {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--cream-border);
}

.storage-label {
  font-size: 11px;
  color: var(--charcoal-lt);
  font-family: var(--font-mono);
}

/* Download options */
.download-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  background: var(--cream);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  font-family: var(--font-ui);
}

.download-option:hover {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.download-option-icon {
  font-size: 20px;
  color: var(--amber);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.download-option div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-option strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
}

.download-option span {
  font-size: 11px;
  color: var(--charcoal-lt);
}

.download-option-primary {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.download-section-label {
  font-size: 11px;
  color: var(--charcoal-lt);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 8px 2px 4px;
}

/* Confirm dialog */
.confirm-message {
  font-size: 14px;
  color: var(--charcoal-lt);
  line-height: 1.5;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Diff sections */
.diff-section {
  margin-bottom: 0;
}

.diff-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--cream-dark);
  border-bottom: 1px solid var(--cream-border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.diff-section-file {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--charcoal);
}

/* Diff table */
.diff-table-wrap {
  overflow: auto;
  max-height: 60vh;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.diff-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: rgba(245,240,232,0.7);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: var(--charcoal-mid);
  border-right: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.diff-table tbody tr { border-bottom: 1px solid var(--cream-border); }
.diff-table tbody tr:hover { background: var(--cream); }

.diff-key {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--charcoal-lt);
  border-right: 1px solid var(--cream-border);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diff-old {
  padding: 10px 14px;
  color: var(--red);
  background: #FFF5F5;
  border-right: 1px solid var(--cream-border);
  word-break: break-word;
  line-height: 1.4;
}

.diff-new {
  padding: 10px 14px;
  color: #1A7A45;
  background: #F4FBF7;
  border-right: 1px solid var(--cream-border);
  word-break: break-word;
  line-height: 1.4;
}

.diff-time {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--charcoal-lt);
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBARS
═══════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--cream-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--charcoal-lt); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .search-input { width: 140px; }
  .progress-bar-wrap { width: 80px; }
  .editor-metabar { flex-wrap: wrap; }
  .metabar-right { gap: 8px; }
  .modal-box-wide { max-width: 95vw; }
  .file-badge { display: none; }
  .file-badge:first-child { display: inline; }
}
