/* ============================================================
   FRAMETA — main.css
   Design: editorial / luxury-minimal
   Autor: Gustavo de Morais Simão
   ============================================================ */

/* --- RESET & BASE ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0d0d0d;
  --ink-2:      #3a3a3a;
  --ink-3:      #787878;
  --ink-4:      #b0b0b0;
  --paper:      #f7f5f0;
  --paper-2:    #eeecea;
  --paper-3:    #e4e2dd;
  --white:      #ffffff;
  --accent:     #1a1a1a;
  --accent-alt: #c8a96e;
  --danger:     #c0392b;
  --success:    #2d7a4f;

  --header-h:   52px;
  --sidebar-w:  210px;
  --exif-w:     200px;

  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;
  --font-serif: Georgia, 'Times New Roman', serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --transition: 0.18s ease;
}

/* ── TEMA ESCURO ─────────────────────────────────────────── */
[data-theme="dark"] {
  --ink:     #f0f0f0;
  --ink-2:   #c8c8c8;
  --ink-3:   #888888;
  --ink-4:   #555555;
  --paper:   #141414;
  --paper-2: #1c1c1c;
  --paper-3: #2a2a2a;
  --white:   #1a1a1a;
  --accent-alt: #c8a96e;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- HEADER ------------------------------------------------ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--paper-3);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}
.header-brand:hover { opacity: 0.72; }

.header-version {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--ink-4);
  letter-spacing: 0.06em;
  margin-left: 2px;
}

.brand-mark { color: var(--ink); display: flex; align-items: center; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }

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

.brand-tag {
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.header-nav { display: flex; gap: 2px; margin-left: 20px; }

.nav-btn {
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-btn:hover { color: var(--ink); background: var(--paper-2); }
.nav-btn.active {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper-3);
  font-weight: 500;
}

.header-credit {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-4);
  white-space: nowrap;
}

.credit-link {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.credit-link:hover { color: var(--ink); border-bottom-color: var(--accent-alt); }

/* --- APP LAYOUT -------------------------------------------- */
.app {
  display: flex;
  height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
  overflow: hidden;
}

.app-column {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

/* --- SIDEBAR ----------------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--paper-3);
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  gap: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-3) transparent;
}

.sidebar-section {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--paper-2);
}

.sidebar-section:last-of-type { border-bottom: none; }
.sidebar-spacer { flex: 1; }

.section-title {
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 5px;
}

/* Upload Zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 10px;
  border: 1.5px dashed var(--paper-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--paper);
}
.upload-zone:hover { border-color: var(--accent-alt); background: var(--paper-2); }
.upload-icon { color: var(--ink-3); }
.upload-label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.upload-sub { font-size: 9px; color: var(--ink-4); font-family: var(--font-mono); }

/* Option Groups */
.option-group { display: flex; gap: 4px; }

.opt-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
  justify-content: center;
}
.opt-btn:hover { border-color: var(--ink-3); color: var(--ink-2); }
.opt-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* Grid de posições — variantes */
.pos-grid {
  display: grid;
  gap: 3px;
}
.pos-grid--corners {
  grid-template-columns: repeat(2, 1fr);
  max-width: 80px;
  margin: 0 auto;
}
.pos-grid--bars {
  grid-template-columns: 1fr;
  max-width: 50px;
  margin: 0 auto;
  gap: 4px;
}

.pos-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 12px;
  color: var(--ink-4);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  height: 26px;
}
.pos-btn:hover { border-color: var(--ink-3); color: var(--ink-2); }
.pos-btn.active { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Format Grid */
.fmt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.fmt-btn {
  padding: 4px 2px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.fmt-btn small { font-size: 8px; opacity: 0.7; }
.fmt-btn:hover { border-color: var(--ink-3); color: var(--ink-2); }
.fmt-btn.active { border-color: var(--ink); background: var(--ink); color: var(--white); }
.fmt-btn.active small { color: rgba(255,255,255,0.5); }

/* Font group */
.font-row { display: flex; gap: 4px; }
.font-btn {
  flex: 1; padding: 5px; border: 1px solid var(--paper-3); border-radius: var(--radius-sm);
  background: var(--paper); font-size: 11px; cursor: pointer; text-align: center;
  color: var(--ink-3); transition: all var(--transition);
}
.font-btn:hover { border-color: var(--ink-3); }
.font-btn.active { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Export Button */
.export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.export-btn:hover { opacity: 0.85; }
.export-btn:active { transform: scale(0.98); }
.export-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* --- WORKSPACE --------------------------------------------- */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}

.drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(247,245,240,0.92);
  z-index: 10;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drop-overlay.active {
  display: flex;
  pointer-events: auto;
}
[data-theme="dark"] .drop-overlay { background: rgba(20,20,20,0.92); }
.drop-overlay-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; color: var(--ink-3); font-size: 15px; font-weight: 500;
}

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center; padding: 40px;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.empty-icon { color: var(--ink-4); margin-bottom: 6px; }
.empty-title { font-size: 17px; font-weight: 500; color: var(--ink-2); }
.empty-sub { font-size: 13px; color: var(--ink-3); }
.empty-sub em { font-style: italic; color: var(--ink-2); }
.empty-formats { font-size: 9px; font-family: var(--font-mono); color: var(--ink-4); letter-spacing: 0.08em; margin-top: 6px; }

.preview-container {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 20px;
}

#mainCanvas {
  max-width: 100%; max-height: 100%; display: block;
  border-radius: 3px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.08);
  animation: fadeIn 0.3s ease;
}

/* --- EXIF PANEL -------------------------------------------- */
.exif-panel {
  width: var(--exif-w);
  min-width: var(--exif-w);
  background: var(--white);
  border-left: 1px solid var(--paper-3);
  padding: 14px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-3) transparent;
}

.exif-empty { font-size: 11px; color: var(--ink-4); line-height: 1.7; margin-top: 6px; }

.exif-status {
  font-size: 9px; font-family: var(--font-mono); padding: 3px 7px;
  border-radius: var(--radius-sm); margin-bottom: 10px; display: inline-block;
}
.exif-status.ok      { background: #edf7f2; color: var(--success); }
.exif-status.warn    { background: #fef9ec; color: #a07000; }
.exif-status.err     { background: #fdf0ef; color: var(--danger); }
[data-theme="dark"] .exif-status.ok   { background: #1a2e22; color: #5cb88a; }
[data-theme="dark"] .exif-status.warn { background: #2a2210; color: #c8a96e; }
[data-theme="dark"] .exif-status.err  { background: #2e1a1a; color: #e07070; }

.exif-list { display: flex; flex-direction: column; gap: 10px; }
.exif-key {
  font-size: 8px; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-4); margin-bottom: 1px;
}
.exif-val { font-size: 12px; font-weight: 500; color: var(--ink); word-break: break-word; }
.exif-val.muted { color: var(--ink-3); font-weight: 400; }

/* Toggle list */
.toggle-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle-label { font-size: 11px; color: var(--ink-2); }

.toggle-wrap { position: relative; width: 28px; height: 16px; flex-shrink: 0; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--paper-3); border-radius: 16px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 10px; height: 10px;
  left: 3px; top: 3px; background: var(--white); border-radius: 50%;
  transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: var(--ink); }
input:checked + .toggle-slider::before { transform: translateX(12px); }

/* --- ABOUT PAGE -------------------------------------------- */
.about-page {
  margin-top: var(--header-h); min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px; background: var(--paper);
}
.about-inner { max-width: 640px; width: 100%; }
.about-inner h1 { font-size: 44px; font-weight: 600; letter-spacing: -2px; color: var(--ink); margin-bottom: 14px; }
.about-lead { font-size: 17px; color: var(--ink-2); line-height: 1.6; margin-bottom: 36px; font-weight: 300; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 40px; }
.about-card { padding: 18px; background: var(--white); border: 1px solid var(--paper-3); border-radius: var(--radius-lg); }
.about-card-title { font-size: 9px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-4); margin-bottom: 8px; }
.about-card p { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.about-credit { font-size: 11px; font-family: var(--font-mono); color: var(--ink-4); padding-top: 20px; border-top: 1px solid var(--paper-3); }
.about-credit strong { color: var(--ink-2); }

/* --- TOAST ------------------------------------------------- */
.toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: var(--white);
  padding: 8px 18px; border-radius: var(--radius-md);
  font-size: 12px; opacity: 0; pointer-events: none;
  transition: all 0.25s ease; z-index: 200; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- ASSINATURA / NOME DO ARQUIVO -------------------------- */
.signature-input,
.filename-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 11px;
  transition: border-color var(--transition);
  margin-top: 3px;
}
.filename-input { font-family: var(--font-mono); }
.signature-input:focus,
.filename-input:focus {
  outline: none;
  border-color: var(--ink-3);
}
.signature-hint {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--ink-4);
  margin-top: 3px;
}
.sidebar-section .filename-input + .export-btn {
  margin-top: 6px;
}

/* --- BATCH MODE / FILMSTRIP -------------------------------- */
.export-btn--batch {
  background: var(--ink-2);
  margin-top: 4px;
}
.export-btn--batch:hover { background: var(--ink); }

.filmstrip {
  width: 100%;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  flex-shrink: 0;
}

.filmstrip-track {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0;
}
.filmstrip-track::-webkit-scrollbar { display: none; }

.filmstrip-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  position: relative;
}
.filmstrip-thumb.active {
  border-color: var(--accent-alt);
}
.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.filmstrip-thumb .thumb-index {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 8px;
  font-family: var(--font-mono);
  color: white;
  background: rgba(0,0,0,0.55);
  padding: 1px 3px;
  border-radius: 2px;
}

.filmstrip-nav {
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.filmstrip-nav:hover { background: rgba(255,255,255,0.25); }
.filmstrip-nav:disabled { opacity: 0.2; cursor: not-allowed; }

.batch-counter {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
  display: none;
  padding: 0 4px;
}
.batch-counter.visible { display: block; }

/* --- HINT DE REPOSICIONAMENTO ------------------------------ */
.reposition-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0,0,0,0.72);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  pointer-events: auto;
  z-index: 5;
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: hintFadeIn 0.3s ease forwards;
  min-width: 240px;
}
@keyframes hintFadeIn { to { opacity: 1; } }

.reposition-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reposition-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.reposition-zoom input[type=range] {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.reposition-zoom input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}
.reposition-zoom input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
}

.zoom-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  min-width: 10px;
  text-align: center;
}

.zoom-val {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  min-width: 36px;
  text-align: right;
}

.reposition-reset {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.reposition-reset:hover { background: rgba(255,255,255,0.28); }

#mainCanvas.draggable { cursor: grab; }
#mainCanvas.dragging  { cursor: grabbing; }

/* --- SELETOR DE FORMATO DE EXPORT -------------------- */
.export-format-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.fmt-type-btn {
  flex: 1;
  padding: 5px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
}
.fmt-type-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* --- BATCH TOOLBAR ------------------------------------ */
.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
  border-bottom: 1px solid var(--paper-3);
  gap: 8px;
  flex-shrink: 0;
}

.batch-mode-toggle {
  display: flex;
  background: var(--paper-3);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.bmt-btn {
  padding: 4px 12px;
  border: none;
  border-radius: calc(var(--radius-sm) - 1px);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
}

.bmt-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.batch-apply-all {
  padding: 4px 12px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  transition: all var(--transition);
}

.batch-apply-all:hover {
  background: var(--paper-3);
  color: var(--ink);
}

/* --- RESPONSIVIDADE MOBILE — sem rolagem, tudo acessível ---- */
@media (max-width: 768px) {
  :root { --header-h: 44px; }
  html, body { overflow: hidden; height: 100%; }
  .header { padding: 0 12px; gap: 10px; }
  .header-credit { display: none; }
  .brand-tag { display: none; }
  .nav-btn { padding: 4px 10px; font-size: 12px; }

  .app {
    flex-direction: column;
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    position: relative;
  }

  /* Sidebar desktop some no mobile */
  .sidebar { display: none !important; }
  .exif-panel { display: none; }

  .app-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 56px; /* altura da bottom nav */
  }

  .workspace {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  #mainCanvas {
    max-width: 100%;
    max-height: 100%;
  }

  .filmstrip { padding: 4px 6px; }
  .filmstrip-thumb { width: 40px; height: 40px; }

  /* Bottom navigation */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: var(--white);
    border-top: 1px solid var(--paper-3);
    z-index: 100;
  }

  /* Painéis mobile */
  .mobile-panel {
    position: fixed;
    bottom: 56px; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--paper-3);
    z-index: 99;
    max-height: 55vh;
    overflow-y: auto;
  }

  .mp-inner { padding: 12px 16px 16px; }

  .batch-toolbar {
    margin-bottom: 0;
  }
}

/* Bottom nav escondida no desktop */
.bottom-nav {
  display: none;
  align-items: center;
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-4);
  font-family: var(--font-sans);
  font-size: 9px;
  transition: color var(--transition);
}

.bn-item.active { color: var(--ink); }

.bn-item--upload {
  color: var(--ink-2);
}

/* Sidebar toggle: escondido fora do mobile */
.sidebar-toggle { display: none; }

/* --- SCROLLBAR --------------------------------------------- */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--paper-3); border-radius: 3px; }


/* --- ORDER LIST (drag to reorder) -------------------------- */
.order-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: grab;
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}
.order-item:hover { border-color: var(--ink-3); background: var(--paper-2); }
.order-item.dragging { opacity: 0.4; cursor: grabbing; }
.order-item.drag-over { border-color: var(--accent-alt); background: var(--paper-2); }

.drag-handle { font-size: 11px; color: var(--ink-4); cursor: grab; line-height: 1; }
.order-label { font-size: 11px; color: var(--ink-2); }

/* Colapsável de campos */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-bottom: 7px;
}
.collapsible-header:hover .collapse-icon { color: var(--ink-2); }
.collapse-icon { font-size: 11px; color: var(--ink-4); transition: transform var(--transition); }
.collapsible-header.collapsed .collapse-icon { transform: rotate(-90deg); }
.order-list.collapsed { display: none; }

/* Slider de tamanho de fonte */
.font-size-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.font-size-label { font-size: 9px; font-family: var(--font-mono); color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.font-size-row input[type=range] { flex: 1; }
.font-size-val { font-size: 9px; font-family: var(--font-mono); color: var(--ink-3); min-width: 28px; text-align: right; }

#overlaySizeSection.hidden { display: none; }

.sidebar-section .export-btn { margin-top: 8px; }

/* --- ABOUT — Fale conosco ---------------------------------- */
.about-section-title {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.about-contact {
  margin-bottom: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-3);
}
.contact-links { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition);
}
.contact-btn:hover { border-color: var(--accent-alt); color: var(--ink); background: var(--paper); }

/* --- ABOUT — Sugestões ------------------------------------- */
.about-suggest {
  margin-bottom: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-3);
}
.suggest-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.suggest-form { display: flex; flex-direction: column; gap: 10px; }
.suggest-input,
.suggest-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  transition: border-color var(--transition);
  resize: none;
}
.suggest-input:focus,
.suggest-textarea:focus { outline: none; border-color: var(--ink-3); }
.suggest-textarea { min-height: 100px; }
.suggest-btn {
  align-self: flex-start;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition);
}
.suggest-btn:hover { opacity: 0.82; }
