/* =========================================================
   Victória Vistorias — design tokens
   ========================================================= */
:root {
  --bg: #f3ede0;
  --bg-soft: #ece2d0;
  --paper: #fffdf9;
  --card: #ffffff;
  --ink: #17130f;
  --ink-soft: #3c352d;
  --muted: #756b60;
  --muted-soft: #9a9086;
  --line: #e7dcc8;
  --line-soft: #f1e9da;
  --brand: #c8102e;
  --brand-dark: #970c22;
  --brand-light: #e0455a;
  --brand-tint: #fbe9eb;
  --navy: #14110e;
  --ok: #2d6a4f;
  --ok-tint: #e5f3ea;
  --danger: #a13324;
  --danger-tint: #fbe7e1;
  --warn: #b06a0a;
  --warn-tint: #faf0da;

  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius: 20px;

  --shadow-xs: 0 1px 2px rgba(23, 19, 15, .07);
  --shadow-sm: 0 4px 16px rgba(23, 19, 15, .07);
  --shadow-md: 0 12px 32px rgba(23, 19, 15, .10);
  --shadow-lg: 0 24px 56px rgba(23, 19, 15, .16);
  --shadow-brand: 0 10px 24px rgba(200, 16, 46, .26);
  --focus-ring: 0 0 0 3px rgba(200, 16, 46, .24);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .14s;
  --dur: .2s;
  --dur-slow: .32s;

  --header-h: 56px;
  --bottom-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --page-pad: 16px;
  --max: 1120px;
}

/* =========================================================
   Reset & base
   ========================================================= */
* { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
html, body { margin: 0; padding: 0; max-width: 100%; }
body {
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  background-image: radial-gradient(1100px 480px at 50% -180px, rgba(200, 16, 46, .05), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }
img, video, canvas, svg { max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  text-wrap: balance;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
  letter-spacing: -.01em;
}
a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
button, input, select, textarea {
  font-family: inherit;
}
button, a, input, select, textarea, label { touch-action: manipulation; }
button, a[href], input, select, textarea, [tabindex] {
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
    opacity var(--dur) var(--ease);
}
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}
::selection { background: var(--brand); color: #fff; }

.wrap,
.header-inner,
.foot-inner {
  width: min(var(--max), calc(100% - 24px));
  margin-inline: auto;
}

/* =========================================================
   Header / brand
   ========================================================= */
.site-header {
  background: rgba(255, 253, 249, .88);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(23, 19, 15, .08);
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: var(--safe-top);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-width: 0;
  flex: 0 1 auto;
}
.logo { height: 28px; width: auto; display: block; flex: none; }
.logo-pb { filter: brightness(0) invert(1); height: 28px; }
.brand-meta {
  display: none;
  line-height: 1.15;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.brand-meta small {
  display: block;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  font-family: Manrope, sans-serif;
}
.nav-desktop { display: none; }
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  flex: none;
}
.nav-toggle:hover { background: var(--line-soft); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Drawer
   ========================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, .48);
  backdrop-filter: blur(2px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: var(--paper);
  z-index: 90;
  transform: translateX(110%);
  transition: transform var(--dur-slow) var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(18px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  margin-bottom: 16px;
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--brand-tint), transparent);
  border-radius: var(--radius-sm);
}
.drawer-head strong { display: block; font-size: 16px; }
.drawer-head span { color: var(--muted); font-size: 13px; word-break: break-all; }
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav a, .drawer-nav .drawer-out {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 15.5px;
}
.drawer-nav button.drawer-out,
.drawer-nav a.drawer-out {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--brand);
}
.drawer-nav a.on, .drawer-nav a:hover { background: var(--line-soft); color: var(--brand); }
.drawer-nav a.on { background: var(--brand-tint); }
.nav-ic {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.drawer-nav a.on .nav-ic, .drawer-nav a:hover .nav-ic { color: var(--brand); }
.nav-ic svg { width: 100%; height: 100%; display: block; }

/* =========================================================
   Layout shell
   ========================================================= */
.main {
  width: min(var(--max), calc(100% - 16px));
  margin: 10px auto calc(var(--bottom-h) + var(--safe-bottom) + 28px);
  padding: 18px 15px 28px;
  flex: 1;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(23, 19, 15, .04);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow-x: clip;
}
.site-footer { display: none; background: var(--navy); color: var(--paper); margin-top: auto; }
.site-footer .foot-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 28px 0 8px; }
.site-footer p { margin: 8px 0; padding: 0; font-size: 13px; color: rgba(255, 253, 247, .7); overflow-wrap: anywhere; }
.btn-wa {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff !important; font-weight: 700;
  box-shadow: var(--shadow-brand);
}
.btn-wa:hover { background: var(--brand-dark); }
.wa-fab { display: none; }

/* =========================================================
   Panels & cards
   ========================================================= */
.panel, .auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-width: 0;
}
.auth-card { max-width: 440px; box-shadow: var(--shadow-md); }
h1 { margin: 0 0 8px; font-size: clamp(26px, 7vw, 36px); }
h2 { font-size: clamp(20px, 5vw, 26px); }
.kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: '';
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  display: inline-block;
}
.muted { color: var(--muted); margin: 0 0 16px; overflow-wrap: anywhere; }

/* =========================================================
   Forms
   ========================================================= */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; color: var(--ink-soft); }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  color: var(--ink);
}
input:hover, select:hover, textarea:hover { border-color: var(--muted-soft); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
.password-wrap { display: flex; gap: 8px; min-width: 0; }
.password-wrap input { flex: 1; min-width: 0; }
.toggle-pass {
  border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  padding: 0 12px; cursor: pointer; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  flex: none; min-width: 88px; min-height: 48px;
}
.toggle-pass:hover { border-color: var(--brand); color: var(--brand); }

/* =========================================================
   Buttons
   ========================================================= */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer;
  text-align: center; border: 0;
}
.btn {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn:hover { background: var(--brand-dark); box-shadow: 0 14px 30px rgba(200, 16, 46, .32); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--shadow-xs); }
.btn-ghost {
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.btn-ghost:active { transform: scale(.98); }
.btn-full { width: 100%; }
.btn:disabled, .btn-ghost:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.form-links { margin: 4px 0 0; font-size: 14px; text-align: center; }

/* =========================================================
   Alerts / flash / loading
   ========================================================= */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 14px;
  overflow-wrap: anywhere;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alertIn var(--dur-slow) var(--ease-out) both;
}
.alert.error { background: var(--danger-tint); color: var(--danger); }
.alert.success { background: var(--ok-tint); color: var(--ok); }
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

body.is-loading { cursor: progress; }
body.is-loading::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, transparent, var(--brand) 40%, var(--brand-light) 60%, transparent);
  background-size: 200% 100%;
  animation: loadbar 1s linear infinite;
}
@keyframes loadbar {
  from { background-position: 200% 0; }
  to { background-position: -40% 0; }
}

/* =========================================================
   Toolbar / grids / cards
   ========================================================= */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .btn, .toolbar .btn-ghost { width: 100%; }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card-link, .choice {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; color: inherit; min-width: 0; overflow-wrap: anywhere;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.choice { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.choice.selected, .card-link:hover, .choice:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.choice.selected { background: var(--brand-tint); }
.card-link h2, .choice h2 { margin: 8px 0 6px; font-size: 22px; }
.continue {
  display: block;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 20px;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-brand);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.continue:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.stat {
  text-align: center; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-md);
  padding: 12px 6px; min-width: 0; box-shadow: var(--shadow-xs);
}
.stat strong { display: block; font-family: "Cormorant Garamond", serif; font-size: clamp(22px, 6vw, 30px); color: var(--brand-dark); }
.stat span { font-size: 11px; color: var(--muted); display: block; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

/* =========================================================
   Step progress
   ========================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.steps span, .steps a, .steps button span {
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--line-soft);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.steps .on, .steps a.on, .steps button span.on,
.steps button.on span {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.steps form { margin: 0; min-width: 0; }
.steps button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.btn-row > .btn, .btn-row > .btn-ghost, .btn-row > a { flex: 1 1 140px; }

/* =========================================================
   Tables
   ========================================================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
table.data th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
table.data tbody tr { transition: background var(--dur) var(--ease); }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--line-soft); font-weight: 700; color: var(--ink-soft); letter-spacing: .02em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.warn { background: var(--danger-tint); color: var(--danger); }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 12px; overflow-wrap: anywhere; }
.crumbs a:hover { color: var(--brand-dark); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery img, .photo-preview, .gallery video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--line-soft);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gallery a:hover img, .gallery img:hover { transform: scale(1.015); box-shadow: var(--shadow-sm); }
.gallery-item { position: relative; min-width: 0; }
.midia-del-form { position: absolute; top: 6px; right: 6px; margin: 0; }
.midia-del {
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(23,19,15,.65); color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.midia-del:hover { background: var(--brand); }
.oc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.oc-row form { margin: 0; }
.oc-del {
  flex-shrink: 0; border: 1px solid var(--line); background: var(--paper); color: var(--brand);
  border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.oc-del:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.oc-row-rev { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.oc-row-rev form { margin: 0; }

.ambiente { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin: 0 0 14px; background: var(--card); min-width: 0; box-shadow: var(--shadow-xs); }
.check-list { display: grid; gap: 10px; margin: 10px 0; }
.check-row {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; background: var(--card);
  scroll-margin-top: 80px; min-width: 0; box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.check-row:target, .check-row:focus-within { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.check-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.check-actions form { margin: 0; min-width: 0; }
.check-actions button, .check-actions .sit {
  width: 100%;
  min-height: 44px; border-radius: var(--radius-xs); border: 1.5px solid transparent; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--bg-soft); color: var(--muted);
  padding: 8px 6px; line-height: 1.2;
}
.check-actions .sit:hover:not(.on-ok):not(.on-oc):not(.on-na) { background: var(--line-soft); color: var(--ink); }
.check-actions .sit.on-ok { background: var(--ok); color: #fff; box-shadow: var(--shadow-xs); }
.check-actions .sit.on-oc { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.check-actions .sit.on-na { background: var(--navy); color: #fff; box-shadow: var(--shadow-xs); }

/* =========================================================
   Sheet / modal
   ========================================================= */
.sheet {
  position: fixed; inset: 0; background: rgba(20, 17, 14, .52); z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
  padding: var(--safe-top) 0 0;
  backdrop-filter: blur(2px);
  animation: sheetBg var(--dur-slow) var(--ease-out) both;
}
@keyframes sheetBg { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  background: var(--bg);
  width: min(560px, 100%);
  max-height: 92dvh;
  overflow: auto;
  border-radius: 28px 28px 0 0;
  padding: 22px 18px calc(20px + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
  animation: sheetUp var(--dur-slow) var(--ease-out) both;
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.tipo-btn {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: var(--radius-md); padding: 12px 14px; margin: 0 0 8px; cursor: pointer; font: inherit;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tipo-btn:hover { border-color: var(--brand-light); }
.tipo-btn.on { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--shadow-xs); }

/* =========================================================
   Bottom nav
   ========================================================= */
.nav-bottom {
  position: fixed;
  inset: auto 0 0 0;
  background: rgba(255, 253, 249, .96);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  z-index: 40;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -8px 24px rgba(23, 19, 15, .05);
}
.nav-bottom.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nav-bottom a, .nav-bottom button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px 10px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: 0;
  min-height: 56px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.nav-bottom a .nav-ic, .nav-bottom button .nav-ic { color: inherit; width: 22px; height: 22px; }
.nav-bottom a.on, .nav-bottom button.on { color: var(--brand); }
.nav-bottom a.on::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--brand);
  transform: translateX(-50%);
}
.login-grid { display: grid; gap: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.capture-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cap {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 52px; padding: 10px 8px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--paper); font-weight: 700; font-size: 13px; cursor: pointer;
  flex: 1 1 130px; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.cap .nav-ic { width: 20px; height: 20px; }
.cap:active { transform: scale(.98); }
.cap-cam { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-brand); }
.cap-cam:hover { background: var(--brand-dark); }
.cap-gal { color: var(--ink); }
.cap-gal:hover { border-color: var(--brand); color: var(--brand); }
.manual h2 { font-size: clamp(22px, 5vw, 26px); margin: 28px 0 8px; }
.manual ol { padding-left: 20px; }
.manual li { margin: 0 0 8px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.amb-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.amb-nav a { font-weight: 700; white-space: nowrap; }
label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  grid-template-columns: none;
}
label:has(> input[type="checkbox"]) input {
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  flex: none;
  margin-top: 2px;
  accent-color: var(--brand);
}

/* =========================================================
   Toasts (JS-driven feedback)
   ========================================================= */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-h) + var(--safe-bottom) + 14px);
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 24px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--dur-slow) var(--ease-out) both;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.is-out { animation: toastOut var(--dur) var(--ease) both; }
.toast.ok { background: var(--ok); }
.toast.error { background: var(--brand-dark); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(6px) scale(.97); } }

/* =========================================================
   Lightbox (ampliar foto/vídeo do laudo em tela cheia)
   ========================================================= */
.lightbox-trigger { cursor: zoom-in; display: block; }
body.lightbox-open { overflow: hidden; }
.lightbox-modal {
  position: fixed; inset: 0; z-index: 300; background: rgba(12, 9, 6, .92);
  display: flex; align-items: center; justify-content: center; padding: 48px 20px 20px;
  animation: lightboxIn var(--dur) var(--ease) both;
}
.lightbox-modal[hidden] { display: none; }
@keyframes lightboxIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close {
  position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.28); }
.lightbox-body { max-width: 100%; max-height: 100%; }
.lightbox-body img, .lightbox-body video {
  max-width: 100%; max-height: calc(100vh - 90px); border-radius: var(--radius-sm);
  display: block; margin: 0 auto; box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

@media (min-width: 900px) {
  .toast-stack { bottom: 20px; }
}

/* =========================================================
   Login
   ========================================================= */
.page-login .site-header,
.page-login .site-footer,
.page-login .nav-bottom,
.page-login .wa-fab,
.page-login .nav-toggle,
.page-login .drawer,
.page-login .drawer-backdrop { display: none !important; }
.page-login,
.page-login .main {
  background: #12151c;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  border: 0;
}
.page-login { min-height: 100dvh; }
.page-login .main { margin: 0; min-height: 100dvh; overflow: visible; }
.login-stage {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.login-visual { position: absolute; inset: 0; overflow: hidden; }
.login-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% center;
  animation: heroZoom 18s var(--ease-out) both;
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
.login-veil {
  position: relative;
  z-index: 1;
  padding: 24px 16px calc(24px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(10, 8, 7, .55) 22%, rgba(10, 8, 7, .96) 100%);
}
.login-veil .auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255, 253, 249, .98);
  animation: riseIn .55s var(--ease-out) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 176px;
  margin: 0 0 18px;
  color: #fffcf7;
  background: linear-gradient(160deg, #3a3028 0%, #17130f 100%);
  box-shadow: var(--shadow-md);
}
.dash-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 20s var(--ease-out) both;
}
.dash-hero-txt {
  position: relative;
  z-index: 1;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(10, 8, 7, .68));
}
.dash-hero h1, .dash-hero p, .dash-hero .kicker { color: #fffcf7; margin: 0; }
.dash-hero .kicker::before { background: #fffcf7; }

/* Tables become stacked cards on narrow screens */
@media (max-width: 759px) {
  .table-wrap { overflow: visible; }
  table.data thead { position: absolute; left: -9999px; height: 0; overflow: hidden; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin: 0 0 10px;
    box-shadow: var(--shadow-xs);
  }
  table.data td {
    border: 0;
    padding: 5px 0;
    display: grid;
    grid-template-columns: minmax(88px, 34%) 1fr;
    gap: 8px;
    align-items: start;
  }
  table.data td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  table.data td:last-child {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  table.data td:last-child::before { display: none; }
}

@media (min-width: 400px) {
  .check-actions { grid-template-columns: 1fr 1fr 1fr; }
  .check-actions .sit { font-size: 11px; }
}

@media (min-width: 560px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .btn, .toolbar .btn-ghost { width: auto; }
  .panel, .auth-card { padding: 24px; }
  .main { padding: 24px 24px 32px; width: min(var(--max), calc(100% - 24px)); }
  .brand-meta { display: block; }
  .logo { height: 30px; }
}

@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { gap: 12px; }
  .dash-hero, .dash-hero-txt { min-height: 230px; }
  .table-wrap:not(.panel) {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow-xs);
  }
  .table-wrap:not(.panel) table.data { padding: 4px; }
  table.data thead th { background: var(--bg-soft); }
  table.data tbody tr:hover { background: var(--line-soft); }
}

/* Split login + hide mobile chrome */
@media (min-width: 900px) {
  .login-stage {
    display: grid;
    grid-template-columns: 1.15fr minmax(380px, 1fr);
    justify-content: stretch;
    align-items: stretch;
  }
  .login-visual { position: relative; min-height: 100dvh; }
  .login-photo { object-position: center; }
  .login-veil {
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 8%;
  }
  .login-veil .auth-card {
    margin: 0;
    background: var(--paper);
    border: 0;
    padding: 0;
    max-width: 420px;
    width: 100%;
  }
  .sheet { align-items: center; }
  .sheet-card { border-radius: 28px; padding: 26px; }
  .site-footer { display: block; }
  .site-footer .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 36px 0; }
  .nav-bottom { display: none !important; }
  .main { margin-bottom: 40px; }
  .wa-fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 50;
    min-width: 56px;
    min-height: 56px;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  }
  .wa-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 28px rgba(0, 0, 0, .32); }
}

@media (min-width: 1100px) {
  .nav-toggle, .drawer, .drawer-backdrop { display: none !important; }
  .nav-desktop {
    display: flex;
    gap: 6px 16px;
    align-items: center;
    font-size: 13.5px;
    font-weight: 600;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
  }
  .nav-desktop a { color: var(--ink); padding: 8px 3px; position: relative; }
  .nav-desktop a::after {
    content: '';
    position: absolute;
    left: 3px; right: 3px; bottom: 2px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }
  .nav-desktop a:hover, .nav-desktop a.active { color: var(--brand); }
  .nav-desktop a:hover::after, .nav-desktop a.active::after { transform: scaleX(1); }
  .nav-user { color: var(--muted); font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 40px 44px 52px; margin: 28px auto 40px; }
  .grid-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .header-inner { min-height: 66px; }
  .logo { height: 32px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .login-stage { display: block; min-height: auto; }
  .login-visual { position: relative; height: 140px; }
  .login-photo { object-position: center 40%; }
  .login-veil { background: var(--paper); padding: 16px; }
  .login-veil .auth-card { background: var(--paper); }
}

.page-laudo .nav-bottom { display: none; }
.laudo img, .laudo video { max-width: 100%; height: auto; }
.laudo figure { margin: 0; }
.laudo figcaption { font-size: 12px; color: var(--muted); }
.laudo-amb { margin: 14px 0 10px; }
.laudo-amb h2 { margin: 12px 0 6px; font-size: 22px; }
.laudo-item { margin: 0 0 18px; }
.laudo-item h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-sit { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; }
.tag-sit.tag-ok { background: var(--ok-tint); color: var(--ok); }
.tag-sit.tag-na { background: var(--line-soft); color: var(--muted); }
.tag-sit.tag-ocorrencia, .tag-sit.tag-avaria, .tag-sit.tag-faltante { background: var(--brand-tint); color: var(--brand); }
.tag-sit.tag-pendente { background: var(--warn-tint); color: var(--warn); }
.laudo-oc { margin: 0 0 14px; padding: 2px 0 0 14px; border-left: 2px solid var(--line); }
.laudo-oc:last-child { margin-bottom: 0; }
.laudo-oc-desc { margin: 0 0 8px; }
.gallery-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery-sm img, .gallery-sm video { height: 100px; }

@media print {
  .site-header, .site-footer, .nav-bottom, .btn, .btn-ghost, form, .no-print,
  .wa-fab, .nav-toggle, .drawer, .drawer-backdrop { display: none !important; }
  html, body { background: #fff !important; }
  body, .page-laudo .main {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .panel, .laudo { border: 0; padding: 0; border-radius: 0; }
  .laudo-amb {
    break-inside: auto;
    page-break-inside: auto;
    page-break-before: auto;
    page-break-after: auto;
    margin: 8px 0 6px;
  }
  .laudo h1 { font-size: 22px; margin: 0 0 8px; }
  .laudo h2 { font-size: 16px; margin: 10px 0 4px; page-break-after: avoid; }
  .laudo h3 { font-size: 13px; margin: 8px 0 4px; page-break-after: avoid; }
  .laudo p { font-size: 12px; line-height: 1.35; }
  .laudo-oc { break-inside: avoid; page-break-inside: avoid; }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
  .gallery-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery img, .laudo img {
    height: auto;
    max-height: 140px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .lightbox-modal, .lightbox-close { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
