
/* AGV+ v1.18.0 — UI operacional modular e responsiva */
html { overflow-x: hidden; }
body { overflow-x: hidden; }
button, summary, select, input { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid rgba(201,255,56,.28);
  outline-offset: 2px;
}

.desktop-tabs-five .tab-button { flex: 1 1 0; justify-content: center; }
.desktop-tabs-five .tab-button span { margin-left: 6px; }

/* Registro: a confirmação visual é a informação principal. */
.identified-card { contain: layout style; }
.identity-confirmation-heading { margin-top: 14px; }
.student-check-card {
  display: grid !important;
  grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
  align-items: stretch !important;
  gap: 18px !important;
  padding: 14px !important;
  border-color: rgba(201,255,56,.26) !important;
  background: linear-gradient(145deg, rgba(201,255,56,.055), rgba(8,8,8,.96) 38%) !important;
}
.student-check-card .identified-photo-shell {
  width: 100% !important;
  height: auto !important;
  min-height: 240px;
  aspect-ratio: 4 / 5;
  border-radius: 16px !important;
  border: 1px solid rgba(201,255,56,.35) !important;
  background: #050505;
}
.student-check-card .student-photo { object-fit: cover; object-position: 50% 18%; }
.student-check-card .student-avatar-large { width: 100%; height: 100%; border-radius: 0; font-size: 2rem; }
.student-core-data { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.identity-label { color: var(--success); font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.student-core-data h2 { margin-top: 8px !important; font-size: clamp(1.7rem, 4vw, 2.55rem) !important; line-height: .98; letter-spacing: -.055em !important; overflow-wrap: anywhere; }
.student-class-primary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 13px 0 0 !important; }
.student-class-primary strong { color: var(--text); font-size: 1rem; }
.student-class-primary span { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; color: var(--action-text); background: var(--action); border-radius: 999px; font-size: .62rem; font-weight: 900; }
.compact-student-meta { display: grid !important; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px !important; margin-top: 18px; }
.compact-student-meta span { min-width: 0; padding: 10px 11px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; }
.compact-student-meta strong { display: block; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .76rem; }
.photo-zoom-hint { min-height: 30px; padding: 0 10px; font-size: .61rem; }

.guardian-disclosure { margin-top: 10px; background: rgba(8,8,8,.88); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.guardian-disclosure > summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; cursor: pointer; list-style: none; }
.guardian-disclosure > summary::-webkit-details-marker { display: none; }
.guardian-disclosure > summary span { min-width: 0; }
.guardian-disclosure > summary strong, .guardian-disclosure > summary small { display: block; }
.guardian-disclosure > summary strong { font-size: .78rem; }
.guardian-disclosure > summary small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.guardian-disclosure > summary i { width: 10px; height: 10px; flex: 0 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.guardian-disclosure[open] > summary i { transform: rotate(225deg) translate(-2px,-2px); }
.guardian-disclosure .guardian-confirmation-card { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #070707; }
.reason-block { margin-top: 12px !important; }
.reason-select-label > span { font-size: .69rem; }
.reason-select-label select { min-height: 58px; font-size: .92rem; font-weight: 800; }

/* Histórico independente do dashboard. */
.history-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.history-summary-chip { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; color: var(--action-text); background: var(--action); border-radius: 999px; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.history-filter-card { display: grid; grid-template-columns: minmax(160px,.75fr) minmax(160px,.75fr) minmax(190px,auto); align-items: end; gap: 10px; padding: 14px; background: rgba(10,10,10,.96); border: 1px solid var(--line); border-radius: var(--radius); }
.history-filter-card label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .6rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.history-filter-card select, .history-clear-button { min-height: 48px; }
.history-clear-button { padding: 0 14px; }
.history-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 18px 2px 10px; }
.history-list-heading span { color: var(--muted); font-size: .61rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.history-list-heading h3 { margin: 4px 0 0; font-size: 1.08rem; }
.records-list-cards { display: grid; gap: 8px; overflow: visible; background: transparent; border: 0; }
.records-list-cards .record-row { grid-template-columns: 76px minmax(0,1fr) minmax(240px,.72fr); background: rgba(12,12,12,.95); border: 1px solid var(--line); border-radius: 13px; }
.records-list-cards .record-row:last-child { border-bottom: 1px solid var(--line); }

/* Dashboard independente: mais espaço para leitura e gráficos. */
#dashboardView .dashboard-title-row { margin-top: 8px; }
#dashboardView .dashboard-kpis { margin-top: 4px; }
#dashboardView .dashboard-chart-card { min-width: 0; }
#dashboardView .chart-stage { width: 100%; min-width: 0; }
#dashboardView canvas { max-width: 100% !important; }

.nav-dashboard::before { content: ""; position: absolute; inset: 2px; border: 1.7px solid currentColor; border-radius: 4px; }
.nav-dashboard::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: 5px; height: 7px; background: linear-gradient(90deg,currentColor 0 22%,transparent 22% 39%,currentColor 39% 62%,transparent 62% 78%,currentColor 78%); opacity: .9; }

@media (max-width: 900px) {
  .student-check-card { grid-template-columns: 170px minmax(0,1fr); }
  .student-check-card .identified-photo-shell { min-height: 215px; }
  .history-filter-card { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-clear-button { grid-column: span 2; width: 100%; }
  .records-list-cards .record-row { grid-template-columns: 70px minmax(0,1fr); }
  .records-list-cards .record-side { grid-column: 2; text-align: left; }
  .records-list-cards .record-status-line { justify-content: flex-start; }
}

@media (max-width: 780px) {
  body { min-height: 100dvh; }
  .pedagogue-app { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .app-content { padding: 8px 8px calc(34px + env(safe-area-inset-bottom)); }
  .mobile-nav-five { grid-template-columns: repeat(5,minmax(0,1fr)) !important; }
  .mobile-nav-five .mobile-nav-button { min-height: 58px; padding-inline: 2px; }
  .mobile-nav-five .mobile-nav-button span { font-size: .52rem; letter-spacing: -.01em; }
  .mobile-nav-five .mobile-nav-button b { right: calc(50% - 24px); }
  .student-identified .identified-card { padding-bottom: 102px; }
  .identity-confirmation-heading { margin-top: 8px; }
  .identity-confirmation-heading small { display: none; }
  .student-check-card { grid-template-columns: 1fr; gap: 12px !important; padding: 10px !important; }
  .student-check-card .identified-photo-shell { width: min(100%, 360px) !important; min-height: 0; max-height: 54dvh; margin-inline: auto; aspect-ratio: 4 / 5; }
  .student-core-data { justify-content: flex-start; text-align: center; }
  .identity-label { margin-top: 2px; }
  .student-core-data h2 { margin-top: 7px !important; font-size: clamp(1.75rem,8vw,2.35rem) !important; }
  .student-class-primary { justify-content: center; margin-top: 10px !important; }
  .compact-student-meta { margin-top: 12px; text-align: left; }
  .register-action { left: 8px; right: 8px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .history-filter-card { position: relative; grid-template-columns: 1fr 1fr; padding: 10px; }
  .history-clear-button { grid-column: span 2; }
  .records-list-cards .record-row { grid-template-columns: 62px minmax(0,1fr); gap: 10px; padding: 12px; }
  .records-list-cards .record-side { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
  .records-list-cards .record-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .records-list-cards .record-actions button { width: 100%; min-height: 42px; }
  #dashboardView .dashboard-title-row { align-items: stretch; flex-direction: column; }
  #dashboardView .dashboard-period { width: 100%; }
  #dashboardView .dashboard-period select { width: 100%; }
}

@media (max-width: 480px) {
  input, select, textarea { font-size: 16px; }
  .app-header { padding-inline: 10px; }
  .header-meta { gap: 8px; }
  .header-meta > div span { max-width: 88px; }
  .header-meta .ghost-button { min-height: 38px; padding-inline: 10px; }
  .student-check-card .identified-photo-shell { width: 100% !important; max-height: 50dvh; }
  .compact-student-meta { grid-template-columns: 1fr 1fr !important; }
  .compact-student-meta span { min-height: 52px; padding: 9px; }
  .guardian-disclosure > summary { min-height: 58px; }
  .history-title-row { align-items: flex-start; flex-direction: column; }
  .history-summary-chip { width: 100%; justify-content: center; }
  .history-filter-card { grid-template-columns: 1fr; }
  .history-clear-button { grid-column: auto; }
  .history-list-heading { align-items: flex-start; flex-direction: column; }
  .records-list-cards .record-row { grid-template-columns: 54px minmax(0,1fr); }
  .records-list-cards .record-main strong { font-size: .88rem; }
  .records-list-cards .record-main span { line-height: 1.45; }
  .records-list-cards .record-actions { grid-template-columns: 1fr; }
  .mobile-nav-five { left: 4px; right: 4px; gap: 1px; padding: 4px; }
  .mobile-nav-five .mobile-nav-button { min-height: 56px; border-radius: 10px; }
  .mobile-nav-five .mobile-nav-button span { font-size: .49rem; }
  .mobile-nav-five .mobile-nav-button i { width: 16px; height: 16px; }
}

@media (max-width: 360px) {
  .wordmark.compact small { display: none; }
  .mobile-nav-five .mobile-nav-button span { font-size: .46rem; }
  .compact-student-meta { grid-template-columns: 1fr !important; }
  .student-core-data h2 { font-size: 1.62rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .guardian-disclosure > summary i { transition: none; }
}


/* v1.20.0 — fotos WebP sob demanda */
.student-photo-badge:not(.has-photo) {
  min-width: 6.8rem;
  text-align: center;
}
.student-photo[fetchpriority="high"] {
  content-visibility: auto;
}
.photo-management-card code {
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .photo-management-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .photo-management-actions .large {
    width: 100%;
    min-height: 48px;
  }
}


/* AGV+ v1.20.0 — dashboard customizável e histórico de versões */
.version-chip-button { appearance: none; cursor: pointer; font: inherit; }
.version-chip-button:hover, .version-chip-button:focus-visible { border-color: rgba(201,255,56,.62); box-shadow: 0 0 0 3px rgba(201,255,56,.09); }
.dashboard-primary-controls { display: flex; align-items: flex-end; gap: 10px; }
.dashboard-customization-card {
  margin-bottom: 12px; padding: 15px; background: linear-gradient(135deg, rgba(14,17,18,.98), rgba(7,8,9,.98));
  border: 1px solid rgba(78,167,255,.2); border-radius: 16px;
}
.dashboard-customization-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-customization-heading span, .dashboard-customization-grid label > span, .chart-card-tools label > span {
  display: block; margin-bottom: 5px; color: var(--muted); font-size: .56rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase;
}
.dashboard-customization-heading h3 { margin: 3px 0 0; font-size: .96rem; }
.dashboard-customization-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.dashboard-customization-grid select { width: 100%; min-height: 44px; }
.dashboard-layout-description { margin: 10px 0 0; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.chart-card-tools { display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.chart-card-tools > strong { align-self: center; color: var(--muted); font-size: .65rem; white-space: nowrap; }
.chart-card-tools label { min-width: 142px; }
.chart-card-tools select { width: 100%; min-height: 36px; padding: 0 30px 0 10px; font-size: .66rem; border-radius: 9px; }
#dashboardView .dashboard-chart-card { transition: border-color .2s ease, transform .2s ease; }
#dashboardView .dashboard-chart-card:hover { border-color: rgba(78,167,255,.28); }

#dashboardView[data-dashboard-palette="institutional"] .dashboard-customization-card { border-color: rgba(86,204,242,.32); }
#dashboardView[data-dashboard-palette="institutional"] .dashboard-kpi.primary-kpi { color: #06131a; background: #56ccf2; }
#dashboardView[data-dashboard-palette="institutional"] .reason-progress i::after { background: #56ccf2; }
#dashboardView[data-dashboard-palette="contrast"] .dashboard-customization-card { border-color: rgba(255,230,0,.42); }
#dashboardView[data-dashboard-palette="contrast"] .dashboard-kpi.primary-kpi { color: #000; background: #ffe600; }
#dashboardView[data-dashboard-palette="contrast"] .reason-progress i::after { background: #ffe600; }

/* Executivo: visão equilibrada em duas colunas. */
#dashboardView[data-dashboard-layout="executive"] .dashboard-charts-expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="classes"],
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="trend"] { grid-column: span 2; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="classes"] { order: 1; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="courses"] { order: 2; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="communication"] { order: 3; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="trend"] { order: 4; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="hours"] { order: 5; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="reasons"] { order: 6; }

/* Operacional: mais painéis simultâneos para monitoramento. */
#dashboardView[data-dashboard-layout="operational"] .dashboard-kpis-expanded { grid-template-columns: repeat(4,minmax(0,1fr)); }
#dashboardView[data-dashboard-layout="operational"] .dashboard-charts-expanded { grid-template-columns: repeat(3,minmax(0,1fr)); }
#dashboardView[data-dashboard-layout="operational"] .dashboard-chart-wide { grid-column: auto; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="classes"] { grid-column: span 2; order: 1; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="hours"] { order: 2; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="communication"] { order: 3; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="courses"] { order: 4; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="reasons"] { order: 5; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="trend"] { grid-column: span 3; order: 6; }
#dashboardView[data-dashboard-layout="operational"] .chart-stage { min-height: 280px; }

/* Analítico: uma coluna e gráficos maiores. */
#dashboardView[data-dashboard-layout="analytical"] .dashboard-kpis-expanded { grid-template-columns: repeat(4,minmax(0,1fr)); }
#dashboardView[data-dashboard-layout="analytical"] .dashboard-charts-expanded { grid-template-columns: 1fr; }
#dashboardView[data-dashboard-layout="analytical"] .dashboard-chart-card,
#dashboardView[data-dashboard-layout="analytical"] .dashboard-chart-wide { grid-column: auto; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="trend"] { order: 1; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="classes"] { order: 2; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="courses"] { order: 3; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="hours"] { order: 4; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="reasons"] { order: 5; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="communication"] { order: 6; }
#dashboardView[data-dashboard-layout="analytical"] .chart-stage { min-height: 390px; }

.system-version-card { position: relative; }
.system-version-history-button { grid-column: 1 / -1; min-height: 44px; color: var(--action); background: rgba(201,255,56,.06); border: 1px solid rgba(201,255,56,.2); border-radius: 11px; font-weight: 900; cursor: pointer; }
.system-version-history-button:hover { background: rgba(201,255,56,.1); }
.version-history-modal-card { width: min(760px, calc(100vw - 24px)); max-height: min(86dvh, 820px); overflow: hidden; display: flex; flex-direction: column; }
.version-current-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.version-current-summary > div { padding: 12px; background: rgba(201,255,56,.06); border: 1px solid rgba(201,255,56,.18); border-radius: 11px; }
.version-current-summary span { display: block; color: var(--muted); font-size: .57rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.version-current-summary strong { display: block; margin-top: 5px; font-size: .82rem; }
.version-history-list { min-height: 0; overflow-y: auto; padding: 4px 4px 10px 0; overscroll-behavior: contain; }
.version-entry { position: relative; display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; padding-bottom: 12px; }
.version-entry::before { content: ''; position: absolute; left: 9px; top: 17px; bottom: -4px; width: 1px; background: rgba(255,255,255,.11); }
.version-entry:last-child::before { display: none; }
.version-entry-marker { position: relative; z-index: 1; width: 11px; height: 11px; margin: 7px 0 0 4px; background: #60625d; border: 3px solid #111; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.version-entry.current .version-entry-marker { background: var(--action); box-shadow: 0 0 0 1px var(--action), 0 0 18px rgba(201,255,56,.34); }
.version-entry-content { padding: 12px 13px; background: #090a0a; border: 1px solid var(--line); border-radius: 13px; }
.version-entry.current .version-entry-content { border-color: rgba(201,255,56,.28); background: linear-gradient(135deg, rgba(201,255,56,.07), rgba(9,10,10,.98)); }
.version-entry-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.version-entry-heading strong { display: block; color: var(--text); font-size: .79rem; }
.version-entry-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: .6rem; }
.version-entry-heading b { padding: 5px 8px; color: #bcd4ff; background: rgba(78,167,255,.09); border: 1px solid rgba(78,167,255,.2); border-radius: 99px; font-size: .52rem; text-transform: uppercase; }
.version-entry.current .version-entry-heading b { color: #0b0d05; background: var(--action); border-color: var(--action); }
.version-entry h4 { margin: 9px 0 0; font-size: .82rem; }
.version-entry ul { margin: 8px 0 0; padding-left: 17px; color: var(--muted); font-size: .66rem; line-height: 1.55; }

@media (max-width: 1100px) {
  #dashboardView[data-dashboard-layout="operational"] .dashboard-charts-expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="trend"] { grid-column: span 2; }
  #dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="classes"] { grid-column: span 2; }
}
@media (max-width: 780px) {
  .dashboard-customization-grid { grid-template-columns: 1fr; }
  .chart-card-heading { align-items: stretch; flex-direction: column; }
  .chart-card-tools { align-items: stretch; justify-content: flex-start; }
  .chart-card-tools label { min-width: min(100%, 220px); flex: 1; }
  #dashboardView[data-dashboard-layout] .dashboard-charts-expanded { grid-template-columns: 1fr; }
  #dashboardView[data-dashboard-layout] .dashboard-chart-card,
  #dashboardView[data-dashboard-layout] .dashboard-chart-wide,
  #dashboardView[data-dashboard-layout] [data-dashboard-card] { grid-column: auto; }
  #dashboardView[data-dashboard-layout="operational"] .dashboard-kpis-expanded,
  #dashboardView[data-dashboard-layout="analytical"] .dashboard-kpis-expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #dashboardView[data-dashboard-layout="analytical"] .chart-stage { min-height: 330px; }
}
@media (max-width: 520px) {
  .dashboard-customization-heading { align-items: stretch; flex-direction: column; }
  .dashboard-customization-heading .compact-action-button { width: 100%; min-height: 40px; }
  .dashboard-primary-controls, .dashboard-period { width: 100%; }
  .dashboard-period select { width: 100%; }
  .chart-card-tools { display: grid; grid-template-columns: 1fr; }
  .chart-card-tools > strong { justify-self: start; }
  .chart-card-tools label { width: 100%; max-width: none; }
  .version-current-summary { grid-template-columns: 1fr; }
  .version-history-modal-card { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); padding: 14px; }
  .version-entry-content { padding: 11px; }
}

@media (max-width: 780px) { .version-chip.version-chip-button { display: inline-flex !important; min-height: 22px; padding: 0 6px; font-size: .52rem; } }


/* AGV+ v1.21.1 — câmera validada, seleção de dispositivo e chamada sequencial */
.identification-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.school-parana-tab.active { background: linear-gradient(135deg, #0d76b8, #18a7d1); color: #fff; box-shadow: 0 8px 24px rgba(24,167,209,.18); }
.camera-mode-notice { min-height: 58px; display: flex; align-items: center; margin-bottom: 9px; padding: 9px 11px; color: var(--text); background: #080b0d; border: 1px solid #222d32; border-radius: 12px; }
.camera-mode-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.camera-mode-copy > div { min-width: 0; }
.camera-mode-copy strong, .camera-mode-copy small { display: block; }
.camera-mode-copy strong { font-size: .78rem; }
.camera-mode-copy small { margin-top: 3px; color: var(--muted); font-size: .64rem; line-height: 1.35; }
.camera-mode-icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; color: var(--action-text); background: var(--action); border-radius: 10px; font-size: .62rem; font-weight: 950; letter-spacing: .02em; }
.school-parana-icon { color: #fff; background: linear-gradient(145deg, #0d76b8, #18a7d1); }
.reader-placeholder small { display: block; margin-top: 7px; color: var(--muted); font-size: .62rem; font-weight: 700; }
.school-parana-link-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; background: rgba(10,17,20,.96); border: 1px solid #26373e; border-radius: 13px; }
.school-parana-link-form > label span, .school-parana-link-form > label small { display: block; }
.school-parana-link-form > label span { color: #e9f9ff; font-size: .7rem; font-weight: 900; }
.school-parana-link-form > label small { margin-top: 3px; color: #8fa8b2; font-size: .62rem; }
.school-parana-link-form input { min-width: 0; font-size: .79rem; letter-spacing: 0; }
.school-parana-verification-card { margin-top: 11px; padding: 13px; background: linear-gradient(145deg, rgba(13,118,184,.16), rgba(7,12,15,.97) 58%); border: 1px solid rgba(24,167,209,.38); border-radius: 14px; }
.school-parana-verification-heading { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.school-parana-seal { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #0d76b8, #18a7d1); border-radius: 12px; font-size: .7rem; font-weight: 950; }
.school-parana-verification-heading > div span, .school-parana-verification-heading > div strong { display: block; }
.school-parana-verification-heading > div span { color: #74d4f3; font-size: .58rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.school-parana-verification-heading > div strong { margin-top: 3px; font-size: .82rem; }
.school-parana-status { min-height: 28px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; font-size: .58rem; font-weight: 900; white-space: nowrap; }
.school-parana-status.local { color: #dff8ff; background: rgba(24,167,209,.16); border: 1px solid rgba(24,167,209,.33); }
.school-parana-status.opened { color: #fff0bb; background: rgba(255,190,54,.14); border: 1px solid rgba(255,190,54,.34); }
.school-parana-status.confirmed { color: #061007; background: var(--action); border: 1px solid var(--action); }
.school-parana-verification-card > p { margin: 11px 0 0; color: #c9d9df; font-size: .71rem; line-height: 1.5; }
.school-parana-verification-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.school-parana-verification-actions button { min-height: 46px; }
.school-parana-verification-actions button:disabled { opacity: .45; cursor: not-allowed; }
.school-parana-privacy-note { display: block; margin-top: 9px; color: #82959d; font-size: .59rem; line-height: 1.45; }
.school-parana-history-badge { display: inline-flex; width: fit-content; min-height: 24px; align-items: center; margin-top: 5px; padding: 0 8px; color: #dff8ff; background: rgba(24,167,209,.12); border: 1px solid rgba(24,167,209,.3); border-radius: 999px; font-size: .56rem; font-weight: 900; }

@media (max-width: 780px) {
  .identification-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identification-tab { min-height: 48px; font-size: .76rem; }
  .school-parana-link-form .manual-search-row { grid-template-columns: 1fr; }
  .school-parana-link-form .primary-button { width: 100%; }
}
@media (max-width: 480px) {
  .school-parana-verification-heading { grid-template-columns: 40px minmax(0,1fr); }
  .school-parana-status { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .school-parana-verification-actions { grid-template-columns: 1fr; }
  .school-parana-verification-actions button { min-height: 50px; }
  .camera-mode-notice { min-height: 64px; }
}


/* v1.21.1 — diagnóstico e escolha de câmera */
.camera-setup-panel {
  margin-bottom: 12px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(14,21,24,.98), rgba(7,10,12,.98));
  border: 1px solid #28363c;
  border-radius: 14px;
}
.camera-setup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.camera-setup-heading > div { min-width: 0; }
.camera-setup-heading strong,
.camera-setup-heading small { display: block; }
.camera-setup-heading strong { color: var(--text); font-size: .82rem; }
.camera-setup-heading small { margin-top: 4px; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.camera-access-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #3a4246;
  border-radius: 999px;
  color: var(--muted);
  background: #111619;
  font-size: .61rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.camera-access-badge.success { color: #dfff86; border-color: rgba(201,255,56,.35); background: rgba(201,255,56,.09); }
.camera-access-badge.warning { color: #ffd975; border-color: rgba(255,193,61,.36); background: rgba(255,193,61,.09); }
.camera-access-badge.danger { color: #ff9f9f; border-color: rgba(255,94,94,.4); background: rgba(255,94,94,.1); }
.camera-selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
}
.camera-selector-grid label { min-width: 0; }
.camera-selector-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.camera-selector-grid select { min-height: 46px; font-size: .82rem; }
.camera-control-button { min-height: 46px; padding-inline: 13px; white-space: nowrap; }
.camera-diagnostics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.camera-diagnostic {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #30383c;
  border-radius: 999px;
  color: var(--muted);
  background: #0d1113;
  font-size: .58rem;
  font-weight: 800;
}
.camera-diagnostic.success { color: #dfff86; border-color: rgba(201,255,56,.28); }
.camera-diagnostic.warning { color: #ffd975; border-color: rgba(255,193,61,.3); }
.camera-diagnostic.danger { color: #ff9f9f; border-color: rgba(255,94,94,.35); }

@media (max-width: 760px) {
  .camera-setup-panel { padding: 11px; }
  .camera-setup-heading { align-items: stretch; flex-direction: column; gap: 8px; }
  .camera-access-badge { align-self: flex-start; }
  .camera-selector-grid { grid-template-columns: 1fr 1fr; }
  .camera-selector-grid label { grid-column: 1 / -1; }
  .camera-control-button { width: 100%; min-height: 48px; }
  .camera-diagnostics { gap: 5px; }
  .camera-diagnostic { min-height: 27px; }
}

@media (max-width: 420px) {
  .camera-selector-grid { grid-template-columns: 1fr; }
  .camera-selector-grid label { grid-column: auto; }
  .camera-setup-heading small { font-size: .65rem; }
}


/* AGV+ v1.21.2 — leitura reforçada do ID Escola Paraná e comunicação direta */
.school-parana-scan-hint {
  display: grid;
  gap: .22rem;
  margin: .8rem 0 0;
  padding: .82rem .95rem;
  border: 1px solid rgba(39, 185, 255, .34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(39, 185, 255, .12), rgba(201, 255, 56, .07));
}
.school-parana-scan-hint strong { color: #f5fbff; font-size: .9rem; }
.school-parana-scan-hint span { color: var(--muted, #aeb5b8); font-size: .78rem; line-height: 1.4; }
.scanner-actions-extended { flex-wrap: wrap; }
.scanner-actions-extended > button { min-width: min(100%, 170px); flex: 1 1 170px; }
.communication-primary-action {
  display: grid;
  gap: .28rem;
  min-width: 190px;
}
.communication-primary-action > span {
  color: var(--muted, #aeb5b8);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.communication-whatsapp-button {
  min-height: 48px;
  padding-inline: 1rem;
  font-weight: 850;
}
@media (max-width: 720px) {
  .scanner-actions-extended { display: grid; grid-template-columns: 1fr; }
  .scanner-actions-extended > button { width: 100%; min-width: 0; }
  .communication-primary-action { width: 100%; min-width: 0; }
  .communication-primary-action .communication-whatsapp-button { width: 100%; }
  .communication-record-actions > .communication-copy-button,
  .communication-record-actions > .compact-action-button { min-height: 44px; }
}

/* AGV+ v1.22.1 — piloto pedagógico: câmera, QR congelado, preferências e processos */
.header-settings-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #dce6d2;
  background: #101410;
  border: 1px solid #30382d;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
}
.header-settings-button:hover,
.header-settings-button:focus-visible { border-color: rgba(201,255,56,.65); box-shadow: 0 0 0 3px rgba(201,255,56,.08); }

.camera-settings-drawer { margin-bottom: 12px; border: 1px solid #273238; border-radius: 14px; background: #090d0f; overflow: hidden; }
.camera-settings-drawer > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
}
.camera-settings-drawer > summary::-webkit-details-marker { display: none; }
.camera-settings-summary-copy { min-width: 0; }
.camera-settings-summary-copy strong,
.camera-settings-summary-copy small { display: block; }
.camera-settings-summary-copy strong { color: var(--text); font-size: .78rem; }
.camera-settings-summary-copy small { margin-top: 3px; color: var(--muted); font-size: .63rem; line-height: 1.35; overflow-wrap: anywhere; }
.camera-settings-summary-action { flex: 0 0 auto; min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; color: #dfff86; border: 1px solid rgba(201,255,56,.28); border-radius: 999px; font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.camera-settings-drawer[open] .camera-settings-summary-action { color: #0b1005; background: var(--action); border-color: var(--action); }
.camera-settings-drawer .camera-setup-panel { margin: 0; border: 0; border-top: 1px solid #273238; border-radius: 0; }
.camera-toggle-row,
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.camera-toggle-row > span,
.settings-toggle-row > span { min-width: 0; }
.camera-toggle-row strong,
.camera-toggle-row small,
.settings-toggle-row strong,
.settings-toggle-row small { display: block; }
.camera-toggle-row strong,
.settings-toggle-row strong { font-size: .73rem; }
.camera-toggle-row small,
.settings-toggle-row small { margin-top: 3px; color: var(--muted); font-size: .61rem; line-height: 1.4; }
.camera-toggle-row input,
.settings-toggle-row input { width: 44px; height: 24px; flex: 0 0 auto; accent-color: var(--action); }

body.camera-preview-mirrored #reader video { transform: scaleX(-1) !important; }
#reader video { transform-origin: center; }

.accent-button {
  min-height: 46px;
  padding: 0 16px;
  color: #061006;
  background: linear-gradient(135deg, #d9ff67, #9bea30);
  border: 1px solid #d9ff67;
  border-radius: 11px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.accent-button:disabled { opacity: .42; cursor: not-allowed; }

.frozen-qr-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(81,190,235,.38);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(8,19,24,.98), rgba(6,9,10,.98));
}
.frozen-qr-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.frozen-qr-heading span,
.frozen-qr-heading strong { display: block; }
.frozen-qr-heading span { color: #75d9ff; font-size: .58rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.frozen-qr-heading strong { margin-top: 3px; font-size: .86rem; }
.frozen-qr-preview { min-height: 210px; max-height: 56dvh; display: grid; place-items: center; overflow: hidden; border: 1px solid #263239; border-radius: 12px; background: #000; }
.frozen-qr-preview img { width: 100%; height: 100%; max-height: 56dvh; display: block; object-fit: contain; }
.frozen-qr-panel > p { margin: 0; color: #b7c8ce; font-size: .72rem; line-height: 1.45; }
.frozen-qr-actions { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.frozen-qr-actions button { min-height: 48px; }

.system-process-overlay {
  position: fixed;
  z-index: 4000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(39,58,24,.42), rgba(0,0,0,.94) 58%);
  backdrop-filter: blur(9px);
}
.system-process-card {
  width: min(430px, 100%);
  padding: 26px;
  color: #f5f7f1;
  background: linear-gradient(145deg, rgba(17,21,14,.98), rgba(5,6,5,.99));
  border: 1px solid rgba(201,255,56,.28);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.boot-mark { font-size: 2rem; font-weight: 950; letter-spacing: -.05em; }
.boot-mark span { color: var(--action); }
.system-process-card > strong { display: block; margin-top: 16px; font-size: 1.22rem; }
.system-process-card > p { min-height: 22px; margin: 8px 0 16px; color: #aeb9aa; font-size: .78rem; }
.system-process-card > span { color: var(--action); font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.system-process-card > small { display: block; margin-top: 8px; color: #879182; text-align: right; font-size: .66rem; }
.process-progress-track { height: 7px; overflow: hidden; background: #1c2218; border: 1px solid #2b3524; border-radius: 999px; }
.process-progress-track > i { width: 0; height: 100%; display: block; background: linear-gradient(90deg, #79d82d, #d4ff5a); border-radius: inherit; transition: width .25s ease; box-shadow: 0 0 16px rgba(201,255,56,.32); }

.system-settings-modal { width: min(680px, calc(100vw - 24px)); max-height: min(88dvh, 760px); overflow: auto; }
.settings-intro { margin: 0 0 14px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.photo-mode-options { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
.photo-mode-options legend { margin-bottom: 8px; color: #dbe6d3; font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.photo-mode-card { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid #2a3228; border-radius: 14px; background: #0c100b; cursor: pointer; }
.photo-mode-card:has(input:checked) { border-color: rgba(201,255,56,.56); background: rgba(201,255,56,.07); box-shadow: 0 0 0 3px rgba(201,255,56,.05); }
.photo-mode-card input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--action); }
.photo-mode-card strong,
.photo-mode-card small,
.photo-mode-card b { display: block; }
.photo-mode-card strong { font-size: .82rem; }
.photo-mode-card small { margin-top: 4px; color: var(--muted); font-size: .67rem; line-height: 1.45; }
.photo-mode-card b { width: fit-content; margin-top: 8px; padding: 4px 7px; color: #dfff86; background: rgba(201,255,56,.08); border-radius: 999px; font-size: .56rem; }
.settings-toggle-list { display: grid; gap: 8px; margin-top: 14px; }
.settings-toggle-row { margin-top: 0; }
.settings-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }

.reduce-system-motion *,
.reduce-system-motion *::before,
.reduce-system-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
.reduce-system-motion .reader-box::after { display: none; }

@media (max-width: 760px) {
  .header-settings-button { width: 40px; min-width: 40px; height: 40px; }
  .camera-settings-drawer > summary { min-height: 60px; }
  .camera-settings-summary-action { min-height: 32px; }
  .frozen-qr-actions { grid-template-columns: 1fr; }
  .frozen-qr-actions button { width: 100%; min-height: 50px; }
  .settings-modal-actions { grid-template-columns: 1fr; }
  .system-process-card { padding: 22px 18px; border-radius: 18px; }
}

@media (max-width: 480px) {
  .header-settings-button { order: 2; }
  .header-meta .ghost-button { order: 3; }
  .camera-settings-summary-copy small { max-width: 220px; }
  .camera-settings-summary-action { padding-inline: 8px; font-size: .55rem; }
  .frozen-qr-preview { min-height: 180px; }
  .system-settings-modal { width: calc(100vw - 12px); max-height: 94dvh; padding: 16px; }
  .photo-mode-card { padding: 11px; }
}


/* v1.22.1 — indicação discreta da orientação da webcam */
.reader-box { position: relative; }
.camera-preview-mode-badge {
  position: absolute;
  z-index: 5;
  top: .65rem;
  right: .65rem;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .36rem .62rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background: rgba(4,6,4,.78);
  color: #eef4e8;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .01em;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.reduce-system-motion .camera-preview-mode-badge { backdrop-filter: none; }
@media (max-width: 540px) {
  .camera-preview-mode-badge { top: .45rem; right: .45rem; font-size: .68rem; min-height: 28px; }
}


/* v1.22.2 — ciclo de vida resiliente da câmera */
.reader-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background: #000;
}
.reader-mount > div,
.reader-mount #readerMount__scan_region,
.reader-mount video {
  width: 100% !important;
  height: 100% !important;
  min-height: inherit;
}
.reader-mount video {
  display: block;
  object-fit: cover !important;
}
.reader-box .reader-placeholder,
.reader-box .camera-preview-mode-badge {
  position: absolute;
}
#startScannerButton[aria-busy="true"] {
  cursor: progress;
  opacity: .82;
}
#startScannerButton[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: camera-button-spin .7s linear infinite;
}
@keyframes camera-button-spin { to { transform: rotate(360deg); } }
.reduce-system-motion #startScannerButton[aria-busy="true"]::after { animation: none; }

/* v1.24.0 — turno operacional + contexto escolar */
.operational-shift-card {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
}
.operational-shift-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.operational-shift-heading span,
.school-context-heading span {
  display: block;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.operational-shift-heading strong { display: block; margin-top: 3px; font-size: .9rem; }
.operational-shift-heading small { color: var(--muted); font-size: .62rem; text-align: right; }
.operational-shift-buttons {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.05);
}
.operational-shift-buttons button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.operational-shift-buttons button span { margin-right: 5px; font-size: .82rem; }
.operational-shift-buttons button:hover { color: var(--text); background: rgba(255,255,255,.045); }
.operational-shift-buttons button.active {
  color: #111;
  background: var(--action);
  box-shadow: 0 5px 18px rgba(201,255,56,.14);
}
.operational-shift-buttons button:active { transform: scale(.985); }

.identified-school-context {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(201,255,56,.15);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(201,255,56,.04), rgba(255,255,255,.015));
}
.school-context-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.school-context-heading small { color: var(--muted); font-size: .6rem; text-align: right; }
.school-context-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}
.school-context-grid > div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.065);
  background: rgba(0,0,0,.24);
}
.school-context-grid > div > span {
  display: block;
  color: var(--muted);
  font-size: .56rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.school-context-grid > div > strong {
  display: block;
  margin-top: 4px;
  font-size: .78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.school-context-grid .school-context-wide { grid-column: 1 / -1; }
.school-context-grid .school-context-wide strong { color: var(--action); font-size: .9rem; }

@media (max-width: 780px) {
  .operational-shift-card { margin: 8px 0 10px; padding: 9px; }
  .operational-shift-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .operational-shift-heading small { text-align: left; }
  .operational-shift-buttons button { min-height: 42px; font-size: .68rem; }
  .identified-school-context { padding: 10px; }
  .school-context-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .school-context-heading small { text-align: left; }
}

@media (max-width: 480px) {
  .operational-shift-buttons { gap: 4px; padding: 3px; }
  .operational-shift-buttons button { min-height: 40px; padding-inline: 4px; font-size: .63rem; }
  .operational-shift-buttons button span { display: none; }
  .school-context-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .school-context-grid > div { padding: 9px; }
}


/* AGV+ v1.24.4 — interface pedagógica enxuta e desktop responsivo */
.register-mode-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  align-items: stretch;
  gap: 9px;
  margin: 12px 0 10px;
}
.operational-shift-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(150px, 1fr);
  align-items: center;
  gap: 9px;
  padding: 5px;
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.operational-shift-inline-copy {
  min-width: 0;
  padding-left: 8px;
}
.operational-shift-inline-copy > span {
  display: block;
  color: var(--text);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.operational-shift-inline-copy > small {
  display: block;
  max-width: 135px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: .55rem;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.operational-shift-inline .operational-shift-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}
.operational-shift-inline .operational-shift-buttons button {
  min-height: 42px;
  padding-inline: 8px;
}
.identification-tabs.identification-tabs-three {
  grid-template-columns: 1.28fr 1fr .82fr;
  margin-top: 0;
}
.camera-mode-notice.camera-mode-notice-compact {
  min-height: 52px;
  margin: 0 0 9px;
  padding-block: 7px;
}

/* A foto passa a funcionar como quadro de conferência, sem esticar a imagem. */
.student-check-card {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 22px !important;
  padding: 16px !important;
}
.student-check-card .identified-photo-shell {
  width: 100% !important;
  min-width: 0;
  min-height: 0;
  align-self: start;
  aspect-ratio: 4 / 5;
  border-radius: 14px !important;
}
.student-check-card .student-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

/* Monitores e notebooks ganham área útil maior, sem deixar o painel esticado demais. */
@media (min-width: 1180px) {
  .app-content {
    width: min(1440px, calc(100% - 28px));
    padding: 16px 14px 48px;
  }
  .register-grid {
    grid-template-columns: minmax(400px, .8fr) minmax(650px, 1.2fr);
    gap: 16px;
  }
  .scanner-card,
  .workflow-card {
    padding: 18px;
  }
  .student-check-card {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .compact-student-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .student-core-data h2 {
    font-size: clamp(2rem, 2.6vw, 2.8rem) !important;
  }
}

@media (min-width: 901px) and (max-width: 1179px) {
  .app-content {
    width: min(1180px, calc(100% - 20px));
  }
  .register-grid {
    grid-template-columns: minmax(350px, .82fr) minmax(520px, 1.18fr);
  }
  .student-check-card {
    grid-template-columns: minmax(205px, 230px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .register-mode-toolbar {
    grid-template-columns: 1fr;
  }
  .operational-shift-inline {
    grid-template-columns: minmax(100px, auto) minmax(0, 1fr);
  }
  .student-check-card {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .student-check-card .identified-photo-shell {
    min-height: 0;
  }
}

@media (max-width: 780px) {
  .register-mode-toolbar {
    gap: 7px;
    margin: 8px 0;
  }
  .operational-shift-inline {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 4px;
  }
  .operational-shift-inline-copy > small {
    max-width: 92px;
  }
  .identification-tabs.identification-tabs-three {
    grid-template-columns: 1.25fr 1fr .8fr;
    margin-top: 0;
  }
  .identification-tabs-three .identification-tab {
    min-height: 46px;
    padding-inline: 6px;
    font-size: .68rem;
  }
  .student-check-card {
    grid-template-columns: 1fr;
  }
  .student-check-card .identified-photo-shell {
    width: min(100%, 300px) !important;
    max-height: none;
    margin-inline: auto;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 520px) {
  .operational-shift-inline {
    grid-template-columns: 1fr;
  }
  .operational-shift-inline-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 5px 0;
  }
  .operational-shift-inline-copy > small {
    max-width: 62%;
    margin: 0;
    text-align: right;
  }
  .identification-tabs.identification-tabs-three {
    grid-template-columns: 1fr 1fr;
  }
  .identification-tabs-three .school-parana-tab {
    grid-column: 1 / -1;
  }
  .student-check-card .identified-photo-shell {
    width: min(100%, 280px) !important;
  }
}

@media (max-width: 360px) {
  .operational-shift-inline-copy > small {
    display: none;
  }
  .operational-shift-inline-copy {
    display: block;
  }
  .identification-tabs.identification-tabs-three {
    grid-template-columns: 1fr;
  }
  .identification-tabs-three .school-parana-tab {
    grid-column: auto;
  }
}

/* AGV+ v1.25.0 — filtros avançados, novos gráficos e paletas */
.dashboard-filter-card {
  margin-bottom: 12px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(12,14,15,.98), rgba(7,8,9,.98));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
}
.dashboard-filter-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashboard-filter-heading span,
.dashboard-filter-grid label > span,
.dashboard-filter-summary > span {
  display:block; margin-bottom:5px; color:var(--muted); font-size:.56rem; font-weight:900; letter-spacing:.09em; text-transform:uppercase;
}
.dashboard-filter-heading h3 { margin:3px 0 0; font-size:.96rem; }
.dashboard-filter-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:13px; }
.dashboard-filter-grid select,
.dashboard-filter-grid input { width:100%; min-height:44px; }
.dashboard-filter-summary {
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:11px; padding:10px 12px;
  background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.07); border-radius:11px;
}
.dashboard-filter-summary > span { margin:0; }
.dashboard-filter-summary strong { color:var(--text); font-size:.69rem; text-align:right; }
#dashboardView .dashboard-kpi.primary-kpi { background:var(--dashboard-primary, #c9ff38); color:#050505; }
#dashboardView .reason-progress > i::after { background:var(--dashboard-primary, #c9ff38); }
#dashboardView .dashboard-customization-card { border-color:rgba(78,167,255,.24); }
.chart-stage-reason { min-height:250px; margin-bottom:12px; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="reasons"] { grid-column:span 2; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="students"] { order:7; }
#dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="communication"] { order:8; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="students"] { order:6; }
#dashboardView[data-dashboard-layout="operational"] [data-dashboard-card="trend"] { order:7; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="students"] { order:6; }
#dashboardView[data-dashboard-layout="analytical"] [data-dashboard-card="communication"] { order:7; }

@media (max-width: 980px) {
  .dashboard-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .dashboard-filter-grid { grid-template-columns:1fr; }
  .dashboard-filter-heading, .dashboard-filter-summary { align-items:stretch; flex-direction:column; }
  .dashboard-filter-heading .compact-action-button { width:100%; min-height:40px; }
  .dashboard-filter-summary strong { text-align:left; }
  #dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="reasons"] { grid-column:auto; }
}

/* AGV+ v1.25.0 — exportações em quatro formatos */
.export-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .export-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .export-options { grid-template-columns: 1fr; } }

/* AGV+ v1.25.1 — hotfix visual do seletor de turno/identificação e dashboard tablet */
.register-mode-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 9px;
}
.register-mode-toolbar > .operational-shift-inline {
  flex: .58 1 210px;
  min-inline-size: 210px;
}
.register-mode-toolbar > .identification-tabs.identification-tabs-three {
  flex: 1.42 1 330px;
  min-width: 0;
  min-inline-size: 330px;
}
.operational-shift-inline {
  grid-template-columns: minmax(54px, auto) minmax(0, 1fr);
  gap: 4px;
}
.operational-shift-inline-copy {
  padding-left: 7px;
  padding-right: 2px;
}
.operational-shift-inline .operational-shift-buttons,
.operational-shift-inline .operational-shift-buttons button {
  min-width: 0;
}
.operational-shift-inline .operational-shift-buttons button {
  padding-inline: 5px;
}
.identification-tabs.identification-tabs-three {
  grid-template-columns: minmax(118px, 1.28fr) minmax(92px, 1fr) minmax(78px, .86fr);
}
.identification-tabs-three .identification-tab {
  min-width: 0;
  padding-inline: 6px;
}
@media (max-width: 780px) {
  .register-mode-toolbar > .operational-shift-inline,
  .register-mode-toolbar > .identification-tabs.identification-tabs-three {
    flex-basis: 100%;
    min-inline-size: 0;
    width: 100%;
  }
  #dashboardView[data-dashboard-layout="executive"] [data-dashboard-card="reasons"] {
    grid-column: auto;
  }
}
@media (max-width: 520px) {
  .identification-tabs.identification-tabs-three {
    grid-template-columns: 1fr 1fr;
  }
  .identification-tabs-three .school-parana-tab {
    grid-column: 1 / -1;
  }
}
@media (max-width: 360px) {
  .identification-tabs.identification-tabs-three {
    grid-template-columns: 1fr;
  }
  .identification-tabs-three .school-parana-tab {
    grid-column: auto;
  }
}


/* AGV+ v1.25.8 — Mobile UX/UI: bloco final de precedência */
.dashboard-mobile-toggle,
.dashboard-mobile-more-button { display: none; }
.dashboard-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }

@media (max-width: 780px) {
  .app-header {
    min-height: 66px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .app-content {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
  }
  .mobile-nav-five {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    bottom: max(7px, env(safe-area-inset-bottom));
  }
  .mobile-nav-five .mobile-nav-button { min-height: 60px; gap: 4px; }
  .mobile-nav-five .mobile-nav-button span { font-size: .62rem; line-height: 1; font-weight: 850; }
  .mobile-nav-five .mobile-nav-button i { width: 19px; height: 19px; }
  .header-settings-button { width: 44px; min-width: 44px; height: 44px; }
  .header-meta .ghost-button { min-height: 44px; }
  .operational-shift-inline .operational-shift-buttons button,
  .communication-shift-buttons button { min-height: 46px; }
  .compact-action-button { min-height: 44px; }
  .dashboard-period select,
  .dashboard-filter-grid select,
  .dashboard-filter-grid input,
  .dashboard-customization-grid select,
  .chart-card-tools select { min-height: 46px; }

  /* Dashboard: resumo primeiro. */
  .dashboard-mobile-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--text);
    background: #111;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    font-size: .68rem;
    font-weight: 850;
  }
  .dashboard-filter-card:not(.mobile-expanded) .dashboard-filter-grid { display: none; }
  .dashboard-filter-card:not(.mobile-expanded) #resetDashboardFilters { display: none; }
  .dashboard-customization-card:not(.mobile-expanded) .dashboard-customization-grid,
  .dashboard-customization-card:not(.mobile-expanded) .dashboard-layout-description,
  .dashboard-customization-card:not(.mobile-expanded) #resetDashboardPreferences { display: none; }
  .dashboard-filter-card,
  .dashboard-customization-card { padding: 12px; margin-bottom: 8px; }
  .dashboard-filter-heading,
  .dashboard-customization-heading { min-height: 44px; }
  .dashboard-filter-card:not(.mobile-expanded) .dashboard-filter-summary { margin-top: 7px; padding: 8px 10px; }
  .dashboard-filter-card:not(.mobile-expanded) .dashboard-filter-summary > span { display: none; }
  .dashboard-filter-card:not(.mobile-expanded) .dashboard-filter-summary strong { font-size: .66rem; }
  .dashboard-heading-actions { flex: 0 0 auto; }
  .dashboard-heading-actions .compact-action-button { min-height: 44px; }

  .dashboard-kpis-expanded article:nth-child(n+5) { display: none; }
  #dashboardView.dashboard-mobile-kpis-expanded .dashboard-kpis-expanded article:nth-child(n+5) { display: flex; }
  #dashboardView:not(.dashboard-mobile-kpis-expanded) .dashboard-insight-strip { display: none; }
  .dashboard-mobile-more-button {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 8px;
    color: var(--text);
    background: #0d0d0d;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 850;
  }

  /* Inicialmente: turma + evolução. */
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card] { display: none; }
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card="classes"],
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card="trend"] { display: block; }
  .dashboard-mobile-more-analyses { margin-top: 8px; }
  #dashboardView .chart-stage,
  #dashboardView .chart-stage-tall { min-height: 235px; }
  #dashboardView .chart-stage-donut,
  #dashboardView .chart-stage-reason { min-height: 220px; }
  .chart-card-heading { gap: 8px; }
  .chart-card-tools label { min-width: 0; }

  /* Identificação mantém QR em linha cheia + CPF/CGM e Chamada lado a lado. */
  .identification-tabs.identification-tabs-three { grid-template-columns: 1fr 1fr; }
  .identification-tabs-three .school-parana-tab { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .header-meta { gap: 7px; }
  .mobile-nav-five { gap: 2px; padding: 4px; }
  .mobile-nav-five .mobile-nav-button span { font-size: .6rem; }
  .dashboard-kpis-expanded { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi { min-height: 96px; padding: 12px; }
  .dashboard-filter-heading > div:first-child,
  .dashboard-customization-heading > div:first-child { min-width: 0; }
  .dashboard-filter-heading h3,
  .dashboard-customization-heading h3 { font-size: .88rem; }
}

@media (max-width: 360px) {
  .identification-tabs.identification-tabs-three { grid-template-columns: 1fr 1fr; }
  .identification-tabs-three .school-parana-tab { grid-column: 1 / -1; }
  .mobile-nav-five .mobile-nav-button span { font-size: .58rem; }
}

/* Celulares em paisagem continuam no comportamento mobile mesmo acima de 780px. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  body, .pedagogue-app { min-height: 100dvh; }
  .pedagogue-app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .app-header {
    min-height: 58px;
    padding-top: max(6px, env(safe-area-inset-top));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: 6px;
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .desktop-tabs { display: none; }
  .app-content {
    padding: 7px max(8px, env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }
  .register-grid { grid-template-columns: 1fr; gap: 7px; }
  .scanner-card, .workflow-card { padding: 10px; }
  .register-mode-toolbar > .operational-shift-inline,
  .register-mode-toolbar > .identification-tabs.identification-tabs-three { flex: 1 1 100%; min-inline-size: 0; width: 100%; }
  .reader-box { min-height: min(58dvh, 270px); }
  #reader__scan_region { min-height: min(52dvh, 230px); }
  .manual-identification-panel,
  .call-identification-panel { min-height: 220px; }
  .mobile-nav-five {
    position: fixed;
    z-index: 60;
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    bottom: max(5px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    gap: 2px;
    padding: 4px;
    background: rgba(13,13,13,.94);
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    box-shadow: 0 14px 40px rgba(0,0,0,.55);
    backdrop-filter: blur(16px);
  }
  .mobile-nav-five .mobile-nav-button { min-height: 50px; display: grid; place-content: center; justify-items: center; gap: 3px; }
  .mobile-nav-five .mobile-nav-button span { font-size: .6rem; }
  .mobile-nav-five .mobile-nav-button i { width: 17px; height: 17px; }
  .header-settings-button { width: 44px; min-width: 44px; height: 44px; }
  .header-meta .ghost-button { min-height: 44px; }
}

/* v1.25.8 — refinamentos pós-validação de viewports */
@media (min-width: 340px) and (max-width: 650px) {
  #exportView .export-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #exportView .export-card { min-height: 116px; padding: 14px; }
}
@media (max-width: 360px) {
  .mobile-nav-five .mobile-nav-button span { font-size: .61rem; }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .operational-shift-inline .operational-shift-buttons button,
  .communication-shift-buttons button { min-height: 46px; }
  .compact-action-button { min-height: 44px; }
  .dashboard-mobile-toggle,
  .dashboard-mobile-more-button { display: flex; }
  .dashboard-mobile-toggle { min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; color: var(--text); background:#111; border:1px solid var(--line-strong); border-radius:10px; font-size:.68rem; font-weight:850; }
  .dashboard-filter-card:not(.mobile-expanded) .dashboard-filter-grid { display:none; }
  .dashboard-filter-card:not(.mobile-expanded) #resetDashboardFilters { display:none; }
  .dashboard-customization-card:not(.mobile-expanded) .dashboard-customization-grid,
  .dashboard-customization-card:not(.mobile-expanded) .dashboard-layout-description,
  .dashboard-customization-card:not(.mobile-expanded) #resetDashboardPreferences { display:none; }
  .dashboard-kpis-expanded article:nth-child(n+5) { display:none; }
  #dashboardView.dashboard-mobile-kpis-expanded .dashboard-kpis-expanded article:nth-child(n+5) { display:flex; }
  #dashboardView:not(.dashboard-mobile-kpis-expanded) .dashboard-insight-strip { display:none; }
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card] { display:none; }
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card="classes"],
  #dashboardView:not(.dashboard-mobile-charts-expanded) .dashboard-charts-expanded > [data-dashboard-card="trend"] { display:block; }
  .dashboard-mobile-more-button { width:100%; min-height:44px; align-items:center; justify-content:center; margin:2px 0 7px; color:var(--text); background:#0d0d0d; border:1px solid var(--line); border-radius:11px; font-size:.7rem; font-weight:850; }
  #dashboardView .chart-stage,
  #dashboardView .chart-stage-tall { min-height:210px; }
  #dashboardView .chart-stage-donut,
  #dashboardView .chart-stage-reason { min-height:200px; }
}


/* AGV+ v1.25.9 — filtro Geral / Manhã / Tarde em Dashboard e Exportar */
.report-shift-field {
  min-width: min(300px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
}
.report-shift-field legend,
.report-shift-card > span {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.report-shift-buttons {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 4px;
  padding: 4px;
  background: #060606;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-shift-buttons button {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: .7rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.report-shift-buttons button span { margin-right: 4px; font-size: .8rem; }
.report-shift-buttons button.active { color: #080b03; background: var(--action); }
.report-shift-buttons button:active { transform: scale(.985); }
.report-shift-buttons button:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.dashboard-primary-controls .dashboard-shift-field { width: min(300px,100%); }
.report-shift-card { margin-top: 12px; }
#exportView .export-summary strong#exportShiftSummary { font-size: clamp(.88rem,2vw,1.15rem); }

@media (max-width: 780px) {
  .dashboard-primary-controls { display: grid; grid-template-columns: 1fr; width: 100%; gap: 8px; }
  .dashboard-primary-controls .dashboard-shift-field,
  .dashboard-primary-controls .dashboard-period { width: 100%; max-width: none; }
  .report-shift-buttons button { min-height: 46px; font-size: .72rem; }
}
@media (max-width: 360px) {
  .report-shift-buttons button { padding-inline: 4px; font-size: .68rem; }
  .report-shift-buttons button span { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .dashboard-primary-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); width: 100%; gap: 8px; }
  .report-shift-buttons button { min-height: 44px; }
}

/* AGV+ v1.25.10 — confirmação visual compacta no celular
   Remove a coluna vazia abaixo da foto e devolve a largura total aos dados/contexto. */
@media (max-width: 560px) {
  .student-check-card {
    display: grid !important;
    grid-template-columns: clamp(106px, 32vw, 145px) minmax(0, 1fr) !important;
    grid-template-areas:
      "photo label"
      "photo name"
      "photo class"
      "meta meta"
      "context context";
    align-items: start !important;
    column-gap: 11px !important;
    row-gap: 7px !important;
    padding: 10px !important;
  }
  .student-check-card .identified-photo-shell {
    grid-area: photo;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    align-self: start;
    aspect-ratio: 4 / 5;
    border-radius: 14px !important;
  }
  .student-check-card .photo-zoom-hint {
    top: 7px;
    right: 7px;
    min-height: 25px;
    padding-inline: 7px;
    font-size: .53rem;
  }
  .student-check-card .student-summary-main {
    display: contents !important;
  }
  .student-check-card .identity-label {
    grid-area: label;
    align-self: end;
    margin: 3px 0 0;
    text-align: left;
    font-size: .58rem;
  }
  .student-check-card .student-core-data h2 {
    grid-area: name;
    align-self: center;
    margin: 0 !important;
    font-size: clamp(1.28rem, 6.4vw, 1.75rem) !important;
    line-height: 1;
    text-align: left;
  }
  .student-check-card .student-class-primary {
    grid-area: class;
    align-self: start;
    justify-content: flex-start;
    margin: 2px 0 0 !important;
    text-align: left;
  }
  .student-check-card .student-class-primary strong { font-size: .88rem; }
  .student-check-card .student-class-primary span { min-height: 25px; padding-inline: 8px; }

  .student-check-card .compact-student-meta {
    grid-area: meta;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100%;
    margin: 3px 0 0 !important;
    text-align: left;
  }
  .student-check-card .compact-student-meta span {
    min-height: 46px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: .6rem;
  }
  .student-check-card .compact-student-meta strong {
    margin-top: 3px;
    font-size: .72rem;
  }

  .student-check-card .identified-school-context {
    grid-area: context;
    width: 100%;
    margin: 3px 0 0;
    padding: 9px;
    border-radius: 11px;
  }
  .student-check-card .school-context-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin-bottom: 7px;
  }
  .student-check-card .school-context-heading small {
    text-align: left;
    font-size: .57rem;
    line-height: 1.3;
  }
  .student-check-card .school-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .student-check-card .school-context-grid > div {
    min-height: 48px;
    padding: 7px 8px;
    border-radius: 9px;
  }
  .student-check-card .school-context-grid > div > span { font-size: .52rem; }
  .student-check-card .school-context-grid > div > strong {
    margin-top: 3px;
    font-size: .72rem;
    line-height: 1.22;
  }
  .student-check-card .school-context-grid .school-context-wide strong { font-size: .82rem; }

  .guardian-disclosure { margin-top: 8px; }
  .guardian-disclosure > summary { min-height: 52px; padding-block: 8px; }
  .reason-block { margin-top: 10px !important; }
}

@media (min-width: 390px) and (max-width: 560px) {
  .student-check-card .compact-student-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Mesmo aproveitamento em celulares deitados, independentemente da largura CSS. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .student-check-card {
    display: grid !important;
    grid-template-columns: clamp(118px, 20vw, 160px) minmax(0, 1fr) !important;
    grid-template-areas:
      "photo label"
      "photo name"
      "photo class"
      "meta meta"
      "context context";
    align-items: start !important;
    gap: 6px 10px !important;
    padding: 9px !important;
  }
  .student-check-card .student-summary-main { display: contents !important; }
  .student-check-card .identified-photo-shell {
    grid-area: photo;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    aspect-ratio: 4 / 5;
  }
  .student-check-card .identity-label { grid-area: label; align-self: end; text-align: left; }
  .student-check-card .student-core-data h2 {
    grid-area: name;
    margin: 0 !important;
    font-size: clamp(1.25rem, 4vw, 1.7rem) !important;
    text-align: left;
  }
  .student-check-card .student-class-primary {
    grid-area: class;
    justify-content: flex-start;
    margin: 2px 0 0 !important;
  }
  .student-check-card .compact-student-meta {
    grid-area: meta;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 3px 0 0 !important;
  }
  .student-check-card .compact-student-meta span { min-height: 44px; padding: 6px 8px; }
  .student-check-card .identified-school-context { grid-area: context; margin-top: 2px; padding: 8px; }
  .student-check-card .school-context-heading { margin-bottom: 6px; }
  .student-check-card .school-context-grid > div { min-height: 44px; padding: 6px 8px; }
}


/* AGV+ v1.25.12 — fluxo de registro mobile sem espaço morto
   Motivo é a ação principal; contato fica secundário. A reserva para o
   botão fixo só existe quando a ação de registro está realmente visível. */
.reason-block-primary { margin-top: 10px !important; }
.guardian-disclosure-secondary { margin-top: 8px; }

@media (max-width: 780px) {
  .student-identified .identified-card {
    padding-bottom: 12px !important;
  }
  .student-identified .identified-card:has(#registerAction:not(.hidden)) {
    padding-bottom: 102px !important;
  }
  .reason-block-primary { margin-top: 8px !important; }
  .guardian-disclosure-secondary { margin-top: 7px; }
}

@media (max-width: 560px) {
  .student-check-card { row-gap: 6px !important; }
  .student-check-card .compact-student-meta { gap: 5px !important; margin-top: 2px !important; }
  .student-check-card .identified-school-context { margin-top: 1px; padding: 8px; }
  .student-check-card .school-context-heading { margin-bottom: 6px; }
  .student-check-card .school-context-grid { gap: 5px; }
  .student-check-card .school-context-grid > div { min-height: 45px; padding: 6px 7px; }
  .reason-block-primary .reason-select-label select { min-height: 56px; }
  .guardian-disclosure-secondary > summary { min-height: 50px; padding: 7px 12px; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .student-identified .identified-card { padding-bottom: 10px !important; }
  .student-identified .identified-card:has(#registerAction:not(.hidden)) { padding-bottom: 92px !important; }
  .reason-block-primary { margin-top: 7px !important; }
  .guardian-disclosure-secondary { margin-top: 6px; }
}

/* AGV+ v1.26.1 — autenticação e sincronização Supabase */
.login-cloud-note {
  margin: 2px 0 0;
  color: var(--muted-2, #7c7f79);
  font-size: .76rem;
  line-height: 1.35;
  text-align: center;
}
.cloud-create-access {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.cloud-create-access:disabled { opacity: .55; cursor: progress; }
.cloud-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  max-width: 170px;
  color: var(--muted-2, #7c7f79);
  font-size: .64rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cloud-sync-status.online { color: #95ff3d; }
.cloud-sync-status.syncing, .cloud-sync-status.waiting { color: #f6d56a; }
.cloud-sync-status.offline, .cloud-sync-status.error { color: #ff8d8d; }
.cloud-sync-status.signed-out { color: var(--muted-2, #7c7f79); }

@media (max-width: 560px) {
  .header-meta > div { min-width: 0; }
  .cloud-sync-status { max-width: 118px; font-size: .58rem; }
  .login-cloud-note { font-size: .72rem; }
}

/* v1.26.1 — login compacto em celulares baixos/paisagem */
@media (max-height: 650px) {
  .auth-page { place-items: start center; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 10px; }
  .login-card { padding-top: 16px; padding-bottom: 16px; }
  .login-card .back-link { margin-bottom: 14px; }
  .login-card h1 { margin-top: 12px; font-size: clamp(2rem, 9vw, 2.45rem); }
  .login-form { margin-top: 18px; gap: 9px; }
  .login-form label > span { margin-bottom: 5px; }
  .login-version { margin-top: 12px; padding-top: 10px; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .auth-page { display: block; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .login-card { width: min(680px, 100%); margin: 0 auto; }
  .login-card h1 { font-size: 2rem; line-height: .95; }
  .login-form { grid-template-columns: 1fr 1fr; align-items: end; }
  .login-form .form-error, .login-form .primary-button, .login-form .cloud-create-access, .login-form .login-cloud-note { grid-column: 1 / -1; }
  .login-form .primary-button { min-height: 46px; }
}


/* AGV+ v1.27.0 — Admin + aproveitamento vertical da confirmação */
.header-admin-button{
  width:46px;min-width:46px;height:44px;display:grid;place-items:center;padding:0;
  color:#c8ff38;background:rgba(200,255,56,.06);border:1px solid rgba(200,255,56,.30);
  border-radius:12px;font-size:.60rem;font-weight:950;letter-spacing:.04em;
}
.header-admin-button:hover,.header-admin-button:focus-visible{border-color:rgba(200,255,56,.72);box-shadow:0 0 0 3px rgba(200,255,56,.07)}
.record-actor{display:block!important;margin-top:4px!important;color:#9fa897!important;font-size:.62rem!important;font-weight:750!important}

@media (max-width:780px){
  .student-identified .app-content{padding-top:3px!important}
  .student-identified .identified-card{padding-top:8px!important}
  .student-identified .identified-topbar{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center!important;
    gap:6px!important;margin-bottom:2px!important
  }
  .student-identified .identified-actions{flex-direction:row!important;align-items:center!important;gap:5px!important}
  .student-identified .compact-action-button{min-height:38px!important;padding-inline:9px!important;font-size:.59rem!important;white-space:nowrap}
  .student-identified .identity-confirmation-heading{margin-top:6px!important}
  .student-identified .identity-confirmation-heading strong{margin-top:2px!important}
}
@media (max-width:380px){
  .student-identified .identified-topbar{grid-template-columns:1fr!important}
  .student-identified .identified-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}
  .student-identified .compact-action-button{width:100%}
  .header-admin-button{width:44px;min-width:44px;height:40px}
}


/* v1.28.0 — histórico individual do aluno */
.history-filter-card-v128{grid-template-columns:repeat(4,minmax(150px,1fr)) minmax(190px,auto)}
.history-student-summary{margin-top:12px;padding:14px;background:linear-gradient(145deg,rgba(15,18,12,.98),rgba(8,9,8,.98));border:1px solid rgba(201,255,56,.22);border-radius:var(--radius)}
.history-student-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px}
.history-student-avatar{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;color:#0a0d04;background:var(--action);font-size:1rem;font-weight:950;letter-spacing:.03em}
.history-student-copy{min-width:0}.history-student-copy>span{color:var(--action);font-size:.6rem;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.history-student-copy h3{margin:3px 0 0;overflow-wrap:anywhere;font-size:1.08rem}.history-student-copy p{margin:4px 0 0;color:var(--muted);font-size:.72rem}
.history-student-pdf{min-height:44px;white-space:nowrap}
.history-student-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:12px}.history-student-kpis>div{padding:10px;background:#080908;border:1px solid var(--line);border-radius:10px}.history-student-kpis span,.history-student-kpis strong{display:block}.history-student-kpis span{color:var(--muted);font-size:.55rem;font-weight:850;letter-spacing:.06em;text-transform:uppercase}.history-student-kpis strong{margin-top:5px;font-size:.88rem;overflow-wrap:anywhere}
.history-student-reasons{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.history-student-reasons span{padding:6px 8px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:#070807;font-size:.62rem}.history-student-reasons strong{color:var(--text)}
.export-entity-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}.export-entity-filters .scope-select{margin-top:12px}
.detail-guardian-actions{display:flex;flex-wrap:wrap;gap:7px}
@media(max-width:1050px){.history-filter-card-v128{grid-template-columns:repeat(2,minmax(0,1fr))}.history-filter-card-v128 .history-clear-button{grid-column:1/-1}.history-student-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.history-filter-card-v128{grid-template-columns:1fr}.history-filter-card-v128 .history-clear-button{grid-column:auto}.history-student-heading{grid-template-columns:auto minmax(0,1fr)}.history-student-pdf{grid-column:1/-1;width:100%}.history-student-kpis{grid-template-columns:1fr 1fr}.history-student-kpis>div:last-child{grid-column:1/-1}.export-entity-filters{grid-template-columns:1fr}.export-entity-filters .scope-select+ .scope-select{margin-top:0}.detail-guardian-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}}
@media(max-width:390px){.detail-guardian-actions{grid-template-columns:1fr}}


/* v1.28.2 — Modo Simplificado: somente Chamada, sem câmera */
.simplified-mode-banner{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid rgba(255,68,68,.48);background:linear-gradient(135deg,rgba(180,15,15,.28),rgba(90,8,8,.14));border-radius:14px;padding:.72rem .9rem;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)}
.simplified-mode-banner strong{font-size:1.05rem;letter-spacing:.08em;color:#ff5d5d}
.simplified-mode-banner span{font-size:.78rem;color:#e7caca;text-align:right}
body.agv-simplified-mode .identification-tabs{display:none!important}
body.agv-simplified-mode #simplifiedModeBanner{display:flex!important}
body.agv-simplified-mode #qrIdentificationPanel,
body.agv-simplified-mode #manualSearchForm{display:none!important}
body.agv-simplified-mode #callSearchForm{display:block!important}
body.agv-simplified-mode .scanner-card .card-heading h2::after{content:" · Chamada";color:#ff5d5d}
body.agv-simplified-mode #cameraSettingsDrawer{display:none!important}
body.agv-simplified-mode .camera-mode-notice{display:none!important}
body.agv-simplified-mode .reader-box{display:none!important}
.interface-mode-options{margin-bottom:1rem}
@media(max-width:640px){
  body.agv-simplified-mode .register-mode-toolbar{gap:.6rem}
  .simplified-mode-banner{padding:.65rem .75rem}
  .simplified-mode-banner span{font-size:.72rem}
}
