:root {
  --ink: #f1f4f0;
  --muted: #aab3ac;
  --paper: #050605;
  --surface: #0d100e;
  --surface-soft: #141814;
  --surface-raised: #1a201b;
  --line: #354037;
  --green-deep: #102408;
  --green: #419a19;
  --green-bright: #63c52b;
  --green-pale: #183817;
  --yellow: #d6e83f;
  --red: #b44945;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 7px 22px rgba(0, 0, 0, 0.2);
}

.applicator-body { min-height: 100vh; background: #07100a; }
.applicator-header { min-height: 64px; padding: 0 max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #263529; background: #0a0d0b; }
.applicator-brand { display: inline-flex; align-items: center; gap: .65rem; color: white; font: 600 1.05rem 'Space Grotesk', sans-serif; }
.applicator-brand img { display: block; width: 5.2rem; height: 1.7rem; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.applicator-brand span { display: grid; line-height: 1.05; }
.applicator-brand strong { color: var(--green-bright); }
.applicator-brand small { margin-top: .2rem; color: #a7c89b; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.applicator-exit { min-height: 44px; padding: 8px 12px; color: #c7cec8; background: transparent; border: 1px solid #36443a; border-radius: 8px; cursor: pointer; }
.applicator-shell { width: min(100% - 32px, 620px); margin: 0 auto; padding: 32px 0 max(48px, env(safe-area-inset-bottom)); }
.applicator-card { padding: clamp(24px, 6vw, 40px); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.applicator-card--center { text-align: center; }
.applicator-card h1 { margin-bottom: 14px; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.05; }
.applicator-card > p:not(.eyebrow):not(.applicator-school) { color: var(--muted); line-height: 1.55; }
.applicator-school { margin: 22px 0; padding: 16px; display: grid; gap: 4px; background: var(--green-pale); border: 1px solid #365732; border-radius: 12px; }
.applicator-school span { color: var(--muted); font-size: .84rem; }
.applicator-install, .applicator-open { width: 100%; margin-top: 12px; box-sizing: border-box; }
.applicator-open[aria-disabled='true'] { opacity: .45; cursor: wait; pointer-events: none; }
.offline-preparation { margin: 24px 0 8px; padding: 0; display: grid; gap: 8px; list-style: none; text-align: left; }
.offline-preparation li { padding: 11px 12px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); background: #121613; border: 1px solid var(--line); border-radius: 9px; }
.offline-preparation strong { color: #dce8d9; font-size: .82rem; }
.offline-preparation [data-state='running'] { border-color: #8c6920; }
.offline-preparation [data-state='running'] strong { color: #ffe3a1; }
.offline-preparation [data-state='complete'] { border-color: #365732; }
.offline-preparation [data-state='complete'] strong { color: var(--green-bright); }
.offline-preparation [data-state='error'] { border-color: #7d4038; }
.offline-preparation [data-state='error'] strong { color: #ffaaa4; }
.applicator-ios, .applicator-help { margin-top: 20px; font-size: .82rem; }
.applicator-placeholder { margin-top: 28px; padding: 34px 20px; text-align: center; background: #0c130e; border: 1px dashed #456d36; border-radius: 14px; }
.applicator-placeholder strong { color: var(--green-bright); font: 700 1.2rem 'Space Grotesk', sans-serif; }
.applicator-placeholder p { margin: 8px 0 0; color: var(--muted); }
.applicator-search { margin-top: 28px; }
.applicator-search label, .applicator-absence label { margin-bottom: 7px; display: block; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.applicator-search__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.applicator-search input, .applicator-absence select { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #080b09; border: 1px solid var(--line); border-radius: 9px; }
.applicator-proof { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.applicator-proof h2 { margin-bottom: 8px; font-size: 1.65rem; }
.applicator-proof > p { color: var(--muted); line-height: 1.55; }
.applicator-actions { margin: 20px 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.applicator-actions .button, .applicator-absence .button { width: 100%; }
.applicator-absence { padding: 14px; background: #121613; border: 1px solid var(--line); border-radius: 10px; }
.applicator-absence .button { margin-top: 10px; }
.applicator-history { margin-top: 20px; }
.applicator-history ul { margin: 10px 0 0; padding: 0; list-style: none; }
.applicator-history li { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.applicator-history time { color: var(--muted); }
.applicator-card .message--error { margin-top: 16px; color: #ffaaa4; }
.applicator-card button:disabled, .applicator-card select:disabled { opacity: .45; cursor: not-allowed; }
.applicator-sync { margin-top: 18px; padding: 10px 12px; color: #dce8d9; background: #17221a; border: 1px solid #365732; border-radius: 9px; font-size: .85rem; }
.applicator-sync--pending { color: #ffe3a1; border-color: #8c6920; }
.applicator-sync--offline { color: #ffcbc5; border-color: #7d4038; }
.sync-indicator { width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; fill: #8d9790; }
.applicator-sync--online .sync-indicator { fill: #62c54d; }
.applicator-sync--working .sync-indicator { fill: #62c54d; animation: sync-pulse 1s ease-in-out infinite; }
.applicator-sync--error .sync-indicator { fill: #e06b62; }
@keyframes sync-pulse { 50% { opacity: .35; } }
.applicator-toolbar { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.applicator-steps { margin: -10px 0 24px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.applicator-steps span { padding: 6px 9px; flex: 0 0 auto; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; font-size: .68rem; }
.applicator-steps .is-active { color: #07100a; background: var(--green-bright); border-color: var(--green-bright); }
.applicator-dialog { width: min(92vw, 560px); padding: 24px; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; }
.applicator-dialog::backdrop, .capture-dialog::backdrop { background: rgba(0,0,0,.82); }
.applicator-dialog label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; }
.applicator-dialog input, .applicator-dialog select { min-height: 46px; padding: 9px 11px; color: var(--ink); background: #080b09; border: 1px solid var(--line); border-radius: 8px; }
.applicator-dialog menu { padding: 0; display: flex; justify-content: flex-end; gap: 9px; }
.sync-problems { margin-top: 10px; padding: 12px; color: #ffe3a1; border: 1px solid #8c6920; border-radius: 9px; }
.capture-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; background: #000; border: 0; }
.capture-stage, .capture-stage video { width: 100%; height: 100%; }
.capture-stage { position: relative; overflow: hidden; }
.capture-stage video { position: absolute; inset: 0; z-index: 0; object-fit: cover; pointer-events: none; }
.capture-stage::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(0,0,0,.28),rgba(0,0,0,.28)) top/100% 7% no-repeat, linear-gradient(rgba(0,0,0,.28),rgba(0,0,0,.28)) bottom/100% 13% no-repeat, linear-gradient(rgba(0,0,0,.28),rgba(0,0,0,.28)) left 7%/6% 80% no-repeat, linear-gradient(rgba(0,0,0,.28),rgba(0,0,0,.28)) right 7%/6% 80% no-repeat; pointer-events: none; }
.sheet-guide { position: absolute; inset: 7% 6% 13%; z-index: 2; border: 3px solid rgba(220,226,221,.76); border-radius: 12px; pointer-events: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
.sheet-guide.is-searching { border-color: #e4c84b; box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }
.sheet-guide.is-ready { border-color: var(--green-bright); box-shadow: 0 0 0 2px rgba(99,197,43,.22); }
.capture-quality { position: absolute; top: max(10px,env(safe-area-inset-top)); left: 50%; z-index: 3; width: min(calc(100% - 28px),480px); margin: 0; padding: 8px 12px; color: white; text-align: center; background: rgba(0,0,0,.74); border-radius: 99px; pointer-events: none; transform: translateX(-50%); font-size: .82rem; line-height: 1.25; }
.capture-actions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; min-height: 64px; padding: 8px 10px max(8px,env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.25fr .8fr; align-items: center; gap: 7px; background: rgba(0,0,0,.86); pointer-events: auto; touch-action: manipulation; }
.capture-actions .button { min-height: 44px; padding: 7px 9px; position: relative; z-index: 1; font-size: .78rem; line-height: 1.1; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.capture-actions [data-retry]:not([hidden]) { grid-column: 2 / -1; }
@media (orientation: landscape) {
  .capture-actions { left: auto; width: min(42vw,360px); padding-left: 10px; }
  .sheet-guide { right: min(42vw,360px); }
  .capture-quality { left: calc((100% - min(42vw,360px))/2); }
}
.photo-capture-stage { width: 100%; height: 100%; position: relative; overflow: hidden; background: #000; }
.photo-capture-stage video, .photo-capture-stage > canvas { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; background: #000; }
.photo-capture-stage video { object-fit: cover; }
.capture-back { width: 48px; height: 48px; padding: 0; position: absolute; top: max(10px,env(safe-area-inset-top)); left: max(10px,env(safe-area-inset-left)); z-index: 5; color: white; background: transparent; border: 0; border-radius: 50%; font: 400 2rem/1 sans-serif; text-shadow: 0 2px 7px #000; cursor: pointer; touch-action: manipulation; }
.capture-shutter { width: 70px; height: 70px; padding: 5px; position: absolute; left: 50%; bottom: max(22px,calc(env(safe-area-inset-bottom) + 12px)); z-index: 5; background: rgba(0,0,0,.25); border: 3px solid white; border-radius: 50%; transform: translateX(-50%); cursor: pointer; touch-action: manipulation; }
.capture-shutter span { width: 100%; height: 100%; display: block; background: white; border-radius: 50%; }
.capture-shutter:disabled { opacity: .4; }
.capture-processing, .capture-orientation { position: absolute; left: 50%; top: 50%; z-index: 6; width: min(86vw,420px); padding: 14px 18px; color: white; text-align: center; background: rgba(0,0,0,.78); border-radius: 12px; transform: translate(-50%,-50%); }
.capture-failure { position: absolute; left: 12px; right: 12px; bottom: max(16px,env(safe-area-inset-bottom)); z-index: 6; padding: 16px; color: white; background: rgba(8,11,9,.93); border: 1px solid var(--line); border-radius: 14px; }
.capture-failure strong { display: block; font-size: 1rem; }
.capture-failure p { margin: 6px 0 12px; color: #d8ded9; font-size: .84rem; }
.capture-failure > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-capture-dialog.is-landscape-device .capture-shutter { display: none; }
.photo-capture-dialog.is-landscape-device video { filter: brightness(.38); }
.answer-list { max-height: 55vh; display: grid; gap: 8px; overflow-y: auto; }
.answer-row { min-width: 0; margin: 0; padding: 10px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.answer-row legend { display: contents; }
.answer-number { font-weight: 800; font-variant-numeric: tabular-nums; }
.answer-options { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.answer-bubble { position: relative; width: 42px; height: 42px; padding: 0 !important; display: inline-grid !important; grid-template-columns: 1fr !important; place-items: center; border: 0 !important; border-radius: 50% !important; cursor: pointer; }
.answer-bubble input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.answer-bubble span { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--muted); border-radius: 50%; color: var(--ink); background: var(--surface); font-weight: 800; }
.answer-bubble input:checked + span { color: white; background: var(--green); border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(65,154,25,.22); }
.answer-bubble.is-correct-answer span { color: #baf49a; background: #10240f; border-color: #6fdb3a; box-shadow: 0 0 0 3px rgba(99,197,43,.18); }
.answer-bubble.is-correct-answer::after { content: '✓'; position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; display: grid; place-items: center; color: #071006; background: #7de34b; border: 2px solid #0b0f0c; border-radius: 50%; font-size: .7rem; font-weight: 900; }
.answer-bubble.is-correct-selection input:checked + span { color: white; background: #419a19; border-color: #8bed59; box-shadow: 0 0 0 3px rgba(99,197,43,.28); }
.answer-bubble.is-incorrect-selection input:checked + span { color: white; background: #a82d27; border-color: #ff746c; box-shadow: 0 0 0 3px rgba(224,74,65,.27); }
.answer-bubble.is-empty-selection input:checked + span { color: #f0f3f0; background: #3d4740; border-color: #89958c; box-shadow: 0 0 0 3px rgba(137,149,140,.18); }
.answer-bubble input:focus-visible + span { outline: 3px solid #ffd35a; outline-offset: 2px; }
.answer-bubble.answer-empty span { font-size: 1.25rem; font-weight: 500; }
.answer-row > small { grid-column: 2; color: inherit; }
.answer-comparison { grid-column: 2; color: #dce5de; font-size: .76rem; font-weight: 700; }
.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; }
.answer-warning { color: #ffe3a1 !important; background: #292315; border-color: #8c6920 !important; }
.review-summary { margin-bottom: 12px; padding: 12px; color: var(--green-bright); background: var(--green-pale); border-radius: 8px; font-weight: 700; }
.replacement-warning { padding: 10px; color: #ffe3a1; border-left: 3px solid #d6a32d; }
.applicator-camera { width: 100%; margin-top: 12px; }
.applicator-camera-view { margin-top: 14px; padding: 12px; background: #050705; border: 1px solid #365732; border-radius: 10px; }
.applicator-camera-view video { width: 100%; max-height: 360px; object-fit: cover; border-radius: 7px; }
.applicator-camera-view p { color: #dce8d9; font-size: .85rem; }

/* Aplicador: fluxo de campo com uma ação principal por vez. */
.applicator-shell { width: min(100% - 24px, 560px); padding-top: 20px; }
.applicator-card { padding: 0; overflow: hidden; background: transparent; border: 0; box-shadow: none; }
.applicator-flow { padding: 10px 2px 14px; display: flex; align-items: center; justify-content: space-between; color: #dce8d9; border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 700; }
.applicator-flow [data-flow-label]::before { content: ''; width: 8px; height: 8px; margin-right: 8px; display: inline-block; background: var(--green-bright); border-radius: 50%; box-shadow: 0 0 0 4px rgba(99,197,43,.13); }
.applicator-flow [data-flow-count] { color: var(--muted); font-variant-numeric: tabular-nums; }
.applicator-kit-header { padding: 26px 2px 22px; }
.applicator-card h1 { margin-bottom: 10px; font-size: clamp(2rem, 9vw, 3.1rem); }
.applicator-school { margin: 0; padding: 0; display: flex; gap: 8px; background: none; border: 0; }
.applicator-school strong, .applicator-school span { color: var(--muted); font-size: .83rem; }
.applicator-school strong::after { content: '·'; margin-left: 8px; color: #576057; }
.applicator-sync { width: fit-content; margin-top: 18px; padding: 7px 10px; font-size: .76rem; border-radius: 99px; }
.applicator-toolbar { justify-content: flex-end; margin-bottom: 10px; }
.applicator-toolbar .button { color: var(--muted); background: transparent; }
.applicator-identification, .applicator-proof { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-soft); }
.applicator-search { margin: 0; }
.applicator-search__row { display: grid; grid-template-columns: 1fr; gap: 9px; }
.applicator-search input { min-height: 52px; font-size: 1rem; }
.applicator-search__row .button, .applicator-camera, .applicator-card-reader { width: 100%; min-height: 52px; font-size: .93rem; }
.applicator-camera { margin-top: 10px; color: #dce8d9; background: transparent; }
.applicator-proof { margin-top: 16px; padding: 24px 20px; border-color: #3a493c; }
.applicator-proof h2 { margin-bottom: 18px; font-size: clamp(1.75rem, 8vw, 2.35rem); }
.applicator-proof-data { margin: 0 0 18px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.applicator-proof-data div { padding: 11px 12px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.applicator-proof-data div:last-child { border-bottom: 0; }
.applicator-proof-data dt { color: var(--muted); font-size: .75rem; font-weight: 700; }
.applicator-proof-data dd { margin: 0; color: #f2f5f2; font-size: .85rem; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.applicator-more-actions { margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; }
.applicator-more-actions summary { padding: 13px 14px; color: #c9d1ca; cursor: pointer; font-size: .83rem; font-weight: 700; }
.applicator-more-actions[open] summary { border-bottom: 1px solid var(--line); }
.applicator-more-actions .applicator-actions, .applicator-more-actions .applicator-absence { margin: 12px; }
.applicator-more-actions .applicator-actions { grid-template-columns: 1fr; }
.applicator-more-actions .button { min-height: 46px; }
.applicator-absence { background: #101512; }
.review-dialog { width: min(94vw, 760px); max-height: min(88dvh, 840px); padding: 0; overflow: hidden; }
.review-dialog form { height: min(88dvh, 840px); display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; }
.review-dialog h2, .review-dialog > form > p { margin: 0; padding: 22px 22px 0; }
.review-dialog > form > p { padding-top: 8px; color: var(--muted); line-height: 1.45; }
.review-summary { margin: 16px 22px 10px; }
.answer-list { min-height: 0; max-height: none; padding: 0 22px 18px; gap: 9px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.answer-row { padding: 12px; grid-template-columns: 48px minmax(0,1fr); background: #0b0f0c; }
.answer-row legend { padding: 0; display: grid; gap: 3px; }
.answer-row legend small { color: var(--muted); font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.answer-row > small { display: none; }
.review-dialog menu { margin: 0; padding: 12px 22px max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: .8fr 1.2fr; background: #111712; border-top: 1px solid var(--line); }
.review-dialog menu .button { min-height: 50px; }
.result-dialog { text-align: center; }

@media screen and (max-width: 480px) {
  .applicator-shell { width: min(100% - 20px, 560px); padding-top: 12px; }
  .applicator-kit-header { padding-top: 22px; }
  .applicator-proof, .applicator-identification { padding: 18px 16px; }
  .review-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .review-dialog form { height: 100dvh; }
  .review-dialog h2, .review-dialog > form > p { padding-left: 18px; padding-right: 18px; }
  .review-summary { margin-left: 18px; margin-right: 18px; }
  .answer-list { padding-left: 18px; padding-right: 18px; }
  .answer-row { grid-template-columns: 1fr; gap: 10px; }
  .answer-row legend { display: flex; align-items: baseline; gap: 8px; }
  .answer-comparison { grid-column: 1; }
  .answer-options { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .review-dialog menu { padding-left: 18px; padding-right: 18px; }
}

@media screen and (max-width: 480px) {
  .applicator-search__row, .applicator-actions { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: 'DM Sans', Arial, sans-serif; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .button, .brand strong, .summary-strip strong { font-family: 'Space Grotesk', 'DM Sans', Arial, sans-serif; }
h1, h2, h3 { letter-spacing: -0.035em; }

.site-header { min-height: 78px; padding: 0 max(4vw, 24px); display: flex; align-items: center; justify-content: space-between; color: white; background: #050605; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__logo { width: 76px; height: 42px; display: grid; place-items: center; overflow: hidden; background: transparent; border: 0; border-radius: 8px; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 0 2px rgba(255,255,255,.95)) drop-shadow(0 0 5px rgba(255,255,255,.38)); }
.brand__copy { display: grid; gap: 3px; }
.brand strong { font-size: 1.02rem; letter-spacing: -.02em; }
.brand small { color: #a7c89b; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 24px; }
.header-status { color: #aeb6ae; font-size: .78rem; }
.header-status i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; background: var(--green-bright); border-radius: 50%; box-shadow: 0 0 0 4px rgba(65,154,25,.18); }
.header-status--inactive i { background: var(--muted); box-shadow: 0 0 0 4px rgba(174,182,174,.14); }
.admin-link { color: #c7cec8; font-size: .82rem; text-decoration: none; }
.admin-link:hover { color: var(--green-bright); }
.header-action { min-height: 34px; padding: 7px 12px; color: #dbe2dc; background: transparent; border: 1px solid var(--line); border-radius: 7px; font: 700 .76rem 'DM Sans', Arial, sans-serif; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.header-action:hover { color: var(--green-bright); background: var(--green-pale); border-color: var(--green); }
.page-shell { width: min(1400px, 92vw); margin: 0 auto; padding: 36px 0 76px; }

.dashboard-hero { min-height: 235px; margin-bottom: 24px; padding: 38px 42px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; color: white; background: linear-gradient(120deg, #0a0d0b, #111713); border: 1px solid #303932; border-radius: 20px; box-shadow: var(--shadow); position: relative; }
.dashboard-hero::after { content: ''; position: absolute; width: 390px; height: 390px; right: -100px; top: -175px; border: 1px solid rgba(99,197,43,.2); border-radius: 50%; box-shadow: 0 0 0 38px rgba(99,197,43,.045), 0 0 0 76px rgba(99,197,43,.025); }
.dashboard-hero > div:first-child { position: relative; z-index: 1; }
.dashboard-hero h1 { max-width: 560px; margin-bottom: 10px; font-size: clamp(2.35rem, 5vw, 4.3rem); line-height: .98; }
.dashboard-hero p:not(.eyebrow) { max-width: 460px; margin-bottom: 0; color: #a5aca6; font-size: 1.05rem; }
.dashboard-hero .eyebrow { color: var(--green-bright) !important; }
.dashboard-hero__brand { width: 270px; padding: 10px; display: grid; gap: 7px; color: white; background: rgba(255,255,255,.025); border: 1px solid rgba(99,197,43,.25); border-radius: 12px; transform: rotate(2deg); box-shadow: 0 14px 30px rgba(0,0,0,.2); z-index: 1; }
.dashboard-hero__brand img { width: 100%; height: 125px; object-fit: contain; filter: drop-shadow(0 0 3px rgba(255,255,255,.95)) drop-shadow(0 0 8px rgba(255,255,255,.35)); }
.dashboard-hero__brand span { padding-top: 7px; color: #b6c0b7; border-top: 1px solid rgba(99,197,43,.3); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-align: center; text-transform: uppercase; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-heading--compact { margin-bottom: 20px; }
.page-heading h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3.25rem); }
.page-heading p { max-width: 720px; color: var(--muted); }
.eyebrow { margin-bottom: 8px; color: var(--green) !important; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.breadcrumb { display: flex; gap: 9px; margin-bottom: 25px; color: var(--muted); font-size: .82rem; }
.breadcrumb a { color: var(--green); text-decoration: none; }
.lot-nav { margin: -5px 0 28px; padding: 5px; display: flex; gap: 4px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-soft); }
.lot-nav a { padding: 9px 13px; color: var(--muted); border-radius: 7px; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lot-nav a:hover, .lot-nav a[aria-current='page'] { color: var(--green-bright); background: var(--green-pale); box-shadow: inset 0 -2px 0 var(--green); }
.actions-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.actions-heading { margin: 24px 0 12px; }

.button { min-height: 44px; padding: 10px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface-soft); font-size: .84rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.button:hover { border-color: var(--green-bright); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(99, 197, 43, .35); outline-offset: 2px; }
.button--primary { color: #061a10; background: var(--green-bright); border-color: var(--green-bright); }
.button--primary:hover { color: white; background: var(--green-deep); border-color: var(--green-deep); }
.button--danger { color: white; background: var(--red); border-color: var(--red); }
.button--small { min-height: 34px; padding: 7px 12px; font-size: .76rem; }
.inline-form { display: inline; }
td.actions .inline-form { margin-left: 10px; }
.selection-actions { margin: 18px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.selection-actions span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.portal-email-warning { display: block; margin: 0 0 14px; padding: 11px 13px; color: #f2c36c; background: #332a19; border: 1px solid #7a5b26; border-radius: 9px; font-size: .8rem; font-weight: 700; }
.portal-email-warning[hidden] { display: none; }

.summary-strip { margin-bottom: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); overflow: hidden; color: white; background: #151a16; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.summary-strip div { padding: 19px 23px; border-right: 1px solid rgba(255,255,255,.15); }
.summary-strip span, .summary-strip small { display: block; color: #9ca69d; font-size: .73rem; }
.summary-strip strong { display: block; margin: 3px 0; font-size: 1.7rem; }
.summary-strip--dashboard { margin-bottom: 28px; }
.summary-strip--dashboard div { min-height: 112px; }
.generation-summary { margin-bottom: 20px; }
.generation-summary__metrics { margin-bottom: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.generation-detail__actions .btn { min-height: 44px; }
.generation-detail__actions form { margin: 0; }
.generation-status { min-height: 30px; padding: 6px 11px; display: inline-flex; align-items: center; color: #dbe3dc; background: #202621; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; font-weight: 700; }
.generation-status::before { content: ''; width: 7px; height: 7px; margin-right: 7px; background: #aab3ac; border-radius: 50%; }
.generation-status--concluido { color: #9ce989; background: #142b19; border-color: #315f38; }
.generation-status--concluido::before { background: var(--green-bright); box-shadow: 0 0 0 4px rgba(99,197,43,.12); }
.generation-status--processando, .generation-status--na_fila { color: #f1df79; background: #2b2815; border-color: #5f5729; }
.generation-status--processando::before, .generation-status--na_fila::before { background: #e2ad45; }
.generation-status--falhou { color: #ffaaa4; background: #321918; border-color: #71332f; }
.generation-status--falhou::before { background: #e06b62; }
.generation-section-heading { margin-bottom: 20px; }
.generation-section-heading h2 { margin: 0; font-size: 1.35rem; }
.generation-section-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }
.generation-alert { padding: 14px 16px; color: #f4dda2; background: #2b2517; border: 1px solid #67552a; border-radius: 10px; }
.generation-alert ul { margin: 8px 0 0; padding-left: 20px; }
.generation-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 20px; align-items: start; }
.generation-region-list { display: grid; gap: 18px; }
.generation-region { overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.generation-region__header { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #101411; border-bottom: 1px solid var(--line); }
.generation-region__header span { color: var(--green-bright); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.generation-region__header h3 { margin: 2px 0 0; font-size: 1.08rem; }
.generation-region__header p { margin: 0; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.generation-school-list { display: grid; }
.generation-school { border-bottom: 1px solid var(--line); }
.generation-school:last-child { border-bottom: 0; }
.generation-school summary { min-height: 64px; padding: 11px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; }
.generation-school summary::-webkit-details-marker { display: none; }
.generation-school summary::after { content: '+'; width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: var(--green-bright); background: var(--green-pale); border-radius: 7px; font-size: 1rem; }
.generation-school[open] summary::after { content: '−'; }
.generation-school summary:hover { background: var(--surface-raised); }
.generation-school summary > span:first-child { min-width: 0; display: grid; }
.generation-school summary strong { overflow-wrap: anywhere; font-size: .9rem; }
.generation-school summary small { color: var(--muted); font-size: .72rem; }
.generation-school__count { margin-left: auto; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.generation-school ul { margin: 0; padding: 2px 18px 16px 48px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.generation-school li { padding: 6px 10px; color: #dce3dd; background: #202621; border: 1px solid #39433b; border-radius: 999px; font-size: .76rem; }
.generation-material-card header { display: flex; align-items: center; gap: 14px; }
.generation-material-card h2 { margin: 0; font-size: 1.05rem; }
.generation-material-card .eyebrow { margin-bottom: 2px; }
.generation-material-card__number { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; color: #07180c; background: var(--green-bright); border-radius: 11px; font: 700 1.15rem 'Space Grotesk'; }
.generation-material-card ul { margin: 18px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.generation-material-card li { padding: 10px 12px; overflow-wrap: anywhere; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; }
.generation-material-card .generation-material-card__empty { color: var(--muted); }

.production-overview { margin-bottom: 26px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; font-size: 1.45rem; }
.production-overview__grid { display: grid; grid-template-columns: minmax(330px, .9fr) minmax(0, 1.5fr); overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.progress-card { min-height: 248px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; background: #080b09; border-right: 1px solid var(--line); }
.progress-card::after { content: ''; width: 180px; height: 180px; position: absolute; right: -90px; bottom: -100px; border: 1px solid rgba(65,154,25,.25); border-radius: 50%; box-shadow: 0 0 0 28px rgba(65,154,25,.045), 0 0 0 58px rgba(65,154,25,.025); }
.progress-card__main { display: flex; align-items: center; gap: 22px; position: relative; z-index: 1; }
.progress-ring { width: 116px; height: 116px; flex: 0 0 116px; display: grid; place-items: center; position: relative; background: conic-gradient(var(--green-bright) var(--progress), #252b27 0); border-radius: 50%; }
.progress-ring::before { content: ''; position: absolute; inset: 9px; background: #0e120f; border: 1px solid #29302b; border-radius: 50%; }
.progress-ring div { z-index: 1; display: grid; text-align: center; }
.progress-ring strong { font: 700 1.7rem 'Space Grotesk'; line-height: 1; }
.progress-ring span { margin-top: 4px; color: var(--muted); font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.progress-card__copy { display: grid; gap: 4px; }
.progress-card__copy > span { color: var(--green-bright); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.progress-card__copy strong { font: 700 1.05rem 'Space Grotesk'; }
.progress-card__copy p { margin: 0; color: var(--muted); font-size: .8rem; }
.progress-card__track { height: 7px; overflow: hidden; position: relative; z-index: 1; background: #252b27; border-radius: 20px; }
.progress-card__track span { height: 100%; display: block; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: inherit; transition: width 520ms linear; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric { min-height: 123px; padding: 18px 20px; display: flex; align-items: center; justify-content: center; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background 160ms ease; }
.metric:nth-child(2n) { border-right: 0; }
.metric:nth-last-child(-n+2) { border-bottom: 0; }
.metric:hover { background: var(--surface-raised); }
.metric__icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; color: var(--metric-color, var(--green-bright)); background: var(--metric-bg, var(--green-pale)); border: 1px solid color-mix(in srgb, var(--metric-color, var(--green)) 38%, transparent); border-radius: 11px; font: 700 .82rem 'Space Grotesk'; }
.metric > div { min-width: 0; display: grid; justify-items: center; }
.metric > div > span { color: var(--muted); font-size: .68rem; font-weight: 700; }
.metric strong { margin: 2px 0; font: 700 clamp(1.15rem, 2vw, 1.6rem) 'Space Grotesk'; white-space: nowrap; }
.metric strong em { color: #555e58; font-style: normal; font-size: .72em; }
.metric small { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.metric .metric__remaining { margin-top: 3px; color: var(--green-bright); font-size: .6rem; font-weight: 700; }
.metric--kits { --metric-color: #e2ad45; --metric-bg: #332a19; }
.metric--students { --metric-color: #62a8dc; --metric-bg: #172b3a; }
.metric--pages { --metric-color: #b192e4; --metric-bg: #282039; }
.metric--deliveries { --metric-color: #b192e4; --metric-bg: #282039; }
.production-facts { padding: 13px 4px 0; display: flex; justify-content: flex-end; gap: 24px; color: var(--muted); font-size: .72rem; }
.production-facts b { color: var(--ink); }

.panel, .form-panel { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel__header h2 { margin-bottom: 5px; font-size: 1.35rem; }
.panel__lead { margin-bottom: 0; color: var(--muted); font-size: .86rem; }
.panel-empty { padding: 24px 0 8px; color: var(--muted); border-top: 1px solid var(--line); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 24px; align-items: stretch; }
.content-grid > .action-card { height: 100%; box-sizing: border-box; }
.content-grid > .action-card > .button { margin-top: auto; }
.import-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.import-type-grid .panel__header { justify-content: center; text-align: center; }
.import-type-grid > .action-card > p { text-align: center; }

.lote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 17px; }
.lote-card { position: relative; min-height: 285px; padding: 25px; color: inherit; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.lote-card::after { content: '→'; position: absolute; right: 24px; bottom: 24px; color: var(--green); font-size: 1.3rem; }
.lote-card:hover { transform: translateY(-4px); border-color: var(--green-bright); background: #202720; box-shadow: var(--shadow); }
.lote-card__heading { margin: 20px 0 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.lote-card__heading h2 { margin: 0; font-size: 1.35rem; }
.lote-card__heading > strong { color: var(--green-bright); font: 700 1.45rem 'Space Grotesk'; }
.lote-card > p { min-height: 42px; margin-bottom: 13px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.lote-card__progress { height: 6px; display: block; overflow: hidden; background: #292f2b; border-radius: 10px; }
.lote-card__progress i { height: 100%; display: block; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: inherit; }
.lote-card__progress-copy { margin-top: 7px; display: block; color: var(--muted); font-size: .66rem; }
.lote-card dl { margin: 17px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.lote-card dl div { padding: 14px 8px 0 0; }
.lote-card dt { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.lote-card dd { margin: 4px 0 0; font: 700 1.2rem 'Space Grotesk'; }
.status { padding: 5px 9px; color: #a7b9ac; background: #1b2d22; border-radius: 99px; font-size: .68rem; font-weight: 700; }
.status--active { color: #8bea70; background: var(--green-pale); }
.status--success { color: #8bea70; background: var(--green-pale); }
.status--warning { color: #f1df79; background: #3a3314; }
.status--danger { color: #ffaaa4; background: #3b1918; }
.empty-state { padding: 70px 30px; text-align: center; background: var(--surface-soft); border: 1px dashed #456d36; border-radius: 12px; }
.empty-state strong { font: 700 1.25rem 'Space Grotesk'; }
.empty-state p { margin: 8px 0 0; color: var(--muted); }
.empty-state p + .button { margin-top: 18px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.summary-card { min-width: 0; padding: 20px; display: grid; gap: 5px; color: inherit; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.summary-card:hover { transform: translateY(-2px); border-color: var(--green-bright); background: #202720; }
.summary-card__label { color: var(--green-bright); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { display: block; font: 700 1.15rem 'Space Grotesk'; }
.summary-card small { display: block; color: var(--muted); font-size: .75rem; }

.tracking-metrics { margin-bottom: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tracking-metric { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.tracking-metric > span, .tracking-metric small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tracking-metric strong { margin: 4px 0; display: block; color: var(--green-bright); font: 700 2rem 'Space Grotesk'; }
.tracking-progress { height: 7px; margin-top: 13px; overflow: hidden; background: #292f2b; border-radius: 99px; }
.tracking-progress i { height: 100%; display: block; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: inherit; }
.tracking-panel { margin-top: 24px; }
.tracking-lots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.tracking-lot { padding: 22px; color: inherit; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease; }
.tracking-lot:hover { transform: translateY(-3px); border-color: var(--green-bright); }
.tracking-lot h2 { margin: 14px 0 5px; font-size: 1.3rem; }
.tracking-lot p, .tracking-lot small, .tracking-delivery > span, .tracking-delivery p { color: var(--muted); font-size: .78rem; }
.tracking-lot small { margin-top: 7px; display: block; }
.tracking-deliveries { display: grid; gap: 12px; }
.tracking-delivery { display: block; padding: 18px 20px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 11px; color: inherit; text-decoration: none; }
.tracking-delivery:hover { border-color: var(--accent); background: var(--surface); }
.tracking-delivery > div { margin-bottom: 7px; display: flex; align-items: center; gap: 12px; }
.tracking-delivery h3 { margin: 0; font-size: 1.05rem; }
.tracking-delivery p { margin: 10px 0 0; }

.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--green) var(--surface-soft); scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { color: var(--muted); font-size: .65rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cell-stack { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.cell-stack > small { display: block; color: var(--muted); line-height: 1.35; }
.cell-stack > code { overflow-wrap: anywhere; word-break: break-word; }
.panel--cadernos .table-wrap { overflow-x: visible; }
.panel--cadernos table { table-layout: fixed; font-size: .76rem; }
.panel--cadernos th, .panel--cadernos td { padding: 12px 8px; overflow-wrap: anywhere; }
.panel--cadernos th { font-size: .56rem; letter-spacing: .035em; }
.panel--cadernos th:nth-child(1) { width: 9%; }
.panel--cadernos th:nth-child(2) { width: 20%; }
.panel--cadernos th:nth-child(3) { width: 16%; }
.panel--cadernos th:nth-child(4), .panel--cadernos th:nth-child(5) { width: 11%; }
.panel--cadernos th:last-child { width: 25%; }
.panel--cadernos td.actions { white-space: normal; }
.table-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface-soft); }
.table-actions a { margin: 0 !important; padding: 6px 8px; display: inline-block; color: var(--green) !important; border-right: 1px solid var(--line); font-size: .72rem; line-height: 1.1; text-decoration: none; }
.table-actions a:last-child { border-right: 0; }
.table-actions a:hover { color: var(--green-bright) !important; background: var(--green-pale); }
.table-actions .danger { color: #df7772 !important; }
.table-actions .danger:hover { color: #fff !important; background: #572927; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
tbody tr:hover { background: #1a211c; }
td.actions { white-space: nowrap; text-align: right; }
td.actions a { margin-left: 10px; color: var(--green); font-weight: 700; text-decoration: none; }
td.actions .danger, .danger { color: var(--red); }
.record-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.record-actions form { margin: 0; }
.icon-action { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 1.2rem; line-height: 1; text-decoration: none; cursor: pointer; }
.icon-action--edit { color: var(--green); }
.icon-action--delete { color: var(--red); font-size: 1.5rem; }
.icon-action:hover { border-color: currentColor; }
.portal-actions { display: inline-flex; gap: 6px; }
.portal-action { width: 28px; height: 28px; color: var(--green-bright); }
.portal-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.portal-action--copied { color: var(--green); border-color: var(--green); }
.portal-link { min-width: 260px; display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 8px; }
.portal-link input { min-width: 0; }
.portal-link a { color: var(--green-bright); font-weight: 700; text-decoration: none; }
.portal-link code, td code { overflow-wrap: anywhere; word-break: break-word; }
.filters { margin-bottom: 22px; display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; }
.filters--conference { grid-template-columns: minmax(0, 2fr) minmax(170px, 1fr) minmax(150px, .7fr) auto; }
.portal-class-list { display: grid; gap: 18px; }
.portal-auth { width: min(100%, 520px); margin: 32px auto; }
.portal-auth .form-grid { display: grid; gap: 18px; }
.portal-auth label { display: grid; gap: 8px; font-size: 15px; font-weight: 700; }
.portal-auth input { width: 100%; min-height: 48px; }
.portal-auth .button { min-height: 48px; }
.portal-school .page-shell { width: min(1180px, 92vw); padding-top: 42px; }
.portal-header { min-height: 84px; }
.portal-header .brand { gap: 11px; }
.portal-header__mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--green-bright); background: var(--green-pale); border: 1px solid rgba(99,197,43,.35); border-radius: 10px; }
.portal-header__mark svg, .portal-lot-card__icon svg, .portal-material-group__icon svg, .portal-download > span svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-header .brand__copy small { letter-spacing: .04em; }
.portal-hero, .portal-lote-hero { margin-bottom: 34px; padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; position: relative; background: linear-gradient(120deg, #101b13, #0d100e); border: 1px solid #39543a; border-radius: 18px; box-shadow: var(--shadow); }
.portal-hero::after, .portal-lote-hero::after { content: ''; width: 300px; height: 300px; position: absolute; right: -110px; bottom: -170px; border: 1px solid rgba(99,197,43,.3); border-radius: 50%; box-shadow: 0 0 0 36px rgba(99,197,43,.05), 0 0 0 72px rgba(99,197,43,.025); }
.portal-hero > div, .portal-lote-hero > div { position: relative; z-index: 1; }
.portal-hero h1, .portal-lote-hero h1 { margin-bottom: 9px; font-size: clamp(2rem, 4vw, 3.2rem); }
.portal-hero p:not(.eyebrow), .portal-lote-hero p:not(.eyebrow) { max-width: 610px; margin-bottom: 0; color: var(--muted); }
.portal-hero__guide { min-width: 205px; padding: 17px 19px; display: grid; gap: 4px; background: rgba(0,0,0,.19); border: 1px solid rgba(99,197,43,.26); border-radius: 12px; }
.portal-hero__guide span, .portal-hero__guide small { color: var(--muted); font-size: .72rem; }
.portal-hero__guide strong { color: var(--green-bright); font: 700 1rem 'Space Grotesk'; }
.portal-section { padding: 0 2px; }
.portal-section__heading { margin-bottom: 17px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.portal-section__heading .eyebrow { margin-bottom: 5px; }
.portal-section__heading h2 { margin: 0; font-size: 1.5rem; }
.portal-section__heading > span, .portal-lote-hero > span { padding: 7px 10px; color: var(--green-bright); background: var(--green-pale); border: 1px solid rgba(99,197,43,.27); border-radius: 99px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.portal-lot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 15px; }
.portal-lot-card { min-height: 205px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; color: inherit; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.portal-lot-card:hover { transform: translateY(-3px); border-color: var(--green-bright); box-shadow: var(--shadow-soft); }
.portal-lot-card__icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green-bright); background: var(--green-pale); border-radius: 10px; }
.portal-lot-card .summary-card__label { margin-top: 17px; }
.portal-lot-card strong { margin-top: 4px; font: 700 1.15rem 'Space Grotesk'; }
.portal-lot-card small { margin-top: 8px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.portal-lot-card__open { margin-top: auto; padding-top: 16px; color: var(--green-bright); font-size: .76rem; font-weight: 700; }
.portal-lot-card__open span { margin-left: 4px; font-size: 1rem; }
.portal-lote-hero { padding: 27px 32px; }
.portal-class-list { grid-template-columns: repeat(auto-fit, minmax(410px, 1fr)); gap: 18px; }
.portal-class-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-soft); }
.portal-class-card__header { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(115deg, #182119, #101411); border-bottom: 1px solid var(--line); }
.portal-class-card__header span { color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.portal-class-card__header h2 { margin: 4px 0 0; font-size: 1.35rem; }
.portal-class-card__header > strong { padding: 7px 9px; color: var(--green-bright); background: var(--green-pale); border-radius: 7px; font-size: .72rem; }
.portal-material-group { padding: 20px 22px; }
.portal-material-group--applicator { border-top: 1px solid var(--line); background: rgba(255,255,255,.012); }
.portal-material-group__heading { margin-bottom: 13px; display: flex; gap: 11px; }
.portal-material-group__icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: var(--green-bright); background: var(--green-pale); border-radius: 9px; }
.portal-material-group__heading h3 { margin: 0 0 3px; font-size: .95rem; }
.portal-material-group__heading p { margin: 0; color: var(--muted); font-size: .72rem; }
.portal-downloads { display: grid; gap: 8px; }
.portal-download { padding: 11px 12px; display: flex; align-items: center; gap: 10px; color: inherit; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.portal-download:hover { background: #202920; border-color: var(--green-bright); transform: translateX(2px); }
.portal-download > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: var(--green-bright); }
.portal-download strong, .portal-download small { display: block; }
.portal-download strong { font-size: .78rem; }
.portal-download small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.cell-contact { overflow-wrap: break-word; word-break: normal; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 700; font-size: .78rem; }
input, select, textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: #091a10; border: 1px solid #466238; border-radius: 8px; font: 400 .9rem 'DM Sans', Arial, sans-serif; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(65,154,25,.2); border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
input[type='checkbox'] { width: auto; justify-self: start; accent-color: var(--green); }
.check-control { min-width: 112px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.check-control input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.check-control:has(input:checked) { color: var(--green-bright); }
.conference-region { margin-top: 1.5rem; }
.conference-region__heading { margin: 0 0 .75rem; padding: .75rem 1rem; color: var(--ink); background: var(--surface-soft); border-left: 4px solid var(--green); border-radius: 6px; font-size: 1.1rem; overflow-wrap: anywhere; }
.conference-panel .check-control { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.generation-dialog { width: min(1040px, calc(100% - 32px)); height: min(860px, calc(100vh - 32px)); max-width: none; max-height: none; overflow: hidden; border: 1px solid #36443a; border-radius: 20px; background: var(--surface); color: inherit; padding: 0; box-shadow: 0 28px 90px rgba(0,0,0,.65); }
.generation-dialog::backdrop { background: rgba(8, 18, 15, .72); backdrop-filter: blur(3px); }
.generation-form { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.generation-dialog__header { padding: 26px 30px 22px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #101a12, #0b0d0c); }
.generation-dialog__header h2 { margin-bottom: 5px; font-size: 1.65rem; }
.generation-dialog__header p:last-child { margin: 0; color: var(--muted); font-size: .95rem; }
.generation-dialog__close { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface-raised); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.generation-dialog__close:hover { color: var(--ink); border-color: var(--green); }
.generation-dialog__body { min-height: 0; overflow-y: auto; padding: 24px 30px; }
.generation-toolbar { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .7fr); gap: 16px; }
.generation-toolbar label { font-size: .84rem; }
.generation-toolbar input, .generation-toolbar select { min-height: 48px; font-size: .95rem; }
.generation-selection-summary { margin: 20px 0 14px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #34502e; border-radius: 12px; background: rgba(65,154,25,.08); }
.generation-selection-summary > strong { color: var(--green-bright); font-size: .9rem; }
.generation-check { min-height: 44px; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.generation-check input, .school-option input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--green-bright); }
.generation-check span, .school-option span { display: grid; gap: 2px; }
.generation-check strong { font-size: .95rem; }
.generation-check small, .school-option small { color: var(--muted); font-size: .78rem; font-weight: 500; }
.region-list { display: grid; gap: 12px; }
.region-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); transition: border-color 150ms ease; }
.region-card.has-selection { border-color: #47783b; }
.region-card__header { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.region-selected-count { padding: 5px 9px; border-radius: 99px; color: var(--green-bright); background: var(--green-deep); font-size: .78rem; font-weight: 800; }
.region-card__schools { padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.school-option { min-width: 0; padding: 12px 13px; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 9px; background: #0d110e; cursor: pointer; }
.school-option:hover { border-color: #3a5635; background: #111712; }
.school-option:has(input:checked) { border-color: var(--green); background: rgba(65,154,25,.1); }
.school-option strong { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.generation-errors { margin-bottom: 18px; padding: 13px 15px; border: 1px solid #7a3733; border-radius: 10px; color: #ffaaa5; background: #311918; }
.generation-dialog__footer { padding: 18px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); background: #090b0a; }
.generation-dialog__footer p { margin: 0; display: grid; gap: 3px; }
.generation-dialog__footer p strong { font-size: .92rem; }
.generation-dialog__footer p span { color: var(--muted); font-size: .76rem; }
.generation-dialog__footer > div { display: flex; gap: 10px; }
.generation-submit { min-width: 170px; }
.generation-dialog__footer .btn { min-height: 44px; }
.generation-dialog .generation-submit { min-height: 48px; }
.generation-dialog .generation-toolbar input, .generation-dialog .generation-toolbar select { min-height: 44px; }
@media (max-width: 700px) {
  .generation-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .generation-dialog__header, .generation-dialog__body, .generation-dialog__footer { padding-left: 18px; padding-right: 18px; }
  .generation-toolbar, .region-card__schools { grid-template-columns: 1fr; }
  .generation-dialog__footer { align-items: stretch; flex-direction: column; }
  .generation-dialog__footer > div, .generation-dialog__footer .button { width: 100%; }
  .generation-dialog__footer .button { justify-content: center; }
}
tr.is-ready { background: rgba(65,154,25,.07); }
tr.is-ready td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.form-actions { margin-top: 8px; display: flex; justify-content: flex-end; gap: 10px; }
.errorlist { margin: 0; padding: 0; color: var(--red); list-style: none; font-weight: 500; }
.success-note { padding: 13px 15px; color: #9bd77c; background: var(--green-pale); border-left: 4px solid var(--green); }
.messages { display: grid; gap: 10px; margin-bottom: 24px; }
.message { margin: 0; padding: 13px 16px; background: var(--surface-raised); border-left: 4px solid var(--green-bright); border-radius: 8px; box-shadow: var(--shadow-soft); }
.message--error { border-color: var(--red); }

.stack-actions { display: grid; gap: 10px; }
.action-card { min-height: 74px; padding: 17px 18px; display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid var(--line); border-left: 4px solid var(--green-bright); border-radius: 10px; background: var(--surface-soft); text-decoration: none; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.action-card:hover { background: var(--surface-raised); border-color: var(--green-bright); transform: translateX(2px); }
.action-card strong { font-size: .9rem; }
.action-card span { color: var(--muted); font-size: .82rem; }
.subheading { margin: 28px 0 8px; font-size: 1rem; }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.history-list span, .history-list small { display: block; }
.history-list small { color: var(--muted); }
.form-panel { width: min(680px, 100%); margin: 20px auto; }
.form-panel--wide { width: 100%; margin: 0 0 20px; }
/* O painel de correção carrega dgr-form-narrow + form-panel--wide juntos;
   --wide precisa vencer (especificidade 0,2,0 > 0,1,0) senão o editor de
   gabarito fica espremido em 560px e as 4 colunas nunca cabem. */
.form-panel--wide.dgr-form-narrow { max-width: none; }
.form-panel--narrow { width: min(560px, 100%); }
.login-shell { min-height: calc(100vh - 190px); display: grid; place-items: center; padding: 28px 0 56px; }
.login-card { width: min(440px, 100%); padding: 34px; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); border: 1px solid #415044; border-radius: 16px; box-shadow: var(--shadow); }
.login-card header { margin-bottom: 28px; }
.login-card h1 { margin-bottom: 8px; font-size: 2.25rem; }
.login-card header p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); }
.login-card .button { width: 100%; margin-top: 4px; }
.model-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.model-layout .form-panel { position: sticky; top: 20px; }
.model-preview__page { max-height: min(75vh, 900px); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; overflow-y: auto; background: #050605; border: 1px solid var(--line); border-radius: 10px; }
.model-preview__sheet { width: min(100%, 900px); margin: 0; }
.model-preview__sheet img { width: 100%; height: auto; display: block; background: white; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.model-preview__sheet figcaption { margin-top: 8px; color: var(--muted); font-size: .78rem; text-align: center; }
.field-editor { min-width: 0; }
.field-editor__layout { display: grid; grid-template-columns: minmax(210px, .35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.field-editor__page > h3 { margin: 0 0 6px; font-size: .95rem; }
.field-palette { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.field-palette h3 { margin: 0 0 6px; }
.field-palette p, .field-editor__hint { color: var(--muted); font-size: .78rem; }
.field-palette__items { margin-top: 16px; display: grid; gap: 8px; }
.field-palette__item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font: inherit; font-size: .82rem; font-weight: 700; text-align: left; cursor: grab; }
.field-palette__item:hover { border-color: var(--green); }
.field-properties { margin-top: 20px; padding-top: 18px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.field-properties[hidden] { display: none; }
.field-properties h3, .field-properties p { margin: 0; }
.field-properties > strong { color: #9bd77c; font-size: .86rem; }
.field-properties label { display: grid; gap: 8px; font-size: .78rem; font-weight: 700; }
.field-properties label span { display: flex; align-items: center; gap: 9px; }
.field-properties input { min-width: 0; flex: 1; accent-color: var(--green); }
.field-properties__geometry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-properties__geometry input { width: 100%; padding: 7px 8px; }
.field-properties output { min-width: 38px; color: var(--ink); font-size: .75rem; }
.field-canvas { position: relative; width: 100%; overflow: hidden; background: white; box-shadow: 0 12px 34px rgba(0,0,0,.35); touch-action: none; }
.field-canvas > img { width: 100%; height: auto; display: block; pointer-events: none; user-select: none; }
.field-canvas.is-grid-visible::before { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(8, 122, 67, .16) 1px, transparent 1px), linear-gradient(to bottom, rgba(8, 122, 67, .16) 1px, transparent 1px); background-size: 5% 5%; }
.field-editor__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 6px; }
.field-editor__tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.field-editor__tools input { accent-color: var(--green); }
.pdf-preview-dialog { width: min(1440px, 96vw); height: min(94vh, 1200px); max-width: none; max-height: none; overflow: hidden; padding: 0; border: 1px solid #36443a; border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.65); }
.pdf-preview-dialog::backdrop { background: rgba(8, 18, 15, .78); backdrop-filter: blur(3px); }
.pdf-preview-dialog__header { padding: 22px 28px 18px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #101a12, #0b0d0c); }
.pdf-preview-dialog__header h2 { margin: 2px 0 5px; }
.pdf-preview-dialog__header p:last-child { margin: 0; color: var(--muted); }
.pdf-preview-dialog__close { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface-raised); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.pdf-preview-dialog__close:hover { color: var(--ink); border-color: var(--green); }
.pdf-preview-dialog__body { height: calc(100% - 116px); padding: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; overflow: auto; background: #050605; }
.pdf-preview-group { grid-column: 1 / -1; display: grid; gap: 14px; }
.pdf-preview-group > h3 { margin: 0; font-size: 1rem; }
.pdf-preview-group__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pdf-preview-card { min-width: 0; display: grid; justify-items: center; gap: 10px; }
.pdf-preview-card h4 { margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }
.pdf-preview-dialog__body img { width: 100%; height: auto; display: block; background: white; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.pdf-preview-dialog__state { margin: 0; align-self: center; max-width: 620px; color: var(--muted); text-align: center; }
.pdf-preview-dialog__state.is-error { color: #ffaaa5; }
.placed-field { position: absolute; z-index: 2; display: grid; place-items: center; overflow: visible; border: 1px dashed #087a43; color: #061a10; background: rgba(218, 255, 231, .82); font-size: 10px; font-weight: 700; cursor: move; user-select: none; touch-action: none; }
.placed-field.is-selected { border-style: solid; outline: 2px solid rgba(8,122,67,.22); }
.placed-field.is-moving { box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.placed-field > span { display: block; width: calc(100% - 8px); overflow: hidden; white-space: nowrap; text-align: center; }
.placed-field > button { position: absolute; top: -11px; right: -11px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; color: white; background: #8b1d25; font-size: 15px; cursor: pointer; }
.placed-field__resize { position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px; border: 2px solid white; border-radius: 2px; background: #087a43; cursor: nwse-resize; }
.placed-field--qr { padding: 0; background: repeating-conic-gradient(#07150d 0 25%, white 0 50%) 0 / 12px 12px; }
.placed-field--qr > span { flex: none; padding: 2px 4px; color: white; background: #07150d; }
.placed-field--qr > button { line-height: 20px; }
.field-editor__actions { margin-top: 18px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.field-editor__hint { margin: 0 auto 0 0; }
.field-preview-scenarios { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.field-preview-scenarios select { min-width: 180px; }
.form-panel header { margin-bottom: 26px; }
.form-panel header p { color: var(--muted); }
.form-stack, .mapping-form { display: grid; gap: 18px; }
.correction-form-grid { display: grid; grid-template-columns: minmax(180px, .6fr) 1fr; gap: 18px; }
.correction-form-grid label, .form-stack > label { display: grid; gap: 7px; }
.correction-form-grid small, .form-stack label small { color: var(--muted); font-weight: 400; }
.calibration-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.calibration-status { color: var(--muted); }
.calibration-status.is-error { color: #ffaaa5; }
.calibration-status.is-success { color: #9bd77c; }
.calibration-review { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; }
.calibration-review[hidden] { display: none !important; }
.calibration-review h2 { margin-bottom: 4px; }
.calibration-canvas-wrap { max-height: 68vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #eee; }
.calibration-canvas-wrap canvas { width: 100%; height: auto; display: block; touch-action: none; }
.answer-key-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); justify-content: center; align-items: start; gap: 16px; width: 100%; max-width: 1080px; margin: 0 auto; }
.answer-key-column { display: grid; align-content: start; gap: 9px; min-width: 0; }
.answer-key-column__title { margin: 0; padding: 0 4px 3px; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; white-space: nowrap; }
.answer-key-item { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; padding: 8px 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; min-inline-size: 0; }
.answer-key-item legend { flex: 0 0 2ch; min-width: 2ch; margin: 0; padding: 0; font-weight: 800; }
.answer-key-item strong { min-width: 35px; }
.answer-key-item label { display: inline-flex; align-items: center; gap: 2px; }
.answer-key-item .answer-bubble { flex: 0 0 auto; }
.answer-key-item.is-uncertain { border-color: #d99b24; background: #292315; color: #ffe3a1; }
@media (max-width: 500px) { .answer-key-editor { grid-template-columns: minmax(230px, 1fr); } }
.publish-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
@media (max-width: 680px) { .correction-form-grid { grid-template-columns: 1fr; } }
.mapping-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.mapping-form { grid-row: span 2; position: sticky; top: 20px; }
.preview-panel { min-width: 0; }
.preview-panel table { min-width: 700px; }
.validation-panel { grid-column: 2; }
.import-conflict-choice { margin-top: 18px; padding: 16px; border: 1px solid #8c6920; border-radius: 10px; background: #292315; color: #ffe3a1; }
.import-conflict-choice h3 { margin: 0 0 6px; color: inherit; font-size: 1rem; }
.import-conflict-choice p { margin: 0; }
.import-conflict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.import-conflict-actions .btn { min-height: 44px; }
.error-count { padding: 6px 10px; color: #ffaaa5; background: #482522; border-radius: 99px; font-weight: 700; }
.error-list { max-height: 300px; overflow-y: auto; }
.error-list p { margin: 0; padding: 8px 0; color: #ffaaa5; border-bottom: 1px solid #57312d; }
.error-list strong { margin-right: 8px; }
.delivery-selection { margin-top: 20px; }
.delivery-report { display: grid; gap: 24px; }
.delivery-box { padding: 24px; background: white; color: #11271d; border: 1px solid var(--line); box-shadow: var(--shadow); }
.delivery-box h2 { margin: 0 0 18px; padding: 12px; color: white; background: var(--green); text-align: center; text-transform: uppercase; }
.delivery-box td:last-child { white-space: nowrap; line-height: 1.35; }
.signature-row { display: flex; justify-content: space-between; gap: 40px; padding-top: 40px; }
.signature-row span { flex: 1; padding-top: 8px; border-top: 1px solid var(--ink); text-align: center; font-size: .8rem; }
.confirm-dialog { width: min(500px, calc(100vw - 32px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 80px rgba(24, 33, 38, .3); }
.confirm-dialog::backdrop { background: rgba(8, 43, 29, .58); }
.confirm-dialog__content { padding: 30px; }
.confirm-dialog__content h2 { margin-bottom: 10px; }
.confirm-dialog__content > p:not(.eyebrow) { color: var(--muted); }

.report-catalog { display: grid; gap: 24px; }
.report-catalog__featured { min-height: 245px; padding: 38px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; position: relative; background: linear-gradient(125deg, #0d160f, #172419); border: 1px solid #36543a; border-left: 6px solid var(--green-bright); border-radius: 16px; box-shadow: var(--shadow); }
.report-catalog__featured > * { max-width: 620px; position: relative; z-index: 1; }
.report-catalog__featured > span { color: var(--green-bright); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.report-catalog__featured h2 { margin: 0 0 7px; font-size: 2rem; }
.report-catalog__featured p { color: var(--muted); }
.report-catalog__lots { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
.report-lot-card { padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.report-lot-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.report-lot-card h2 { margin: 13px 0 0; font-size: 1.3rem; }
.report-lot-card header > strong { color: var(--green-bright); font: 700 1.6rem 'Space Grotesk'; }
.report-lot-card > p { margin: 14px 0; color: var(--muted); font-size: .82rem; }
.report-lot-card__actions { padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line); }
.report-lot-card__actions a { color: var(--green-bright); font-size: .76rem; font-weight: 700; text-decoration: none; }

.report-toolbar { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.report-toolbar h1 { margin-bottom: 7px; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.report-toolbar p:not(.eyebrow) { max-width: 700px; margin: 0; color: var(--muted); }
.report-editor { max-width: 1050px; margin: 0 auto 26px; padding: 0; }
.report-editor summary { padding: 18px 24px; color: var(--green-bright); font-weight: 700; cursor: pointer; }
.report-editor[open] summary { border-bottom: 1px solid var(--line); }
.report-editor__form { padding: 22px 24px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-editor__wide { grid-column: 1 / -1; }
.report-document { display: grid; gap: 28px; }
/* O documento do relatório é sempre papel claro, mesmo dentro de bases com
   data-bs-theme="dark" (ex.: acompanhamento público): o Bootstrap 5.3 deriva
   as cores de .table do tema e pintaria as células de preto na impressão. */
.report-document { background: #fff; color: #243128; color-scheme: light; }
.report-document .table {
  --bs-table-bg: #fff;
  --bs-table-color: #243128;
  --bs-table-border-color: #cbd5cd;
  --bs-table-striped-bg: #f2f6f2;
  --bs-table-striped-color: #243128;
  --bs-table-active-bg: #f2f6f2;
  --bs-table-active-color: #243128;
  --bs-table-hover-bg: #f2f6f2;
  --bs-table-hover-color: #243128;
}
/* Especificidade maior que .table > :not(caption) > * > * do Bootstrap,
   que também pinta th/td via variáveis. */
.report-document .report-table > thead > tr > th {
  color: #fff;
  background-color: #26382b;
}
.report-document .report-table > tbody > tr > td,
.report-document .report-table > tbody > tr > th {
  color: #243128;
  background-color: #fff;
}
.report-document .report-table > tbody > tr:nth-child(even) > td,
.report-document .report-table > tbody > tr:nth-child(even) > th {
  background-color: #f2f6f2;
}
.report-page { width: min(210mm, 100%); min-height: 297mm; margin: 0 auto; padding: 17mm 15mm 16mm; display: flex; flex-direction: column; position: relative; overflow: hidden; color: #17211a; background: #fff; box-shadow: 0 22px 65px rgba(0,0,0,.45); print-color-adjust: exact; }
.report-page__header { min-height: 19mm; padding-bottom: 4mm; display: flex; align-items: center; justify-content: space-between; gap: 12mm; border-bottom: .5mm solid #419a19; }
.report-brand { display: flex; align-items: center; gap: 3mm; }
.report-brand img { width: 25mm; height: auto; object-fit: contain; }
.report-brand > span { display: grid; }
.report-brand strong { color: #17211a; font: 700 11pt 'Space Grotesk'; letter-spacing: .08em; }
.report-institution { display: grid; gap: .4mm; color: #607066; font-size: 6.4pt; line-height: 1.3; text-align: right; }
.report-institution span { overflow-wrap: anywhere; }
.report-page__footer { min-height: 8mm; margin-top: auto; padding-top: 3mm; color: #758179; border-top: .2mm solid #ccd5ce; font-size: 6.5pt; text-align: center; }
.report-page__footer-block { display: grid; gap: .4mm; text-align: center; }
.report-page__footer-block strong { color: #17211a; font-size: 7pt; letter-spacing: .06em; }
.report-page__issued { text-align: center; }
.report-cover { background: radial-gradient(circle at 80% 18%, rgba(99,197,43,.13), transparent 36%), #fff; }
.report-cover__logo { width: 56mm; height: auto; margin: 0 auto 14mm; display: block; object-fit: contain; }
.analytics-report-logo { display: block; width: 25mm; height: auto; object-fit: contain; }
.analytics-report-header .analytics-report-logo { margin-bottom: 2mm; }
.report-cover__content { margin: auto 0; padding: 15mm 0 12mm; border-bottom: .3mm solid #bfcabf; text-align: center; }
.report-cover__content > p, .report-section-heading > p { margin: 0 0 2mm; color: #419a19; font-size: 7pt; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.report-cover__content h1 { max-width: 150mm; margin: 0 auto 4mm; color: #111a13; font-size: 31pt; line-height: 1.03; }
.report-cover__content > strong { display: block; max-width: 125mm; margin: 0 auto; color: #607066; font-size: 12pt; font-weight: 500; }
.report-section-heading { margin: 9mm 0 7mm; padding-bottom: 4mm; border-bottom: .5mm solid #17211a; }
.report-section-heading--spaced { margin-top: 10mm; }
.report-section-heading h1, .report-section-heading h2 { margin: 0; color: #17211a; font-size: 19pt; }
.report-section-heading span { margin-top: 2mm; display: block; color: #607066; font-size: 8pt; }
.report-progress { margin-bottom: 7mm; padding: 6mm; display: flex; align-items: center; justify-content: space-between; gap: 8mm; color: white; background: #17211a; border-left: 3mm solid #63c52b; }
.report-progress > div { display: grid; }
.report-progress strong { color: #77da42; font: 700 28pt 'Space Grotesk'; line-height: 1; }
.report-progress span { margin-top: 1mm; color: #bac7bd; font-size: 7pt; }
.report-progress p { margin: 0; color: #dce5de; font-size: 9pt; text-align: right; }
.report-progress p b { display: block; color: white; font: 700 15pt 'Space Grotesk'; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #d3dcd5; border: .3mm solid #bdc9bf; print-color-adjust: exact; }
.report-metrics > div { min-height: 25mm; padding: 4mm; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; text-align: center; }
.report-metrics--trio { grid-template-columns: repeat(3, 1fr); }
.report-metrics span { color: #607066; font-size: 6.5pt; font-weight: 700; text-transform: uppercase; }
.report-metrics strong { margin-top: 1mm; color: #17211a; font: 700 15pt 'Space Grotesk'; }
.report-metrics small { margin-top: .5mm; color: #758179; font-size: 6.5pt; }
.report-metrics--compact { grid-template-columns: repeat(4, 1fr); }
.report-detail-grid { margin-top: 7mm; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5mm; }
.report-detail-grid--two { grid-template-columns: repeat(2, 1fr); }
.report-detail-grid > section { padding: 4mm 5mm; background: #f7faf7; border: .3mm solid #c6d3c8; }
.report-detail-grid h3 { margin: 0 0 1.5mm; padding-bottom: 1.8mm; border-bottom: .4mm solid #419a19; color: #17211a; font: 700 9pt 'Space Grotesk'; letter-spacing: .05em; text-transform: uppercase; }
.report-detail-grid dl { margin: 0; display: grid; }
.report-detail-grid dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 3mm; padding: 1.5mm 0; border-bottom: .2mm solid #dde7de; }
.report-detail-grid dl > div:last-child { border-bottom: 0; }
.report-detail-grid dt { color: #607066; font-size: 7.2pt; }
.report-detail-grid dd { margin: 0; color: #17211a; font: 700 9pt 'Space Grotesk'; }
.report-table { width: 100%; color: #243128; border-collapse: collapse; table-layout: fixed; font-size: 7.4pt; }
.report-table thead { display: table-header-group; }
.report-table th, .report-table td { padding: 2.7mm 2mm; overflow-wrap: anywhere; border: .2mm solid #cbd5cd; text-align: center; vertical-align: middle; }
.report-table th { color: white; background: #26382b; font-size: 6.4pt; letter-spacing: .04em; text-transform: uppercase; }
.report-table tbody tr:nth-child(even) { background: #f2f6f2; }
.report-table tbody tr:hover { background: inherit; }
.report-table tfoot th, .report-table tfoot td { color: #17211a; background: #dcead9; font-weight: 700; }
.report-table td small { margin-top: 1mm; display: block; color: #69756d; }
.report-table--medium { font-size: 8pt; }
.report-table--medium th, .report-table--medium td { padding: 3.4mm 2.3mm; }
.report-table--sparse { font-size: 8.4pt; }
.report-table--sparse th, .report-table--sparse td { height: 12mm; padding: 4.2mm 2.5mm; }
.report-table--production th:first-child, .report-table--production td:first-child { width: 10mm; text-align: center; }
.report-note, .report-formula, .report-declaration { margin-top: 8mm; padding: 4mm 5mm; color: #35463a; background: #f0f6ef; border-left: 1.3mm solid #419a19; font-size: 8pt; }
.report-note strong, .report-formula strong { color: #17211a; }
.report-note p, .report-formula p, .report-declaration p { margin: 1mm 0 0; line-height: 1.5; }
.report-signatures { margin-top: auto; padding: 18mm 5mm 8mm; display: flex; justify-content: space-around; gap: 20mm; }
.report-signatures > div { width: 68mm; text-align: center; }
.report-signatures span { display: block; border-top: .3mm solid #17211a; }
.report-signatures strong { padding-top: 2mm; display: block; color: #35463a; font-size: 7.5pt; }
.report-status { padding: 1mm 2mm; display: inline-block; color: #8a4a1b; background: #f8e7d8; border-radius: 4mm; font-size: 6pt; font-weight: 700; text-transform: uppercase; }
.report-status--done { color: #27621b; background: #def0d8; }
.report-status--partial { color: #8a6d1b; background: #f8efd8; }
.report-check-table { font-size: 8.8pt; }
.report-check-table th, .report-check-table td { padding: 3.5mm 2.5mm; }
.report-check-table th:nth-child(1), .report-check-table td:nth-child(1) { width: 34%; }
.report-check-table th:nth-child(2), .report-check-table td:nth-child(2) { width: 14%; }
.report-check-table th:nth-child(3), .report-check-table td:nth-child(3) { width: 15%; }
.report-check-table th:nth-child(4), .report-check-table td:nth-child(4), .report-check-table th:nth-child(5), .report-check-table td:nth-child(5) { width: 9%; text-align: center; }
.report-check-table th:nth-child(6), .report-check-table td:nth-child(6) { width: 19%; }
.report-check-table th { font-size: 7.2pt; }
.report-check-table td { height: 15mm; }
.report-check-table--medium td { height: 22mm; }
.report-check-table--sparse td { height: 30mm; }
.report-check { display: grid; justify-items: center; gap: 3mm; white-space: nowrap; font-size: 10pt; font-weight: 700; }
.report-check-option { display: flex; align-items: center; justify-content: center; gap: 2mm; }
.report-check-box { width: 7mm; height: 7mm; flex: 0 0 7mm; display: block; box-sizing: border-box; border: .6mm solid #17211a; background: white; }
.report-empty { margin: auto; text-align: center; }
.report-empty strong { color: #17211a; font: 700 18pt 'Space Grotesk'; }
.report-empty p { color: #607066; }
.report-declaration { margin-top: 12mm; padding: 7mm; background: white; border: .3mm solid #b8c5ba; }
.report-declaration h2 { margin-bottom: 3mm; color: #17211a; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: white; }
  .site-header, .no-print, .breadcrumb { display: none !important; }
  .page-shell { width: 100%; padding: 0; }
  .delivery-report { gap: 0; }
  .delivery-box { min-height: 260mm; padding: 18mm 12mm 12mm; border: 0; box-shadow: none; page-break-after: always; }
  .delivery-box:last-child { page-break-after: auto; }
  .delivery-box h2 { print-color-adjust: exact; }
  .delivery-box th, .delivery-box td { padding: 8px 6px; font-size: 9pt; }
  .report-document { display: block; }
  .report-page { width: 210mm; min-height: 297mm; margin: 0; padding: 17mm 15mm 16mm; overflow: hidden; box-shadow: none; break-after: page; page-break-after: always; }
  .report-page:last-child { break-after: auto; page-break-after: auto; }
  .report-table tr, .report-note, .report-formula, .report-signatures, .report-detail-grid > section { break-inside: avoid; page-break-inside: avoid; }
}

@media screen and (max-width: 850px) {
  .page-shell { width: min(94vw, 700px); padding-top: 28px; }
  .dashboard-hero { padding: 30px; }
  .dashboard-hero__brand { width: 210px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .generation-summary__metrics { grid-template-columns: repeat(2, 1fr); }
  .generation-content-grid { grid-template-columns: 1fr; }
  .generation-materials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-overview__grid { grid-template-columns: 1fr; }
  .progress-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .content-grid, .mapping-layout, .model-layout, .field-editor__layout { grid-template-columns: 1fr; }
  .pdf-preview-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .pdf-preview-dialog__header, .pdf-preview-dialog__body { padding-left: 18px; padding-right: 18px; }
  .pdf-preview-dialog__body { grid-template-columns: 1fr; }
  .pdf-preview-group__grid { grid-template-columns: 1fr; }
  .model-layout .form-panel { position: static; }
  .mapping-form { position: static; grid-row: auto; }
  .validation-panel { grid-column: 1; }
  .import-conflict-actions { flex-direction: column; }
  .import-conflict-actions .btn { width: 100%; min-height: 48px; }
  .filters { grid-template-columns: 1fr; }
  .table-wrap { border: 1px solid var(--line); border-radius: 10px; }
  .report-toolbar { align-items: flex-start; flex-direction: column; }
  .report-editor__form { grid-template-columns: 1fr; }
  .report-editor__wide { grid-column: 1; }
  .report-page { min-height: auto; padding: 8vw 6vw; }
  .report-metrics, .report-metrics--compact { grid-template-columns: repeat(2, 1fr); }
  .report-table { font-size: 6.5pt; }
  .tracking-metrics { grid-template-columns: 1fr; }
  .portal-class-list { grid-template-columns: 1fr; }
}

@media screen and (max-width: 560px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .site-header { min-height: 70px; padding: 0 4vw; }
  .brand__logo { width: 56px; height: 44px; }
  .brand strong { font-size: .88rem; }
  .brand small, .header-status { display: none; }
  .header-tools { gap: 4px; }
  .admin-link { min-height: 44px; padding: 10px 6px; display: inline-flex; align-items: center; font-size: .74rem; }
  .header-action { min-height: 44px; }
  .page-shell { width: 92vw; padding-top: 24px; }
  .portal-school .page-shell { width: 92vw; padding-top: 26px; }
  .portal-header__mark { width: 32px; height: 32px; }
  .portal-hero, .portal-lote-hero { margin-bottom: 25px; padding: 25px 21px; align-items: flex-start; flex-direction: column; gap: 18px; }
  .portal-hero h1, .portal-lote-hero h1 { font-size: 2.2rem; }
  .portal-hero__guide { width: 100%; min-width: 0; box-sizing: border-box; }
  .portal-section__heading { align-items: flex-start; flex-direction: column; }
  .portal-lot-grid { grid-template-columns: 1fr; }
  .portal-lot-card { min-height: 180px; }
  .portal-class-card__header { padding: 18px; }
  .portal-material-group { padding: 18px; }
  .dashboard-hero { min-height: 280px; padding: 27px 24px; align-items: flex-start; }
  .dashboard-hero__brand { position: absolute; right: 18px; bottom: 18px; width: 180px; padding: 7px; }
  .dashboard-hero__brand img { height: 82px; }
  .dashboard-hero__brand span { font-size: .55rem; }
  .dashboard-hero h1 { font-size: 2.6rem; }
  .summary-strip { grid-template-columns: 1fr; }
  .generation-summary__metrics { grid-template-columns: 1fr; }
  .generation-detail__actions, .generation-detail__actions form, .generation-detail__actions .btn { width: 100%; }
  .generation-materials { grid-template-columns: 1fr; }
  .generation-region__header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .generation-region__header p { white-space: normal; }
  .generation-school summary { min-height: 68px; padding-inline: 14px; }
  .generation-school__count { display: none; }
  .generation-school ul { padding-left: 18px; }
  .production-overview { padding: 18px 14px; }
  .progress-card { min-height: 285px; padding: 22px; }
  .progress-card__main { align-items: flex-start; flex-direction: column; gap: 16px; }
  .progress-ring { width: 98px; height: 98px; flex-basis: 98px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(2n), .metric:nth-last-child(-n+2) { min-height: 105px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .production-facts { justify-content: flex-start; flex-wrap: wrap; gap: 10px 18px; }
  .summary-strip div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .summary-strip div:last-child { border-bottom: 0; }
  .panel, .form-panel { padding: 20px 16px; }
  .panel__header { align-items: flex-start; flex-direction: column; }
  .panel__header .button { width: 100%; }
  .lote-grid { grid-template-columns: 1fr; }
  .lote-card { min-height: 215px; }
  .breadcrumb { align-items: center; overflow-x: auto; white-space: nowrap; }
  .breadcrumb a { min-height: 40px; display: inline-flex; align-items: center; }
  .lot-nav { margin-right: -4vw; padding-right: 18px; border-right: 0; border-radius: 10px 0 0 10px; scroll-padding-inline: 5px 22px; scroll-snap-type: inline proximity; }
  .lot-nav a { min-height: 44px; display: inline-flex; align-items: center; scroll-snap-align: start; }
  .table-wrap { margin-right: -16px; padding-right: 16px; border-right: 0; border-radius: 10px 0 0 10px; }
  .table-wrap::before { content: 'Deslize para ver todas as colunas →'; min-height: 34px; padding: 8px 10px; position: sticky; left: 0; display: block; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: .68rem; font-weight: 700; letter-spacing: .03em; }
  .table-wrap table { min-width: 620px; }
  .table-wrap--cards { margin-right: 0; padding-right: 0; overflow: visible; border: 0; border-radius: 0; }
  .table-wrap--cards::before { content: none; }
  .table-wrap--cards table, .table-wrap--cards tbody, .table-wrap--cards tr, .table-wrap--cards td { display: block; }
  .table-wrap--cards table { min-width: 0; }
  .table-wrap--cards thead { position: absolute; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .table-wrap--cards thead tr, .table-wrap--cards thead th { width: 1px; max-width: 1px; height: 1px; padding: 0; overflow: hidden; border: 0; }
  .table-wrap--cards tbody { display: grid; gap: 12px; }
  .table-wrap--cards tr { padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
  .table-wrap--cards td { min-height: 34px; padding: 7px 0 7px 118px; position: relative; border: 0; overflow-wrap: anywhere; }
  .table-wrap--cards td::before { content: attr(data-label); width: 104px; position: absolute; left: 0; color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .table-wrap--cards td[data-label=''] { min-height: 0; padding-left: 0; }
  .table-wrap--cards td[data-label='']::before { content: none; }
  .table-wrap--cards td:last-child .button { width: 100%; margin-top: 4px; }
  .table-wrap--cards .cell-contact,
  .table-wrap--cards td[data-label='E-mail'] { padding-top: 26px; padding-left: 0; }
  .table-wrap--cards .cell-contact::before,
  .table-wrap--cards td[data-label='E-mail']::before { width: auto; top: 5px; }
  .table-wrap--cards td[data-label='Portal'] code { display: none; }
  .table-wrap--cards td[data-label='Portal'] .cell-stack small { font-size: .82rem; }
  .conference-panel .table-wrap--cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .conference-panel .table-wrap--cards td { min-height: 40px; padding: 20px 0 0; }
  .conference-panel .table-wrap--cards td::before { top: 0; }
  .conference-panel .table-wrap--cards td[data-label='Status'],
  .conference-panel .table-wrap--cards td[data-label='Escola'] { grid-column: 1 / -1; }
  .conference-panel .table-wrap--cards td[data-label='INEP'],
  .conference-panel .table-wrap--cards td[data-label='Salas'] { display: none; }
  .table-wrap--cards .portal-link { min-width: 0; grid-template-columns: 1fr auto; }
  .panel--cadernos .table-wrap { overflow: visible; }
  .panel--cadernos .table-wrap::before { content: none; }
  .panel--cadernos table, .panel--cadernos thead, .panel--cadernos tbody, .panel--cadernos tr, .panel--cadernos td { display: block; }
  .panel--cadernos table { min-width: 0; }
  .panel--cadernos thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .panel--cadernos tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .panel--cadernos td { padding: 5px 0 5px 105px; position: relative; border: 0; min-height: 30px; overflow-wrap: anywhere; }
  .panel--cadernos td::before { position: absolute; left: 0; color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
  .panel--cadernos td:nth-child(1)::before { content: 'Ordem'; }
  .panel--cadernos td:nth-child(2)::before { content: 'Caderno'; }
  .panel--cadernos td:nth-child(3)::before { content: 'Páginas/cópia'; }
  .panel--cadernos td:nth-child(4)::before { content: 'Cópias'; }
  .panel--cadernos td:nth-child(5)::before { content: 'Páginas'; }
  .panel--cadernos td.actions { padding-left: 0; text-align: left; }
  .panel--cadernos td.actions::before { content: none; }
  .table-actions { justify-content: flex-start; }
  .heading-actions { display: grid; grid-template-columns: 1fr; }
  .heading-actions .button { width: 100%; }
  .actions-row { display: grid; grid-template-columns: 1fr; }
  .actions-row .button { width: 100%; min-height: 44px; }
  .field-editor__actions { align-items: stretch; flex-direction: column; }
  .field-editor__actions .field-editor__hint { margin: 0; }
  .field-editor__actions .button { width: 100%; min-height: 44px; }
  .portal-link { min-width: 300px; grid-template-columns: minmax(180px, 1fr) auto; }
  .portal-link a { grid-column: 1 / -1; min-height: 40px; display: inline-flex; align-items: center; }
  .check-control { min-height: 44px; }
  .check-control input, input[type='checkbox'] { min-width: 20px; min-height: 20px; }
  .history-list li { align-items: flex-start; flex-direction: column; }
  .login-shell { min-height: auto; padding: 16px 0 40px; }
  .login-card { padding: 26px 20px; }
}
/* Etiquetas */
.label-panel { margin-bottom: 1.25rem; }
.label-panel .panel__header p { margin: .25rem 0 0; color: var(--muted); }
.label-items { display: grid; gap: .75rem; margin: 0 0 1rem; }
.label-item { display: grid; grid-template-columns: 32px minmax(220px, 2fr) minmax(150px, 1fr) 90px 100px; gap: .75rem; align-items: end; padding: .85rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease; }
.label-item:hover { background: var(--surface-raised); border-color: #465248; }
.label-item:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px rgba(65, 154, 25, .12); }
.label-item label { display: grid; gap: .3rem; color: var(--muted); font-size: .82rem; font-weight: 600; }
.label-item input[type='text'], .label-item input[type='number'] { width: 100%; box-sizing: border-box; color: var(--ink); }
.label-item .label-capacity-field { grid-column: 2 / -1; grid-row: 2; min-width: 0; font-size: .9rem; }
.label-capacity-field input { min-height: 44px; max-width: 320px; }
#form-configuracao .label-capacity-field { font-size: .9rem; }
#form-configuracao .label-capacity-field input { min-height: 44px; font-size: 1rem; }
.drag-handle { align-self: center; color: var(--muted); font-size: 1.35rem; text-align: center; cursor: grab; }
.drag-handle:active { color: var(--green-bright); cursor: grabbing; }
.label-item.dragging { opacity: .45; border-color: var(--green); }
.delete-field { align-self: center !important; display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; color: var(--muted) !important; }
.selection-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.selection-tools .btn, .label-region-filter .btn, .label-region-filter .form-select { min-height: 44px; }
.label-region-filter .form-select { font-size: 1rem; }
.label-region-filter .form-label { font-size: .875rem; }
.label-panel .label-pdf-submit { min-height: 48px; font-size: 1rem; }
.label-records { display: grid; gap: .4rem; max-height: 360px; margin-bottom: 1rem; padding: .5rem; overflow: auto; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.label-panel .label-records > label { display: flex; gap: .7rem; align-items: center; min-height: 44px; padding: .65rem .7rem; background: #0d110e; border: 1px solid transparent; border-radius: 7px; cursor: pointer; transition: background 150ms ease, border-color 150ms ease; }
.label-records > label:hover { background: var(--surface-raised); border-color: #3a5635; }
.label-records > label:has(input:checked) { background: rgba(65, 154, 25, .1); border-color: var(--green); }
.label-records span { display: grid; min-width: 0; overflow-wrap: anywhere; }
.label-records strong { color: var(--ink); }
.label-records small { color: var(--muted); }
.label-panel .label-records strong { font-size: 1rem; line-height: 1.35; }
.label-panel .label-records small { font-size: .875rem; line-height: 1.4; }
.format-options { display: flex; gap: 1.25rem; margin: 0 0 1rem; padding: 0; color: var(--ink); border: 0; }
.format-options legend { margin-bottom: .5rem; font-weight: 700; }
.format-options label { color: var(--ink); cursor: pointer; }
.label-panel .format-options { display: flex; flex-wrap: wrap; gap: .75rem; }
.label-panel .format-options legend { float: none; width: 100%; font-size: 1rem; }
.label-panel .format-options label { display: flex; align-items: center; gap: .5rem; min-height: 44px; font-size: 1rem; }
.form-errors { margin-bottom: 1rem; padding: 11px 13px; color: #ffaaa5; background: #311918; border: 1px solid #7a3733; border-radius: 9px; }
.label-panel .errorlist { color: #ffaaa5; }
@media(max-width:760px){.label-item{grid-template-columns:28px 1fr}.label-item label{grid-column:2}.format-options{display:grid;gap:.5rem}}
@media(max-width:760px){.label-item .label-capacity-field{grid-row:auto}.label-capacity-field input{max-width:none}.conference-panel .table-wrap--cards td[data-label='Situação']{grid-column:1 / -1}.conference-panel .table-wrap--cards td{font-size:.95rem}.conference-panel .check-control{font-size:.95rem}}


/* Opções opcionais de preparação para impressão. */
.print-options { min-width: 0; margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.print-options > legend { float: none; width: auto; margin: 0; padding: 0 6px; color: var(--ink); font-size: .95rem; font-weight: 700; }
.print-options > legend span { margin-left: 8px; color: var(--muted); font-size: .75rem; font-weight: 500; }
.print-options__intro { margin: 0 0 14px; color: var(--muted); font-size: .85rem; }
.print-options__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.generation-form .print-option { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); cursor: pointer; transition: border-color 150ms, background 150ms; }
.generation-form .print-option input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; min-height: 20px; flex: 0 0 20px; margin: 1px 0 0; padding: 0; accent-color: var(--green-bright); }
.print-option > span { display: grid; gap: 7px; min-width: 0; }
.print-option strong { font-size: .86rem; line-height: 1.45; }
.print-option small { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.5; }
.print-option:hover, .print-option:focus-within { border-color: var(--green); }
.print-option:has(input:checked) { border-color: var(--green); background: rgba(65,154,25,.1); }
.print-option input:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 3px; }
.print-options__note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
@media (max-width: 760px) {
  .print-options__grid { grid-template-columns: 1fr; }
  .print-options { padding: 14px; }
}

@media (min-width: 761px) { .print-options__grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
