/* ============================================================
   VISTORIA DE IMÓVEL – Estilos Mobile-First
   ============================================================ */

:root {
  --primary: #0d1b3e;
  --primary-dark: #060e20;
  --primary-light: #e8ecf5;
  --secondary: #6b7280;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --header-height: 56px;
  --footer-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  background: var(--bg);
  animation: slideIn 0.22s ease;
}

.screen.active {
  display: flex;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============ WELCOME ============ */
#screen-welcome {
  background: linear-gradient(170deg, #0d1b3e 0%, #162455 60%, #1a2d6b 100%);
  color: #fff;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#screen-welcome::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

#screen-welcome::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: 60px;
  left: -60px;
  pointer-events: none;
}

.welcome-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2.5rem 1.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.welcome-logo {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  margin-bottom: 0.25rem;
}

.welcome-logo img {
  width: 180px;
  height: auto;
  display: block;
}

.welcome-divider {
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  border-radius: 99px;
  margin: 0.1rem 0;
}

.welcome-wrapper h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.welcome-wrapper > p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: -0.4rem;
}

.welcome-version {
  font-size: 0.72rem !important;
  color: rgba(255,255,255,0.35) !important;
  margin-top: 0.5rem !important;
}

/* ============ HEADER ============ */
.app-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  padding: 0 1rem;
  height: var(--header-height);
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(13,27,62,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header h2 {
  color: #fff !important;
}

.app-header .step-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.app-header .btn-back {
  color: rgba(255,255,255,0.9);
}

.app-header .btn-back:active {
  background: rgba(255,255,255,0.15);
}

.header-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  flex-shrink: 0;
  margin-left: auto;
}

.app-header h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* ============ SCREEN CONTENT ============ */
.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: calc(var(--footer-height) + 1rem);
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
  background: var(--border);
  border-radius: 99px;
  height: 5px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ============ CARDS ============ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tip-card {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  flex-direction: row;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #78350f;
}

.tip-card i {
  color: #f59e0b;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============ FORM ELEMENTS ============ */
label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

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

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.required { color: var(--danger); }
.hint-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

/* ============ RADIO GROUP ============ */
.radio-group { display: flex; flex-direction: column; gap: 0.4rem; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.radio-option input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
.radio-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

/* ============ CHECKLIST ITEMS ============ */
.checklist-items { display: flex; flex-direction: column; gap: 0.5rem; }

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #f9fafb;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.check-item span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 120px;
}

.estado-buttons {
  display: flex;
  gap: 4px;
}

.btn-estado {
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text-secondary);
  transition: all 0.15s;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-estado:active { transform: scale(0.95); }

.btn-estado.ok.active     { background: #d1fae5; border-color: var(--success); color: #065f46; }
.btn-estado.problema.active { background: #fef3c7; border-color: var(--warning); color: #78350f; }
.btn-estado.na.active     { background: #f3f4f6; border-color: #9ca3af; color: #374151; }

.check-item.has-ok     { border-left: 3px solid var(--success); }
.check-item.has-problema { border-left: 3px solid var(--warning); }
.check-item.has-na     { border-left: 3px solid #9ca3af; }

/* ============ TOGGLE SECTION ============ */
.toggle-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.toggle-label input[type="checkbox"] { display: none; }

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: #d1d5db;
  border-radius: 99px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.toggle-label input:checked ~ .toggle-switch { background: var(--primary); }
.toggle-label input:checked ~ .toggle-switch::after { transform: translateX(22px); }

/* ============ MEDIA UPLOAD ============ */
.media-upload-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.media-upload-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #f3f4f6;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb .video-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  color: #fff;
  font-size: 1.6rem;
}

.media-thumb .remove-media {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(220,38,38,0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  touch-action: manipulation;
  border: none;
  text-decoration: none;
  align-self: flex-start;
}

.btn-upload:active { transform: scale(0.97); }
.btn-upload-lg { width: 100%; padding: 0.8rem; font-size: 0.9rem; }

/* ============ BUTTONS ============ */
.btn-primary, .btn-secondary, .btn-ghost, .btn-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  touch-action: manipulation;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #f9fafb; }
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); }

/* Ghost na tela welcome (fundo escuro) */
#screen-welcome .btn-ghost {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
}
#screen-welcome .btn-ghost:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.7);
}

/* Primary na tela welcome */
#screen-welcome .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
#screen-welcome .btn-primary:hover {
  background: #f0f4ff;
}

.btn-report {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(5,150,105,0.35);
  width: 100%;
}
.btn-report:hover { box-shadow: 0 6px 20px rgba(5,150,105,0.45); }

.btn-back {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: -0.5rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-back:active { background: var(--primary-light); }

.btn-lg { padding: 0.9rem 1.5rem; font-size: 1rem; width: 100%; max-width: 320px; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ============ NAV FOOTER ============ */
.nav-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.6rem;
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.nav-footer .btn-primary,
.nav-footer .btn-secondary {
  flex: 1;
}

.nav-footer-center {
  justify-content: center;
  padding: 0.75rem 1rem;
}

/* ============ SIGNATURE CANVAS ============ */
.signature-canvas {
  width: 100%;
  height: 140px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #f9fafb;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

/* ============ CHECKBOX LABEL ============ */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  margin: 0;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.checkbox-label:hover { background: #f9fafb; }

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============ AMBIENTE CARD ============ */
.ambiente-card {
  border-left: 4px solid var(--primary);
}

/* ============ ANOMALIAS ============ */
.anomalia-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.anomalia-num {
  font-weight: 700;
  color: var(--primary);
  padding-top: 0.7rem;
  min-width: 1.5rem;
  font-size: 0.9rem;
}

.anomalia-input { flex: 1; }

/* ============ DECLARATION ============ */
.declaration-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: #f9fafb;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 0.7rem 1.25rem;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.25s;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ MODAL ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 5000;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
}

.modal-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }

.saved-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.saved-item {
  background: #f9fafb;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.15s;
}

.saved-item:hover { background: var(--primary-light); }

.saved-item-info { flex: 1; }
.saved-item-info strong { font-size: 0.9rem; color: var(--text); display: block; }
.saved-item-info span { font-size: 0.78rem; color: var(--text-secondary); }

.saved-item-icon { color: var(--primary); font-size: 1.5rem; }

.empty-saved { text-align: center; color: var(--text-secondary); font-size: 0.9rem; padding: 2rem 1rem; }

/* ============ REPORT ============ */
.report-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.25rem;
}

.report-actions .btn-primary,
.report-actions .btn-secondary,
.report-actions .btn-ghost {
  flex: 1;
  min-width: 100px;
}

.report-paper {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #111;
}

.report-header {
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 10px;
  background: #0d1b3e;
  color: #fff;
}

.report-header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem 0.75rem;
}

.report-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.report-header-info {
  flex: 1;
}

.report-empresa {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.1rem;
}

.report-doc-tipo {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.report-header-bar {
  height: 3px;
  background: linear-gradient(90deg, #4a7fff, #60b0ff, #4a7fff);
  margin: 0 1.25rem;
  border-radius: 99px;
  opacity: 0.6;
}

.report-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem 0.9rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  flex-wrap: wrap;
  gap: 0.25rem;
}

.report-protocolo {
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
  font-size: 0.7rem;
}

.report-section {
  margin-bottom: 1.25rem;
}

.report-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0d1b3e;
  background: #e8ecf5;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border-left: 4px solid #0d1b3e;
  margin-bottom: 0.75rem;
}

.report-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.report-row strong { min-width: 130px; color: #374151; }
.report-row span { color: #111; flex: 1; }

.report-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-ok { background: #d1fae5; color: #065f46; }
.status-problema { background: #fef3c7; color: #78350f; }
.status-na { background: #f3f4f6; color: #6b7280; }
.status-nd { background: #f3f4f6; color: #9ca3af; }

.report-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-photos img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.report-signature-block {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.report-signature {
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.report-signature img {
  max-width: 180px;
  height: 70px;
  object-fit: contain;
  border-bottom: 1px solid #374151;
  display: block;
  margin: 0 auto;
}

.report-signature p { font-size: 0.75rem; color: #6b7280; margin-top: 0.2rem; }

.anomaly-list { list-style: decimal; padding-left: 1.5rem; }
.anomaly-list li { font-size: 0.82rem; padding: 0.2rem 0; }

.report-footer-note {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

/* ============ PRINT ============ */
@media print {
  body { background: #fff; }
  .screen { position: static; height: auto; overflow: visible; display: block !important; }
  #screen-relatorio { display: block !important; }
  .screen:not(#screen-relatorio) { display: none !important; }
  .app-header, .nav-footer, .report-actions, .toast, .modal-overlay { display: none !important; }
  .screen-content { overflow: visible; padding: 0; }
  .report-paper { box-shadow: none; }
}

/* ============ CÔMODOS COUNTER ============ */
.comodo-counter-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
  border: 1.5px solid #c7d7f8;
}

.comodo-counter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.comodo-counter-header i {
  font-size: 1.1rem;
}

.comodo-counter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-counter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
  flex-shrink: 0;
}

.btn-counter:hover:not(:disabled) { background: var(--primary); color: #fff; }
.btn-counter:active:not(:disabled) { transform: scale(0.9); }
.btn-counter:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-secondary);
}

.counter-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  min-width: 2rem;
  text-align: center;
  line-height: 1;
}

.counter-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  width: 100%;
  text-align: center;
}

/* ============ CÔMODOS EXTRAS ============ */
.comodo-tipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.btn-tipo-comodo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  transition: all 0.15s;
  touch-action: manipulation;
  line-height: 1.2;
}

.btn-tipo-comodo i {
  font-size: 1.2rem;
  color: var(--primary);
}

.btn-tipo-comodo:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.btn-tipo-comodo:active { transform: scale(0.95); }

.comodo-custom-wrap {
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.comodo-custom-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.comodo-custom-row input {
  flex: 1;
}

/* Card header com botão remover */
.card-header-with-remove {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  gap: 0.5rem;
}

.card-header-with-remove h3 {
  border: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.btn-remove-comodo {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 6px;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.btn-remove-comodo:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-remove-comodo:active { transform: scale(0.95); }

/* Empty state de cômodos */
.empty-comodos {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  line-height: 1.8;
}

.empty-comodos i {
  font-size: 2.5rem;
  opacity: 0.25;
  display: block;
  margin-bottom: 0.5rem;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
