/* Layout: uma coluna, como uma prancheta de visita, com as ações principais ao alcance do polegar.
   No computador, a mesma coluna com uma barra lateral. A cor da marca vem dos ajustes dela. */
:root {
  --bg: #f1f5f4;
  --surface: #ffffff;
  --surface-2: #e6edeb;
  --ink: #15231f;
  --muted: #55645f;
  --line: #d4dedb;
  --warn: #7c5100;
  --warn-bg: #fcefd2;
  --danger: #ad2a1f;
  --danger-bg: #fbe8e5;
  --brand: #0f6b5c;
  --on-brand: #ffffff;
  --brand-text-light: #0f6b5c;
  --brand-text-dark: #5fd0bb;
  --brand-tint-light: #dbeae7;
  --brand-tint-dark: #16322c;
  --brand-text: var(--brand-text-light);
  --brand-tint: var(--brand-tint-light);
  --shadow: 0 1px 2px rgb(21 35 31 / 0.06), 0 8px 24px rgb(21 35 31 / 0.08);
  --font-body: 'Figtree', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --tabs-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1513;
    --surface: #18211e;
    --surface-2: #232e2a;
    --ink: #e8efec;
    --muted: #9fafa9;
    --line: #2c3834;
    --warn: #f2c56b;
    --warn-bg: #33280f;
    --danger: #ff8f83;
    --danger-bg: #3a1a16;
    --brand-text: var(--brand-text-dark);
    --brand-tint: var(--brand-tint-dark);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1513;
  --surface: #18211e;
  --surface-2: #232e2a;
  --ink: #e8efec;
  --muted: #9fafa9;
  --line: #2c3834;
  --warn: #f2c56b;
  --warn-bg: #33280f;
  --danger: #ff8f83;
  --danger-bg: #3a1a16;
  --brand-text: var(--brand-text-dark);
  --brand-tint: var(--brand-tint-dark);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('../fonts/figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('../fonts/figtree-600.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 600; font-display: swap; src: url('../fonts/fraunces-600.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2.5px solid var(--brand-text); outline-offset: 2px; }

.file-input { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -100px; top: 0; }

/* ---------- Estrutura ---------- */

#app { min-height: 100dvh; display: flex; flex-direction: column; min-width: 0; }

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(54px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.bar h1 {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 4px;
}

.bar-action { display: flex; align-items: center; gap: 6px; flex: none; }

/* Telas principais: a barra fica fixa no topo para o conteúdo não passar por baixo do relógio. */
.bar.top { padding-left: max(16px, env(safe-area-inset-left, 0px)); }
.bar.top h1 { padding-left: 0; overflow: visible; font: 600 26px/1.25 var(--font-display); letter-spacing: -0.01em; }

.screen {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-block: 16px 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.top-title {
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  font: 600 30px/1.12 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.dock {
  position: sticky;
  bottom: var(--tabs-h);
  z-index: 15;
  display: flex;
  gap: 8px;
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
body[data-tabs] .dock { padding-bottom: 10px; }
.dock-inner { display: flex; gap: 8px; width: 100%; max-width: 728px; margin-inline: auto; }
.dock-inner > .btn { flex: 1; min-width: 0; }
.dock-inner > .btn.fit { flex: none; }

#side { display: none; }
.brandmark { display: none; }

body[data-tabs] { --tabs-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
body[data-tabs] #app { padding-bottom: var(--tabs-h); }
body[data-tabs] #side {
  display: block;
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#tabs { display: flex; height: 58px; padding-inline: max(0px, env(safe-area-inset-left, 0px)) max(0px, env(safe-area-inset-right, 0px)); }

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.tab[aria-current="page"] { color: var(--brand-text); }
.tab .icon { width: 24px; height: 24px; }

@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
  body[data-tabs] { --tabs-h: 0px; }
  body[data-tabs] #app { padding-bottom: 0; }
  #side, body[data-tabs] #side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 12px;
    background: var(--surface);
    border-top: 0;
    border-right: 1px solid var(--line);
  }
  .brandmark { display: block; padding-inline: 12px; font: 600 23px/1 var(--font-display); color: var(--brand-text); letter-spacing: -0.01em; }
  #tabs { flex-direction: column; gap: 2px; height: auto; padding: 0; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 11px; padding: 10px 12px; border-radius: 9px; font-size: 15px; }
  .tab[aria-current="page"] { background: var(--brand-tint); }
  .top-title { padding-top: 12px; font-size: 34px; }
  .bar { padding-left: 14px; padding-right: 18px; }
  .bar.top { padding-inline: 16px; }
  .bar.top h1 { flex: 0 1 728px; margin-inline: auto; font-size: 30px; }
}

/* ---------- Componentes ---------- */

.icon { width: 22px; height: 22px; flex: none; display: inline-flex; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.small { min-height: 40px; padding: 7px 12px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--danger); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
}
.icon-btn:disabled { opacity: 0.3; cursor: default; background: none; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 2px;
  background: none;
  border: 0;
  color: var(--brand-text);
  font-weight: 600;
  text-align: left;
}
.link.danger { color: var(--danger); }
.link.quiet { color: var(--muted); }

.tag {
  display: inline-block;
  flex: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.caps {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
}
.chip.ok { background: var(--brand-tint); color: var(--brand-text); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip .icon { width: 14px; height: 14px; }

.note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--brand-tint);
}
.note.warn { background: var(--warn-bg); }
.note strong { display: block; font-weight: 600; }
.note p { color: var(--ink); }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}
.search input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: none; outline: none; color: var(--ink); }

/* ---------- Listas ---------- */

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

.list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
}
.row:first-child { border-top: 0; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-text strong { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-thumb { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.row-thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.row > .icon { color: var(--muted); width: 18px; height: 18px; }

.empty-state {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 18px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); font-weight: 600; font-size: 17px; }

/* ---------- Visita ---------- */

.visit-head { display: flex; flex-direction: column; gap: 3px; }
.visit-head h2 { font: 600 25px/1.15 var(--font-display); text-wrap: balance; overflow-wrap: anywhere; }

.items { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.item-main {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 0;
  background: none;
  text-align: left;
}
.item-thumb { width: 88px; height: 88px; flex: none; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
.item-thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.item-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; }
.item-place { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-text); overflow-wrap: anywhere; }
.item-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.item-move { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.item-move .icon-btn { flex: 1; width: 42px; height: auto; border-radius: 0; color: var(--muted); }
.item-move .icon-btn + .icon-btn { border-top: 1px solid var(--line); }

/* Os setores: a nota é sempre um círculo com a cor da tabela de pontuação dela. */
.sector-groups { display: flex; flex-direction: column; gap: 22px; }
.sector-group { display: flex; flex-direction: column; gap: 10px; }
.sector-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.sector-head-text { display: flex; flex-direction: column; min-width: 0; }
.sector-head strong { font: 600 18px/1.2 var(--font-display); overflow-wrap: anywhere; }
.sector-title { font: 600 18px/1.2 var(--font-display); }

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--level);
  color: var(--on-level);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--line);
}
.score-badge.none { background: none; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }

.sector-list { display: flex; flex-direction: column; gap: 12px; }
.sector-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.sector-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.sector-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.sector-name strong { font: 600 18px/1.2 var(--font-display); overflow-wrap: anywhere; }
.sector-name .icon { width: 16px; height: 16px; color: var(--muted); }
.sector-tools { display: flex; flex: none; }
.sector-tools .icon-btn { width: 38px; color: var(--muted); }
.sector-result { min-height: 2.6em; }

.score-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.score-btn {
  min-width: 0;
  min-height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--level);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.score-btn[aria-pressed="true"] { border-color: var(--level); background: var(--level); color: var(--on-level); box-shadow: 0 0 0 2px var(--ink); }

.legend { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding-inline: 12px; }
.legend summary { display: flex; align-items: center; min-height: 46px; color: var(--brand-text); font-weight: 600; cursor: pointer; }
.legend-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
.legend-row { display: flex; gap: 10px; }
.legend-row strong { font-weight: 600; }
.legend-dot { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--level); box-shadow: 0 0 0 1px var(--line); }
.legend-factors { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.add-sector { display: flex; gap: 8px; }
.add-sector .input { flex: 1; min-width: 0; }

.drop-hint { padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); font-size: 14px; }
body.dragging .drop-hint { border-color: var(--brand-text); background: var(--brand-tint); color: var(--brand-text); }
@media (pointer: coarse) { .drop-hint { display: none; } }

.more-actions { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Item ---------- */

.photo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.photo-grid.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.photo {
  position: relative;
  display: flex;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.photo img { max-height: 44dvh; width: auto; object-fit: contain; }
.photo-grid.many .photo img { max-height: 26dvh; }
.photo-tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.photo-tools button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 10px;
  border: 0;
  border-radius: 9px;
  background: rgb(14 21 19 / 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.photo-tools .icon { width: 18px; height: 18px; }

.photo-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}
.photo-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.photo-add { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Formulários ---------- */

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-weight: 600; font-size: 15px; }
.field .optional { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 13.5px; color: var(--muted); }
.field .error { font-size: 14px; color: var(--danger); font-weight: 600; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
input.input::-webkit-date-and-time-value { text-align: left; }
textarea.input { resize: vertical; line-height: 1.4; }
.input:focus { outline: 2px solid var(--brand-text); outline-offset: 0; border-color: transparent; }

.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  min-height: 36px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.pick[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.saved { font-size: 13.5px; color: var(--muted); min-width: 44px; text-align: right; }

/* ---------- Ajustes ---------- */

.section { display: flex; flex-direction: column; gap: 12px; }
.section > h2 { font: 600 20px/1.2 var(--font-display); }

.brand-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--on-brand);
}
.brand-preview-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand-preview-title { font: 600 19px/1.15 var(--font-display); }
.brand-preview-sub { font-size: 13.5px; opacity: 0.9; overflow-wrap: anywhere; }
.logo-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 60px;
  flex: none;
  padding: 7px;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-text-light);
  font: 600 22px/1 var(--font-display);
}
.logo-plate img { max-width: 100%; max-height: 100%; object-fit: contain; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 1px;
  background: var(--swatch);
  padding: 0;
}
.swatch[aria-pressed="true"] { outline-color: var(--ink); }
.swatch-custom { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.swatch-custom input { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; overflow: hidden; cursor: pointer; }

/* ---------- Ajuda ---------- */

.help { display: flex; flex-direction: column; gap: 22px; max-width: 65ch; }
.help section { display: flex; flex-direction: column; gap: 8px; }
.help h2 { font: 600 21px/1.2 var(--font-display); }
.help h3 { font-size: 16px; font-weight: 600; margin-top: 6px; }
.help ol, .help ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.help strong { font-weight: 600; }

/* ---------- Mensagens ---------- */

#busy {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(14 21 19 / 0.45);
  color: #fff;
  font-weight: 600;
  text-align: center;
}
#busy span { padding: 14px 20px; border-radius: 12px; background: rgb(14 21 19 / 0.88); }

#toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--tabs-h) + 84px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

dialog.sheet {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 20px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog.sheet::backdrop { background: rgb(14 21 19 / 0.5); }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-body h2 { font: 600 21px/1.2 var(--font-display); text-wrap: balance; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Resultado do PDF ---------- */

.pdf-result { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--brand-tint); }
.pdf-result-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; }
.pdf-result-title .icon { color: var(--brand-text); }
.pdf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pdf-actions .btn { flex: 1 1 130px; }
.pdf-frame { width: 100%; height: 72dvh; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }

.fatal { display: flex; flex-direction: column; gap: 10px; margin: auto; max-width: 440px; padding: 32px 20px; }
.fatal h1 { font: 600 24px/1.2 var(--font-display); }

/* Só em aparelhos com mouse: no celular, o destaque ficaria preso depois do toque. */
@media (hover: hover) {
  .btn:hover { border-color: var(--muted); }
  .btn.primary:hover { border-color: var(--brand); filter: brightness(1.06); }
  .icon-btn:hover:not(:disabled), .row:hover, .item-main:hover, .tab:hover { background: var(--surface-2); }
  .tab[aria-current="page"]:hover { background: var(--brand-tint); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .row, .item-main, .tab { transition: background-color 0.12s ease, border-color 0.12s ease; }
}
