@charset "UTF-8";
:root {
  --primary: #00172f;
  --primary-container: #002c51;
  --primary-fixed: #d2e4ff;
  --primary-fixed-dim: #a8c9f6;
  --on-primary: #ffffff;
  --on-primary-container: #7494bf;
  --secondary: #914d00;
  --secondary-container: #fc9430;
  --secondary-fixed: #ffdcc3;
  --on-secondary: #ffffff;
  --on-secondary-container: #663500;
  --safety-orange: #F28C28;
  --tertiary-container: #003315;
  --on-tertiary-container: #00a953;
  --success-green: #3BE079;
  --surface: #f9f9f9;
  --surface-white: #ffffff;
  --surface-container: #eeeeee;
  --surface-container-low: #f3f3f3;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #43474e;
  --outline: #73777f;
  --outline-variant: #c3c6cf;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --red: #c0392b;
  --red-dark: #96281b;
  --red-light: #fdecea;
  --green: #00a953;
  --amber: #F28C28;
  --gray: #73777f;
  --bg: #f9f9f9;
  --card: #ffffff;
  --line: #c3c6cf;
  --text: #1a1c1c;
  --muted: #43474e;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-full: 24px;
  --gutter: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface);
  color: var(--on-surface);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: "Hanken Grotesk", inherit;
  font-size: 16px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 12px;
  background: var(--surface-white);
  color: var(--on-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-container);
  box-shadow: 0 0 0 3px rgba(0, 44, 81, 0.12);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--secondary);
  margin: 0 0 6px;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.ms-fill {
  font-variation-settings: "FILL" 1;
}

header {
  background: var(--surface-white);
  color: var(--primary);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--surface-container-high);
  transition: box-shadow 0.2s;
}
header .logo-mark {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 20px;
}
header h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
header .sub {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: 1px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}
header .spacer {
  flex: 1;
}
header .hbtn {
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--primary-fixed);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, transform 0.1s;
}
header .hbtn:active {
  transform: scale(0.97);
}
header .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: transparent;
  transition: background 0.15s;
}
header .icon-btn:hover {
  background: var(--surface-container-low);
}

nav.tabs {
  display: flex;
  background: var(--surface-white);
  border-bottom: 1px solid var(--surface-container-high);
  position: sticky;
  top: 64px;
  z-index: 20;
  overflow-x: auto;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar {
  display: none;
}
nav.tabs button {
  flex: 1;
  min-width: 80px;
  padding: 14px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  color: var(--on-surface-variant);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
nav.tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--secondary-container);
}
nav.tabs button.locked {
  opacity: 0.38;
}
nav.tabs button.locked::after {
  content: " 🔒";
  font-size: 10px;
}

main {
  flex: 1;
  padding: var(--gutter);
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.screen {
  display: none;
}
.screen.active {
  display: block;
}

.card {
  background: var(--surface-white);
  border-radius: var(--radius);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2 {
  font-size: 16px;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
}
.card .desc {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin: 0 0 14px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bento-span2 {
  grid-column: 1/-1;
}

@media (max-width: 440px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-span2 {
    grid-column: 1;
  }
}
.stat-card {
  background: var(--surface-white);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.1s;
}
.stat-card:active {
  transform: scale(0.98);
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  font-family: "JetBrains Mono", monospace;
}
.stat-card .stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.stat-card .stat-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  opacity: 0.12;
  color: var(--primary);
}
.stat-card.orange .stat-value {
  color: var(--secondary-container);
}
.stat-card.orange .stat-icon {
  color: var(--secondary-container);
}
.stat-card.red .stat-value {
  color: var(--error);
}
.stat-card.red .stat-icon {
  color: var(--error);
}

.hero-card {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--on-primary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-fixed-dim);
  margin: 0 0 6px;
}
.hero-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 14px;
  max-width: 200px;
}
.hero-card .hero-icon {
  position: absolute;
  right: -12px;
  bottom: -12px;
  font-size: 100px;
  opacity: 0.08;
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid .full {
  grid-column: 1/-1;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.field {
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
  background: var(--primary);
  color: var(--on-primary);
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.btn:active {
  transform: scale(0.97);
}
.btn.block {
  width: 100%;
}
.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn.ghost:active {
  background: var(--primary-fixed);
}
.btn.orange {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}
.btn.gray {
  background: var(--surface-container);
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
}
.btn.sm {
  padding: 8px 16px;
  font-size: 12px;
}
.btn.danger {
  background: var(--error-container);
  color: var(--on-error-container);
  border: none;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 35;
  font-size: 28px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:active {
  transform: scale(0.93);
  box-shadow: var(--shadow);
}
.fab.hidden {
  display: none;
}

.insp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-white);
  border-radius: var(--radius);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
}
.insp-item:active {
  transform: scale(0.99);
  box-shadow: none;
  border-color: var(--primary-container);
}
.insp-item .ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-fixed);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.insp-item .meta {
  flex: 1;
  min-width: 0;
}
.insp-item .meta .t {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--on-surface);
}
.insp-item .meta .s {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: 2px;
  font-family: "JetBrains Mono", monospace;
}

.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}
.pill.rascunho {
  background: #fef3c7;
  color: #92400e;
}
.pill.concluida {
  background: #dcfce7;
  color: #166534;
}

.count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--surface-container);
  color: var(--on-surface-variant);
  font-family: "JetBrains Mono", monospace;
}
.count-badge.done {
  background: #dcfce7;
  color: #166534;
}

.panel {
  background: var(--surface-white);
  border-radius: var(--radius);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.panel > .head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}
.panel > .head:active {
  background: var(--surface-container-low);
}
.panel > .head .name {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}
.panel > .head .chev {
  transition: 0.2s;
  color: var(--on-surface-variant);
  font-size: 18px;
}
.panel.open > .head .chev {
  transform: rotate(90deg);
}
.panel > .body {
  display: none;
  padding: 0 16px 14px;
}
.panel.open > .body {
  display: block;
}
.panel.floor {
  margin: 8px 0;
  box-shadow: none;
  border: 1px solid var(--surface-container-high);
  border-radius: 12px;
  background: var(--surface-container-low);
}
.panel.floor > .head {
  padding: 11px 12px;
}
.panel.floor > .head .name {
  font-size: 14px;
  color: var(--primary-container);
}
.panel.floor > .body {
  padding: 0 12px 12px;
}

.subsec {
  border-top: 1px solid var(--surface-container-high);
  padding-top: 14px;
  margin-top: 14px;
}
.subsec:first-child {
  border-top: none;
  margin-top: 0;
}
.subsec > .st {
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-container);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", monospace;
}
.subsec > .st .em {
  font-size: 16px;
}

.item {
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--surface-white);
  transition: border-color 0.15s;
}
.item .itemhead {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.item .q {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  color: var(--on-surface);
  line-height: 1.4;
}
.item .itembtn {
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.1s;
}
.item .itembtn:active {
  background: var(--surface-container-high);
}

.status-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.status-row .opt {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--outline-variant);
  background: var(--surface-white);
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.status-row .opt.c.on {
  background: #dcfce7;
  border-color: var(--success-green);
  color: #166534;
}
.status-row .opt.n.on {
  background: var(--error-container);
  border-color: var(--error);
  color: var(--on-error-container);
}
.status-row .opt.na.on {
  background: var(--surface-container-high);
  border-color: var(--outline);
  color: var(--on-surface);
}

.item .extra {
  display: block;
  margin-top: 8px;
}

.item textarea {
  min-height: 48px;
  font-size: 14px;
  margin-bottom: 8px;
}

.item .phlabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.photos .thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--outline-variant);
}
.photos .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photos .thumb .x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.photos .addph {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1.5px dashed var(--outline-variant);
  color: var(--on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--surface-container-low);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.photos .addph:active {
  background: var(--surface-container);
  border-color: var(--primary);
}

.add-line {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.add-line input {
  flex: 1;
}

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--on-surface-variant);
}
.empty .big {
  font-size: 56px;
  margin-bottom: 12px;
}
.empty .empty-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 6px;
}

nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-white);
  border-top: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  max-width: 920px;
  margin: 0 auto;
}
nav.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--on-surface-variant);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.15s;
}
nav.bottom-nav .nav-item .nav-icon-wrap {
  width: 60px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-size: 22px;
}
nav.bottom-nav .nav-item.active .nav-icon-wrap {
  background: var(--primary-fixed);
}
nav.bottom-nav .nav-item.active {
  color: var(--primary);
}
nav.bottom-nav .nav-item span.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  line-height: 1;
}
nav.bottom-nav.hidden {
  display: none;
}

.footbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-white);
  border-top: 1px solid var(--outline-variant);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  z-index: 25;
  max-width: 920px;
  margin: 0 auto;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}
.footbar .grow {
  flex: 1;
}

.save-note {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  opacity: 0;
  transition: 0.3s;
  z-index: 40;
  pointer-events: none;
  white-space: nowrap;
}
.save-note.show {
  opacity: 0.95;
}

#saveStatus {
  position: fixed;
  bottom: 68px;
  left: 0;
  right: 0;
  max-width: 920px;
  margin: 0 auto;
  background: #ecfdf5;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 5px 12px;
  border-top: 1px solid #d1fae5;
  z-index: 24;
  font-family: "JetBrains Mono", monospace;
}
#saveStatus.err {
  background: var(--error-container);
  color: var(--on-error-container);
  border-top-color: var(--error);
}

.banner {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--outline-variant);
}
.banner.resume {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border-color: #fde68a;
}
.banner.resume .ic {
  font-size: 26px;
}
.banner.resume .txt {
  flex: 1;
  min-width: 0;
}
.banner.resume .txt .t {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}
.banner.resume .txt .s {
  font-size: 12px;
  color: var(--secondary);
  font-family: "JetBrains Mono", monospace;
}
.banner.warn {
  background: var(--error-container);
  border-color: var(--error);
  color: var(--on-error-container);
  font-size: 13px;
}

.progress {
  height: 6px;
  background: var(--surface-container-high);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
}
.progress .bar {
  height: 100%;
  background: var(--success-green);
  width: 0%;
  transition: 0.3s;
  border-radius: 6px;
}

.rev-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--outline-variant);
}

#userBar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-bottom: 14px;
  background: var(--surface-white);
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  padding: 10px 14px;
}
#userBar b {
  color: var(--primary);
  font-weight: 700;
}

#loginOverlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-container) 100%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#loginOverlay .login-box {
  background: var(--surface-white);
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}
#loginOverlay .login-logo {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #fff;
  font-size: 28px;
}
#loginOverlay h1 {
  font-size: 22px;
  text-align: center;
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 700;
}
#loginOverlay p {
  text-align: center;
  color: var(--on-surface-variant);
  font-size: 13px;
  margin: 0 0 20px;
}
#loginOverlay input {
  margin-bottom: 10px;
}
#loginOverlay .login-err {
  background: var(--error-container);
  color: var(--on-error-container);
  border: 1px solid var(--error);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 10px;
}

.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  margin-bottom: 10px;
  border: 1.5px dashed var(--outline-variant);
  border-radius: 12px;
  background: var(--surface-container-low);
  padding: 8px;
}
.logo-preview img {
  max-height: 90px;
  max-width: 100%;
  object-fit: contain;
}
.logo-preview .ph {
  color: var(--on-surface-variant);
  font-size: 13px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}
.switch-row input {
  width: auto;
  padding: 0;
  margin: 0;
  transform: scale(1.3);
}

.hidden {
  display: none !important;
}

.row-2 {
  display: flex;
  gap: 10px;
}

.mb0 {
  margin-bottom: 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 10px;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label a {
  color: var(--secondary-container);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface-white);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}
.quick-btn .ms {
  font-size: 26px;
}
.quick-btn:active {
  transform: scale(0.97);
  background: var(--surface-container-low);
}

#report {
  display: none;
}

@media print {
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
  }
  .app, .save-note, #saveStatus, nav.bottom-nav, .fab {
    display: none !important;
  }
  #report {
    display: block !important;
  }
  @page {
    margin: 14mm;
  }
  @page coverpg {
    margin: 0;
  }
}
#report {
  font-size: 12px;
  color: #1a1a1a;
  padding: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
#report .rpt * {
  box-sizing: border-box;
}
#report .cover {
  page: coverpg;
  min-height: 296mm;
  display: flex;
  flex-direction: column;
  page-break-after: always;
  padding: 16mm 0 0;
}
#report .cv-top {
  text-align: center;
  padding: 0 14mm 6mm;
}
#report .cv-logo {
  height: 96px;
  max-width: 70%;
  object-fit: contain;
}
#report .cv-co-big {
  font-size: 26px;
  font-weight: 800;
  color: #111;
}
#report .cv-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 0 14mm;
}
#report .cv-badge {
  align-self: center;
  background: #00172f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 20px;
}
#report .cv-title {
  font-size: 30px;
  font-weight: 800;
  color: #111;
  line-height: 1.15;
  margin: 0 0 8px;
}
#report .cv-sub {
  font-size: 13px;
  color: #00172f;
  font-weight: 700;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#report .cv-client {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}
#report .cv-addr {
  font-size: 13px;
  color: #555;
}
#report .cv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 14mm 34px;
}
#report .cv-meta div {
  padding: 10px 14px;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}
#report .cv-meta div:nth-child(odd) {
  border-right: 1px solid #eee;
  background: #fafafa;
}
#report .cv-meta div:nth-last-child(-n+2) {
  border-bottom: none;
}
#report .cv-meta b {
  color: #888;
  font-weight: 700;
  display: block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
#report .cv-footband {
  margin-top: 0;
}
#report .cv-green {
  height: 5px;
  background: #57d370;
}
#report .cv-blue {
  background: #00172f;
  color: #fff;
  padding: 13px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
#report .cv-blue-name {
  font-weight: 800;
  font-size: 13px;
}
#report .cv-blue-info {
  font-size: 10.5px;
  color: #cbd5e1;
  text-align: right;
  line-height: 1.5;
}
#report .sec {
  margin-bottom: 14px;
}
#report h2 {
  font-size: 14px;
  background: #00172f;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 16px 0 10px;
  font-weight: 700;
  border-left: 5px solid #57d370;
}
#report h3 {
  font-size: 13px;
  color: #00172f;
  font-weight: 700;
  margin: 14px 0 6px;
  padding-bottom: 5px;
  border-bottom: 2px solid #57d370;
}
#report h4 {
  font-size: 11.5px;
  color: #00172f;
  font-weight: 700;
  margin: 10px 0 5px;
}
#report .floor-h {
  font-weight: 800;
  font-size: 12px;
  color: #00172f;
  background: #eef2f7;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 12px 0 4px;
}
#report .matrix {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4px;
}
#report .matrix th {
  background: #00172f;
  color: #fff;
  font-size: 10px;
  padding: 6px;
  text-align: center;
  border: 1px solid #00172f;
}
#report .matrix th:first-child {
  text-align: left;
}
#report .matrix td {
  border: 1px solid #d9d9d9;
  padding: 5px 6px;
  font-size: 10.5px;
}
#report .matrix .mx {
  text-align: center;
  font-weight: 800;
}
#report .matrix .mx-c {
  background: #dcfce7;
  color: #166534;
}
#report .matrix .mx-n {
  background: #fee2e2;
  color: #991b1b;
}
#report .matrix .mx-e {
  background: #fef3c7;
  color: #92400e;
}
#report .matrix .mx-none {
  background: #f8fafc;
  color: #bbb;
}
#report .mx-legend {
  font-size: 10px;
  color: #666;
  margin: 3px 0 12px;
  line-height: 1.5;
}
#report .items-ref {
  font-size: 10.5px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 4px;
}
#report .items-ref b {
  color: #00172f;
}
#report .occ {
  border-left: 3px solid #e5e7eb;
  padding: 3px 0 3px 10px;
  margin-bottom: 7px;
}
#report .occ-floor {
  font-weight: 800;
  font-size: 11px;
  color: #00172f;
  margin-bottom: 2px;
}
#report .occ-line {
  font-size: 10.5px;
  color: #333;
  line-height: 1.55;
  margin-bottom: 2px;
}
#report .occ-line .st {
  margin-right: 4px;
}
#report .occ-ok {
  font-size: 10.5px;
  color: #166534;
  margin: 2px 0 6px;
}
#report table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
}

#report td, #report th {
  border: 1px solid #d9d9d9;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 11px;
}

#report th {
  background: #f3f4f6;
  font-weight: 700;
  color: #333;
}

#report tbody tr:nth-child(odd) td {
  background: #fcfcfc;
}

#report .info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 13px 16px;
}
#report .info .it {
  font-size: 12px;
}
#report .info .it b {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 2px;
  font-weight: 700;
}

#report .cards {
  display: flex;
  gap: 8px;
  margin: 6px 0 10px;
}

#report .card2 {
  flex: 1;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 11px 6px;
  text-align: center;
}
#report .card2 .n {
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}
#report .card2 .l {
  font-size: 9px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
#report .card2.c .n {
  color: #16a34a;
}
#report .card2.n .n {
  color: #b91c1c;
}
#report .card2.na .n {
  color: #666;
}
#report .card2.p .n {
  color: #00172f;
}

#report .cbar {
  height: 9px;
  border-radius: 6px;
  background: #eee;
  overflow: hidden;
  margin: 0 0 12px;
}
#report .cbar > i {
  display: block;
  height: 100%;
  background: #57d370;
}

#report .nc {
  border-left: 4px solid #b91c1c;
  background: #fef2f2;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 11px;
}
#report .nc b {
  color: #7f1d1d;
}

#report .okbox {
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: #166534;
}

#report .st {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
#report .st.c {
  background: #dcfce7;
  color: #166534;
}
#report .st.n {
  background: #fee2e2;
  color: #991b1b;
}
#report .st.na {
  background: #e5e7eb;
  color: #555;
}
#report .st.e {
  background: #f3f4f6;
  color: #9ca3af;
}

/* Inspeção visual — apresentação aprimorada por grupo */
#report .vis-group {
  margin-bottom: 12px;
  page-break-inside: avoid;
}
#report .vis-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eef2f7;
  border: 1px solid #d9e1ea;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 6px 11px;
}
#report .vis-head .gname {
  font-size: 11.5px;
  font-weight: 800;
  color: #00172f;
}
#report .vis-head .sum {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #64748b;
  white-space: nowrap;
}
#report table.vis {
  margin-bottom: 0;
}
#report table.vis td {
  border-color: #e6e9ee;
}
#report table.vis .num {
  width: 26px;
  text-align: center;
  color: #94a3b8;
  font-weight: 700;
  font-size: 10px;
  border-left: 3px solid #cbd5e1;
}
#report table.vis .stc {
  width: 108px;
  text-align: center;
  white-space: nowrap;
}
#report table.vis .item {
  font-weight: 600;
  color: #1f2937;
}
#report table.vis .obs {
  color: #555;
}
#report table.vis tr.s-conforme .num {
  color: #16a34a;
  border-left-color: #22c55e;
}
#report table.vis tr.s-nao_conforme td {
  background: #fff6f6 !important;
}
#report table.vis tr.s-nao_conforme .num {
  color: #dc2626;
  border-left-color: #dc2626;
}
#report table.vis tr.s-nao_conforme .item {
  color: #991b1b;
}
#report table.vis tr.s-na .num {
  border-left-color: #9ca3af;
}

#report .rphotos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}
#report .rphotos img {
  width: 150px;
  height: 112px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#report .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 8px;
}

#report .gphoto {
  width: calc(33.333% - 6px);
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}
#report .gphoto img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  display: block;
}
#report .gphoto .cap {
  font-size: 8.5px;
  padding: 4px 6px;
  color: #333;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
#report .gphoto .cap span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#report .parecer {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 12px;
  line-height: 1.6;
}
#report .parecer .sit {
  display: inline-block;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 11px;
}

#report .sigs {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 48px;
  gap: 24px;
}
#report .sigs .sig {
  border-top: 1px solid #333;
  padding-top: 7px;
  width: 230px;
  font-size: 11px;
  font-weight: 600;
}
#report .sigs .sig .role {
  color: #999;
  font-size: 10px;
  font-weight: 400;
}

#report .page-break {
  page-break-before: always;
}

#report .no-break {
  page-break-inside: avoid;
}
