:root {
  --navy: #123b5d;
  --navy-2: #0d2c46;
  --blue: #48a8df;
  --cyan: #47d5dc;
  --ink: #172633;
  --muted: #637383;
  --line: #dbe4eb;
  --surface: #ffffff;
  --background: #f3f7f9;
  --green: #1c8b62;
  --red: #c84b51;
  --amber: #b77716;
  --shadow: 0 10px 30px rgba(23, 38, 51, .08);
}

/* v3.1 operational polish */
.autosave-state { color: #39724f; white-space: nowrap; }
.schedule-matrix { min-width: max(100%, calc(92px + var(--teacher-count, 1) * 170px)); }
.week-board, .day-sheet { max-width: 100%; }
.day-sheet { overflow: hidden; }
.day-sheet .schedule-matrix { overflow: visible; }
.matrix-cell, .matrix-head { min-width: 0; overflow-wrap: anywhere; }
.agenda-row a { display: inline-flex; margin-top: 6px; }
.photo-unavailable::before { content: "?"; display: grid; place-items: center; width: 100%; height: 100%; }
.inline-student-cell { padding: 4px !important; display: grid !important; grid-template-columns: minmax(0, 1fr) 24px; gap: 3px; align-items: center; }
.cell-student-input { width: 100%; min-width: 0; height: 32px; border: 1px solid #b8ccda; background: white; padding: 4px 6px; font-size: 12px; }
.cell-add-student { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #174b70; color: white; font-weight: 700; }
.catalog-delete { width: 30px; height: 30px; color: #a3313b; }

@media (max-width: 760px) {
  body:has(.sidebar.open)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(6, 28, 45, .28);
  }
  .sidebar.open { z-index: 60; }
  .report-grid, .report-summary-grid { grid-template-columns: 1fr !important; }
  .star-picker { display: flex; flex-wrap: nowrap; gap: 3px; }
  .star-picker button { width: 42px; min-width: 42px; height: 42px; padding: 0; }
  .agenda-row { grid-template-columns: 62px minmax(0, 1fr); }
  .agenda-row > button { grid-column: 1 / -1; width: 100%; }
  .day-sheet { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .day-sheet .schedule-matrix { width: max-content; min-width: 100%; }
}

/* Bloco 2: relatórios pedagógicos e listas */
.rating-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;grid-column:1/-1}
.report-rating{min-width:0}.report-rating .star-picker{display:flex;gap:4px;min-height:44px;align-items:center}
.star-picker button{border:0;background:transparent;color:#e2a500;font-size:28px;padding:2px;line-height:1;cursor:pointer}
.report-mode{display:flex;gap:20px;flex-wrap:wrap}.report-students{display:flex;gap:8px;flex-wrap:wrap}
.report-students span{background:#e9f6fb;border:1px solid #b9dce9;padding:6px 10px;border-radius:6px;font-weight:700}
.student-report-section{border-top:1px solid #d5e0e7;padding-top:18px;margin-top:18px}
.report-worklist{display:grid;gap:10px}.report-late{border-left:4px solid #c54b55}.warning-text{display:block;color:#a52f39;font-weight:700;margin-top:4px}
.exercise-tree details{border-bottom:1px solid #d7e1e7;padding:10px 0}.exercise-tree summary{cursor:pointer;font-weight:800;padding:8px}
.exercise-tree details details{margin-left:18px}.exercise-row{display:flex;align-items:center;gap:10px;padding:12px;background:#f7fafc;margin:6px 0}
.exercise-row>div{flex:1;min-width:0}.exercise-row small{display:block;color:#5d7180;margin-top:4px}
.folder-empty{padding:10px 16px;color:var(--muted);font-size:14px}.attention-list{display:grid;gap:10px}
.list-search{max-width:420px;margin-bottom:14px}
.attention-list .read{background:#f6fafb}.attention-list .resolved{border-color:#b8decf;background:#edf8f3;opacity:.82}
.explicit-matrix{grid-auto-rows:minmax(calc(54px * var(--schedule-zoom,1)),auto)}
.duration-card{position:relative;z-index:1;border-bottom:2px solid white}.duration-card strong,.duration-card small{white-space:normal;line-height:1.2}.duration-card time{font-size:.75em;color:var(--muted)}
.fixed-empty{color:#176748;background:#f2fbf7}.fixed-copy-bar{display:flex;align-items:end;gap:12px;margin:0 0 16px}.fixed-copy-bar label{margin:0}
.recipient-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:260px;overflow:auto;padding:8px;border:1px solid var(--line);border-radius:6px}.recipient-checklist label{display:flex;align-items:flex-start;gap:7px;padding:7px;background:#f7fafc}
.priority-alta{color:#8a5b00;background:#fff0c9}.priority-urgente{color:#a52f39;background:#ffe4e7}
@media(max-width:700px){.rating-pair{grid-template-columns:1fr}.report-mode{display:grid}.exercise-row{align-items:stretch;flex-direction:column}.report-tabs{overflow-x:auto}.report-tabs .tab{white-space:nowrap}}
@media(max-width:760px){.fixed-copy-bar{align-items:stretch;flex-direction:column}.fixed-copy-bar>*{width:100%}.recipient-checklist{grid-template-columns:1fr}.explicit-matrix.mobile-focused{grid-template-columns:64px minmax(0,1fr)!important;min-width:0!important;width:100%}.explicit-matrix .duration-card{min-width:0}.day-admin-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important}.day-admin-actions button{min-width:0;font-size:12px;padding:5px 3px}}
@media(max-width:760px){.todo-table{overflow:visible}.todo-table table,.todo-table tbody,.todo-table tr,.todo-table td{display:block;width:100%}.todo-table thead{display:none}.todo-table tr{padding:14px;margin-bottom:12px;border:1px solid var(--line);border-radius:6px;background:#fff}.todo-table td{display:grid;grid-template-columns:108px minmax(0,1fr);align-items:center;gap:10px;padding:7px 0;border:0}.todo-table td::before{content:attr(data-label);font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase}.todo-table td[data-label="Tarefa"]{display:block}.todo-table td[data-label="Tarefa"]::before{display:none}.todo-table select{width:100%;min-width:0}}
@media(max-width:760px){.attention-item{align-items:stretch;flex-direction:column}.attention-item .actions{display:grid;grid-template-columns:1fr}.attention-item .actions button{width:100%}}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--background); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-shell, .installer-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf4f7; }
.login-panel, .installer { width: min(560px, 100%); padding: 36px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; }
.login-panel { width: min(430px, 100%); }
.login-panel img, .installer img { display: block; width: 220px; max-width: 70%; margin: 0 auto 28px; }
h1, h2, p { margin-top: 0; }
.login-panel h1, .installer h1 { text-align: center; margin-bottom: 8px; }
.login-panel > p, .installer > p { text-align: center; color: var(--muted); margin-bottom: 28px; }
label { display: grid; gap: 7px; font-weight: 650; color: #334757; }
input, select, textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: white; border: 1px solid #bccbd5; border-radius: 6px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(72, 168, 223, .14); }
textarea { min-height: 90px; resize: vertical; }
.login-panel form { display: grid; gap: 17px; }
.primary, .secondary, .icon-button { min-height: 40px; border-radius: 6px; border: 1px solid transparent; font-weight: 700; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.primary { padding: 10px 16px; color: white; background: var(--navy); }
.primary:hover { background: var(--navy-2); }
.secondary { padding: 9px 14px; color: var(--navy); background: white; border-color: #b9cad6; }
.icon-button { width: 40px; padding: 0; color: var(--navy); background: white; border-color: var(--line); font-size: 20px; }
.form-error { min-height: 20px; color: var(--red); }
.alert { padding: 12px 14px; margin-bottom: 18px; border-radius: 6px; }
.alert.error { color: #852c31; background: #fdecee; border: 1px solid #efbdc0; }
.alert.success { color: #176748; background: #e7f6ef; border: 1px solid #aadcc6; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; color: white; background: var(--navy); overflow-y: auto; }
.brand { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px; padding: 7px 7px 22px; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { font-size: 16px; }
.brand span { padding: 3px 6px; font-size: 10px; font-weight: 800; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; }
#main-nav { display: grid; gap: 3px; }
.nav-button { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 8px 11px; color: #d8e9f4; background: transparent; border: 0; border-radius: 6px; text-align: left; }
.nav-button > span { display: grid; place-items: center; width: 22px; font-weight: 800; }
.nav-button:hover, .nav-button.active { color: white; background: rgba(255,255,255,.13); }
.nav-button.logout { margin-top: auto; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; min-height: 74px; display: flex; align-items: center; gap: 16px; padding: 12px 25px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 1px 0 0; font-size: 22px; }
.topbar #page-eyebrow { color: var(--muted); font-size: 12px; }
#menu-button { display: none; }
.profile-chip { margin-left: auto; display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 24px; }
#profile-initials, .avatar-large { display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-weight: 800; }
#profile-initials { width: 34px; height: 34px; }
.content { padding: 24px; }
.welcome { min-height: 155px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; color: white; background: var(--navy); border-radius: 8px; }
.welcome span { color: #bce9f5; text-transform: capitalize; }
.welcome h2 { margin: 6px 0; font-size: 32px; }
.welcome p { margin: 0; color: #d9e9f2; }
.avatar-large { width: 78px; height: 78px; flex: 0 0 78px; font-size: 25px; background: var(--cyan); color: var(--navy); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.metric { min-height: 116px; display: grid; gap: 4px; padding: 16px; color: var(--ink); text-align: left; background: white; border: 1px solid var(--line); border-radius: 7px; }
.metric strong { font-size: 28px; color: var(--navy); }
.metric small, .metric span { color: var(--muted); }
.panel { margin-top: 18px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-head h2 { margin-bottom: 4px; font-size: 19px; }
.panel-head p { margin: 0; color: var(--muted); }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 13px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font-weight: 700; white-space: nowrap; }
.tab.active { color: var(--navy); border-bottom-color: var(--blue); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.choice-grid label, .check-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.choice-grid input, .check-line input { width: auto; }
.subject-checks { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 8px; }
.subject-checks label { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f4f7f9; border: 1px solid var(--line); border-radius: 5px; font-weight: 600; }
.subject-checks input { width: auto; }
fieldset { padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
legend { padding: 0 6px; font-weight: 750; }
.empty-state, .loading { padding: 34px 20px; color: var(--muted); text-align: center; border: 1px dashed #c7d5df; border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid h2 { margin: 10px 0 0; font-size: 17px; }
.form-grid small { color: var(--muted); font-weight: 400; }
.form-grid.compact { grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; }
.align-end { align-self: end; }
.week-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.week-state-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 13px; margin-bottom: 12px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.week-nav, .actions { display: flex; align-items: center; gap: 9px; }
.status { display: inline-flex; padding: 5px 9px; color: var(--navy); background: #eaf2f7; border-radius: 4px; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.status.liberada { color: #176748; background: #e1f3ea; }
.status.encerrada { color: #5b6370; background: #e8ebee; }
.week-board { display: grid; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.excel-week { font-size: calc(14px * var(--schedule-zoom, 1)); }
.day-sheet { min-width: 760px; background: white; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.day-sheet > header { position: sticky; left: 0; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; color: white; background: var(--navy); }
.day-sheet > header div { display: flex; align-items: center; gap: 12px; }
.day-sheet > header span { font-weight: 800; }
.small { min-height: 32px; padding: 5px 9px; }
.schedule-matrix { display: grid; grid-template-columns: calc(84px * var(--schedule-zoom,1)) repeat(var(--teacher-count), minmax(calc(145px * var(--schedule-zoom,1)), 1fr)); min-width: max-content; }
.matrix-head, .matrix-time { min-height: 42px; display: grid; place-items: center; padding: 7px; background: #edf3f6; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 750; text-align: center; }
.matrix-time { color: var(--muted); font-size: .82em; }
.matrix-time small { display: block; font-size: .8em; }
.matrix-cell { min-height: calc(54px * var(--schedule-zoom,1)); display: grid; place-content: center; place-items: center; gap: 3px; padding: 7px; text-align: center; color: var(--ink); background: white; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.matrix-cell strong, .matrix-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix-cell small { color: var(--muted); }
.matrix-cell.atividade { color: #176748; background: #e5f6ed; }
.matrix-cell.aula { border-left: 4px solid var(--blue); background: #edf7fd; }
.matrix-cell.reuniao, .matrix-cell.planejamento { border-left: 4px solid var(--amber); background: #fff7e5; }
.matrix-cell.home_office { border-left: 4px solid #7b62a8; background: #f4f0fa; }
.matrix-cell.unavailable { place-items: center; color: #9c3d42; background: repeating-linear-gradient(135deg,#f9ebec,#f9ebec 8px,#f5dfe1 8px,#f5dfe1 16px); font-size: .8em; }
.matrix-cell.selected-cell { position: relative; z-index: 2; box-shadow: inset 0 0 0 3px #1687c1; }
.empty-day { width: 100%; min-height: 90px; color: var(--muted); background: white; border: 0; }
.day-column { min-height: 410px; background: #eaf0f4; border: 1px solid #d4dfe6; border-radius: 7px; overflow: hidden; }
.day-column > header { display: flex; justify-content: space-between; gap: 9px; padding: 11px; color: white; background: var(--navy); font-size: 12px; }
.day-entries { display: grid; gap: 7px; padding: 8px; }
.schedule-entry, .empty-slot { width: 100%; min-height: 75px; display: grid; gap: 4px; padding: 9px; color: var(--ink); text-align: left; background: white; border: 1px solid #c8d6df; border-left: 4px solid var(--blue); border-radius: 5px; }
.schedule-entry.atividade { border-left-color: var(--green); background: #eff9f4; }
.schedule-entry.reuniao { border-left-color: var(--amber); background: #fff8e9; }
.schedule-entry time { color: var(--muted); font-size: 11px; }
.schedule-entry small { color: var(--muted); }
.empty-slot { place-items: center; color: var(--muted); border-style: dashed; }
.extraordinary { margin-top: 22px; }
.extraordinary .schedule-entry { display: inline-grid; width: min(310px, 100%); margin: 0 8px 8px 0; }
.fixed-grid { display: grid; grid-template-columns: 70px repeat(5, minmax(135px, 1fr)); min-width: 800px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.fixed-head, .fixed-time { display: grid; place-items: center; min-height: 40px; padding: 6px; font-weight: 750; background: #eaf1f5; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fixed-cell { min-height: 48px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fixed-cell.active { color: #176748; background: #e5f6ed; }
.fixed-cell.blocked { color: #9c3d42; background: repeating-linear-gradient(135deg,#f8e8e9,#f8e8e9 8px,#f4dddf 8px,#f4dddf 16px); }
#fixed-grid { overflow-x: auto; }
.availability-grid { display:grid; grid-template-columns:70px repeat(6,minmax(105px,1fr)); min-width:760px; overflow-x:auto; border:1px solid var(--line); }
.availability-cell { min-height:44px; border:0; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#f7f9fa; }
.availability-cell.active { background:#dff4e9; box-shadow:inset 0 0 0 2px var(--green); }
.availability-cell.active::after { content:"Disponível"; color:#176748; font-size:11px; font-weight:800; }
.record-grid { display:grid; gap:10px; }
.table-wrap { overflow-x: auto; }
.attention-list{display:grid;gap:10px}.attention-item{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);border-left:4px solid var(--cyan);border-radius:6px;background:#fff}.attention-item.resolved{border-left-color:#39a86b;background:#f1fbf5}.attention-item p{margin:6px 0;color:var(--muted)}.attention-related{display:block;margin-top:5px;font-weight:800;color:var(--blue)}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f3f7f9; font-size: 12px; text-transform: capitalize; }
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(8, 28, 43, .58); }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px; background: white; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head { margin-bottom: 20px; }
.modal-head span { color: var(--muted); font-size: 12px; }
.modal-head h2 { margin: 2px 0 0; }
.modal-actions { justify-content: flex-end; margin-top: 20px; }
.agenda-day { margin-top: 16px; }
.agenda-day h3 { margin-bottom: 8px; color: var(--navy); }
.agenda-row { display: grid; grid-template-columns: 100px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px; border-bottom: 1px solid var(--line); }
.agenda-row time { color: var(--navy); font-weight: 800; }
.agenda-row div { display: grid; gap: 4px; }
.agenda-row small { color: var(--muted); }
.star-picker { display: flex; gap: 5px; }
.star-picker button { padding: 0; color: #e0a526; background: transparent; border: 0; font-size: 32px; }
.report-list { display: grid; gap: 12px; }
.report-card { padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.report-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.report-card header div { display: grid; gap: 4px; }
.report-card header small { color: var(--muted); }
.report-card header > span { color: #e0a526; }
.report-card p { margin: 7px 0; }
.settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.settings-section { padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.settings-section header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.settings-section h3 { margin: 0; }
.catalog-item { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.catalog-item small, .muted { color: var(--muted); }
.row-actions { display:flex; flex-wrap:wrap; gap:6px; min-width:280px; }
.person-photo { display:grid; place-items:center; object-fit:cover; border-radius:50%; color:white; background:var(--blue); font-weight:800; }
.person-photo.small { width:48px; height:48px; }
.person-photo.large { width:92px; height:92px; font-size:24px; }
.person-photo:is(img) { object-fit:cover; object-position:center; }
.profile-summary { display:flex; align-items:center; gap:18px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.profile-summary h3 { margin:0 0 5px; }
.profile-summary p { margin:0; color:var(--muted); }
.record-sections { display:grid; gap:14px; margin-top:18px; }
.record-sections section { padding:14px; border:1px solid var(--line); border-radius:6px; }
.photo-editor { display:flex; align-items:center; gap:14px; padding:12px; background:#f4f8fa; border:1px solid var(--line); }
.photo-editor label { flex:1; }
.journey-list { display:grid; gap:8px; }
.journey-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(130px,1fr) minmax(130px,1fr); align-items:end; gap:10px; padding:10px; border:1px solid var(--line); background:#f7f9fa; }
.danger-zone { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; padding:14px; border:1px solid #e4b5b8; background:#fff5f5; }
.danger-zone h3 { grid-column:1/-1; color:#9a3339; }
.inline-upload { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; }
.document-mini-list { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.document-mini-list a { padding:7px 10px; color:var(--navy); background:#edf5f9; border-radius:4px; text-decoration:none; }
.date-control { width:min(320px,100%); margin-bottom:16px; }
.record-tabs { display:flex; gap:3px; overflow-x:auto; border-bottom:1px solid var(--line); margin-bottom:16px; }
.record-tab-panel { min-height:190px; padding:8px 2px; }
.crop-modal { width:min(520px,100%); }
.crop-modal canvas { display:block; width:min(320px,100%); height:auto; margin:0 auto 18px; background:#dce8ee; border-radius:50%; touch-action:none; }
.remove-extra { width:24px; height:24px; margin-left:5px; color:#9a3339; background:#fff; border:1px solid #e1b7ba; border-radius:50%; }
.day-admin-actions { display:flex; gap:6px; margin-left:auto; }
.holiday-banner { padding:9px 12px; color:#73520d; background:#fff2c8; border-bottom:1px solid #e8cf7c; text-align:center; font-weight:800; }
.absence-banner { display:flex; flex-wrap:wrap; gap:6px; padding:7px 10px; background:#fff4f4; border-bottom:1px solid #e6bfc2; }
.absence-banner button { padding:5px 8px; color:#873a40; background:white; border:1px solid #deb4b7; border-radius:4px; }
.mobile-day-tabs { display:none; }
.mobile-teacher-select { display:none; padding:10px; background:#edf3f6; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 15px 0 35px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  #menu-button { display: inline-grid; place-items: center; }
  .topbar { padding: 10px 14px; }
  .topbar h1 { font-size: 18px; }
  #profile-name { display: none; }
  .content { padding: 14px; }
  .welcome { min-height: 132px; padding: 20px; }
  .welcome h2 { font-size: 25px; }
  .avatar-large { width: 58px; height: 58px; flex-basis: 58px; font-size: 18px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric { min-height: 102px; padding: 12px; }
  .week-toolbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .week-toolbar .actions { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .form-grid, .form-grid.compact { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .choice-grid { grid-template-columns: 1fr; }
  .subject-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .align-end { align-self: stretch; }
  .week-state-bar { align-items: flex-start; flex-direction: column; }
  .day-sheet { display:block; min-width:760px; width:760px; }
  .day-sheet.mobile-active { display:block; }
  .mobile-day-tabs,.mobile-teacher-select { display:none!important; }
  .day-sheet .schedule-matrix.mobile-focused { grid-template-columns:64px minmax(0,1fr); min-width:0; width:100%; }
  .mobile-teacher-select { display:grid; }
  .excel-week, .week-board { overflow-x:hidden; }
  .day-admin-actions { width:100%; margin:7px 0 0; }
  .day-sheet > header { flex-wrap:wrap; }
  .agenda-row { grid-template-columns: 76px minmax(0,1fr); }
  .agenda-row button { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
  .journey-row, .danger-zone, .inline-upload { grid-template-columns:1fr; }
  .danger-zone h3 { grid-column:auto; }
  .row-actions { min-width:220px; }
}
/* Blocos 1 e 2 consolidados - v2.3 */
.draft-state{font-size:.82rem;color:#537083;white-space:nowrap}
.draft-state.dirty{color:#9a5a00;font-weight:700}
.selected-students{display:grid;gap:8px;margin-top:8px}
.selected-student-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,220px) 40px;align-items:center;gap:8px;padding:8px;border:1px solid #c9dbe6;background:#f7fbfd;border-radius:6px}
.selected-student-row span{display:flex;flex-direction:column;min-width:0}
.selected-student-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.student-picker{position:relative}
.student-search-results{position:absolute;z-index:30;left:0;right:0;top:67px;max-height:240px;overflow:auto;background:#fff;border:1px solid #abc9da;box-shadow:0 8px 22px #163c5426}
.student-search-results button{display:flex;flex-direction:column;width:100%;padding:10px 12px;border:0;border-bottom:1px solid #e2edf3;background:#fff;text-align:left}
.student-search-results button:hover{background:#eaf7fc}
.recipient-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;min-height:34px}
.recipient-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 8px;background:#e7f5fb;border:1px solid #b6d9e8;border-radius:16px;font-size:.85rem}
.recipient-chip button{border:0;background:transparent;font-size:1rem;line-height:1;cursor:pointer}
.recipient-picker{position:relative}
.communication-list{display:grid}
.communication-row{display:grid;grid-template-columns:110px minmax(240px,1fr) minmax(180px,auto);gap:14px;align-items:center;width:100%;padding:14px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left}
.communication-row:hover,.attention-link:hover{background:#f0f8fc}
.communication-row.resolvida{background:#effaf4;color:#456}
.communication-row>span{display:flex;flex-direction:column;gap:3px}
.communication-kind{font-size:12px;font-weight:800;text-transform:uppercase;color:var(--blue)}
.message-thread{display:grid;gap:10px;max-height:430px;overflow:auto;padding:8px;background:#f5f8fa}
.message-thread article{max-width:78%;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:6px}
.message-thread article.mine{margin-left:auto;background:#eaf7fc}
.message-thread article p{white-space:pre-wrap}
.message-thread article small{display:block;margin-top:6px;color:var(--muted)}
.meeting-box{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#eaf7fc}
.attention-link{display:grid;grid-template-columns:1fr auto;gap:4px;width:100%;padding:12px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left}
.attention-link span{grid-column:1;color:var(--muted)}
.attention-link small{grid-row:1/3;grid-column:2;align-self:center}
.searchable-list{display:grid;gap:10px}
.wellness-reminder{display:grid;grid-template-columns:1fr auto;width:100%;gap:4px;padding:14px 16px;margin-bottom:14px;border:1px solid #94cdb5;background:#eefaf4;color:#174c37;text-align:left}
.wellness-reminder span{grid-column:1}.wellness-reminder small{grid-column:2;grid-row:1/3;align-self:center;font-weight:800}
@media(max-width:760px){
  .communication-row{grid-template-columns:1fr}
  .communication-row>span:last-child{align-items:flex-start}
  .message-thread article{max-width:94%}
}
.matrix-cell,.duration-card{align-items:center;justify-content:center;text-align:center}
.week-board,.excel-week{overflow:auto;touch-action:pan-x pan-y pinch-zoom}
@media(max-width:760px){
  .selected-student-row{grid-template-columns:1fr 42px}
  .selected-student-row select{grid-column:1}
  .week-board .day-sheet{display:block!important}
  .week-board .mobile-day-tabs,.mobile-teacher-select{display:none!important}
  .schedule-matrix.mobile-focused{min-width:max-content}
  .schedule-matrix [data-grid-teacher][hidden]{display:flex!important}
}

/* Bloco 4 - documentos, mobile e usabilidade */
.document-list{display:grid;gap:10px}
.document-card{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,1fr) auto auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:7px;background:#fff}
.document-card strong,.document-card small{display:block}
.document-card small,.document-card span,.document-card time{color:var(--muted)}
.attention-focus{outline:3px solid #54cfe0;outline-offset:3px;background:#edfaff!important}
.photo-unavailable img{display:none!important}
.photo-unavailable::after{content:attr(data-initials);display:grid;place-items:center;width:100%;height:100%;border-radius:999px;background:#4aa9df;color:#fff;font-weight:800}
.cell-student-input,.cell-add-student{display:none!important}
.matrix-cell.inline-student-cell{grid-template-columns:1fr!important}
.matrix-cell strong,.matrix-cell small,.matrix-cell time{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.entry-summary-strip{margin:12px 0;padding:10px 12px;border:1px solid #cfe0ea;border-radius:7px;background:#f7fbfd;color:#123b5d}
.entry-summary-strip small{display:block;margin-top:4px;color:#5b7080}
.matrix-cell.teacher-absent-cell{background:#fff3df!important;border-color:#e29b3d!important;color:#7a4300!important}
.matrix-cell.teacher-absent-cell::after{content:"AUSENCIA";display:block;margin-top:4px;font-size:10px;font-weight:800;color:#a15b00}
.audit-selected-cell,.selected-cell{outline:3px solid #50b9e8!important;outline-offset:-3px}
@media(max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}
  .workspace,.content{max-width:100%;overflow-x:hidden}
  .content{padding:12px}
  .panel{padding:16px 12px}
  .panel-head .actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
  .panel-head .actions button,.panel-head .actions .button-link{width:100%;min-width:0;white-space:normal}
  .tabs,.report-tabs{display:flex;max-width:100%;overflow-x:auto;gap:8px;padding-bottom:6px}
  .tabs .tab,.report-tabs .tab{flex:0 0 auto;max-width:170px;white-space:normal;line-height:1.15}
  .report-worklist{display:grid;gap:10px}
  .agenda-row.mobile-report-row{grid-template-columns:1fr;gap:8px;align-items:stretch;padding:12px}
  .agenda-row.mobile-report-row time{display:flex;justify-content:space-between;gap:8px;font-size:15px}
  .agenda-row.mobile-report-row time small{font-size:15px}
  .agenda-row.mobile-report-row div{min-width:0;text-align:left}
  .agenda-row.mobile-report-row strong,.agenda-row.mobile-report-row small{display:block;position:static;white-space:normal;overflow:visible;text-overflow:clip}
  .agenda-row.mobile-report-row button{grid-column:auto;width:100%;margin-top:4px}
  .report-card header{display:grid;grid-template-columns:1fr;gap:8px}
  .document-card{grid-template-columns:1fr;align-items:stretch}
  .document-card .row-actions{display:grid;grid-template-columns:1fr 1fr;min-width:0}
  .document-card .button-link{text-align:center}
  .day-sheet{min-width:720px;width:720px}
  .week-board,.excel-week{overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch}
  .schedule-matrix{grid-template-columns:72px repeat(var(--teacher-count), minmax(150px, 1fr));}
  .matrix-cell{padding:6px;min-height:58px}
  .matrix-cell strong{font-size:13px;line-height:1.15}
  .matrix-cell small,.matrix-cell time{font-size:11px;line-height:1.15}
  .day-admin-actions{display:flex!important;flex-wrap:wrap}
  .day-admin-actions button{flex:1 1 92px}
}

/* Bloco 4 auditado - financeiro, pagamentos e ponto */
.finance-shell,.point-shell{display:grid;gap:16px}
.finance-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;padding:18px;border:1px solid var(--line);border-radius:7px;background:#fff}
.finance-toolbar h2{margin:0 0 4px;font-size:26px;color:var(--navy)}
.finance-toolbar p{margin:0;color:var(--muted)}
.finance-toolbar .actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.finance-toolbar input[type=month]{min-width:150px}
.finance-metrics .metric{cursor:default}
.finance-tabs{margin:0;padding:0;border-bottom:1px solid var(--line)}
.finance-table input,.finance-table select,.finance-table textarea{min-width:110px}
.finance-table textarea{min-height:54px;resize:vertical}
.finance-table td{vertical-align:middle}
.finance-table small{display:block;color:var(--muted);margin-top:4px}
.team-table td:nth-child(8){min-width:220px}
.muted-row{opacity:.6;background:#f4f4f4}
.danger,.link-danger{color:#9a3339!important;border-color:#e5b9bd!important}
.link-danger{background:transparent;border:0;cursor:pointer;font-weight:700}
.category-admin{margin-top:18px}
.point-clock-card{display:flex;justify-content:space-between;align-items:center;gap:14px}
.point-clock-card h2{margin:0 0 5px}
.point-clock-card p{margin:0;color:var(--muted)}
.button-link.small{padding:7px 9px;font-size:13px}

@media(max-width:760px){
  .finance-toolbar{align-items:stretch;flex-direction:column;padding:14px}
  .finance-toolbar h2{font-size:22px}
  .finance-toolbar .actions{display:grid;grid-template-columns:44px 1fr 44px;gap:8px}
  .finance-toolbar .actions button,.finance-toolbar .actions input,.finance-toolbar .actions a{width:100%;min-width:0}
  #toggle-money{grid-column:1/-1}
  .finance-metrics{grid-template-columns:1fr 1fr}
  .finance-tabs .tab{max-width:none}
  .finance-table{min-width:850px}
  .team-table{min-width:1100px}
  .point-clock-card{align-items:stretch;flex-direction:column}
  .point-clock-card .actions{display:grid;grid-template-columns:1fr 1fr}
}

/* Pre-5 - consolidacao antes do bloco 5 */
.teacher-absent-cell{background:#fff3df!important;border-color:#e29b3d!important;color:#7a4300!important}
.teacher-absent-cell::after{content:"Ausencia";display:block;margin-top:4px;font-size:11px;font-weight:800;color:#a15b00}
.absence-banner button{background:#fff3df;border:1px solid #e29b3d;color:#7a4300}
#pre5-home-clock{margin:0 0 16px}
#pre5-home-clock .actions{display:flex;gap:10px;flex-wrap:wrap}
.clock-in{background:#14804a!important;border-color:#14804a!important}
.clock-out,.danger.clock-out{background:#b33a3f!important;border-color:#b33a3f!important;color:#fff!important}
.point-review{display:block;margin-top:4px;color:#9a5a00;font-weight:700}
.chip{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid #b6d9e8;background:#edfaff;border-radius:999px}
.chip button{border:0;background:transparent;font-weight:800;cursor:pointer}
.duration-card{position:relative}
.duration-card time{display:block;margin-top:4px}
.report-list,.report-worklist{min-width:0}
.report-card *,.agenda-row *{overflow-wrap:anywhere}

/* Pre-5 completo - fechamento antes do bloco 5 */
.quick-cell-add{
  margin-top:6px;
  border:1px solid #9eb9c9;
  background:#fff;
  color:#123b5d;
  border-radius:6px;
  padding:5px 8px;
  font-weight:700;
  cursor:pointer;
}
.cell-selected{outline:3px solid #45a9df;outline-offset:-3px;box-shadow:inset 0 0 0 999px rgba(69,169,223,.08)}
.centered-schedule-cell{align-items:center;justify-content:center;text-align:center}
.agenda-day-readonly{border:1px solid #d3e2ec;border-radius:8px;overflow:hidden;margin:0 0 16px}
.agenda-day-readonly h3{margin:0;padding:13px 16px;background:#123b5d;color:#fff;display:flex;gap:10px;align-items:baseline}
.agenda-day-readonly h3 strong{font-size:1.18rem}
.agenda-day-readonly h3 span{font-size:.95rem;opacity:.9}
.agenda-day-blue{background:#f1f8fc}
.agenda-day-white{background:#fff}
.agenda-day-readonly .agenda-row{margin:0;border-radius:0;border-width:0 0 1px 0;background:transparent}
.agenda-day-readonly .agenda-row:last-child{border-bottom:0}
.agenda-day-readonly .unavailable{color:#688091}
.lesson-note{margin:.45rem 0 0;padding:.5rem .65rem;border-left:3px solid #45a9df;background:#edf8fc;border-radius:0 6px 6px 0}
.point-clock-card .danger,button.danger{background:#b42318;color:#fff;border-color:#b42318}
@media(max-width:760px){
  #pre5-home-clock{order:-1}
  #pre5-home-clock .actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .report-card,.agenda-row{max-width:100%;overflow:hidden}
  .report-card header,.agenda-row{grid-template-columns:1fr!important}
  .agenda-row time{white-space:normal}
  .table-wrap{max-width:100%;overflow-x:auto}
  .student-search-results{position:fixed;left:18px;right:18px;top:auto;bottom:24px;max-height:45vh}
  .report-tabs,.tabs{overflow-x:auto;white-space:nowrap;display:flex}
  .report-worklist .agenda-row{display:grid;grid-template-columns:1fr;gap:8px}
  .agenda-day-readonly h3{font-size:1rem}
  .agenda-day-readonly .agenda-row{grid-template-columns:72px 1fr!important}
  .quick-cell-add{font-size:.82rem;padding:4px 6px}
  .matrix-cell strong,.matrix-cell small{word-break:break-word}
}

/* Pre-bloco 5.1 */
.quick-cell-add{display:none!important}
.selected-cell{outline:3px solid #50b9e8!important;outline-offset:-3px}
.holiday-unavailable{background:#f7d8d8!important;color:#8a2630!important}
.pre51-home-clock{display:flex;align-items:center;justify-content:space-between;gap:16px}
.pre51-report-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:14px;margin-top:18px}
.pre51-report-grid article{border:1px solid #cfe0ea;border-radius:8px;background:#f7fbfd;padding:16px}
.pre51-report-grid h3{margin:0 0 10px;color:#123b5d}
.pre51-report-grid p{margin:6px 0}
.agenda-board-panel .actions{align-items:center;flex-wrap:wrap}
.document-card .button-link.small,.agenda-row .small{font-size:14px;padding:7px 10px}
@media(max-width:720px){
  .pre51-home-clock{align-items:flex-start;flex-direction:column}
  .pre51-report-grid{grid-template-columns:1fr}
  .agenda-row{grid-template-columns:1fr!important;gap:8px}
  .agenda-day-readonly h3{font-size:18px}
  .tabs{overflow-x:auto;white-space:nowrap}
  .panel-head .actions{width:100%}
  .panel-head .actions button,.panel-head .actions label{flex:1 1 auto}
  .matrix-board,.schedule-matrix{max-width:100%;overflow:auto}
}

/* Pacote Gama - ponto e documentos financeiros */
.gama-clock-status{border:1px solid #cfe0ea;border-radius:8px;background:#f7fbfd;padding:10px 12px;min-width:210px}
.gama-clock-status strong{display:block;color:#123b5d;font-size:1.05rem}
.gama-clock-status small{display:block;color:#5b7080;margin-top:3px}
.gama-doc-legend{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.gama-doc-legend span,.gama-doc-cell>span{border-radius:999px;display:inline-flex;font-size:.78rem;font-weight:800;padding:5px 9px}
.doc-gray{background:#edf1f4;color:#526473}
.doc-blue{background:#e6f3ff;color:#0f5f99}
.doc-yellow{background:#fff5d6;color:#866000}
.doc-green{background:#e6f6ea;color:#176734}
.doc-red{background:#ffe7e6;color:#a32318}
.gama-doc-table td{vertical-align:top}
.gama-doc-cell{display:grid;gap:6px;min-width:190px}
.gama-doc-cell small{color:#5b7080}
.mini-actions,.gama-row-docs{display:flex;gap:6px;flex-wrap:wrap}
.mini-actions .button-link,.gama-row-docs .button-link{display:inline-flex}
#gama-my-payment-docs .document-card{align-items:center}
#gama-point-teacher-filter{display:flex;align-items:center;gap:6px;font-weight:800}
@media(max-width:720px){
  .gama-clock-status{min-width:0;width:100%}
  .gama-doc-table{min-width:980px}
  .mini-actions{display:grid;grid-template-columns:1fr 1fr}
}

/* Ajustes de texto e encaixe - v5.2.7 */
.topbar,
.panel,
.metric,
.report-card,
.agenda-row,
.document-card,
.point-clock-card,
.finance-toolbar,
.gama-clock-status {
  min-width: 0;
}

.topbar h1,
.panel h2,
.panel h3,
.panel p,
.panel small,
.agenda-row strong,
.agenda-row small,
.report-card strong,
.report-card small,
.document-card strong,
.document-card small,
.gama-clock-status strong,
.gama-clock-status small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.point-clock-card {
  flex-wrap: wrap;
  align-items: stretch;
}

.point-clock-card .actions,
.panel-head .actions,
.finance-toolbar .actions,
.gama-row-docs,
.mini-actions {
  flex-wrap: wrap;
}

.point-clock-card button,
.panel-head .actions button,
.panel-head .actions .button-link,
.finance-toolbar button,
.gama-row-docs button,
.mini-actions button {
  white-space: normal;
  line-height: 1.15;
}

.gama-clock-status {
  flex: 1 1 240px;
}

.document-card .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.documents-workflow .tabs {
  margin-top: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.document-workflow-card {
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .8fr) 110px auto;
}

.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.doc-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #edf5f9;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.document-workflow-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

@media(max-width:720px){
  .topbar {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 1.45rem;
    line-height: 1.1;
  }

  .profile-chip {
    max-width: 92px;
    padding: 6px;
  }

  .profile-chip span:last-child {
    display: none;
  }

  .panel {
    overflow: hidden;
  }

  .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .panel-head .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .point-clock-card .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .point-clock-card .actions button,
  .point-clock-card .actions .button-link {
    width: 100%;
    min-height: 46px;
  }

  .document-card .actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .document-card .actions button,
  .document-card .actions .button-link {
    width: 100%;
  }

  .document-workflow-card {
    grid-template-columns: 1fr;
  }

  .report-tabs .tab,
  .tabs .tab {
    max-width: 150px;
    min-height: 44px;
    align-items: center;
  }

  .report-worklist .agenda-row,
  .agenda-row.mobile-report-row {
    text-align: left;
  }

  .report-worklist .agenda-row time,
  .agenda-row.mobile-report-row time {
    display: block;
    width: 100%;
  }
}

/* Ponto final - v5.3.0 */
.point-final-shell{display:grid;gap:16px}
.point-final-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:18px;border:1px solid var(--line);border-radius:8px;background:#fff}
.point-final-toolbar h2{margin:0 0 4px;color:var(--navy);font-size:28px}
.point-final-toolbar p{margin:0;color:var(--muted)}
.point-final-toolbar .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.point-final-toolbar .actions>strong{min-width:92px;text-align:center;color:var(--navy)}
.point-teacher-tabs{display:flex;gap:0;border-bottom:1px solid var(--line);overflow-x:auto}
.point-teacher-tabs .tab{border:0;border-radius:0;background:transparent;padding:14px 18px;color:#557084;font-weight:800}
.point-teacher-tabs .tab.active{background:#e8f6fb;border-bottom:4px solid #1187a8;color:#08314e}
.point-review-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px}
.point-review-summary>div{border:1px solid #cfe0ea;border-radius:8px;background:#f7fbfd;padding:12px}
.point-review-summary strong{display:block;font-size:26px;color:#123b5d}
.point-review-summary small{display:block;color:#5b7080}
.point-month-sheet .panel-head{align-items:flex-start}
.point-month-table th,.point-month-table td{vertical-align:middle}
.point-month-table td small{display:block;color:#5b7080;margin-top:4px}
.point-empty-day{background:#f8fbfd;color:#6c7d88}
.point-day-odd td{background:#fff}
.point-day-even td{background:#f6fbfd}
.point-day-even.point-empty-day td{background:#edf5f9}
.point-closing-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-top:14px}
.point-closing-summary>div{border:1px solid #cfe0ea;border-radius:8px;background:#f7fbfd;padding:12px}
.point-closing-summary strong{display:block;font-size:22px;color:#123b5d}
.point-closing-summary small{display:block;color:#5b7080}
.point-conference-card{display:flex;justify-content:space-between;align-items:center;gap:16px}
.point-conference-card h2{margin:0 0 4px}
.point-conference-card p{margin:0;color:#5b7080}
.point-conference-card .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.point-final-home{border-left:5px solid #1187a8}
.point-running-box{border:1px solid #cfe0ea;border-radius:8px;background:#f7fbfd;padding:10px 12px;min-width:170px;text-align:center}
.point-running-box strong,.point-running-box small{display:block;color:#5b7080}
.point-running-box time{display:block;margin-top:3px;font-size:25px;font-weight:900;color:#123b5d;font-variant-numeric:tabular-nums}
.point-final-home .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.point-final-home button{min-height:46px}
@media(max-width:760px){
  .point-final-toolbar{align-items:stretch;flex-direction:column;padding:14px}
  .point-final-toolbar h2{font-size:24px}
  .point-final-toolbar .actions{display:grid;grid-template-columns:44px 1fr 44px;width:100%}
  .point-final-toolbar .actions .primary,.point-final-toolbar .actions .button-link{grid-column:1/-1;width:100%}
  .point-review-summary{grid-template-columns:1fr 1fr}
  .point-conference-card,.point-final-home{align-items:stretch;flex-direction:column}
  .point-conference-card .actions,.point-final-home .actions{display:grid;grid-template-columns:1fr;width:100%}
  .point-running-box{width:100%;min-width:0}
  .point-month-table{min-width:900px}
  .point-closing-summary{grid-template-columns:1fr 1fr}
  .point-teacher-tabs .tab{flex:0 0 auto}
}
/* Central de Atencao aprimorada */
.central-attention-panel{max-width:100%}
.attention-summary{display:grid;justify-items:end;gap:2px;color:var(--blue)}
.attention-summary strong{font-size:34px;line-height:1}
.attention-summary span{font-size:13px;color:var(--muted)}
.attention-filters{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}
.attention-filters span{padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:#f7fbfd;color:var(--blue);font-weight:800;font-size:13px}
.attention-rich-list{gap:14px}
.attention-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:18px;border:1px solid var(--line);border-left:5px solid var(--cyan);border-radius:8px;background:#fff;box-shadow:0 1px 0 rgba(18,59,93,.04)}
.attention-card.unread{border-left-color:#e2a93b;background:#fffdf6}
.attention-card.read{border-left-color:#54cfe0;background:#fbfdfe}
.attention-card.resolved{border-left-color:#39a86b;background:#f4fbf7;opacity:.86}
.attention-card-main{min-width:0}
.attention-card-kicker{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:6px;color:var(--muted);font-size:13px}
.attention-card-kicker span{padding:4px 8px;border-radius:999px;background:#eaf4f8;color:var(--blue);font-weight:900}
.attention-card-kicker strong{color:var(--blue)}
.attention-card h3{margin:0 0 6px;font-size:20px;line-height:1.2;color:var(--ink)}
.attention-card p{margin:0 0 10px;color:var(--muted);line-height:1.45}
.attention-card ul{display:grid;gap:5px;margin:10px 0 8px;padding:0;list-style:none}
.attention-card li{padding:7px 9px;border-radius:6px;background:#f3f8fb;color:var(--ink);font-size:14px}
.attention-card small{color:var(--muted)}
.attention-card-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:160px}
.attention-card-actions button{width:100%}
.attention-done{padding:8px 10px;border-radius:6px;background:#dff5ea;color:#1f7a47;font-weight:900;text-align:center}
.attention-conversations{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}
.attention-conversations h3{margin:0 0 10px}
.attention-resolved{margin-top:20px}
.attention-resolved summary{cursor:pointer;font-weight:900;color:var(--blue);padding:10px 0}
@media(max-width:760px){
  .attention-summary{justify-items:start}
  .attention-card{grid-template-columns:1fr;padding:15px}
  .attention-card-actions{min-width:0}
  .attention-card h3{font-size:18px}
  .attention-filters{gap:6px}
  .attention-filters span{font-size:12px}
}
