/* MotelClean — Claro Operacional Design System
 * Zero external CDNs. Minimum font >= 12px. Inputs >= 16px. Tap targets >= 44x44px.
 */

:root {
  /* Core Surfaces & Neutrals */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-alt: #ECEFF3;
  --border: #D5DDE5;
  --border-strong: #B8C5D1;

  /* Ink */
  --ink: #112630;
  --ink-muted: #4C616D;
  --ink-subtle: #667B87;

  /* White-Label Brand Tokens */
  --primary: #0F3D4C;
  --primary-dark: #0A2B36;
  --primary-soft: #E6F0F3;
  --primary-ink: #FFFFFF;

  --accent: #D97706;
  --accent-soft: #FEF3C7;
  --accent-ink: #7C2D12;

  /* Semantic Status Palette */
  --st-pronta: #15803D;
  --st-pronta-bg: #ECFDF3;
  --st-pronta-bd: #86EFAC;

  --st-suja: #DC2626;
  --st-suja-bg: #FEF2F2;
  --st-suja-bd: #FCA5A5;

  --st-limpando: #D97706;
  --st-limpando-bg: #FFFBEB;
  --st-limpando-bd: #FCD34D;

  --st-vistoria: #2563EB;
  --st-vistoria-bg: #EFF6FF;
  --st-vistoria-bd: #93C5FD;

  --st-manutencao: #7C3AED;
  --st-manutencao-bg: #F5F3FF;
  --st-manutencao-bd: #C4B5FD;

  /* Geometry & Elevation */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(17, 38, 48, 0.06);
  --shadow-sm: 0 2px 6px rgba(17, 38, 48, 0.08);
  --shadow-md: 0 6px 18px rgba(17, 38, 48, 0.12);
  --shadow-lg: 0 16px 40px rgba(17, 38, 48, 0.22);

  /* Layout & Safe Areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --header-h: 64px;
}

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

html,
body {
  overflow-x: clip;
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: var(--safe-bottom);
}

body.mc-modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img,
svg {
  max-width: 100%;
}

.mc-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.5rem;
  font-weight: 750;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary-dark);
}

/* Focus & Accessibility */
:focus-visible {
  outline: 3px solid var(--st-vistoria);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hard Invariants: Inputs >= 16px & Tap Targets >= 44x44px */
input,
select,
textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  min-height: 44px;
  color: var(--ink);
}

button,
a.btn,
.btn,
.tap-target {
  min-height: 44px;
  min-width: 44px;
  font-family: inherit;
  touch-action: manipulation;
}

/* ==========================================================================
   App Header (Sticky Claro Operacional Top Bar)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: calc(8px + var(--safe-top)) calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));
  background: var(--surface);
  border-top: 4px solid var(--primary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-home:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 290px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-pill > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Safe Auto-Update Banner (#app-update)
   ========================================================================== */
.update-banner,
#app-update {
  position: sticky;
  top: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px calc(16px + var(--safe-right)) 10px calc(16px + var(--safe-left));
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-bottom: 2px solid var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.update-banner button,
#app-update button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--primary-dark);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.update-banner button:hover,
#app-update button:hover {
  background: var(--primary-dark);
}

/* ==========================================================================
   Page Containers & Surfaces
   ========================================================================== */
.page-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px calc(16px + var(--safe-right)) calc(32px + var(--safe-bottom)) calc(16px + var(--safe-left));
}

.page-container--narrow {
  max-width: 760px;
}

.page-container--mobile {
  max-width: 560px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.card-body {
  padding: 16px;
}

.surface-muted {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ==========================================================================
   Buttons (All >= 44x44px tap targets)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--ink-subtle);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--primary-ink);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover:not(:disabled) {
  filter: brightness(0.92);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--surface-alt);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: #E1E7EE;
  border-color: var(--ink-subtle);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--border);
}

.btn-danger {
  background: var(--st-suja);
  border-color: var(--st-suja);
  color: #FFFFFF;
}

.btn-danger:hover:not(:disabled) {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
}

.btn-success {
  background: var(--st-pronta);
  border-color: var(--st-pronta);
  color: #FFFFFF;
}

.btn-success:hover:not(:disabled) {
  background: #166534;
  border-color: #166534;
  color: #FFFFFF;
}

.btn-vistoria {
  background: var(--st-vistoria);
  border-color: var(--st-vistoria);
  color: #FFFFFF;
}

.btn-vistoria:hover:not(:disabled) {
  background: #1D4ED8;
  border-color: #1D4ED8;
  color: #FFFFFF;
}

.btn-manutencao {
  background: var(--st-manutencao);
  border-color: var(--st-manutencao);
  color: #FFFFFF;
}

.btn-manutencao:hover:not(:disabled) {
  background: #6D28D9;
  border-color: #6D28D9;
  color: #FFFFFF;
}

.btn-sm {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 52px;
  padding: 13px 20px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
}

/* ==========================================================================
   Badges & Status Pills (Floor >= 12px)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-pronta,
.badge-ok {
  background: var(--st-pronta-bg);
  border-color: var(--st-pronta-bd);
  color: var(--st-pronta);
}

.badge-suja,
.badge-urgente,
.badge-vencida {
  background: var(--st-suja-bg);
  border-color: var(--st-suja-bd);
  color: var(--st-suja);
}

.badge-limpando,
.badge-alta,
.badge-7d {
  background: var(--st-limpando-bg);
  border-color: var(--st-limpando-bd);
  color: #9A3412;
}

.badge-vistoria,
.badge-media {
  background: var(--st-vistoria-bg);
  border-color: var(--st-vistoria-bd);
  color: #1D4ED8;
}

.badge-manutencao {
  background: var(--st-manutencao-bg);
  border-color: var(--st-manutencao-bd);
  color: #6D28D9;
}

.badge-baixa {
  background: var(--surface-alt);
  border-color: var(--border-strong);
  color: var(--ink-muted);
}

.badge-priority {
  background: var(--st-suja);
  border-color: #991B1B;
  color: #FFFFFF;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
  animation: mc-priority-pulse 2s infinite;
}

@keyframes mc-priority-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(220, 38, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

/* ==========================================================================
   KPI Strip
   ========================================================================== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ==========================================================================
   Tabs & Filter Chips
   ========================================================================== */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.tab-btn.is-active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.chip-btn:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.chip-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* ==========================================================================
   Forms & Switches
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

.field-error {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--st-suja);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-subtle);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--st-vistoria);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-alt);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.switch-input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 30px;
  min-height: 30px;
  min-width: 52px;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.switch-input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 160ms ease;
}

.switch-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.switch-input:checked::after {
  transform: translateX(22px);
}

/* ==========================================================================
   Login Shell
   ========================================================================== */
.login-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--st-suja-bd);
  background: var(--st-suja-bg);
  color: #991B1B;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #F9FBFD;
}

/* ==========================================================================
   Empty State & Loading Skeleton
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 36px 20px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink-muted);
}

.skeleton-card {
  min-height: 112px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--surface-alt) 25%, #F8FAFC 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: mc-skeleton 1.4s ease-in-out infinite;
}

@keyframes mc-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: rgba(17, 38, 48, 0.56);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-dialog--wide {
  max-width: 780px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.modal-body {
  padding: 18px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-stack {
  position: fixed;
  right: calc(16px + var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.9375rem;
  font-weight: 600;
}

.toast--success {
  border-left-color: var(--st-pronta);
  background: var(--st-pronta-bg);
  color: #14532D;
}

.toast--warn {
  border-left-color: var(--st-limpando);
  background: var(--st-limpando-bg);
  color: var(--accent-ink);
}

.toast--error {
  border-left-color: var(--st-suja);
  background: var(--st-suja-bg);
  color: #991B1B;
}

.toast--info {
  border-left-color: var(--st-vistoria);
  background: var(--st-vistoria-bg);
  color: #1E3A8A;
}

/* ==========================================================================
   Responsive & Motion / Print Safeguards
   ========================================================================== */
@media (max-width: 640px) {
  .app-header {
    padding-left: calc(12px + var(--safe-left));
    padding-right: calc(12px + var(--safe-right));
  }

  .page-container {
    padding: 12px calc(12px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(12px + var(--safe-left));
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 8px;
  }

  .modal-dialog {
    max-height: 92dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 12px 12px;
  }

  .modal-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-foot .btn {
    width: 100%;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }

  .app-header,
  .update-banner,
  #app-update,
  .toast-stack,
  .modal-backdrop {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border-color: #CBD5E1;
  }
}
