@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;700;900&family=DM+Sans:wght@400;600;700;900&display=swap');

/* ── RESET & TOKENS ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #222222;
  --border2: #2a2a2a;
  --text: #f0f0f0;
  --muted: #666;
  --muted2: #444;
  --accent: #FF6B00;
  --accent2: #ffcc00;
  --green: #22c55e;
  --blue: #3b82f6;
  --red: #ef4444;
  --card: #161616;
  --card2: #1c1c1c;
  --purple: #818cf8;
  --radius: 10px;
  --radius-sm: 7px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 44px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 8px;
}
.site-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
}
.site-header h1 span { color: var(--accent); }
.site-header a h1 { transition: opacity .15s; }
.site-header a:hover h1 { opacity: .75; }
.hdr-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.hdr-actions .btn-sm { padding: 5px 8px; font-size: 13px; }
.hdr-title { display: flex; flex-direction: column; gap: 1px; }

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── LEFT PANEL ──────────────────────────────────────────── */
.panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
  border-right: 1px solid var(--border);
}
.panel::-webkit-scrollbar { width: 3px; }
.panel::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.card-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-label-row .card-label { margin-bottom: 0; }

/* ── INPUTS ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }

.field input[type=text],
.field textarea,
.field select {
  background: #0d0d0d;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  color: var(--text);
  font: 13px 'DM Sans';
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.field input[type=text]:focus,
.field textarea:focus,
.field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 52px; line-height: 1.5; }
.field select { cursor: pointer; }
option { background: #141414; }

/* ── TABS ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #0d0d0d;
  font: 700 10px 'DM Sans';
  cursor: pointer;
  color: var(--muted);
  text-align: center;
  transition: all .15s;
  line-height: 1.5;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ── LAYOUT PICKER ───────────────────────────────────────── */
.layout-row { display: flex; gap: 4px; flex-wrap: wrap; }
.layout-opt {
  flex: 1;
  padding: 7px 2px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #0d0d0d;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  transition: all .15s;
  min-width: 36px;
}
.layout-opt.active { border-color: var(--accent2); color: var(--accent2); background: #150f00; }
.layout-opt:hover:not(.active) { border-color: var(--muted2); color: var(--text); }
.layout-icon { font-size: 13px; display: block; margin-bottom: 2px; }

/* ── VIRAL BUTTONS ───────────────────────────────────────── */
.viral-row { display: flex; gap: 5px; margin-top: 6px; }
.viral-btn {
  flex: 1; padding: 7px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #0d0d0d;
  cursor: pointer; font: 700 10px 'DM Sans'; color: var(--muted);
  text-align: center; transition: all .15s;
}
.viral-btn:hover { border-color: var(--accent2); color: var(--accent2); background: #150f00; }

/* ── PHOTO GRID ──────────────────────────────────────────── */
.img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.drop-zone {
  background: #0d0d0d;
  border: 1.5px dashed var(--border2);
  border-radius: 8px;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .15s;
}
.drop-zone:hover { border-color: var(--accent); background: #150800; }
.drop-zone.has-img { border-style: solid; border-color: #2a2a2a; }
.drop-zone.drag-over { border-color: var(--accent2); background: #150f00; }
.drop-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.drop-zone .dz-label { font-size: 9px; color: var(--muted); font-weight: 700; text-align: center; z-index: 1; }
.drop-zone .dz-num { font-size: 16px; color: var(--border2); font-weight: 900; line-height: 1; z-index: 1; }
.drop-zone .dz-remove {
  position: absolute; top: 3px; right: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; border: none;
}
.drop-zone.selected-slot { border-color: var(--accent) !important; border-style: solid !important; box-shadow: 0 0 0 2px #FF6B0033; }

/* ── VIDEO ZONE ──────────────────────────────────────────── */
.video-zone {
  background: #0d0d0d;
  border: 1.5px dashed #2a2a5a;
  border-radius: 8px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .15s;
  flex-wrap: wrap;
}
.video-zone:hover { border-color: var(--purple); }
.video-zone.has-vid { border-color: var(--purple); border-style: solid; background: #0a0a1a; }
.vz-thumb { width: 64px; height: 40px; border-radius: 5px; flex-shrink: 0; display: none; }
.vz-thumb.show { display: block; }
.vz-info { flex: 1; min-width: 0; }
.vz-icon { font-size: 16px; }
.vz-label { font-size: 10px; color: var(--muted); font-weight: 700; display: block; }
.vz-duration { font-size: 9px; color: var(--purple); font-weight: 700; margin-top: 1px; display: none; }
.vz-duration.show { display: block; }
.vid-clear { background: var(--purple); color: #fff; border: none; border-radius: 5px; padding: 3px 8px; font: 700 9px 'DM Sans'; cursor: pointer; flex-shrink: 0; }
.video-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }
.video-zone.has-vid input[type=file] { pointer-events: none; }

/* ── SLIDERS ─────────────────────────────────────────────── */
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); height: 18px; }
.slider-val { font: 700 11px 'DM Sans'; color: var(--accent); min-width: 26px; text-align: right; }
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-item { display: flex; align-items: center; gap: 5px; }
.color-item label { font: 700 9px 'DM Sans'; color: var(--muted); }
.color-item input[type=color] { width: 26px; height: 26px; border: none; background: none; cursor: pointer; border-radius: 4px; padding: 0; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-row { display: flex; gap: 6px; }
.btn {
  padding: 11px 16px; border-radius: var(--radius); font: 700 12px 'DM Sans';
  cursor: pointer; border: none; transition: all .15s; white-space: nowrap; flex: 1;
}
.btn-render { background: var(--accent); color: #fff; }
.btn-render:hover { background: #e05a00; }
.btn-dl { background: #fff; color: #111; }
.btn-dl:hover:not(:disabled) { background: #e8e8e8; }
.btn-dl:disabled { background: #1e1e1e; color: var(--muted2); cursor: not-allowed; }
.btn-sm {
  padding: 5px 11px; border-radius: var(--radius-sm);
  font: 700 10px 'DM Sans'; cursor: pointer;
  border: 1.5px solid var(--border); background: #0d0d0d;
  color: var(--muted); transition: all .15s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm.success { border-color: var(--green); color: var(--green); }

/* ── SERVER ROW ──────────────────────────────────────────── */
.server-row { display: flex; gap: 6px; align-items: center; }
.server-row input {
  flex: 1; background: #0d0d0d; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  color: var(--text); font: 11px 'DM Sans'; outline: none;
}
.server-dot { width: 7px; height: 7px; border-radius: 50%; background: #333; flex-shrink: 0; }
.server-dot.online { background: var(--green); }
.server-dot.offline { background: var(--red); }

/* ── EXPORT BAR ──────────────────────────────────────────── */
.export-bar { display: none; margin-top: 8px; background: #0d0d0d; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.export-bar.show { display: block; }
.export-title { font: 700 11px 'DM Sans'; color: var(--text); }
.progress-track { background: #1a1a1a; border-radius: 5px; height: 5px; overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 5px; transition: width .3s; width: 0%; }
.export-status { font: 600 10px 'DM Sans'; color: var(--muted); }
.export-log { font: 10px monospace; color: #444; margin-top: 4px; max-height: 44px; overflow-y: auto; line-height: 1.5; }

/* ── MODE PILL ───────────────────────────────────────────── */
.mode-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font: 700 9px 'DM Sans'; }
.mode-pill.photo { background: #0f1f0f; color: var(--green); border: 1px solid #1a3a1a; }
.mode-pill.video { background: #0f0f1f; color: var(--purple); border: 1px solid #1a1a3a; }
.mode-dot { width: 5px; height: 5px; border-radius: 50%; }
.mode-pill.photo .mode-dot { background: var(--green); }
.mode-pill.video .mode-dot { background: var(--purple); }

/* ── PREVIEW SIDE ────────────────────────────────────────── */
.preview-side {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #080808;
}
.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 8px;
  background: var(--surface);
}
.preview-topbar-left { display: flex; align-items: center; gap: 8px; }
.preview-topbar-right { display: flex; align-items: center; gap: 8px; }

/* Canvas fills remaining space — no scroll */
.canvas-area {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #080808;
  padding: 8px;
  position: relative;
}
canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 4px;
}

/* Bottom strip below canvas */
.preview-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.preview-meta { font-size: 9px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.preview-meta span { display: flex; align-items: center; gap: 3px; }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }

/* ── QUICK ADJUST ────────────────────────────────────────── */
.qab {
  padding: 4px 9px; border-radius: 6px;
  border: 1.5px solid var(--border); background: #0d0d0d;
  font: 700 9px 'DM Sans'; cursor: pointer; color: var(--muted); transition: all .15s;
}
.qab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.qab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.qa-panel { display: flex; flex-direction: column; gap: 0; }
.qa-lbl { font-size: 9px; color: var(--muted); white-space: nowrap; min-width: 52px; }
.qa-val { font: 700 10px 'DM Sans'; color: var(--accent); min-width: 34px; text-align: right; }

/* ── OVERLAY BOXES ───────────────────────────────────────── */
.overlay-box { margin-top: 8px; padding: 9px; background: #0d0d0d; border: 1.5px solid var(--border); border-radius: 8px; }
.overlay-box-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.overlay-box-title { font: 700 9px 'DM Sans'; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.overlay-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.overlay-toggle input { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; }
.overlay-toggle span { font: 700 9px 'DM Sans'; color: var(--accent); }
.overlay-slot { height: 58px; margin-bottom: 7px; }
.overlay-sliders { display: none; flex-direction: column; gap: 6px; }
.overlay-sliders.show { display: flex; }
.ov-val { font: 700 10px 'DM Sans'; color: var(--accent); min-width: 30px; text-align: right; }
.ov-val-blue { font: 700 10px 'DM Sans'; color: var(--blue); min-width: 30px; text-align: right; }

/* ── TOAST ───────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 9999; }
.toast {
  padding: 9px 14px; border-radius: 8px; font: 700 11px 'DM Sans'; color: #fff;
  background: #1e1e1e; border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,.5);
  animation: slideIn .2s ease; opacity: 1; transition: opacity .3s;
}
.toast.success { background: #0f2a1a; border-color: #1a4a2a; color: var(--green); }
.toast.error { background: #2a0f0f; border-color: #4a1a1a; color: var(--red); }
.toast.pro { background: #1a1200; border-color: #4a3a0a; color: var(--accent); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── MISC ────────────────────────────────────────────────── */
.save-dot { width: 5px; height: 5px; border-radius: 50%; background: #333; display: inline-block; margin-left: 5px; transition: background .3s; }
.save-dot.saved { background: var(--green); }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { height: 100dvh; overflow: hidden; }

  .wrap {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: calc(100dvh - 50px);
    overflow: hidden;
  }

  /* Mobile tab switcher */
  .mobile-tabs {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 52px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
  }
  .mobile-tab-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; border: none; background: none;
    color: var(--muted); font: 700 9px 'DM Sans'; cursor: pointer;
    transition: color .15s; padding: 6px;
  }
  .mobile-tab-btn .mtb-icon { font-size: 18px; line-height: 1; }
  .mobile-tab-btn.active { color: var(--accent); }
  .mobile-tab-btn.active .mtb-icon { filter: drop-shadow(0 0 4px var(--accent)); }

  .panel {
    display: none;
    height: calc(100dvh - 50px - 58px);
    padding-bottom: 60px;
    border-right: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .panel.mobile-active { display: flex; background: var(--bg); }

  .preview-side {
    display: none;
    height: calc(100dvh - 50px - 58px);
  }
  .preview-side.mobile-active { display: flex; }

  .preview-bottom { max-height: 180px; }

  /* Bigger tap targets on mobile */
  .layout-opt { min-width: 44px; padding: 9px 2px; font-size: 10px; }
  .layout-icon { font-size: 15px; }
  .tab { padding: 8px 13px; font-size: 11px; }
  .btn { padding: 13px 16px; font-size: 13px; }
  .drop-zone { height: 82px; }
  .slider-row input[type=range] { height: 22px; }
  .qab { padding: 6px 12px; font-size: 10px; }
}

@media (min-width: 769px) {
  .mobile-tabs { display: none; }
  .panel { display: flex !important; }
  .preview-side { display: flex !important; }
}

/* ── MOBILE REVAMP ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Header — cleaner, hide overflow buttons on mobile */
  .site-header { height: 50px; padding: 0 10px; }
  .site-header h1 { font-size: 19px; letter-spacing: 1px; }
  .hdr-actions { gap: 4px; }
  .hdr-actions .btn-sm { padding: 5px 8px; font-size: 13px; }
  /* Hide less important header buttons on mobile */
  .hdr-actions .btn-sm.hide-mobile { display: none; }

  /* Panel cards — more breathing room */
  .card { padding: 12px 14px; border-radius: 12px; }
  .card-label { font-size: 10px; margin-bottom: 10px; }
  .field label { font-size: 11px; margin-bottom: 4px; }
  .field input[type=text],
  .field textarea,
  .field select { font-size: 14px; padding: 10px 13px; border-radius: 9px; }

  /* Layout opts — bigger grid */
  .layout-row { gap: 5px; }
  .layout-opt { min-width: 48px; padding: 10px 3px; font-size: 10px; border-radius: 8px; }
  .layout-icon { font-size: 16px; margin-bottom: 3px; }

  /* Tabs */
  .tab { padding: 9px 14px; font-size: 12px; border-radius: 8px; }
  .tabs { gap: 5px; }

  /* Sliders — much bigger touch targets */
  .slider-row { gap: 10px; }
  .slider-row input[type=range] { height: 28px; }
  .qa-val, .ov-val, .slider-val { font-size: 12px; min-width: 38px; }
  .qa-lbl { font-size: 10px; min-width: 58px; }

  /* Drop zones */
  .drop-zone { height: 88px; border-radius: 10px; }
  .drop-zone .dz-label { font-size: 10px; }
  .drop-zone .dz-num { font-size: 18px; }

  /* Buttons */
  .btn { padding: 14px 18px; font-size: 14px; border-radius: 10px; }
  .btn-sm { padding: 7px 12px; font-size: 12px; }
  .viral-btn { padding: 9px; font-size: 11px; }

  /* Video zone */
  .video-zone { min-height: 66px; padding: 10px 12px; border-radius: 10px; }
  .vz-label { font-size: 12px; }
  .vz-thumb { width: 72px; height: 46px; }

  /* QA tabs */
  .qab { padding: 7px 13px; font-size: 11px; border-radius: 7px; }
  .qab-bar { gap: 6px; flex-wrap: wrap; }

  /* Mobile tab bar — taller, cleaner */
  .mobile-tabs { height: 58px; }
  .mobile-tab-btn { font-size: 10px; gap: 3px; }
  .mobile-tab-btn .mtb-icon { font-size: 20px; }

  /* Panel height with taller tab bar */
  .panel {
    height: calc(100dvh - 50px - 58px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .preview-side { height: calc(100dvh - 50px - 58px); }
  .wrap {
    height: calc(100dvh - 50px);
    overflow: hidden;
  }

  /* Preview bottom — more room */
  .preview-bottom { max-height: 200px; padding: 10px 14px; }
  .preview-meta { font-size: 10px; gap: 12px; }

  /* Canvas area — more padding for touch */
  .canvas-area { padding: 10px; }

  /* Export bar */
  .export-status { font-size: 11px; }
  .export-log { font-size: 10px; max-height: 60px; }

  /* Server row */
  .server-row input { font-size: 12px; padding: 8px 10px; }

  /* Toast bottom offset for tab bar */
  .toast-container { bottom: 68px; }

  /* Color inputs bigger */
  input[type=color] { width: 32px !important; height: 26px !important; }
}



/* ── TARGETED MOBILE FIXES (non-breaking) ────────────────────────────── */
/* Hide on mobile class */
@media (max-width: 768px) {
  .hide-on-mobile { display: none !important; }
}

/* ── MOBILE HEADER FIX ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .show-on-mobile { display: inline !important; }
  .site-header { padding: 0 8px; }
  .hdr-actions { gap: 3px; }
  .hdr-actions .btn-sm { padding: 5px 7px; font-size: 12px; }
  .site-title { font-size: 16px !important; letter-spacing: 1px; }
}

/* ── MOBILE HEADER COMPACT ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header { padding: 0 8px !important; overflow: hidden; }
  #siteTitle { font-size: 15px !important; letter-spacing: 1px; white-space: nowrap; }
  .hdr-actions { gap: 2px !important; flex-shrink: 0; }
  .hdr-actions .btn-sm { padding: 5px 7px !important; font-size: 12px !important; }
  #userPill { flex-shrink: 0; }
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: inline !important; }
}

/* ── Drag & Drop zones ───────────────────────────────────────────────── */
.drop-zone {
  transition: border-color .2s, background .2s;
}
.drop-zone.drag-over {
  border-color: var(--accent) !important;
  background: rgba(255,107,0,.08) !important;
  transform: scale(1.02);
}

/* ── Export loading skeleton ─────────────────────────────────────────── */
.export-skeleton {
  display: none;
  padding: 16px;
  gap: 10px;
  flex-direction: column;
}
.export-skeleton.show { display: flex; }
.skel-line {
  height: 12px;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Progress bar ────────────────────────────────────────────────────── */
.export-progress-wrap {
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.export-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .3s ease;
}

/* ── Admin mobile cards ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-table-wrap table { display: none; }
  .admin-card-list { display: flex; flex-direction: column; gap: 10px; }
  .admin-user-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
  }
  .admin-user-card .card-name { font: 700 14px DM Sans; color: var(--text); }
  .admin-user-card .card-email { font: 400 11px DM Sans; color: var(--muted); margin-bottom: 10px; }
  .admin-user-card .card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .admin-user-card .card-label { font: 600 10px DM Sans; color: var(--muted); }
  .admin-user-card .card-value { font: 700 12px DM Sans; color: var(--text); }
}
@media (min-width: 769px) {
  .admin-card-list { display: none; }
}

/* ── Focus rings ─────────────────────────────────────────────────────── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Hide native file inputs inside drop zones ───────────────────────── */
.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.img-grid .drop-zone.has-img input[type=file] {
  display: none;
}
.overlay-slot.has-img input[type=file] {
  display: block;
  z-index: 3;
}

/* ── Admin mobile overflow fix ───────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 12px !important; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }
  .admin-card-list { display: flex !important; flex-direction: column; gap: 10px; margin-top: 10px; }
  .admin-table-wrap .table-wrap table { display: none !important; }
}

/* ── Crop tool ───────────────────────────────────────────────────────── */
.crop-handle {
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 3px;
  z-index: 10;
  pointer-events: all;
}
.crop-ratio-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--muted);
  font: 700 10px 'DM Sans';
  cursor: pointer;
  transition: all .15s;
}
.crop-ratio-btn.active,
.crop-ratio-btn:hover {
  border-color: var(--accent);
  background: rgba(255,107,0,.1);
  color: var(--accent);
}

/* ── Slider value bubble + tap-to-edit (slider-upgrade.js) ───────────── */
.slider-value-bubble {
  pointer-events: none;
}

/* ── ACCORDION SECTIONS (sidebar reorganization) ─────────────────────── */
.acc-section { margin-bottom: 8px; }
.acc-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.acc-header:hover { border-color: var(--muted2); }
.acc-header-label {
  font: 700 11px 'DM Sans';
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.acc-chevron {
  font-style: normal;
  font-size: 13px;
  color: var(--accent);
  transition: transform .2s ease;
  flex-shrink: 0;
  display: inline-block;
}
.acc-section.open .acc-chevron { transform: rotate(180deg); }
.acc-body {
  display: none;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px 12px;
  margin-top: -1px;
}
.acc-section.open .acc-body { display: block; }

@media (max-width: 768px) {
  .acc-header { padding: 13px 14px; }
  .acc-header-label { font-size: 12px; }
  .acc-chevron { font-size: 15px; }
}