:root {
  color-scheme: dark;
  --bg: #030303;
  --bg-soft: #070707;
  --panel: #0a0a0a;
  --panel-raised: #101010;
  --panel-hover: #161616;
  --line: #272727;
  --line-strong: #3a3a3a;
  --text: #f4f4ef;
  --muted: #8f918b;
  --muted-2: #7c7f79;
  --action: #c9ff38;
  --action-text: #080a03;
  --success: #c9ff38;
  --success-soft: rgba(201, 255, 56, .11);
  --warning: #efb85f;
  --danger: #ff7474;
  --danger-soft: rgba(255, 116, 116, .1);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 28px 80px rgba(0,0,0,.62);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(201,255,56,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,255,56,.025) 1px, transparent 1px),
    radial-gradient(circle at 12% -8%, rgba(201,255,56,.085), transparent 29%),
    radial-gradient(circle at 100% 100%, rgba(201,255,56,.025), transparent 28%),
    #030303;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  z-index: -1;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.modal-open { overflow: hidden; }

.wordmark, .portal-wordmark { display: flex; align-items: baseline; gap: 12px; }
.wordmark strong, .portal-wordmark strong { font-size: 1.05rem; font-weight: 950; letter-spacing: -.065em; }
.wordmark strong span, .portal-wordmark strong span { color: var(--success); }
.wordmark small, .portal-wordmark small { color: var(--muted); font-size: .66rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.wordmark.compact { align-items: center; gap: 9px; }
.wordmark.compact strong { font-size: 1.02rem; }
.wordmark.compact small { font-size: .59rem; }
.eyebrow { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.portal-body { display: grid; place-items: center; padding: 30px 18px; }
.portal-shell { width: min(920px, 100%); }
.portal-wordmark { margin-bottom: clamp(70px, 13vh, 140px); }
.portal-wordmark strong { font-size: 1.3rem; }
.portal-hero h1 { max-width: 820px; margin: 14px 0 0; font-size: clamp(2.65rem, 8vw, 6.3rem); line-height: .92; letter-spacing: -.075em; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.access-card { position: relative; min-height: 158px; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 18px; padding: 24px; overflow: hidden; background: rgba(12,12,12,.92); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: .2s ease; }
.access-card:hover { transform: translateY(-3px); background: var(--panel-raised); border-color: var(--line-strong); }
.access-card-main { background: var(--action); color: var(--action-text); border-color: var(--action); }
.access-card-main:hover { background: #dcff78; border-color: #dcff78; }
.access-number { align-self: start; color: var(--muted); font-size: .65rem; font-weight: 900; }
.access-card-main .access-number { color: #74716a; }
.access-card small { display: block; margin-bottom: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.access-card-main small { color: #66635d; }
.access-card strong { display: block; font-size: 1.35rem; letter-spacing: -.035em; }
.access-arrow { font-size: 1.3rem; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 22px 16px; }
.login-card { width: min(430px, 100%); padding: 30px; background: rgba(12,12,12,.94); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.back-link { display: inline-block; margin-bottom: 48px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.login-card h1 { margin: 28px 0 0; font-size: clamp(2.45rem, 10vw, 4rem); line-height: .92; letter-spacing: -.07em; }
.login-form { display: grid; gap: 14px; margin-top: 34px; }
.login-form label > span, .other-reason-field > span, .scope-select > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
input, select { width: 100%; min-height: 54px; padding: 0 15px; color: var(--text); background: #080808; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; }
input:focus, select:focus { border-color: rgba(201,255,56,.78); box-shadow: 0 0 0 3px rgba(201,255,56,.09); }
.form-error { margin: 0; padding: 11px 12px; color: #ffc1c1; background: var(--danger-soft); border: 1px solid rgba(255,116,116,.2); border-radius: var(--radius-sm); font-size: .8rem; }
.primary-button, .success-button, .ghost-button, .circle-button, .danger-link, .tab-button, .mobile-nav-button, .filter-chip, .export-card { border: 0; }
.primary-button { color: var(--action-text); background: var(--action); border: 1px solid var(--action); border-radius: var(--radius-sm); font-weight: 900; }
.primary-button:hover { background: #dcff78; border-color: #dcff78; }
.success-button { color: #06140b; background: var(--success); border: 1px solid var(--success); border-radius: var(--radius-sm); font-weight: 900; }
.ghost-button { color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 800; }
.ghost-button:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.large { min-height: 54px; padding: 0 18px; }
.full-width { width: 100%; }

.student-mobile-panel { width: min(500px, 100%); padding: max(18px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom)); }
.mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mobile-header .ghost-button { min-height: 40px; padding: 0 14px; }
.digital-card { padding: 20px; background: rgba(13,13,13,.96); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.student-card-header { display: flex; align-items: center; gap: 14px; }
.student-avatar-large { width: 62px; height: 62px; display: grid; place-items: center; flex: 0 0 auto; color: #070707; background: var(--action); border-radius: 50%; font-size: 1.05rem; font-weight: 950; }
.student-avatar-large.compact { width: 55px; height: 55px; }
.active-label { display: inline-block; margin-bottom: 6px; color: var(--success); font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.student-card-header h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; }
.student-card-header p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.qr-surface { width: min(100%, 340px); margin: 24px auto 18px; padding: 14px; background: white; border-radius: 14px; }
.qr-surface img { display: block; width: 100%; height: auto; }
.student-data-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.student-data-list div { padding: 12px; background: #080808; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.student-data-list dt { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.student-data-list dd { margin: 5px 0 0; font-size: .78rem; font-weight: 850; }
.student-mobile-panel > .primary-button { margin-top: 12px; }
.fullscreen-qr { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: #000; }
.close-fullscreen { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 18px; width: 44px; height: 44px; color: white; background: #151515; border: 1px solid #303030; border-radius: 50%; font-size: 1.6rem; }
.fullscreen-qr-content { width: min(88vw, 520px); text-align: center; }
.fullscreen-qr-content > span { display: block; margin-bottom: 20px; color: var(--success); font-weight: 950; }
.fullscreen-qr-content img { display: block; width: 100%; padding: 16px; background: white; border-radius: 18px; }
.fullscreen-qr-content strong, .fullscreen-qr-content small { display: block; }
.fullscreen-qr-content strong { margin-top: 18px; font-size: 1.35rem; }
.fullscreen-qr-content small { margin-top: 6px; color: var(--muted); }

.pedagogue-app { min-height: 100vh; padding-bottom: 30px; }
.app-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(18px, calc((100vw - 1180px) / 2)); background: rgba(5,5,5,.82); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 25; }
.header-meta { display: flex; align-items: center; gap: 15px; }
.header-meta > div { text-align: right; }
.header-meta strong, .header-meta span { display: block; }
.header-meta strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.header-meta span { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.header-meta .ghost-button { min-height: 40px; padding: 0 13px; }
.desktop-tabs { width: min(1180px, calc(100% - 28px)); display: flex; gap: 4px; margin: 18px auto 0; padding: 4px; background: #090909; border: 1px solid var(--line); border-radius: 13px; }
.tab-button { min-height: 42px; padding: 0 17px; color: var(--muted); background: transparent; border-radius: 9px; font-weight: 800; }
.tab-button span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; color: var(--muted); background: #171717; border-radius: 99px; font-size: .66rem; }
.tab-button.active { color: var(--action-text); background: var(--action); }
.tab-button.active span { color: var(--action-text); background: rgba(0,0,0,.12); }
.app-content { width: min(1180px, 100%); margin: 0 auto; padding: 12px 14px 40px; }
.app-view { animation: viewIn .16s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }
.register-grid { display: grid; grid-template-columns: minmax(320px, .86fr) minmax(390px, 1.14fr); gap: 12px; }
.scanner-card, .workflow-card, .export-summary, .scope-select, .export-card, .records-list { background: rgba(13,13,13,.95); border: 1px solid var(--line); border-radius: var(--radius); }
.scanner-card, .workflow-card { padding: 16px; }
.card-heading, .identified-topbar, .page-title-row, .records-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-heading h2 { margin: 0; font-size: 1rem; }
.status-dot-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .67rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.status-dot-label i { width: 7px; height: 7px; background: var(--muted-2); border-radius: 50%; }
.status-dot-label.success { color: var(--success); }
.status-dot-label.success i { background: var(--success); box-shadow: 0 0 12px rgba(201,255,56,.46); }
.status-dot-label.danger { color: var(--danger); }
.status-dot-label.danger i { background: var(--danger); }
.reader-box { position: relative; min-height: 410px; margin-top: 14px; overflow: hidden; background: #000; border: 1px solid #2a2a2a; border-radius: 13px; }
.reader-box::after { content: ""; position: absolute; z-index: 5; left: 13%; right: 13%; top: 50%; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); box-shadow: 0 0 12px rgba(255,255,255,.35); animation: scan 2.1s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(-130px); opacity: .2; } 50% { transform: translateY(130px); opacity: .9; } }
.reader-placeholder { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); pointer-events: none; }
.scanner-frame { width: 84px; height: 84px; border: 2px solid #d8d6d0; border-radius: 18px; box-shadow: inset 0 0 0 14px #000; }
.reader-placeholder strong { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.reader-box video { object-fit: cover !important; }
.reader-box img { display: none !important; }
#reader__dashboard { display: none !important; }
#reader__scan_region { min-height: 330px; }
.scanner-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.scanner-actions .ghost-button { min-width: 86px; }
.waiting-card { min-height: 502px; display: grid; place-content: center; justify-items: center; gap: 20px; }
.waiting-card strong { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.waiting-ring { width: 78px; height: 78px; border: 1px solid #2e2e2e; border-radius: 50%; position: relative; }
.waiting-ring::before, .waiting-ring::after { content: ""; position: absolute; inset: 18px; border: 1px solid #464646; border-radius: 50%; }
.waiting-ring::after { inset: 34px; background: var(--success); border: 0; box-shadow: 0 0 18px rgba(201,255,56,.34); }
.identified-card { min-height: 502px; }
.circle-button { width: 38px; height: 38px; color: var(--muted); background: #080808; border: 1px solid var(--line); border-radius: 50%; font-size: 1.3rem; }
.student-summary-card { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 15px; background: #080808; border: 1px solid var(--line); border-radius: 13px; }
.student-summary-main { min-width: 0; flex: 1; }
.student-summary-main h2 { margin: 0; font-size: 1.32rem; letter-spacing: -.045em; }
.student-summary-main p { margin: 4px 0 10px; color: var(--muted); font-size: .78rem; }
.student-meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .66rem; }
.student-meta-row strong { color: var(--text); }
.reason-block { margin-top: 17px; }
.reason-block h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.reason-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.reason-option { min-height: 49px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; color: var(--text); background: #090909; border: 1px solid var(--line); border-radius: 10px; text-align: left; font-size: .76rem; font-weight: 780; }
.reason-option:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.reason-option.selected { color: var(--action-text); background: var(--action); border-color: var(--action); }
.reason-number { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; color: var(--muted); background: #161616; border-radius: 50%; font-size: .63rem; }
.reason-option.selected .reason-number { color: var(--action-text); background: rgba(0,0,0,.12); }
.reason-mark { margin-left: auto; opacity: 0; }
.reason-option.selected .reason-mark { opacity: 1; }
.other-reason-field { display: block; margin-top: 10px; }
.register-action { position: sticky; bottom: 10px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 12px; padding: 10px; background: rgba(18,18,18,.96); border: 1px solid var(--line-strong); border-radius: 13px; backdrop-filter: blur(12px); }
.register-action > span { padding-left: 5px; overflow: hidden; color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }

.page-title-row { margin: 14px 2px 18px; }
.page-title-row span { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.page-title-row h2 { margin: 4px 0 0; font-size: 2rem; letter-spacing: -.055em; }
.danger-link { padding: 9px 0; color: var(--danger); background: transparent; font-size: .72rem; font-weight: 800; }
.records-toolbar { margin-bottom: 10px; justify-content: flex-start; }
.filter-chip { min-height: 38px; padding: 0 14px; color: var(--muted); background: #0b0b0b; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; font-weight: 800; }
.filter-chip.active { color: var(--action-text); background: var(--action); border-color: var(--action); }
.record-total { margin-left: auto; color: var(--muted); font-size: .7rem; }
.records-list { overflow: hidden; }
.record-row { display: grid; grid-template-columns: 72px minmax(0,1fr) minmax(150px,.6fr); align-items: center; gap: 14px; padding: 15px; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: 0; }
.record-time strong, .record-main strong, .record-side strong { display: block; }
.record-time strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.record-time span, .record-main span, .record-side span { display: block; margin-top: 4px; color: var(--muted); font-size: .66rem; }
.record-main strong { font-size: .9rem; }
.record-side { text-align: right; }
.record-side strong { font-size: .73rem; }
.empty-state { padding: 60px 20px; color: var(--muted); text-align: center; font-size: .8rem; }

.export-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; }
.export-summary div { padding: 19px; border-right: 1px solid var(--line); }
.export-summary div:last-child { border-right: 0; }
.export-summary span, .export-summary strong { display: block; }
.export-summary span { color: var(--muted); font-size: .63rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.export-summary strong { margin-top: 8px; font-size: 1.65rem; }
.scope-select { display: block; margin-top: 12px; padding: 15px; }
.scope-select select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%); background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.export-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.export-card { min-height: 170px; display: flex; flex-direction: column; align-items: flex-start; padding: 18px; color: var(--text); background: rgba(13,13,13,.95); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; transition: .18s ease; }
.export-card:hover { transform: translateY(-2px); background: var(--panel-raised); border-color: var(--line-strong); }
.export-card > span { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; color: var(--success); background: var(--success-soft); border-radius: 99px; font-size: .61rem; font-weight: 900; letter-spacing: .08em; }
.export-card strong { margin-top: auto; font-size: 1rem; }
.export-card small { margin-top: 6px; color: var(--muted); line-height: 1.45; }
.export-feedback { margin: 13px 2px 0; color: var(--muted); font-size: .7rem; }

.mobile-nav { display: none; }
.success-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; padding: 24px; background: rgba(0,0,0,.94); text-align: center; backdrop-filter: blur(10px); }
.success-check { width: 82px; height: 82px; display: grid; place-items: center; color: #06140b; background: var(--success); border-radius: 50%; font-size: 2.5rem; font-weight: 950; box-shadow: 0 0 0 18px rgba(100,217,139,.05); }
.success-overlay strong { margin-top: 20px; font-size: 1.35rem; }
.success-overlay span { max-width: 420px; margin-top: 8px; color: var(--muted); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(92vw, 440px); transform: translateX(-50%); padding: 13px 15px; color: var(--text); background: #141414; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); text-align: center; font-size: .78rem; }

@media (max-width: 780px) {
  .portal-wordmark { margin-bottom: 75px; }
  .access-grid { grid-template-columns: 1fr; margin-top: 38px; }
  .access-card { min-height: 130px; }
  .pedagogue-app { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .app-header { min-height: 62px; padding: 10px 13px; }
  .header-meta > div span { max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .desktop-tabs { display: none; }
  .app-content { padding: 8px 8px 24px; }
  .register-grid { grid-template-columns: 1fr; gap: 8px; }
  .scanner-card, .workflow-card { padding: 12px; border-radius: 14px; }
  .reader-box { min-height: min(74vw, 390px); margin-top: 10px; }
  #reader__scan_region { min-height: 250px; }
  .waiting-card { min-height: 180px; }
  .identified-card { min-height: 0; }
  .reason-list { grid-template-columns: 1fr; }
  .reason-option { min-height: 52px; font-size: .82rem; }
  .register-action { grid-template-columns: 1fr; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .register-action > span { display: none; }
  .register-action .success-button { width: 100%; }
  .mobile-nav { position: fixed; z-index: 60; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; background: rgba(13,13,13,.94); border: 1px solid var(--line-strong); border-radius: 17px; box-shadow: 0 18px 50px rgba(0,0,0,.55); backdrop-filter: blur(16px); }
  .mobile-nav-button { position: relative; min-height: 56px; display: grid; place-content: center; justify-items: center; gap: 5px; color: var(--muted); background: transparent; border-radius: 12px; }
  .mobile-nav-button.active { color: var(--action-text); background: var(--action); }
  .mobile-nav-button span { font-size: .62rem; font-weight: 850; }
  .mobile-nav-button b { position: absolute; top: 5px; right: calc(50% - 27px); min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; color: #07120b; background: var(--success); border-radius: 99px; font-size: .55rem; }
  .mobile-nav-button i { width: 17px; height: 17px; position: relative; display: block; }
  .nav-scan { border: 1.5px solid currentColor; border-radius: 5px; }
  .nav-scan::before { content: ""; position: absolute; inset: 4px; border: 1px solid currentColor; border-radius: 2px; }
  .nav-list::before, .nav-list::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor; }
  .nav-list::before { top: 1px; }
  .nav-export { border: 1.5px solid currentColor; border-radius: 3px; }
  .nav-export::before { content: "↓"; position: absolute; left: 3px; top: -8px; font-style: normal; font-size: 1rem; font-weight: 900; }
  .page-title-row { margin-top: 8px; }
  .page-title-row h2 { font-size: 1.65rem; }
  .record-row { grid-template-columns: 58px minmax(0,1fr); gap: 10px; padding: 13px; }
  .record-side { grid-column: 2; text-align: left; }
  .export-options { grid-template-columns: 1fr; }
  .export-card { min-height: 120px; }
}

@media (max-width: 480px) {
  .portal-body { align-items: start; padding-top: 24px; }
  .portal-hero h1 { font-size: 2.75rem; }
  .access-card { padding: 19px; }
  .login-card { padding: 24px 18px; }
  .back-link { margin-bottom: 38px; }
  .login-card h1 { font-size: 2.65rem; }
  .student-mobile-panel { padding-left: 9px; padding-right: 9px; }
  .digital-card { padding: 15px; }
  .student-data-list { grid-template-columns: 1fr 1fr; }
  .student-data-list div:first-child { grid-column: span 2; }
  .header-meta > div span { display: none; }
  .header-meta .ghost-button { padding: 0 10px; }
  .scanner-actions { grid-template-columns: 1fr 76px; }
  .student-summary-card { padding: 12px; }
  .student-summary-main h2 { font-size: 1.18rem; }
  .export-summary div { padding: 14px 11px; }
  .export-summary strong { font-size: 1.35rem; }
}

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

/* AGV+ v1.9.0 — seletor compacto, versão e experiência móvel */
.header-brand { display: flex; align-items: center; gap: 10px; }
.version-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #a5a5a0;
  background: #101010;
  border: 1px solid #272727;
  border-radius: 999px;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .04em;
}
.login-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .65rem;
  font-weight: 800;
}
.version-status,
.updated-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
}
.version-status i,
.updated-status i {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(100, 217, 139, .42);
}
.waiting-card small {
  margin-top: -10px;
  color: var(--muted-2);
  font-size: .66rem;
  font-weight: 700;
}
.reason-block { margin-top: 18px; }
.reason-select-label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.select-shell { position: relative; }
.select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-right: 2px solid #8f8f89;
  border-bottom: 2px solid #8f8f89;
  transform: translateY(-70%) rotate(45deg);
}
.reason-select-label select {
  appearance: none;
  min-height: 58px;
  padding-right: 46px;
  color: var(--text);
  background: #070707;
  border-color: #303030;
  font-size: .88rem;
  font-weight: 800;
}
.reason-select-label select:valid { border-color: #464646; }
.other-reason-field { margin-top: 10px; }
.register-action {
  grid-template-columns: 1fr;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}
.register-action .success-button { width: 100%; }
.system-version-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.system-version-card > div {
  min-width: 0;
  padding: 16px;
  background: #0c0c0c;
}
.system-version-card span,
.system-version-card strong { display: block; }
.system-version-card span {
  color: var(--muted);
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.system-version-card strong {
  margin-top: 8px;
  overflow: hidden;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.system-version-card .updated-status { display: flex; }

@media (max-width: 780px) {
  .header-brand { min-width: 0; }
  .version-chip { display: none; }
  .scanner-actions { grid-template-columns: minmax(0, 1fr) auto; }
  #simulateStudentButton { min-width: 112px; padding: 0 13px; }
  .identified-card { padding-bottom: 94px; }
  .student-identified .scanner-card { display: none; }
  .student-identified .register-grid { display: block; }
  .student-identified .identified-card { animation: viewIn .15s ease; }
  .reason-select-label select { min-height: 62px; font-size: .94rem; }
  .register-action {
    position: fixed;
    z-index: 55;
    left: 14px;
    right: 14px;
    bottom: calc(77px + env(safe-area-inset-bottom));
    margin: 0;
  }
  .register-action .success-button {
    min-height: 58px;
    box-shadow: 0 14px 32px rgba(0,0,0,.7);
  }
  .system-version-card { grid-template-columns: 1fr 1fr; }
  .system-version-card > div { padding: 14px; }
}

@media (max-width: 480px) {
  .scanner-card, .workflow-card { padding: 10px; }
  .reader-box { min-height: min(68vw, 310px); }
  #reader__scan_region { min-height: 225px; }
  .scanner-actions .large { min-height: 50px; }
  .student-summary-card { align-items: flex-start; }
  .student-avatar-large.compact { width: 48px; height: 48px; }
  .student-summary-main h2 { font-size: 1.08rem; line-height: 1.12; }
  .student-meta-row { gap: 7px 11px; }
  .system-version-card { grid-template-columns: 1fr; }
  .system-version-card strong { white-space: normal; }
}
.portal-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 800;
}
@media (max-width: 480px) {
  .portal-version { align-items: flex-start; flex-direction: column; }
}


/* AGV+ v1.10.0 — QR Code, CPF/CGM e número da chamada */
.identification-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 14px;
  padding: 5px;
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.identification-tab {
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 900;
}
.identification-tab.active {
  color: var(--action-text);
  background: var(--action);
  box-shadow: 0 7px 22px rgba(201,255,56,.08);
}
.identification-panel { margin-top: 10px; }
.identification-panel .reader-box { margin-top: 0; }
.manual-identification-panel {
  min-height: 410px;
  align-content: center;
  padding: clamp(18px, 4vw, 34px);
  background:
    radial-gradient(circle at 50% 35%, rgba(201,255,56,.055), transparent 35%),
    #060606;
  border: 1px solid #2b2b2b;
  border-radius: 13px;
}
.manual-identification-panel:not(.hidden) { display: grid; }
.manual-identification-panel > label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.manual-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.manual-search-row input {
  min-height: 58px;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .025em;
}
.manual-search-row .primary-button { min-width: 118px; }
.manual-search-feedback {
  min-height: 18px;
  margin: 10px 2px 0;
  color: var(--muted-2);
  font-size: .69rem;
  font-weight: 700;
}
.manual-search-feedback.error { color: var(--danger); }
.identified-state { display: flex; align-items: center; gap: 8px; }
.identification-source {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  color: #cfd1ca;
  background: #111;
  border: 1px solid #2b2b2b;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 850;
}
.reader-box::after {
  background: linear-gradient(90deg, transparent, rgba(201,255,56,.94), transparent);
  box-shadow: 0 0 15px rgba(201,255,56,.38);
}
.scanner-frame { border-color: var(--action); }
.success-check { color: var(--action-text); }
.version-status i, .updated-status i { box-shadow: 0 0 12px rgba(201,255,56,.42); }

@media (max-width: 780px) {
  .identification-tabs { margin-top: 10px; }
  .identification-tab { min-height: 48px; font-size: .82rem; }
  .manual-identification-panel { min-height: min(62vh, 390px); padding: 18px 14px; }
  .manual-search-row { grid-template-columns: 1fr; }
  .manual-search-row input { min-height: 62px; font-size: 1.05rem; }
  .manual-search-row .primary-button { width: 100%; min-height: 58px; }
}

@media (max-width: 480px) {
  .manual-identification-panel { min-height: 275px; }
  .identified-state { gap: 6px; }
  .identification-source { padding: 0 7px; }
}

/* AGV+ v1.10.0 — identificação por número da chamada */
.identification-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.identification-tab {
  padding: 0 8px;
  white-space: nowrap;
}
.call-identification-panel {
  min-height: 410px;
  align-content: center;
  gap: 12px;
  padding: clamp(18px, 4vw, 34px);
  background:
    radial-gradient(circle at 50% 35%, rgba(201,255,56,.055), transparent 35%),
    #060606;
  border: 1px solid #2b2b2b;
  border-radius: 13px;
}
.call-identification-panel:not(.hidden) { display: grid; }
.call-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(120px, .65fr);
  gap: 10px;
}
.call-search-grid label {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.call-search-grid label > span {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.call-search-grid select,
.call-search-grid input {
  width: 100%;
  min-height: 58px;
  color: var(--text);
  background: #070707;
  border: 1px solid #303030;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 850;
}
.call-search-grid input {
  padding: 0 16px;
  text-align: center;
  font-size: 1.08rem;
}
.call-search-grid select {
  appearance: none;
  padding: 0 42px 0 14px;
}
.compact-select-shell { position: relative; }
.compact-select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-right: 2px solid #8f8f89;
  border-bottom: 2px solid #8f8f89;
  transform: translateY(-70%) rotate(45deg);
}

@media (max-width: 780px) {
  .identification-tab { padding: 0 5px; font-size: .74rem; }
  .call-identification-panel { min-height: min(62vh, 390px); padding: 18px 14px; }
  .call-search-grid { grid-template-columns: 1fr; }
  .call-search-grid select,
  .call-search-grid input { min-height: 60px; }
  .call-search-grid input { text-align: left; }
}

@media (max-width: 390px) {
  .identification-tabs { gap: 3px; padding: 4px; }
  .identification-tab { min-height: 46px; padding: 0 3px; font-size: .68rem; }
  .call-identification-panel { min-height: 330px; padding: 14px 10px; }
}


/* AGV+ v1.11.0 — chamadas de teste e cadastro fictício da Delane */
.student-data-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.test-data-details {
  margin-top: 10px;
  padding: 0 12px;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.test-data-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.test-data-details summary::after { content: "+"; color: var(--action); font-size: 1rem; }
.test-data-details[open] summary::after { content: "−"; }
.test-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 0 0 10px; }
.test-data-grid div { padding: 10px; background: #0d0d0d; border: 1px solid #202020; border-radius: 9px; }
.test-data-grid dt { color: var(--muted-2); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.test-data-grid dd { margin: 4px 0 0; font-size: .72rem; font-weight: 800; }
.test-data-details p { margin: 0 0 12px; color: var(--muted-2); font-size: .65rem; line-height: 1.45; }
@media (max-width: 480px) {
  .student-data-list div:first-child { grid-column: auto; }
  .test-data-grid { grid-template-columns: 1fr; }
}


/* v1.14.0 — controle do fluxo e cancelamento auditável */
.identified-actions { display: flex; align-items: center; gap: 7px; }
.compact-action-button { min-height: 36px; padding: 0 11px; color: var(--text); background: #111; border: 1px solid var(--line-strong); border-radius: 9px; font-size: .68rem; font-weight: 850; }
.compact-action-button:hover { background: #181818; }
.compact-action-button.danger { color: #ff8f8f; border-color: rgba(255,92,92,.35); }
.danger-button { min-height: 50px; padding: 0 18px; color: #fff; background: #c93e3e; border: 1px solid #e35d5d; border-radius: 11px; font-weight: 900; }
.danger-button:disabled { opacity: .42; cursor: not-allowed; }

.success-overlay { padding: 18px; }
.success-dialog { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px 20px; background: #0c0c0c; border: 1px solid #333; border-radius: 20px; box-shadow: 0 26px 80px rgba(0,0,0,.78); }
.success-dialog > strong { margin-top: 3px; font-size: 1.2rem; }
.success-dialog > span { color: var(--muted); text-align: center; font-size: .82rem; }
.success-dialog-actions { width: 100%; display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; margin-top: 14px; }

.modal-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.modal-card { width: min(470px, 100%); padding: 20px; background: #0d0d0d; border: 1px solid #343434; border-radius: 18px; box-shadow: 0 28px 90px rgba(0,0,0,.82); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-heading span { color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.modal-heading h3 { margin: 4px 0 0; font-size: 1.45rem; letter-spacing: -.04em; }
.modal-student { margin: 16px 0; padding: 12px; color: var(--text); background: #080808; border: 1px solid var(--line); border-radius: 11px; font-size: .8rem; }
.modal-card label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .68rem; font-weight: 850; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 18px; }

.record-row.cancelled { opacity: .68; background: rgba(120,20,20,.07); }
.record-row.cancelled .record-main > strong { text-decoration: line-through; text-decoration-thickness: 1px; }
.record-status { display: inline-flex !important; width: fit-content; margin: 0 0 7px auto !important; padding: 4px 8px; border-radius: 999px; font-size: .58rem !important; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.record-status.active { color: #baff32; background: rgba(174,255,0,.09); border: 1px solid rgba(174,255,0,.23); }
.record-status.cancelled { color: #ff9a9a; background: rgba(255,70,70,.08); border: 1px solid rgba(255,70,70,.24); }
.record-cancellation { color: #ff9a9a !important; }
.record-cancel-button { min-height: 30px; margin-top: 8px; padding: 0 9px; color: #ff9a9a; background: transparent; border: 1px solid rgba(255,90,90,.28); border-radius: 8px; font-size: .62rem; font-weight: 850; }
.record-cancel-button:hover { background: rgba(255,70,70,.08); }

@media (max-width: 780px) {
  .identified-topbar { align-items: flex-start; }
  .identified-actions { flex-direction: column; align-items: stretch; }
  .compact-action-button { min-height: 34px; padding: 0 9px; }
  .success-dialog-actions { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 10px; }
  .record-side { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); text-align: left; }
  .record-status { margin-left: 0 !important; }
  .record-cancel-button { width: 100%; min-height: 38px; }
}

@media (max-width: 430px) {
  .identified-topbar { gap: 8px; }
  .identified-state { min-width: 0; flex-wrap: wrap; }
  .identified-actions { flex: 0 0 auto; }
  .compact-action-button { font-size: .61rem; }
  .modal-actions { grid-template-columns: 1fr; }
}

/* AGV+ v1.14.0 — dashboard e relatórios gráficos */
.dashboard-title-row,
.history-heading-row,
.chart-card-heading,
.records-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dashboard-period {
  width: min(220px, 100%);
}
.dashboard-period > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dashboard-period select {
  min-height: 44px;
  padding-right: 38px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8f918b 50%),
    linear-gradient(135deg, #8f918b 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.dashboard-kpi {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 17px;
  background: linear-gradient(145deg, rgba(17,17,17,.98), rgba(8,8,8,.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.dashboard-kpi::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, transparent 50%, rgba(201,255,56,.08) 50%);
  pointer-events: none;
}
.dashboard-kpi.primary-kpi {
  color: var(--action-text);
  background: var(--action);
  border-color: var(--action);
}
.dashboard-kpi.primary-kpi::after {
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.10) 50%);
}
.dashboard-kpi > span {
  color: var(--muted);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.dashboard-kpi.primary-kpi > span,
.dashboard-kpi.primary-kpi > small {
  color: rgba(8,10,3,.66);
}
.dashboard-kpi > strong {
  margin-top: 11px;
  overflow: hidden;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -.065em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dashboard-kpi > small {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: .68rem;
  font-weight: 750;
}
.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 10px;
}
.dashboard-chart-card {
  min-width: 0;
  padding: 17px;
  background: rgba(10,10,10,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dashboard-chart-wide {
  grid-row: span 2;
}
.chart-card-heading {
  margin-bottom: 12px;
}
.chart-card-heading span,
.history-heading-row span {
  color: var(--muted);
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.chart-card-heading h3,
.history-heading-row h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  letter-spacing: -.035em;
}
.chart-card-heading > strong {
  color: var(--muted);
  font-size: .64rem;
  font-weight: 800;
}
.chart-stage {
  position: relative;
  min-height: 330px;
}
.chart-stage-donut {
  min-height: 250px;
}
.chart-stage canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-empty {
  min-height: inherit;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: .72rem;
}
.compact-empty {
  min-height: 150px;
}
.dashboard-reasons-card {
  min-height: 238px;
}
.dashboard-reason-list {
  display: grid;
  gap: 11px;
}
.dashboard-reason-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.reason-rank {
  color: var(--muted-2);
  font-size: .62rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.reason-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.reason-progress strong {
  min-width: 0;
  overflow: hidden;
  font-size: .7rem;
  font-weight: 760;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.reason-progress span {
  color: var(--success);
  font-size: .68rem;
  font-weight: 900;
}
.reason-progress > i {
  width: 100%;
  height: 4px;
  display: block;
  overflow: hidden;
  background: #1c1c1c;
  border-radius: 99px;
  position: relative;
}
.reason-progress > i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--reason-width);
  background: var(--success);
  border-radius: inherit;
}
.history-heading-row {
  margin: 24px 2px 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
  .dashboard-chart-wide {
    grid-row: auto;
  }
  .chart-stage {
    min-height: 300px;
  }
}

@media (max-width: 600px) {
  .dashboard-title-row {
    align-items: flex-end;
  }
  .dashboard-period {
    width: 160px;
  }
  .dashboard-period select {
    min-height: 42px;
    padding-left: 11px;
    font-size: .72rem;
  }
  .dashboard-kpis {
    gap: 7px;
    margin-bottom: 7px;
  }
  .dashboard-kpi {
    min-height: 105px;
    padding: 13px;
    border-radius: 13px;
  }
  .dashboard-kpi > strong {
    font-size: 1.55rem;
  }
  .dashboard-kpi > small {
    font-size: .61rem;
  }
  .dashboard-charts {
    gap: 7px;
  }
  .dashboard-chart-card {
    padding: 13px;
    border-radius: 13px;
  }
  .chart-stage {
    min-height: 285px;
  }
  .chart-stage-donut {
    min-height: 250px;
  }
  .history-heading-row {
    margin-top: 17px;
    padding-top: 16px;
  }
}

@media (max-width: 390px) {
  .dashboard-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-period {
    width: 100%;
  }
  .dashboard-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-kpi {
    min-height: 100px;
  }
  .dashboard-kpi > strong {
    font-size: 1.4rem;
  }
}

/* v1.15.0 — identificação visual e base local de fotos */
.student-photo-shell {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: #070707;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.identified-photo-shell { width: 82px; height: 98px; border-radius: 14px; }
.detail-photo-shell { width: 118px; height: 142px; border-radius: 17px; }
.student-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.student-photo-shell .student-avatar-large { width: 100%; height: 100%; border-radius: 0; background: linear-gradient(145deg, rgba(201,255,56,.2), rgba(201,255,56,.06)); color: var(--action); font-size: 1.35rem; }
.student-photo-badge {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  min-height: 22px;
  display: grid;
  place-items: center;
  padding: 2px 7px;
  color: #d8d8d0;
  background: rgba(0,0,0,.78);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  backdrop-filter: blur(7px);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.student-photo-badge.has-photo { color: #0b0d06; background: var(--action); border-color: var(--action); }
.student-summary-card { align-items: stretch; }
.student-summary-main { align-self: center; min-width: 0; }

.record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.record-view-button,
.record-cancel-button { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: .62rem; font-weight: 900; }
.record-view-button { color: #080a03; background: var(--action); border: 1px solid var(--action); }
.record-view-button:hover { background: #dcff78; }
.record-cancel-button { margin-top: 0; }

.photo-management-card {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(201,255,56,.055), rgba(10,10,10,.96) 45%);
  border: 1px solid rgba(201,255,56,.2);
  border-radius: var(--radius);
}
.photo-management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.photo-management-heading span { color: var(--action); font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.photo-management-heading h3 { margin: 5px 0 0; font-size: 1.25rem; letter-spacing: -.035em; }
.photo-management-heading > strong { color: var(--text); font-size: .76rem; white-space: nowrap; }
.photo-management-card > p { margin: 12px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.photo-management-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.photo-privacy-note { display: grid; grid-template-columns: auto 1fr; gap: 9px; margin-top: 14px; padding: 11px 12px; color: var(--muted); background: rgba(0,0,0,.38); border: 1px solid var(--line); border-radius: 11px; font-size: .68rem; line-height: 1.45; }
.photo-privacy-note strong { color: var(--action); }
.photo-privacy-note.warning-note { border-color: rgba(239,184,95,.28); background: rgba(239,184,95,.055); }
.photo-privacy-note.warning-note strong { color: var(--warning); }
.photo-import-progress { margin-top: 14px; }
.photo-import-progress > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: .68rem; }
.photo-import-progress progress { width: 100%; height: 8px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #181818; }
.photo-import-progress progress::-webkit-progress-bar { background: #181818; border-radius: 999px; }
.photo-import-progress progress::-webkit-progress-value { background: var(--action); border-radius: 999px; }
.photo-import-progress progress::-moz-progress-bar { background: var(--action); border-radius: 999px; }

.student-detail-modal-card { width: min(650px, 100%); max-height: min(90vh, 760px); overflow: auto; }
.student-detail-identity { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; margin-top: 14px; padding: 16px; background: #080808; border: 1px solid var(--line); border-radius: 15px; }
.student-detail-identity h4 { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; }
.student-detail-identity p { margin: 7px 0 0; color: var(--muted); }
.student-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.student-detail-tags span { padding: 7px 9px; color: var(--muted); background: #050505; border: 1px solid var(--line); border-radius: 8px; font-size: .65rem; }
.student-detail-tags strong { color: var(--text); }
.student-detail-record { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.student-detail-record > div { min-width: 0; padding: 12px; background: #080808; border: 1px solid var(--line); border-radius: 11px; }
.student-detail-record span,
.student-detail-record strong { display: block; }
.student-detail-record span { color: var(--muted); font-size: .58rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.student-detail-record strong { margin-top: 6px; overflow-wrap: anywhere; font-size: .74rem; }
.photo-link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.photo-link-panel { margin-top: 12px; padding: 13px; background: #070707; border: 1px solid var(--line); border-radius: 13px; }
.photo-link-panel label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.photo-link-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 330px; margin-top: 10px; overflow: auto; }
.photo-link-result { min-width: 0; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; padding: 7px; color: var(--text); text-align: left; background: #0d0d0d; border: 1px solid var(--line); border-radius: 10px; }
.photo-link-result:hover { border-color: rgba(201,255,56,.55); background: #12140f; }
.photo-link-result img { width: 52px; height: 60px; object-fit: cover; border-radius: 7px; background: #050505; }
.photo-link-result span,
.photo-link-result strong,
.photo-link-result small { min-width: 0; display: block; }
.photo-link-result strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .67rem; }
.photo-link-result small { margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .58rem; }

@media (max-width: 720px) {
  .identified-photo-shell { width: 92px; height: 112px; }
  .student-summary-card { align-items: center; }
  .student-meta-row { grid-template-columns: 1fr 1fr; }
  .record-actions { justify-content: stretch; }
  .record-view-button,
  .record-cancel-button { flex: 1 1 130px; min-height: 40px; }
  .photo-management-actions,
  .photo-link-actions { grid-template-columns: 1fr; }
  .student-detail-identity { grid-template-columns: 96px 1fr; padding: 12px; gap: 12px; }
  .detail-photo-shell { width: 96px; height: 118px; }
  .student-detail-record { grid-template-columns: 1fr 1fr; }
  .photo-link-results { grid-template-columns: 1fr 1fr; max-height: 360px; }
}

@media (max-width: 430px) {
  .student-summary-card { display: grid; grid-template-columns: 88px 1fr; align-items: center; }
  .identified-photo-shell { width: 88px; height: 106px; }
  .student-summary-main h2 { font-size: 1.08rem; }
  .student-summary-main p { font-size: .72rem; }
  .photo-management-heading { display: grid; }
  .photo-management-heading > strong { white-space: normal; }
  .student-detail-identity { grid-template-columns: 84px 1fr; }
  .detail-photo-shell { width: 84px; height: 104px; }
  .student-detail-identity h4 { font-size: 1.05rem; }
  .photo-link-results { grid-template-columns: 1fr; }
}


/* AGV+ v1.17.0 — foto maior e confirmação visual aprimorada */
.identity-confirmation-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 0 2px;
}
.identity-confirmation-heading div { min-width: 0; }
.identity-confirmation-heading span,
.identity-confirmation-heading strong,
.identity-confirmation-heading small { display: block; }
.identity-confirmation-heading span {
  color: var(--action);
  font-size: .61rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.identity-confirmation-heading strong {
  margin-top: 5px;
  font-size: 1.05rem;
  letter-spacing: -.025em;
}
.identity-confirmation-heading small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 750;
}

.student-summary-card.photo-first-summary {
  display: grid;
  grid-template-columns: clamp(170px, 25vw, 220px) minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at 13% 20%, rgba(201,255,56,.09), transparent 34%),
    #080808;
  border-color: rgba(201,255,56,.22);
}
.identified-photo-shell {
  width: 100%;
  height: auto;
  min-height: 220px;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  border-color: rgba(201,255,56,.35);
  box-shadow: 0 18px 45px rgba(0,0,0,.42), 0 0 0 1px rgba(201,255,56,.08);
}
.student-photo-shell.photo-preview-trigger {
  appearance: none;
  padding: 0;
  color: inherit;
  cursor: zoom-in;
  text-align: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.student-photo-shell.photo-preview-trigger:hover,
.student-photo-shell.photo-preview-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: var(--action);
  box-shadow: 0 20px 52px rgba(0,0,0,.52), 0 0 0 3px rgba(201,255,56,.13);
  outline: none;
}
.student-photo { object-position: center 22%; }
.photo-zoom-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  color: #f1f1e9;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: .57rem;
  font-weight: 900;
  letter-spacing: .025em;
}
.photo-first-summary .student-summary-main {
  align-self: center;
  padding: 8px 2px;
}
.photo-first-summary .student-summary-main h2 {
  max-width: 720px;
  margin-bottom: 7px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.02;
}
.photo-first-summary .student-summary-main > p {
  font-size: .9rem;
}
.photo-first-summary .student-meta-row {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.photo-first-summary .student-meta-row span {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px;
  background: rgba(0,0,0,.36);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.photo-first-summary .student-meta-row strong {
  margin-top: 5px;
  font-size: .87rem;
}

.student-detail-modal-card {
  width: min(820px, 100%);
  max-height: min(94vh, 880px);
}
.student-detail-identity {
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
  padding: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(201,255,56,.085), transparent 34%),
    #080808;
  border-color: rgba(201,255,56,.2);
}
.detail-photo-shell {
  width: 100%;
  height: auto;
  min-height: 270px;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  border-color: rgba(201,255,56,.3);
  box-shadow: 0 18px 46px rgba(0,0,0,.42);
}
.student-detail-copy {
  align-self: center;
  min-width: 0;
}
.student-detail-identity h4 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}
.student-detail-identity p { font-size: .88rem; }
.student-detail-tags span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
}

.photo-preview-backdrop {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(16px);
}
.photo-preview-card {
  width: min(94vw, 640px);
  max-height: 96vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  background: #0b0b0b;
  border: 1px solid rgba(201,255,56,.32);
  border-radius: 24px;
  box-shadow: 0 34px 120px rgba(0,0,0,.86);
}
.photo-preview-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}
.photo-preview-topbar span {
  color: var(--action);
  font-size: .59rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.photo-preview-topbar h3 {
  margin: 5px 0 0;
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  line-height: 1.05;
}
.photo-preview-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .75rem;
}
.photo-preview-close { flex: 0 0 auto; }
.photo-preview-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030303;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.photo-preview-image {
  width: 100%;
  max-height: calc(96vh - 170px);
  object-fit: contain;
  object-position: center;
}
.photo-preview-initials {
  width: 100%;
  min-height: min(64vh, 560px);
  display: grid;
  place-items: center;
  color: var(--action);
  background: linear-gradient(145deg, rgba(201,255,56,.16), rgba(201,255,56,.035));
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 950;
  letter-spacing: -.08em;
}
.photo-preview-note {
  display: block;
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 720px) {
  .identity-confirmation-heading { align-items: flex-start; }
  .identity-confirmation-heading small { display: none; }
  .student-summary-card.photo-first-summary {
    grid-template-columns: minmax(140px, 42%) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }
  .identified-photo-shell {
    width: 100%;
    min-height: 190px;
  }
  .photo-first-summary .student-summary-main h2 { font-size: 1.35rem; }
  .photo-first-summary .student-meta-row { grid-template-columns: 1fr 1fr; margin-top: 14px; }
  .photo-first-summary .student-meta-row span { min-height: 52px; padding: 9px; }
  .student-detail-identity {
    grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }
  .detail-photo-shell { width: 100%; min-height: 205px; }
}

@media (max-width: 480px) {
  .identity-confirmation-heading { margin-top: 13px; }
  .identity-confirmation-heading strong { font-size: .96rem; }
  .student-summary-card.photo-first-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 13px;
  }
  .identified-photo-shell {
    width: min(100%, 250px);
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }
  .photo-first-summary .student-summary-main {
    width: 100%;
    padding: 0;
    text-align: center;
  }
  .photo-first-summary .student-summary-main h2 {
    margin-left: auto;
    margin-right: auto;
    font-size: 1.45rem;
  }
  .photo-first-summary .student-meta-row { text-align: left; }
  .student-detail-modal-card { padding: 13px; }
  .student-detail-identity {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  .detail-photo-shell {
    width: min(100%, 270px);
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }
  .student-detail-copy { width: 100%; text-align: center; }
  .student-detail-tags { justify-content: center; }
  .photo-preview-backdrop { padding: 8px; }
  .photo-preview-card { width: 100%; padding: 10px; border-radius: 18px; }
  .photo-preview-stage { border-radius: 14px; }
  .photo-preview-image { max-height: calc(100vh - 160px); }
  .photo-preview-note { display: none; }
}

/* v1.17.0 — cadastro da tarde, comunicação com responsáveis e dashboard ampliado */
button:disabled { cursor: not-allowed; opacity: .48; }
textarea {
  width: 100%;
  padding: 14px;
  resize: vertical;
  color: var(--text);
  background: #080808;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  font: inherit;
  line-height: 1.55;
}
textarea:focus { border-color: rgba(201,255,56,.78); box-shadow: 0 0 0 3px rgba(201,255,56,.09); }
.app-content, .app-view, .record-main, .record-side, .communication-record-main, .student-summary-main { min-width: 0; }
.desktop-tabs .tab-button { flex: 1 1 0; justify-content: center; }
.communication-tab-button span { background: rgba(255,188,71,.16); color: #ffd18a; }

.guardian-confirmation-card {
  margin-top: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(201,255,56,.075), rgba(10,10,10,.96) 42%);
  border: 1px solid rgba(201,255,56,.22);
  border-radius: 13px;
}
.guardian-confirmation-heading,
.guardian-contact-row,
.detail-guardian-card,
.communication-student-line,
.communication-board-heading,
.group-message-heading,
.communication-actions-row,
.group-message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guardian-confirmation-heading > div,
.guardian-contact-row > div { min-width: 0; }
.guardian-confirmation-heading span,
.guardian-contact-row span,
.detail-guardian-card span,
.communication-controls-card label > span,
.communication-guardian-line span,
.communication-status-select > span,
.group-message-heading span,
.communication-board-heading span {
  display: block;
  color: var(--muted);
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.guardian-confirmation-heading strong,
.guardian-contact-row strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.guardian-contact-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.guardian-contact-row .compact-action-button { flex: 0 0 auto; }
.registration-note { margin: 10px 0 0; color: #ffd18a; font-size: .69rem; line-height: 1.45; }
.data-quality-badge {
  display: inline-flex !important;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: var(--text) !important;
  background: #181818;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: .58rem !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  white-space: nowrap;
}
.data-quality-badge.pending { color: #ffd18a !important; border-color: rgba(255,188,71,.32); background: rgba(255,188,71,.09); }
.data-quality-badge.complete { color: var(--success) !important; border-color: rgba(201,255,56,.28); background: rgba(201,255,56,.08); }
.registration-pending-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 8px;
  color: #ffd18a;
  background: rgba(255,188,71,.09);
  border: 1px solid rgba(255,188,71,.22);
  border-radius: 99px;
  font-size: .58rem;
  font-weight: 850;
}

.dashboard-kpis-expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-kpi.warning-kpi::after { background: linear-gradient(135deg, transparent 50%, rgba(255,188,71,.14) 50%); }
.dashboard-kpi.danger-kpi::after { background: linear-gradient(135deg, transparent 50%, rgba(255,116,116,.14) 50%); }
.dashboard-kpi.success-kpi::after { background: linear-gradient(135deg, transparent 50%, rgba(201,255,56,.14) 50%); }
.dashboard-insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.dashboard-insight-strip > div {
  min-width: 0;
  padding: 12px 14px;
  background: rgba(10,10,10,.94);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dashboard-insight-strip span { display: block; color: var(--muted); font-size: .57rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.dashboard-insight-strip strong { display: block; margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .76rem; }
.dashboard-charts-expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-charts-expanded .dashboard-chart-wide { grid-column: span 2; grid-row: auto; }
.chart-stage-tall { min-height: 390px; }
.chart-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.communication-title-row { align-items: flex-end; }
.communication-summary-chip {
  min-width: 96px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 10px 13px;
  color: #0b0d05;
  background: var(--action);
  border-radius: 12px;
}
.communication-summary-chip strong { font-size: 1.25rem; }
.communication-summary-chip span { font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.communication-controls-card,
.group-message-panel,
.communication-board {
  padding: 16px;
  background: rgba(10,10,10,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.communication-controls-grid {
  display: grid;
  grid-template-columns: minmax(160px,.78fr) minmax(190px,.9fr) minmax(220px,1.18fr) minmax(200px,1fr);
  gap: 10px;
}
.communication-controls-card input,
.communication-controls-card select { min-height: 48px; }
.communication-shift-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.communication-shift-field legend {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  padding: 0;
  color: var(--muted);
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.communication-shift-buttons {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  padding: 4px;
  background: #060606;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.communication-shift-buttons button {
  min-width: 0;
  min-height: 38px;
  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;
}
.communication-shift-buttons button span { margin-right: 5px; font-size: .8rem; }
.communication-shift-buttons button.active {
  color: #080b03;
  background: var(--action);
}
.communication-shift-buttons button:active { transform: scale(.985); }
.communication-actions-row { justify-content: flex-start; margin-top: 12px; }
.communication-help { margin: 10px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.group-message-panel { margin-top: 10px; border-color: rgba(201,255,56,.25); }
.group-message-heading h3,
.communication-board-heading h3 { margin: 4px 0 0; font-size: 1rem; }
.group-message-panel textarea { min-height: 230px; margin-top: 13px; }
.group-message-actions { justify-content: flex-end; margin-top: 10px; }
.communication-board { margin-top: 10px; }
.communication-board-heading > strong { color: var(--muted); font-size: .67rem; }
.communication-list { display: grid; gap: 8px; margin-top: 13px; }
.communication-record-card {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 12px;
  padding: 13px;
  background: #080808;
  border: 1px solid var(--line);
  border-left: 3px solid #ffbc47;
  border-radius: 13px;
}
.communication-record-card.status-generated { border-left-color: #f4f4ef; }
.communication-record-card.status-awaiting { border-left-color: #8fb3ff; }
.communication-record-card.status-confirmed { border-left-color: var(--success); }
.communication-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #081005;
  background: var(--action);
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 950;
}
.communication-student-line { align-items: flex-start; }
.communication-student-line > div { min-width: 0; }
.communication-student-line strong { display: block; overflow-wrap: anywhere; font-size: .88rem; }
.communication-student-line div > span { display: block; margin-top: 4px; color: var(--muted); font-size: .67rem; }
.communication-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  color: #ffd18a;
  background: rgba(255,188,71,.09);
  border: 1px solid rgba(255,188,71,.22);
  border-radius: 99px;
  font-size: .56rem;
  font-weight: 900;
  white-space: nowrap;
}
.communication-status-pill.generated { color: var(--text); background: rgba(244,244,239,.07); border-color: rgba(244,244,239,.2); }
.communication-status-pill.awaiting { color: #b9d0ff; background: rgba(143,179,255,.09); border-color: rgba(143,179,255,.24); }
.communication-status-pill.confirmed { color: var(--success); background: rgba(201,255,56,.08); border-color: rgba(201,255,56,.24); }
.communication-guardian-line {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.communication-guardian-line strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: .72rem; }
.communication-record-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.communication-record-actions button { min-height: 39px; padding: 0 11px; font-size: .66rem; }
.communication-status-select { width: min(220px,100%); }
.communication-status-select select { min-height: 39px; padding: 0 10px; font-size: .68rem; }
.record-status-line { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }

.student-update-modal-card { width: min(680px, calc(100vw - 24px)); }
.student-update-form { margin-top: 14px; }
.student-update-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.student-update-grid label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .59rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.student-update-wide { grid-column: span 2; }
.student-update-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 12px; background: rgba(201,255,56,.06); border: 1px solid rgba(201,255,56,.18); border-radius: 11px; }
.student-update-check input { width: 20px; min-height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--action); }
.student-update-check span { color: var(--text); font-size: .72rem; line-height: 1.45; }
.detail-guardian-card {
  margin-top: 10px;
  padding: 12px;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.detail-guardian-card > div { min-width: 0; flex: 1; }
.detail-guardian-card strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: .72rem; }

.nav-message::before { content: ""; position: absolute; inset: 2px 1px 4px; border: 1.7px solid currentColor; border-radius: 5px; }
.nav-message::after { content: ""; position: absolute; left: 4px; bottom: 1px; width: 6px; height: 6px; border-left: 1.7px solid currentColor; transform: skewY(-38deg); }

@media (max-width: 980px) {
  .dashboard-kpis-expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-charts-expanded { grid-template-columns: 1fr; }
  .dashboard-charts-expanded .dashboard-chart-wide { grid-column: auto; }
  .communication-controls-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .mobile-nav { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .mobile-nav-button { min-width: 0; }
  .mobile-nav-button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .communication-record-card { grid-template-columns: 40px minmax(0,1fr); }
  .communication-avatar { width: 40px; height: 40px; }
  .communication-guardian-line { grid-template-columns: 1fr 1fr; }
  .communication-guardian-line .registration-pending-label { grid-column: span 2; }
  .detail-guardian-card { align-items: flex-start; flex-wrap: wrap; }
  .detail-guardian-card .compact-action-button { width: 100%; }
}

@media (max-width: 600px) {
  .guardian-confirmation-heading { align-items: flex-start; }
  .guardian-contact-row { align-items: stretch; flex-direction: column; }
  .guardian-contact-row .compact-action-button { width: 100%; min-height: 42px; }
  .dashboard-insight-strip { grid-template-columns: 1fr; gap: 6px; }
  .chart-stage-tall { min-height: 330px; }
  .communication-title-row { align-items: center; }
  .communication-controls-grid { grid-template-columns: 1fr; }
  .communication-shift-buttons button { min-height: 42px; font-size: .72rem; }
  .communication-actions-row,
  .group-message-actions { align-items: stretch; flex-direction: column; }
  .communication-actions-row button,
  .group-message-actions button { width: 100%; }
  .communication-record-card { grid-template-columns: 1fr; }
  .communication-avatar { width: 42px; height: 42px; }
  .communication-student-line { align-items: flex-start; gap: 8px; }
  .communication-guardian-line { grid-template-columns: 1fr; }
  .communication-guardian-line .registration-pending-label { grid-column: auto; }
  .communication-record-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .communication-status-select { width: 100%; }
  .communication-record-actions button { width: 100%; min-height: 44px; }
  .student-update-grid { grid-template-columns: 1fr; }
  .student-update-wide { grid-column: auto; }
  .student-update-modal-card { max-height: calc(100dvh - 24px); overflow-y: auto; }
}

@media (max-width: 430px) {
  .dashboard-kpis-expanded { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi { min-width: 0; }
  .dashboard-kpi > strong { font-size: 1.32rem; }
  .dashboard-kpi > span { font-size: .54rem; }
  .communication-title-row { align-items: flex-start; flex-direction: column; }
  .communication-summary-chip { width: 100%; }
  .group-message-panel textarea { min-height: 260px; }
  .data-quality-badge { white-space: normal; text-align: center; }
  .mobile-nav { left: 6px; right: 6px; gap: 2px; padding: 4px; }
  .mobile-nav-button { min-height: 54px; padding: 0 2px; }
  .mobile-nav-button span { font-size: .55rem; }
}


/* AGV+ v1.24.3 — validação pedagógica + ajustes da auditoria */
.portal-validation-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 26px 0 16px;
  padding: 14px 16px;
  color: #ffe7a9;
  background: linear-gradient(135deg, rgba(239,184,95,.14), rgba(239,184,95,.06));
  border: 1px solid rgba(239,184,95,.42);
  border-radius: var(--radius);
}
.portal-validation-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #1a1204;
  background: var(--warning);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 950;
}
.portal-validation-alert strong,
.portal-validation-alert span,
.portal-validation-alert small { display: block; }
.portal-validation-alert strong { color: #ffd67e; font-size: .88rem; }
.portal-validation-alert span { margin-top: 4px; color: #c9b785; font-size: .72rem; line-height: 1.45; }
.portal-validation-alert small {
  color: #d4b56e;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: right;
  white-space: nowrap;
}
.portal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.portal-stats article {
  min-width: 0;
  padding: 15px 16px;
  background: rgba(10,10,10,.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.portal-stats span,
.portal-stats strong,
.portal-stats small { display: block; }
.portal-stats span {
  color: var(--muted);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.portal-stats strong { margin-top: 7px; font-size: 1.55rem; letter-spacing: -.05em; }
.portal-stats small { margin-top: 3px; color: var(--muted-2); font-size: .62rem; }
.portal-stats + .access-grid { margin-top: 18px; }

.validation-history-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  color: #ffe5a1;
  background: rgba(239,184,95,.09);
  border: 1px solid rgba(239,184,95,.3);
  border-radius: var(--radius-sm);
}
.validation-history-banner strong {
  flex: 0 0 auto;
  color: #ffd67e;
  font-size: .69rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.validation-history-banner span {
  color: #bdaa7b;
  font-size: .71rem;
  line-height: 1.4;
}
.validation-version-status,
.validation-status { color: var(--warning) !important; }
.validation-version-status i,
.validation-status i {
  background: var(--warning) !important;
  box-shadow: 0 0 12px rgba(239,184,95,.42) !important;
}
.login-form button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 720px) {
  .portal-validation-alert { grid-template-columns: auto minmax(0,1fr); }
  .portal-validation-alert small { grid-column: 2; text-align: left; white-space: normal; }
  .portal-stats { grid-template-columns: 1fr; }
  .validation-history-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
}


/* AGV+ v1.24.4 — entrada única da equipe pedagógica */
.access-grid.access-grid-single {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 640px);
}
.access-grid-single .access-card {
  min-height: 142px;
}
@media (max-width: 780px) {
  .access-grid.access-grid-single {
    width: 100%;
  }
}


/* AGV+ v1.25.8 — contrato visual mobile consolidado */
body, .auth-page, .pedagogue-app { min-height: 100vh; min-height: 100dvh; }
a:focus-visible { outline: 3px solid rgba(201,255,56,.28); outline-offset: 3px; border-radius: 8px; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 4px; }

/* No celular, o CTA de acesso realmente aparece antes dos avisos e métricas. */
@media (max-width: 520px) {
  .portal-shell { display: flex; flex-direction: column; }
  .portal-wordmark { order: 1; margin-bottom: 48px; }
  .portal-hero { order: 2; }
  .access-grid { order: 3; margin-top: 26px; }
  .portal-validation-alert { order: 4; margin-top: 20px; }
  .portal-stats { order: 5; }
  .access-card { min-height: 116px; }
}

/* Exportar: 2x2 em celulares médios e uma coluna apenas nos muito estreitos. */
@media (min-width: 340px) and (max-width: 650px) {
  .export-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .export-card { min-height: 116px; padding: 14px; }
  .export-card strong { font-size: .9rem; }
  .export-card small { font-size: .66rem; }
}
@media (max-width: 339px) {
  .export-options { grid-template-columns: 1fr; }
}
