
.document-footer { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 9px 17px; margin-top: 28px; color: #314b4a; font-family: "Trebuchet MS", sans-serif; font-size: 10px; font-weight: bold; background: #fff; border-top: 2px solid #78928a; }
.document-footer span { text-align: right; }
.curriculum-mark { flex: 0 0 auto; width: 66px; height: 43px; object-fit: contain; object-position: center; }
.curriculum-mark.fica-vivo-mark { width: 66px; height: 43px; border-radius: 0; }
.curriculum-mark.institutional-mark { width: 142px; height: auto; aspect-ratio: 714 / 126; border-radius: 0; }
.curriculum-mark.fica-vivo-isolated { width: 68px; height: auto; aspect-ratio: 960 / 619; border-radius: 0; }
.curriculum-mark.institutional-designer { width: 116px; height: auto; aspect-ratio: 3 / 2; border-radius: 0; }
@media print { .document-footer { margin-top: 16px; } .curriculum-mark.fica-vivo-mark { width: 1.9cm; height: 1.2cm; } }
@media print { .curriculum-mark.institutional-mark { width: 4cm; height: auto; } }
@media print { .curriculum-mark.fica-vivo-isolated { width: 1.8cm; height: auto; } }
@media print { .curriculum-mark.institutional-designer { width: 2.9cm; height: auto; } }

.student-management { display: grid; gap: 10px; margin-top: 12px; }
.review-notice { margin: 0; padding: 9px 10px; color: #703638; font-family: "Trebuchet MS", sans-serif; font-size: 12px; font-weight: bold; background: #fff5ef; border-left: 3px solid #703638; }
.group-filters { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 3px; }
.group-filter { min-height: 38px; padding: 0 6px; color: var(--muted); font-family: "Trebuchet MS", sans-serif; font-size: 12px; font-weight: bold; background: var(--surface); border: 0; border-right: 1px solid var(--line); }
.group-filter:last-child { border-right: 0; }
.group-filter.active { color: #fff; background: var(--teal); }
.pre-register-button { width: 100%; color: var(--teal); border-color: var(--teal); }
.pre-registration-form { display: grid; gap: 15px; padding: 20px; background: var(--surface); box-shadow: var(--shadow); }
.pre-registration-form h2 { margin: 0; }
.pre-registration-form label { display: grid; gap: 6px; color: var(--muted); font-family: "Trebuchet MS", sans-serif; font-size: 12px; font-weight: bold; }
.pre-registration-form input, .pre-registration-form select, .pre-registration-form textarea { width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.pre-registration-form input, .pre-registration-form select { height: 43px; padding: 0 10px; }
.pre-registration-form textarea { min-height: 82px; padding: 10px; resize: vertical; }
.pre-registration-form .primary { width: 100%; }
.student-card.needs-review { border-left: 3px solid #bd7b39; }
.card-menu .delete-student { color: #9b3b31; }
.card-menu .delete-student:hover { color: #fff; background: #9b3b31; }
body.dark .review-notice { color: #ffd2ba; background: #49352d; }

.delete-dialog { width: min(calc(100% - 28px), 440px); padding: 20px; color: var(--ink); background: var(--surface); border: 0; box-shadow: 0 20px 55px rgba(0, 0, 0, .28); }
.delete-dialog::backdrop { background: rgba(18, 35, 33, .68); }
.delete-dialog form { display: grid; gap: 14px; }
.delete-dialog h2 { margin: 0; color: #703638; }
.delete-dialog p { margin: -6px 0 0; color: var(--muted); font-family: "Trebuchet MS", sans-serif; font-size: 13px; }
.delete-dialog label { display: grid; gap: 6px; color: var(--muted); font-family: "Trebuchet MS", sans-serif; font-size: 12px; font-weight: bold; }
.delete-dialog select, .delete-dialog textarea { width: 100%; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.delete-dialog select { height: 42px; padding: 0 9px; }
.delete-dialog textarea { min-height: 92px; padding: 9px; resize: vertical; }
.delete-dialog .legal-check { display: flex; align-items: flex-start; gap: 8px; padding: 9px; color: #703638; background: #fff5ef; border-left: 3px solid #703638; }
.delete-dialog .legal-check input { width: 18px; height: 18px; margin: 0; accent-color: #703638; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.danger-button { min-height: 42px; padding: 0 14px; color: #fff; font-family: "Trebuchet MS", sans-serif; font-size: 13px; font-weight: bold; background: #9b3b31; border: 1px solid #9b3b31; border-radius: 3px; }
:root{--ink:#173238;--muted:#64787a;--paper:#f5f5ed;--surface:#fff;--line:#d6e1da;--teal:#126a66;--teal-dark:#084e4a;--mint:#dcece1;--coral:#c55b48;--shadow:0 12px 28px rgba(23,50,56,.1)}*{box-sizing:border-box}body{margin:0;min-width:320px;color:var(--ink);font-family:Georgia,serif;background:var(--paper)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e5ad54;outline-offset:2px}.app-shell{width:min(100%,600px);min-height:100vh;margin:auto;padding:18px 16px 38px}.topbar,.title-row,.view-heading,.student-card,.form-navigation,.profile-actions,.attendance-controls{display:flex;align-items:center}.topbar,.title-row{justify-content:space-between}.logo{display:flex;align-items:center;gap:9px;padding:0;color:var(--ink);font-size:13px;line-height:1.05;text-align:left;background:transparent;border:0}.logo b{display:grid;width:38px;height:38px;place-items:center;color:#fff;font-family:"Trebuchet MS",sans-serif;font-size:12px;background:var(--teal);border-radius:5px}.theme-button,.back{display:grid;width:38px;height:38px;place-items:center;color:var(--ink);font-size:21px;background:transparent;border:1px solid var(--line);border-radius:50%}.view{display:none}.view.active{display:block}.title-row{margin:36px 0 17px}.eyebrow{margin:0;color:var(--teal);font-family:"Trebuchet MS",sans-serif;font-size:10px;font-weight:bold;letter-spacing:1.2px}h1,h2,h3,p{margin-top:0}h1{margin:4px 0 0;font-size:31px}h2{margin-bottom:5px;font-size:23px}.count{display:grid;min-width:41px;height:41px;padding:0 9px;place-items:center;color:var(--teal);font-family:"Trebuchet MS",sans-serif;font-weight:bold;background:var(--mint);border-radius:50%}.search{display:flex;align-items:center;gap:8px;padding:0 11px;background:var(--surface);border:1px solid var(--line);border-radius:4px}.search input{width:100%;height:44px;background:transparent;border:0;outline:0}.student-list{display:grid;gap:9px;margin-top:17px}.student-card{justify-content:space-between;gap:8px;padding:11px;background:var(--surface);border:1px solid var(--line);box-shadow:0 2px 0 rgba(23,50,56,.03)}.student-open{display:flex;flex:1;align-items:center;gap:11px;min-width:0;padding:0;color:var(--ink);text-align:left;background:transparent;border:0}.avatar{display:grid;flex:0 0 42px;width:42px;height:42px;place-items:center;overflow:hidden;color:#fff;font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold;background:var(--teal);border-radius:50%}.avatar img{width:100%;height:100%;object-fit:cover}.student-name,.student-info{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.student-name{font-size:16px}.student-info{margin-top:3px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:11px}.card-menu{display:flex;gap:2px}.card-menu button{width:34px;height:34px;padding:0;color:var(--teal);font-size:18px;background:transparent;border:0;border-radius:50%}.card-menu button:hover{background:var(--mint)}.empty{margin-top:18px;padding:52px 18px;text-align:center;border:1px dashed var(--line)}.empty strong{display:grid;width:36px;height:36px;margin:0 auto 12px;place-items:center;color:#fff;font-size:25px;background:var(--teal);border-radius:50%}.empty h2{font-size:20px}.empty p,.hint{margin-bottom:0;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:13px}.fab{position:fixed;right:max(18px,calc((100vw - 600px)/2 + 18px));bottom:19px;padding:14px 17px;color:#fff;font-family:"Trebuchet MS",sans-serif;font-size:14px;font-weight:bold;background:var(--teal);border:0;border-radius:4px;box-shadow:0 9px 22px rgba(18,106,102,.3)}.fab span{font-size:20px;vertical-align:-1px}.view-heading{gap:12px;margin:24px 0 20px}.view-heading h1{font-size:25px}.steps{display:flex;align-items:center;margin:0 11px 26px}.steps span{display:grid;width:29px;height:29px;place-items:center;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold;border:1px solid var(--line);border-radius:50%}.steps span.active{color:#fff;background:var(--teal);border-color:var(--teal)}.steps i{flex:1;height:1px;background:var(--line)}#student-form{padding:20px;background:var(--surface);box-shadow:var(--shadow)}.form-step{display:none}.form-step.active{display:grid;gap:15px}.form-step h2{margin:0}.form-step label,.attendance-controls label{display:grid;gap:6px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold}.form-step input,.form-step select,.attendance-controls input{width:100%;height:43px;padding:0 10px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:3px}.form-step input[readonly]{background:#edf2ed}.form-navigation{justify-content:space-between;gap:9px;margin-top:22px}.form-navigation .primary:first-child{margin-left:auto}.primary,.secondary{min-height:42px;padding:0 14px;font-family:"Trebuchet MS",sans-serif;font-size:13px;font-weight:bold;border-radius:3px}.primary{color:#fff;background:var(--teal);border:1px solid var(--teal)}.secondary{color:var(--ink);background:transparent;border:1px solid var(--line)}.status{min-height:16px;margin:0;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px}.photo-preview{width:92px;height:92px;object-fit:cover;border:3px solid var(--mint);border-radius:50%}.profile-sheet{min-height:580px;padding:27px;background:#fff;color:#1d2d35;box-shadow:var(--shadow)}.curriculum-head{display:flex;gap:18px;align-items:center;padding-bottom:19px;border-bottom:4px solid #126a66}.curriculum-logo{display:grid;width:54px;height:54px;place-items:center;color:#fff;font-family:"Trebuchet MS",sans-serif;font-size:15px;font-weight:bold;background:#126a66}.curriculum-photo{width:76px;height:76px;object-fit:cover;border:2px solid #126a66;border-radius:50%}.curriculum-name{margin:0;font-size:26px}.curriculum-head p{margin:5px 0 0;color:#486166;font-family:"Trebuchet MS",sans-serif;font-size:12px}.curriculum-section{margin-top:23px}.curriculum-section h3{padding-bottom:7px;margin-bottom:10px;color:#126a66;font-family:"Trebuchet MS",sans-serif;font-size:12px;letter-spacing:1px;border-bottom:1px solid #ccdcd2}.curriculum-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.curriculum-grid p{margin:0;font-family:"Trebuchet MS",sans-serif;font-size:12px;line-height:1.45}.curriculum-grid b{display:block;color:#667d7d;font-size:10px;text-transform:uppercase}.profile-actions{justify-content:flex-end;gap:9px;margin-top:16px}.attendance-controls{gap:12px;padding:16px;background:var(--surface);box-shadow:var(--shadow)}.attendance-controls label{flex:1}.mode-buttons{display:flex;align-self:end}.mode{height:43px;padding:0 12px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px;background:transparent;border:1px solid var(--line)}.mode.active{color:#fff;background:var(--teal);border-color:var(--teal)}.attendance-list{display:grid;gap:8px;margin-top:18px}.attendance-row{display:flex;align-items:center;justify-content:space-between;padding:13px;background:var(--surface);border:1px solid var(--line)}.attendance-row b{font-size:16px}.attendance-row small{display:block;margin-top:2px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:11px}.attendance-row label{display:flex;align-items:center;gap:7px;color:var(--teal);font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold}.attendance-row input{width:19px;height:19px;accent-color:var(--teal)}.attendance-summary{margin-top:17px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:13px;line-height:1.6}@media(min-width:540px){.form-step.active{grid-template-columns:1fr 1fr}.form-step h2,.form-step .hint{grid-column:span 2}}body.dark{--ink:#eaf3ec;--muted:#b4c8bb;--paper:#172622;--surface:#20332e;--line:#3b544d;--teal:#63c2b6;--teal-dark:#91dcd1;--mint:#294b42;--shadow:0 12px 28px rgba(0,0,0,.24)}body.dark .form-step input[readonly]{background:#2a433b}.profile-sheet{color:#1d2d35}@media print{body{background:#fff}.topbar,.view:not(#profile-view),.view-heading,.profile-actions{display:none!important}.app-shell{width:100%;padding:0}.view#profile-view{display:block}.profile-sheet{box-shadow:none}}
.group-heading{margin:20px 0 8px;font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold;letter-spacing:.7px;text-transform:uppercase;color:var(--teal)}.student-list .group-heading:first-child{margin-top:2px}
.student-management{display:grid;gap:10px;margin-top:12px}
.group-filters,.management-actions{display:flex;flex-wrap:wrap;gap:8px;border:0}
.attendance-controls{flex-wrap:wrap}
.attendance-controls select{width:100%;height:43px;padding:0 10px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:3px}
.attendance-turma{margin:6px 0 0;color:#703638;font-family:"Trebuchet MS",sans-serif;font-size:11px;font-weight:bold;letter-spacing:.3px}
body.dark .attendance-turma{color:#ffd2ba}
.turma-dialog{width:min(calc(100% - 28px),400px);padding:20px;color:var(--ink);background:var(--surface);border:0;border-radius:4px;box-shadow:0 20px 55px rgba(0,0,0,.28)}
.turma-dialog::backdrop{background:rgba(18,35,33,.68)}
.turma-dialog form{display:grid;gap:14px}
.turma-dialog h2{margin:0;color:var(--teal)}
.turma-dialog p{margin:-6px 0 0;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:13px}
.turma-dialog label{display:grid;gap:6px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold}
.turma-dialog input{width:100%;height:42px;padding:0 10px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:3px}
.dialog-error{margin:0 !important;color:#9b3b31 !important;font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold}

/* ===== Padrao unico de botoes e campos ===== */
:root{--control-h:44px;--control-r:8px}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e5ad54;outline-offset:2px}
.form-step input,.form-step select,.form-step textarea,
.pre-registration-form input,.pre-registration-form select,.pre-registration-form textarea,
.attendance-controls input,.attendance-controls select,
.settings-grid input,.settings-grid select,
.cancellation-form input,.cancellation-form select,.cancellation-form textarea,
.turma-dialog input,.turma-dialog select,.turma-dialog textarea,
.delete-dialog input,.delete-dialog select,.delete-dialog textarea{
  width:100%;min-width:0;height:var(--control-h);padding:0 12px;
  font-family:"Trebuchet MS",sans-serif;font-size:14px;
  color:var(--ink);background:var(--surface);
  border:1px solid var(--line);border-radius:var(--control-r)}
.form-step input[readonly]{background:#edf2ed}
body.dark .form-step input[readonly]{background:#2a433b}
.form-step textarea,.pre-registration-form textarea,.cancellation-form textarea,.delete-dialog textarea,.turma-dialog textarea{
  height:auto;min-height:96px;padding:11px 12px;resize:vertical}
/* Um padrao unico para TODOS os botoes de acao */
.primary,.secondary,.danger-button,.camera-button,.mode,.group-filter,
.management-actions button,.attendance-home{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:var(--control-h);padding:0 16px;width:auto;white-space:nowrap;
  font-family:"Trebuchet MS",sans-serif;font-size:13px;font-weight:bold;line-height:1.1;
  color:var(--ink);background:var(--surface);
  border:1px solid var(--line);border-radius:var(--control-r);cursor:pointer}
.group-filter,.management-actions button{flex:1 1 140px}
.mode{flex:1 1 auto;padding:0 14px}
.group-filter,.mode{color:var(--muted)}
.primary,.mode.active,.group-filter.active{color:#fff;background:var(--teal);border-color:var(--teal)}
.danger-button{color:#fff;background:#9b3b31;border-color:#9b3b31}
.mode{border-radius:0}
.mode:first-child{border-radius:var(--control-r) 0 0 var(--control-r)}
.mode:last-child{border-radius:0 var(--control-r) var(--control-r) 0}
.attendance-home{width:100%}
.profile-actions{flex-wrap:wrap}
.search{border-radius:var(--control-r)}
.fab{border-radius:var(--control-r);font-size:13px}

/* ===== Numeracao, ordenacao e colaborador ===== */
:root{--colaborador:#9a5a1f}
body.dark{--colaborador:#f0b27a}
.student-index{flex:0 0 auto;min-width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;font-family:"Trebuchet MS",sans-serif;font-size:11px;font-weight:bold;color:var(--muted);background:var(--mint);border-radius:999px}
.student-card.colaborador{opacity:.72}
.student-card.colaborador .student-name{color:var(--colaborador)}
.list-sort{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.list-sort>span{font-family:"Trebuchet MS",sans-serif;font-size:12px;font-weight:bold;color:var(--muted)}
.sort-btn{flex:0 1 auto;min-height:38px;padding:0 14px}
.sort-btn.active{color:#fff;background:var(--teal);border-color:var(--teal)}
.sort-btn[data-dir="asc"]::after{content:" \2191"}
.sort-btn[data-dir="desc"]::after{content:" \2193"}
.list-legend{margin:0;font-family:"Trebuchet MS",sans-serif;font-size:11px;line-height:1.4;color:var(--muted)}
.list-legend b{color:var(--colaborador)}
.app-footer{margin-top:32px;padding:16px 0 calc(24px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:11px;font-weight:bold;letter-spacing:.4px;text-align:center}
@media print{.app-footer{display:none}}

.fab{left:max(18px,calc((100vw - 600px)/2 + 18px));right:auto}

.app-shell{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
@media print{.app-shell{padding-bottom:0}}
.turma-dialog textarea{width:100%;min-height:110px;padding:10px 12px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--control-r);font-family:"Trebuchet MS",sans-serif;font-size:14px;line-height:1.4;resize:vertical}
.turma-dialog .dialog-actions{flex-wrap:wrap;gap:8px}
.turma-dialog .dialog-actions>*{flex:1 1 120px;text-align:center}
.student-card{border-radius:12px}
.student-list .student-card::after{content:"\203A";align-self:center;color:var(--muted);font-size:22px;line-height:1;padding:0 2px;flex:none}
.drawer-dialog{margin:0 0 0 auto;height:100%;max-height:100%;width:min(87vw,330px);padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));border:0;border-radius:0;background:var(--surface);color:var(--ink);box-shadow:-14px 0 44px rgba(0,0,0,.3);animation:drawer-in .22s ease-out}
.drawer-dialog::backdrop{background:rgba(8,14,20,.5)}
@keyframes drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.drawer-head h2{margin:0;font-size:17px;word-break:break-word}
.drawer-sub{margin:6px 0 16px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:12px}
.drawer-actions{display:grid;gap:8px}
.drawer-actions button{width:100%}
.icon-btn{width:38px;height:38px;flex:none;border:0;border-radius:50%;background:var(--line);color:var(--ink);font-size:14px;cursor:pointer}
.student-name{font-size:13.5px}
.student-card{padding:10px 11px}
.student-open>span{min-width:0}
.student-open>span:last-child{flex:1;min-width:0;overflow:hidden}
.student-name{font-size:13px}
.student-info{font-size:10.5px}
.topbar-brand{display:flex;align-items:center;gap:9px}
.logo-mark{width:56px;height:56px;object-fit:contain;border-radius:8px}
.logo-zoom-btn{padding:0;line-height:0;background:transparent;border:0;cursor:zoom-in}
.footer-logos img{cursor:zoom-in}
.logo-zoom{max-width:94vw;max-height:94vh;padding:0;background:transparent;border:0;overflow:visible}
.logo-zoom::backdrop{background:rgba(0,0,0,.82)}
.logo-zoom img{display:block;width:min(94vw,560px);height:auto;border-radius:14px;background:#fff}
.logo-zoom #logo-zoom-close{position:absolute;top:-14px;right:-14px;background:#fff;border:1px solid var(--line)}
.footer-logos-label{margin:0 0 10px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:10px;font-weight:bold;letter-spacing:1px;text-transform:uppercase}
.footer-logos{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:14px}
.footer-logos img{height:64px;width:auto;max-width:160px;object-fit:contain;opacity:.95}

.footer-org{margin:0 0 8px;color:var(--muted);font-family:"Trebuchet MS",sans-serif;font-size:10px;line-height:1.5}
.curriculum-list{margin:0;padding-left:18px;font-family:"Trebuchet MS",sans-serif;font-size:12px;line-height:1.6}
.curriculum-list li{margin-bottom:3px}
.curriculum-list span{color:#667d7d}
