:root {
  --primary: #0056A4;
  --primary-dark: #00305B;
  --primary-soft: #EAF3FB;
  --navy: #00305B;
  --text: #1d2935;
  --muted: #687786;
  --line: #dde5eb;
  --surface: #ffffff;
  --background: #f5f7f9;
  --success: #17745a;
  --success-soft: #e9f6f1;
  --danger: #b34747;
  --danger-soft: #fff1f1;
  --warning: #a15c0a;
  --warning-soft: #fff6e8;
  --shadow: 0 6px 24px rgba(27, 48, 66, 0.07);
  --radius: 14px;
  --sidebar-width: 272px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); }
body { margin: 0; color: var(--text); background: var(--background); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; color: #dce7ef; background: linear-gradient(180deg, #003b70 0%, var(--navy) 100%); transition: transform .2s ease; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand > img { width: 105px; height: 52px; object-fit: contain; object-position: left center; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: #2e688f; border-radius: 12px; }
.brand-mark svg { width: 23px; height: 23px; }
.brand strong, .brand span { display: block; }
.brand strong { color: #fff; font-size: 14px; letter-spacing: -.02em; }
.brand span { margin-top: 1px; color: #94aabb; font-size: 11px; }
.navigation { display: grid; gap: 4px; padding: 17px 13px 24px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 13px; color: #aebfcb; text-align: left; background: transparent; border: 0; border-radius: 9px; transition: .15s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 #71B8F3; }
.nav-link svg { width: 19px; height: 19px; }
.sidebar-footer { margin-top: auto; padding: 20px 22px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer small { display: block; margin-top: 7px; color: #849aa9; font-size: 10px; }
.mode-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; color: #d7e5ee; background: rgba(255,255,255,.08); border-radius: 999px; font-size: 11px; font-weight: 600; }
.mode-dot { width: 7px; height: 7px; background: #84d4b7; border-radius: 50%; }
.mode-badge.firebase .mode-dot { background: #f7bd4a; }
.sidebar-overlay { display: none; }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; min-height: 88px; padding: 16px 34px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar h1 { margin: 0; color: var(--navy); font-size: 22px; line-height: 1.25; letter-spacing: -.03em; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.today { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.menu-toggle { display: none !important; margin-right: 12px; }
.content-area { width: min(1520px, 100%); margin: 0 auto; padding: 28px 34px 48px; }
.page { display: none; animation: page-in .18s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.card { background: var(--surface); border: 1px solid #e6ebef; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 22px; border-bottom: 1px solid #edf0f2; }
.card-header h2, .section-heading h2 { margin: 0; color: var(--navy); font-size: 16px; letter-spacing: -.02em; }
.card-header p, .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { display: flex; align-items: center; gap: 14px; min-height: 110px; padding: 20px; background: #fff; border: 1px solid #e5eaee; border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-icon { display: grid; flex: 0 0 42px; height: 42px; place-items: center; border-radius: 11px; font-size: 19px; font-weight: 700; }
.metric-icon.blue { color: #2e668e; background: #e9f2f8; }
.metric-icon.teal { color: #197669; background: #e8f6f3; }
.metric-icon.violet { color: #645b9d; background: #f0eef9; }
.metric-icon.amber { color: #996523; background: #fbf2e4; }
.metric-icon.red { color: var(--danger); background: var(--danger-soft); }
.metric-card span:not(.metric-icon) { display: block; min-height: 34px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.metric-card strong { display: block; margin-top: 2px; color: var(--navy); font-size: 25px; line-height: 1; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; transition: .15s ease; }
.button svg { width: 17px; height: 17px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .6; transform: none; }
.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 3px 10px rgba(36,79,115,.15); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: var(--primary); background: var(--primary-soft); border-color: #d8e7f1; }
.button-ghost { color: var(--muted); background: #fff; border-color: var(--line); }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: #f2d7d7; }
.button.compact { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.icon-button { display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.icon-button:hover { color: var(--primary); background: var(--primary-soft); }
.action-buttons { display: flex; justify-content: flex-end; gap: 6px; }
.action-button { display: grid; width: 31px; height: 31px; padding: 0; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.action-button:hover { color: var(--primary); background: var(--primary-soft); }
.action-button.danger:hover { color: var(--danger); background: var(--danger-soft); }
.action-button svg { width: 15px; height: 15px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid #edf0f2; }
th { color: #71808d; background: #fafbfc; font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
td { color: #34424e; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdfe; }
.primary-cell { color: var(--navy); font-weight: 600; }
.secondary-line { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 400; }
.empty-state { padding: 36px 20px !important; color: var(--muted); text-align: center; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-pill.success, .status-pill.active { color: var(--success); background: var(--success-soft); }
.status-pill.warning { color: var(--warning); background: var(--warning-soft); }
.status-pill.inactive { color: #77828c; background: #eef1f3; }
.status-pill.danger { color: #a12f2f; background: #fff0f0; }

.form-section { margin-bottom: 20px; padding: 24px; }
.section-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 21px; margin-bottom: 21px; border-bottom: 1px solid #edf0f2; }
.section-heading > span { display: grid; flex: 0 0 32px; height: 32px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; font-size: 12px; font-weight: 700; }
.form-grid { display: grid; gap: 17px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 7px; color: #42515d; font-size: 11px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; color: var(--text); background: #fff; border: 1px solid #cfdae1; border-radius: 9px; outline: none; transition: .15s ease; }
.field input, .field select { height: 42px; padding: 0 11px; }
.field textarea { min-height: 92px; padding: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6e9cb9; box-shadow: 0 0 0 3px rgba(66,124,163,.11); }
.field input::placeholder, .field textarea::placeholder { color: #a1acb4; }
.field select:disabled, .field input:disabled { color: #8b969e; background: #f3f5f6; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.selection-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 16px 0 20px; padding: 14px; background: #f7fafc; border: 1px solid #e3ebf0; border-radius: 11px; }
.summary-item { padding: 3px 7px; border-right: 1px solid var(--line); }
.summary-item:last-child { border-right: 0; }
.summary-item span, .summary-item strong { display: block; }
.summary-item span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.summary-item strong { margin-top: 3px; color: var(--navy); font-size: 12px; }

.checklist { display: grid; gap: 10px; }
.checklist-item { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; background: #fbfcfd; border: 1px solid #e6ecef; border-radius: 10px; transition: .15s ease; }
.checklist-item.non-compliant { background: var(--danger-soft); border-color: #edcaca; }
.checklist-label { color: var(--navy); font-size: 12px; font-weight: 600; }
.check-options { display: flex; gap: 7px; }
.check-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.check-option span { display: inline-flex; min-height: 34px; align-items: center; padding: 7px 11px; color: #66747f; background: #fff; border: 1px solid #d9e1e6; border-radius: 8px; font-size: 10px; font-weight: 700; cursor: pointer; user-select: none; }
.check-option input:focus-visible + span { outline: 2px solid #6e9cb9; outline-offset: 2px; }
.check-option input[value="conforme"]:checked + span { color: var(--success); background: var(--success-soft); border-color: #aad8c8; }
.check-option input[value="nao_conforme"]:checked + span { color: var(--danger); background: #fff; border-color: #d99090; }
.check-option input[value="nao_se_aplica"]:checked + span { color: #55616b; background: #e9edf0; border-color: #cbd3d8; }
.item-observation { grid-column: 1 / -1; }
.item-observation input { width: 100%; height: 38px; padding: 0 11px; color: var(--text); background: #fff; border: 1px solid #e0bcbc; border-radius: 8px; outline: none; }
.item-observation input:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179,71,71,.08); }
.result-banner { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; align-items: center; margin-bottom: 20px; padding: 16px 18px; border: 1px solid; border-radius: 11px; }
.result-banner span { font-size: 11px; font-weight: 600; }
.result-banner strong { grid-row: span 2; font-size: 18px; letter-spacing: .04em; }
.result-banner small { font-size: 10px; }
.result-banner.approved { color: var(--success); background: var(--success-soft); border-color: #cce9de; }
.result-banner.attention { color: var(--warning); background: var(--warning-soft); border-color: #f0d4a9; }

.photo-upload-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.photo-upload-card { min-width: 0; overflow: hidden; background: #fbfcfd; border: 1px solid #e1e8ed; border-radius: 11px; transition: border-color .15s ease, box-shadow .15s ease; }
.photo-upload-card.has-photo { border-color: #b8cfdd; box-shadow: 0 4px 14px rgba(36,79,115,.06); }
.photo-preview { position: relative; display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; background: #f0f4f6; border-bottom: 1px solid #e1e8ed; }
.photo-preview img { width: 100%; height: 100%; object-fit: contain; background: #e8edef; }
.photo-placeholder { display: grid; padding: 16px; place-items: center; color: #83919b; text-align: center; }
.photo-placeholder svg { width: 28px; height: 28px; margin-bottom: 8px; color: #6f8ca0; }
.photo-placeholder span { color: #5d6c77; font-size: 11px; font-weight: 600; }
.photo-placeholder small { margin-top: 3px; font-size: 9px; }
.photo-processing { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(23,43,61,.7); font-size: 11px; font-weight: 700; }
.photo-upload-meta { min-height: 56px; padding: 11px 12px 8px; }
.photo-upload-meta strong, .photo-upload-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-upload-meta strong { color: var(--navy); font-size: 11px; }
.photo-upload-meta span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.photo-upload-actions { display: flex; gap: 7px; padding: 0 12px 12px; }
.photo-select-button { position: relative; flex: 1; overflow: hidden; }
.photo-select-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-remove-button { flex: 0 0 auto; }
.photo-storage-note { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 10px 12px; color: #63747f; background: #f5f8fa; border-radius: 9px; font-size: 10px; }
.photo-storage-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--primary); }

.filter-card { margin-bottom: 20px; }
.filter-card .form-grid { padding: 20px 22px 23px; }
.management-layout { display: grid; grid-template-columns: minmax(310px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-card { padding-bottom: 22px; }
.form-card form { padding: 20px 22px 0; }
.list-card { min-width: 0; }
.search-box { display: flex; align-items: center; gap: 7px; width: min(230px, 100%); height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }
.search-box svg { flex: 0 0 auto; width: 15px; height: 15px; color: #8b97a0; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; font-size: 11px; }
.history-actions { align-items: center; min-width: 132px; }
.history-report-button { min-height: 31px !important; padding: 5px 9px !important; }

.export-layout { display: grid; gap: 20px; }
.export-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 30px; }
.export-icon { display: grid; width: 64px; height: 64px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 17px; }
.export-icon svg { width: 28px; height: 28px; }
.export-hero h2 { margin: 2px 0 8px; color: var(--navy); font-size: 21px; letter-spacing: -.03em; }
.export-hero p:not(.eyebrow) { max-width: 700px; margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--primary); font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.export-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-info { display: flex; align-items: center; gap: 15px; padding: 20px; }
.mini-info > span { display: grid; min-width: 54px; height: 54px; padding: 0 8px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 12px; font-size: 13px; font-weight: 700; }
.mini-info strong { color: var(--navy); font-size: 12px; }
.mini-info p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.column-preview { display: flex; flex-wrap: wrap; gap: 7px; padding: 20px 22px; }
.column-preview code { padding: 5px 8px; color: #53636f; background: #f3f6f8; border: 1px solid #e2e8ec; border-radius: 6px; font-size: 10px; }

.details-dialog { width: min(820px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; color: var(--text); background: #fff; border: 0; border-radius: 16px; box-shadow: 0 24px 80px rgba(15,30,42,.28); }
.details-dialog::backdrop { background: rgba(16,30,42,.55); backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 3px 0 0; color: var(--navy); font-size: 18px; }
#dialog-content { max-height: calc(100vh - 120px); padding: 22px; overflow-y: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-block { padding: 12px; background: #f7f9fa; border-radius: 9px; }
.detail-block span, .detail-block strong { display: block; }
.detail-block span { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.detail-block strong { margin-top: 4px; color: var(--navy); font-size: 12px; }
.detail-section { margin-top: 22px; }
.detail-section h3 { margin: 0 0 10px; color: var(--navy); font-size: 13px; }
.detail-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.detail-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.detail-check.has-issue { background: var(--danger-soft); border-color: #f0cece; }
.detail-check small { display: block; margin-top: 2px; color: var(--danger); }
.general-notes { padding: 12px; color: #44525d; background: #f7f9fa; border-radius: 9px; font-size: 12px; white-space: pre-wrap; }

.report-page { padding-bottom: 30px; }
.report-toolbar { display: flex; justify-content: space-between; gap: 12px; width: min(100%, 980px); margin: 0 auto 18px; }
.inspection-report { width: min(100%, 980px); margin: 0 auto; overflow: hidden; color: #263745; background: #fff; border: 1px solid #dfe6eb; border-radius: 4px; box-shadow: 0 12px 36px rgba(24,44,58,.11); }
.report-main-content, .report-photo-page { padding: 34px 38px 26px; }
.report-header { margin-bottom: 22px; border-bottom: 2px solid var(--navy); }
.report-brand-row, .report-title-row, .report-photo-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.report-brand-row { padding-bottom: 18px; border-bottom: 1px solid #e4e9ed; }
.report-brand-lockup { display: flex; align-items: center; gap: 10px; }
.report-brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--primary); border-radius: 9px; }
.report-brand-mark svg { width: 19px; height: 19px; }
.report-brand-lockup strong, .report-brand-lockup small { display: block; }
.report-brand-lockup strong { color: var(--navy); font-size: 14px; }
.report-brand-lockup small { color: var(--muted); font-size: 8px; }
.report-document-label { color: #75838d; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.report-title-row { padding: 24px 0 20px; }
.report-title-row p, .report-photo-header p { margin: 0 0 5px; color: var(--primary); font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.report-title-row h1 { margin: 0; color: var(--navy); font-size: 22px; letter-spacing: -.03em; }
.report-title-row h1 span { padding: 0 4px; color: #93a0a9; font-weight: 400; }
.report-result { display: inline-flex; max-width: 240px; min-height: 40px; align-items: center; justify-content: center; padding: 9px 13px; border: 1px solid; border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: .035em; text-align: center; }
.report-result.approved { color: var(--success); background: var(--success-soft); border-color: #bbdfd1; }
.report-result.attention { color: #985514; background: var(--warning-soft); border-color: #e8c998; }
.report-metadata { display: grid; grid-template-columns: 2fr .8fr .7fr 1.2fr; gap: 12px; padding: 12px 0 17px; }
.report-info-item { min-width: 0; }
.report-info-item span, .report-info-item strong { display: block; }
.report-info-item span { color: #75838d; font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.report-info-item strong { margin-top: 3px; overflow-wrap: anywhere; color: #263745; font-size: 10px; font-weight: 600; }
.report-entity-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; }
.report-section { margin-top: 13px; padding: 16px 18px; border: 1px solid #dfe6eb; border-radius: 9px; }
.report-entity-grid .report-section { margin-top: 0; }
.report-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid #e8edf0; }
.report-section-title > span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 7px; font-weight: 800; }
.report-section-title h2 { margin: 0; color: var(--navy); font-size: 12px; letter-spacing: -.01em; }
.report-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; }
.report-info-grid.vehicle { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-checklist-table { width: 100%; border-collapse: collapse; }
.report-checklist-table th, .report-checklist-table td { padding: 8px 9px; white-space: normal; border: 1px solid #e1e7eb; }
.report-checklist-table th { color: #65747e; background: #f4f7f8; font-size: 7px; }
.report-checklist-table td { color: #354650; font-size: 9px; }
.report-checklist-table td:first-child { width: 29%; color: var(--navy); font-weight: 600; }
.report-checklist-table td:nth-child(2) { width: 20%; }
.report-status { display: inline-flex; padding: 3px 6px; border-radius: 999px; font-size: 7px; font-weight: 700; }
.report-status.compliant { color: var(--success); background: var(--success-soft); }
.report-status.non-compliant { color: var(--danger); background: var(--danger-soft); }
.report-status.not-applicable { color: #64717a; background: #edf1f3; }
.report-status.neutral { color: #737e86; background: #f2f4f5; }
.report-nonconformities.has-items { border-color: #ead2b4; background: #fffaf3; }
.report-nonconformities.clear { border-color: #d2e6dd; background: #f8fcfa; }
.report-issue-list { display: grid; gap: 7px; }
.report-issue { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 9px 10px; background: rgba(255,255,255,.8); border-radius: 7px; font-size: 9px; }
.report-issue strong { color: #934e17; }
.report-issue span { color: #5b6670; }
.report-clear-message { margin: 0; color: var(--success); font-size: 9px; font-weight: 600; }
.report-general-notes { min-height: 44px; color: #4b5a64; font-size: 9px; line-height: 1.6; white-space: pre-wrap; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 10px; color: #849099; border-top: 1px solid #dfe5e9; font-size: 7px; }
.report-footer span:last-child { max-width: 50%; overflow-wrap: anywhere; text-align: right; }
.report-photo-page { min-height: 700px; background: #fff; border-top: 12px solid var(--background); }
.report-photo-header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--navy); }
.report-photo-header h2 { margin: 0; color: var(--navy); font-size: 19px; letter-spacing: .03em; }
.report-photo-header > span { color: #687782; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.report-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.report-photo-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #dce4e8; border-radius: 8px; }
.report-photo-frame { display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; background: #edf1f3; }
.report-photo-frame img { width: 100%; height: 100%; object-fit: contain; }
.report-photo-card figcaption { padding: 7px 9px; color: var(--navy); background: #f8fafb; border-top: 1px solid #e4eaed; font-size: 8px; font-weight: 700; text-align: center; }
.report-photo-empty { display: grid; min-height: 360px; place-items: center; align-content: center; color: #7a8892; background: #f7f9fa; border: 1px dashed #cdd7dd; border-radius: 10px; text-align: center; }
.report-photo-empty svg { width: 38px; height: 38px; margin-bottom: 10px; color: #7893a5; }
.report-photo-empty strong, .report-photo-empty span { display: block; }
.report-photo-empty strong { color: #53636e; font-size: 12px; }
.report-photo-empty span { margin-top: 4px; font-size: 9px; }

.toast-container { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 9px; width: min(360px, calc(100% - 44px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; color: #fff; background: #263d4d; border-radius: 10px; box-shadow: 0 12px 35px rgba(20,38,51,.25); animation: toast-in .2s ease; }
.toast.success { background: #216d59; }
.toast.error { background: #a54444; }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; margin-top: 2px; color: rgba(255,255,255,.82); font-size: 10px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .management-layout { grid-template-columns: 350px minmax(0, 1fr); }
  .photo-upload-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: 12px 0 40px rgba(10,25,35,.22); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 30; display: block; visibility: hidden; background: rgba(18,33,45,.5); opacity: 0; transition: .2s; }
  .sidebar-overlay.visible { visibility: visible; opacity: 1; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: inline-grid !important; }
  .management-layout { grid-template-columns: 1fr; }
  .form-card .form-grid.cols-2 { grid-template-columns: repeat(3, 1fr); }
  .form-card .span-2 { grid-column: auto; }
  .list-card { order: 2; }
  .photo-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { min-height: 74px; padding: 12px 16px; }
  .topbar-actions .today { display: none; }
  .topbar-actions .button { width: 36px; padding: 0; font-size: 0; }
  .content-area { padding: 18px 14px 38px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { min-height: 95px; padding: 14px; }
  .metric-card.attention { grid-column: span 2; }
  .form-section { padding: 18px 15px; }
  .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4, .form-grid.cols-5, .form-card .form-grid.cols-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .selection-summary { grid-template-columns: 1fr; }
  .summary-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-item:last-child { border-bottom: 0; }
  .checklist-item { grid-template-columns: 1fr; }
  .check-options { display: grid; grid-template-columns: repeat(3, 1fr); }
  .check-option span { justify-content: center; padding: 7px 5px; text-align: center; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; }
  .export-hero { grid-template-columns: auto 1fr; padding: 22px; }
  .export-hero .button { grid-column: 1 / -1; }
  .export-info-grid { grid-template-columns: 1fr; }
  .detail-grid, .detail-checks { grid-template-columns: 1fr; }
  .photo-upload-grid { grid-template-columns: 1fr; }
  .report-main-content, .report-photo-page { padding: 22px 18px; }
  .report-brand-row, .report-title-row, .report-photo-header { align-items: flex-start; }
  .report-title-row { flex-direction: column; }
  .report-metadata, .report-entity-grid, .report-info-grid.vehicle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  .topbar h1 { font-size: 18px; }
  .topbar p { display: none; }
  .metric-card { gap: 10px; }
  .metric-icon { flex-basis: 36px; height: 36px; }
  .check-options { gap: 4px; }
  .check-option span { font-size: 9px; }
}

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

@page { size: A4 portrait; margin: 10mm; }

@media print {
  html, body { min-width: 0; color: #263745; background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .sidebar-overlay, .topbar, .report-toolbar, .toast-container { display: none !important; }
  .main-content { min-height: 0; margin: 0 !important; }
  .content-area { width: auto; margin: 0; padding: 0 !important; }
  .page { display: none !important; animation: none !important; }
  #page-relatorio { display: block !important; padding: 0 !important; }
  .inspection-report { width: auto; margin: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .report-main-content, .report-photo-page { padding: 0; }
  .report-header, .report-section, .report-entity-grid, .report-issue, .report-photo-card, .report-footer { break-inside: avoid; page-break-inside: avoid; }
  .report-checklist-section { break-inside: auto; page-break-inside: auto; }
  .report-checklist-table thead { display: table-header-group; }
  .report-checklist-table tr { break-inside: avoid; page-break-inside: avoid; }
  .report-photo-page { min-height: 0; padding-top: 0; background: #fff; border: 0; break-before: page; page-break-before: always; }
  .report-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
  .report-photo-card { border-radius: 2mm; }
  .report-photo-empty { min-height: 180mm; }
  .button { display: none !important; }
}

/* Versão 2: autenticação, navegação hierárquica e módulos operacionais */
.boot-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--navy); background: #f4f7fa; }
.boot-screen .spinner { width: 34px; height: 34px; margin-bottom: 5px; border: 3px solid #dce8f2; border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; }
.boot-screen strong { font-size: 14px; }
.boot-screen small { color: var(--muted); font-size: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .95fr) minmax(480px, 1.05fr); background: #fff; }
.login-brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: 54px 64px; overflow: hidden; color: #fff; background: linear-gradient(145deg, #00305B 0%, #0056A4 75%, #0870C9 100%); }
.login-brand-panel::after { content: ""; position: absolute; right: -160px; bottom: -220px; width: 520px; height: 520px; border: 80px solid rgba(255,255,255,.055); border-radius: 50%; }
.login-meta-logo { position: relative; z-index: 1; width: 210px; height: 92px; object-fit: contain; object-position: left center; }
.login-copy { position: relative; z-index: 1; max-width: 580px; margin: auto 0; }
.login-copy > span { font-size: 11px; font-weight: 800; letter-spacing: .18em; opacity: .75; }
.login-copy h1 { max-width: 570px; margin: 18px 0 16px; font-size: clamp(34px, 4vw, 58px); line-height: 1.03; letter-spacing: -.05em; }
.login-copy p { max-width: 520px; margin: 0; color: rgba(255,255,255,.78); font-size: 15px; }
.client-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.client-lockup span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.client-lockup img { width: 80px; height: 48px; padding: 5px 8px; object-fit: contain; background: rgba(255,255,255,.95); border-radius: 8px; }
.login-form-panel { display: grid; min-height: 100vh; place-items: center; padding: 40px; background: #f8fafc; }
.login-card { display: grid; gap: 19px; width: min(100%, 430px); padding: 42px; background: #fff; border: 1px solid #e3e9ee; border-radius: 18px; box-shadow: 0 24px 70px rgba(13,48,78,.12); }
.login-meta-logo-blue { width: 150px; height: 68px; object-fit: contain; object-position: left center; }
.login-card h2 { margin: 4px 0 5px; color: var(--navy); font-size: 27px; letter-spacing: -.04em; }
.login-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.button.full { width: 100%; }
.login-help { padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.login-message { padding: 11px 13px; color: #8e431f; background: #fff5eb; border: 1px solid #f0d4bb; border-radius: 9px; font-size: 11px; overflow-wrap: anywhere; }

.nav-group { display: grid; gap: 3px; margin-top: 8px; }
.nav-group > span { padding: 7px 13px 4px; color: #7899b1; font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-link.sub-link { padding-left: 25px; }
.nav-link.sub-link svg { width: 16px; height: 16px; }
.nav-divider { height: 1px; margin: 12px 13px 8px; background: rgba(255,255,255,.1); }
.mode-badge.warning .mode-dot { background: #f1b94c; }
.mode-badge.local .mode-dot { background: #96a6b2; }

.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip > div { min-width: 0; }
.user-chip strong, .user-chip small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { color: var(--navy); font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 9px; }
.user-avatar { display: grid; width: 35px; height: 35px; place-items: center; color: #fff; background: var(--primary); border-radius: 50%; font-size: 12px; font-weight: 800; }

.dashboard-metrics { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.dashboard-grid { display: grid; grid-template-columns: .85fr 1.45fr; gap: 20px; align-items: start; }
.dashboard-grid > *, .batch-grid > * { min-width: 0; }
.alert-list { display: grid; gap: 0; }
.alert-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 18px; color: var(--text); text-align: left; background: #fff; border: 0; border-bottom: 1px solid #edf1f4; }
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: #fafcfd; }
.alert-item > svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--warning); }
.alert-item strong, .alert-item span { display: block; }
.alert-item strong { color: var(--navy); font-size: 11px; }
.alert-item span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.alert-item.expired > svg { color: var(--danger); }
.empty-panel { padding: 30px 20px; color: var(--muted); text-align: center; font-size: 11px; }

.management-layout { grid-template-columns: minmax(440px, 540px) minmax(0, 1fr); }
.form-card { overflow: hidden; }
.embedded-section { margin: 24px 22px 0; padding-top: 22px; border-top: 1px solid #edf0f2; }
.compact-heading { margin-bottom: 15px; padding-bottom: 14px; }
.compact-heading > span svg { width: 16px; height: 16px; }
.choice-field { min-width: 0; margin: 0; padding: 12px; border: 1px solid #cfdae1; border-radius: 9px; }
.choice-field legend { padding: 0 5px; color: #42515d; font-size: 11px; font-weight: 600; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.checkbox-grid .inline-checkbox { min-width: 0; }
.inline-checkbox { display: inline-flex; align-items: center; gap: 8px; color: #44535f; font-size: 10px; font-weight: 600; cursor: pointer; }
.inline-checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.inline-notice { display: flex; gap: 5px; flex-direction: column; margin-bottom: 14px; padding: 11px 13px; border: 1px solid; border-radius: 9px; }
.inline-notice strong { font-size: 10px; }
.inline-notice span { font-size: 9px; }
.inline-notice.warning { color: #7c4e16; background: #fff8ed; border-color: #edd7b6; }
.inline-notice.info { color: #315d7d; background: #eff6fb; border-color: #d2e4f1; }
.document-layout { display: grid; gap: 14px; padding-bottom: 22px; }
.document-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; background: #f8fafb; border: 1px solid #e6ebef; border-radius: 10px; }
.document-form .form-actions { margin-top: 0; }
.document-table { border: 1px solid #e6ebef; border-radius: 10px; }
.expiry-pill { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.expiry-pill.regular { color: var(--success); background: var(--success-soft); }
.expiry-pill.expiring { color: var(--warning); background: var(--warning-soft); }
.expiry-pill.expired, .expiry-pill.irregular { color: var(--danger); background: var(--danger-soft); }
.expiry-pill.no-expiry { color: #62727d; background: #eef2f4; }

.checklist-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; color: var(--muted); font-size: 10px; font-weight: 700; }
.checklist-progress > div { flex: 1; height: 7px; overflow: hidden; background: #e9eef2; border-radius: 999px; }
.checklist-progress i { display: block; width: 0; height: 100%; background: var(--primary); border-radius: inherit; transition: width .2s ease; }
.checklist-category { display: grid; gap: 9px; }
.checklist-category + .checklist-category { margin-top: 17px; }
.checklist-category-header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; color: var(--navy); background: #edf5fb; border-left: 3px solid var(--primary); border-radius: 7px; }
.checklist-category-header strong { font-size: 11px; letter-spacing: .025em; }
.checklist-category-header span { color: var(--muted); font-size: 9px; }
.checklist-item { grid-template-columns: minmax(240px, 1fr) auto; }
.item-observation .observation-hint { display: block; margin-top: 4px; color: var(--danger); font-size: 9px; }
.inspection-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.inspection-summary-grid > div { padding: 13px; background: #f6f9fb; border: 1px solid #e6edf1; border-radius: 9px; }
.inspection-summary-grid span, .inspection-summary-grid strong { display: block; }
.inspection-summary-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.inspection-summary-grid strong { margin-top: 3px; color: var(--navy); font-size: 18px; }
.result-banner.rejected { color: var(--danger); background: var(--danger-soft); border-color: #edcaca; }
.result-banner.pending { color: #64737e; background: #f1f4f6; border-color: #dce3e7; }
.photo-description { padding: 0 12px 12px; }
.photo-description input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.photo-upload-card.disabled { opacity: .7; }
.photo-upload-card.disabled .photo-preview { aspect-ratio: 16 / 9; }

.history-filters { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.compact-metrics { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.ranking-list { display: grid; padding: 8px 0; }
.ranking-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 18px; background: #fff; border: 0; border-bottom: 1px solid #edf0f2; text-align: left; }
.ranking-item:last-child { border-bottom: 0; }
.ranking-item strong { color: var(--navy); font-size: 11px; }
.ranking-item span { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--danger); background: var(--danger-soft); border-radius: 8px; font-size: 10px; font-weight: 800; }

.selection-list { display: grid; padding: 8px 0; }
.selection-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px 18px; border-bottom: 1px solid #edf0f2; }
.selection-row:last-child { border-bottom: 0; }
.selection-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.selection-row strong, .selection-row small { display: block; }
.selection-row strong { color: var(--navy); font-size: 11px; }
.selection-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.batch-print-area { display: none; }
.batch-grid { grid-template-columns: 1fr 1fr; }

.requirements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.requirement-group { padding: 15px; background: #f8fafb; border: 1px solid #e5ebef; border-radius: 10px; }
.requirement-group h3 { margin: 0 0 10px; color: var(--navy); font-size: 12px; }
.requirement-group .inline-checkbox { display: flex; margin-top: 8px; }
.config-builder { display: grid; gap: 14px; }
.action-field { justify-content: flex-end; }
.config-list { display: grid; gap: 8px; }
.config-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 13px; background: #f8fafb; border: 1px solid #e5ebef; border-radius: 9px; }
.config-row strong, .config-row small { display: block; }
.config-row strong { color: var(--navy); font-size: 11px; }
.config-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.color-dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; }
.dimension-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dimension-card { padding: 14px; background: #f8fafb; border: 1px solid #e5ebef; border-radius: 10px; }
.dimension-card > strong { display: block; margin-bottom: 9px; color: var(--navy); font-size: 11px; }
.dimension-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.sheet-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 20px 22px; }
.sheet-card { padding: 13px; background: #f5f9fc; border: 1px solid #dce9f3; border-radius: 9px; }
.sheet-card strong, .sheet-card span { display: block; }
.sheet-card strong { color: var(--navy); font-size: 11px; }
.sheet-card span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.columns-details { border-top: 1px solid #edf0f2; }
.columns-details summary { padding: 14px 22px; color: var(--primary); font-size: 10px; font-weight: 700; cursor: pointer; }

.confirm-dialog { width: min(430px, calc(100% - 30px)); padding: 0; background: #fff; border: 0; border-radius: 14px; box-shadow: 0 20px 65px rgba(10,31,49,.3); }
.confirm-dialog::backdrop { background: rgba(0,32,59,.55); backdrop-filter: blur(2px); }
.confirm-dialog form { padding: 26px; text-align: center; }
.confirm-icon { display: grid; width: 44px; height: 44px; margin: 0 auto 12px; place-items: center; color: var(--warning); background: var(--warning-soft); border-radius: 12px; }
.confirm-dialog h2 { margin: 0; color: var(--navy); font-size: 17px; }
.confirm-dialog p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.confirm-dialog .form-actions { justify-content: center; }

.report-meta-logos { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid #e1e7eb; }
.report-meta-logos img { object-fit: contain; }
.report-meta-logos .meta-report-logo { width: 125px; height: 54px; object-position: left center; }
.report-meta-logos .klabin-report-logo { width: 68px; height: 50px; object-position: right center; }
.report-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.report-metric { padding: 9px; background: #f5f8fa; border-radius: 7px; }
.report-metric span, .report-metric strong { display: block; }
.report-metric span { color: #71808b; font-size: 7px; text-transform: uppercase; }
.report-metric strong { margin-top: 2px; color: var(--navy); font-size: 11px; }
.report-checklist-table td:first-child { width: 19%; }
.report-checklist-table td:nth-child(2) { width: 31%; color: var(--navy); font-weight: 600; }

.credential-stage { display: grid; min-height: 560px; place-items: center; padding: 30px; background: #e9eef2; border-radius: 14px; }
.vehicle-credential { position: relative; display: flex; width: calc(var(--credential-width, 100) * 1mm); height: calc(var(--credential-height, 70) * 1mm); flex-direction: column; overflow: hidden; color: #16324a; background: #fff; border: .35mm solid #cbd8e2; box-shadow: 0 8px 26px rgba(7,38,62,.18); }
.credential-accent { height: 5mm; background: var(--credential-color, #0056A4); }
.credential-body { display: grid; flex: 1; grid-template-rows: auto 1fr auto; gap: 3mm; padding: 4mm 5mm; }
.credential-logos { display: flex; align-items: center; justify-content: space-between; gap: 4mm; }
.credential-logos img:first-child { width: 30%; max-height: 12mm; object-fit: contain; object-position: left; }
.credential-logos img:last-child { width: 18%; max-height: 12mm; object-fit: contain; object-position: right; }
.credential-main { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4mm; align-items: end; }
.credential-plate { display: block; color: var(--navy); font-size: clamp(14px, calc(var(--credential-width) * .18px), 28px); font-weight: 800; letter-spacing: .06em; }
.credential-company { display: block; margin-top: 1mm; font-size: clamp(7px, calc(var(--credential-width) * .075px), 11px); font-weight: 700; }
.credential-info { display: grid; gap: 1.3mm; }
.credential-info span { display: block; color: #6d7c87; font-size: clamp(5px, calc(var(--credential-width) * .05px), 8px); text-transform: uppercase; }
.credential-info strong { display: block; color: #243b4d; font-size: clamp(6px, calc(var(--credential-width) * .06px), 9px); }
.credential-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 3mm; padding-top: 2mm; border-top: .25mm solid #dde5eb; }
.credential-profile { padding: 1.2mm 2mm; color: #fff; background: var(--credential-color, #0056A4); border-radius: 1.5mm; font-size: clamp(6px, calc(var(--credential-width) * .06px), 9px); font-weight: 800; text-transform: uppercase; }
.credential-validity { text-align: right; }
.credential-validity span, .credential-validity strong { display: block; }
.credential-validity span { color: #71808b; font-size: clamp(5px, calc(var(--credential-width) * .05px), 7px); text-transform: uppercase; }
.credential-validity strong { color: var(--navy); font-size: clamp(7px, calc(var(--credential-width) * .07px), 10px); }
.credential-provisional { position: absolute; right: 2mm; top: 7mm; color: #9a5c10; font-size: 5px; font-weight: 800; letter-spacing: .08em; }

@media (max-width: 1260px) {
  .dashboard-metrics { grid-template-columns: repeat(3, 1fr); }
  .management-layout { grid-template-columns: minmax(400px, 470px) minmax(0, 1fr); }
  .sheet-preview { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; }
  .dashboard-grid, .batch-grid { grid-template-columns: minmax(0, 1fr); }
  .requirements-grid { grid-template-columns: 1fr 1fr; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
  .user-chip > div, .today { display: none; }
}

@media (max-width: 720px) {
  .login-form-panel { padding: 18px; }
  .login-card { padding: 28px 22px; }
  .dashboard-metrics, .compact-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-metrics .metric-card:last-child, .compact-metrics .metric-card:last-child { grid-column: span 2; }
  .checkbox-grid, .document-form, .inspection-summary-grid, .requirements-grid, .dimension-grid, .sheet-preview { grid-template-columns: 1fr; }
  .checklist-item { grid-template-columns: 1fr; }
  .history-filters { grid-template-columns: 1fr !important; }
  .topbar-actions { gap: 8px; }
  .user-chip { padding-left: 7px; }
  .vehicle-credential { max-width: 100%; transform: scale(.82); }
  .credential-stage { min-height: 420px; padding: 12px; overflow: auto; }
}

@media print {
  body:not(.printing-report) #page-relatorio { display: none !important; }
  body.printing-report #page-relatorio { display: block !important; }
  body.printing-credential #page-credencial-documento { display: block !important; }
  body.printing-credential .credential-stage { min-height: 0; padding: 0; background: #fff; }
  body.printing-credential .vehicle-credential { margin: 0; border: 0; box-shadow: none; }
  body.printing-batch #page-credenciais-lote { display: block !important; }
  body.printing-batch #page-credenciais-lote > :not(.batch-print-area) { display: none !important; }
  body.printing-batch .batch-print-area { display: block; }
  body.printing-batch .batch-credential-sheet { display: grid; min-height: 277mm; place-items: center; break-after: page; page-break-after: always; }
  body.printing-batch .batch-credential-sheet:last-child { break-after: auto; page-break-after: auto; }
  body.printing-batch .vehicle-credential { box-shadow: none; }
  .report-meta-logos img { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
