/* -- Variáveis -- */
:root {
  --bg:           #f0f2f5;
  --white:        #ffffff;
  --surface:      #ffffff;
  --surface2:     #f5f6f8;
  --border:       #dde1e8;
  --border2:      #c8cdd6;
  --red:          #cc1f1f;
  --red-dark:     #a81818;
  --red-light:    #f5e6e6;
  --red-mid:      #e8c0c0;
  --text:         #1a1d23;
  --text-muted:   #6b7280;
  --text-light:   #9ca3af;
  --green:        #16a34a;
  --green-light:  #dcfce7;
  --orange:       #d97706;
  --orange-light: #fef3c7;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.12);
  --radius:       8px;
  --sidebar-w:    232px;
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: 'Source Sans 3', sans-serif; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.pre-structured-list { display: flex; flex-direction: column; gap: 8px; }
.pre-structured-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}

/* Efetivo */
.efe-filtros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.efe-botoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.efe-botoes form {
  margin: 0;
}
.efe-resumo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: .9rem;
}
.efe-resumo strong {
  color: var(--text);
  font-family: 'Inter', sans-serif;
}
.efe-scroll {
  overflow-x: auto;
}
.efe-tabela {
  min-width: 1120px;
  border-collapse: collapse;
}
.efe-tabela th,
.efe-tabela td {
  vertical-align: middle;
  white-space: nowrap;
}
.efe-tabela th small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 600;
}
.efe-tabela-mensal {
  min-width: 1680px;
  font-size: .78rem;
}
.efe-celula-dia {
  min-width: 86px;
  padding: 5px !important;
  text-align: center;
}
.efe-celula-dia form {
  margin: 0;
}
.efe-celula-editavel {
  width: 78px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}
.efe-nome-cell {
  min-width: 118px;
  max-width: 160px;
}
.efe-horario-cell {
  width: 122px !important;
  min-width: 122px !important;
  max-width: 122px !important;
  padding: 5px !important;
}
.efe-horario-cell form {
  margin: 0;
}
.efe-horario-select {
  width: 116px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: .72rem;
  font-weight: 800;
}
.efe-dia-mes {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
}
.efe-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.efe-historico summary,
.efe-mini summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--red);
}
.efe-historico[open] summary {
  margin-bottom: 12px;
}
.efe-mini {
  min-width: 220px;
}
.efe-mini-form {
  display: grid;
  gap: 7px;
  min-width: 220px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}
.efe-mini-form input,
.efe-mini-form select {
  min-width: 0;
}
.efe-obs-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 240px;
}
.efe-obs-form textarea {
  min-height: 34px;
  resize: vertical;
}
.efe-obs-item {
  max-width: 220px;
  color: var(--text-muted);
  white-space: normal;
}
.efe-obs-modal-item {
  display: block;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}
.efe-modal-panel-sm .efe-obs-modal-item,
.efe-modal-form-full .efe-obs-modal-item {
  max-width: 100%;
}
.efe-obs-modal-item:last-child {
  border-bottom: 0;
}
.efe-mensal-card {
  overflow: hidden;
}
@media (max-width: 760px) {
  .efe-filtros {
    grid-template-columns: 1fr;
  }
  .efe-botoes {
    align-items: stretch;
    flex-direction: column;
  }
  .efe-botoes .btn,
  .efe-botoes button,
  .efe-botoes a {
    width: 100%;
    justify-content: center;
  }
}
@media print {
  .efe-print-hide,
  .efe-botoes,
  .efe-historico,
  .top-bar,
  .sidebar {
    display: none !important;
  }
  .conteudo {
    padding: 0 !important;
    overflow: visible !important;
  }
  .main-layout {
    display: block !important;
  }
  .efe-tabela,
  .efe-tabela-mensal {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9px !important;
  }
  .efe-tabela th,
  .efe-tabela td {
    padding: 3px !important;
  }
}

/* Efetivo - observações em popup sem rolagem horizontal */
.efe-modal.aberto .efe-modal-panel {
  overflow-x: hidden !important;
}
.efe-modal.aberto .efe-modal-panel,
.efe-modal.aberto .efe-modal-panel *,
.efe-modal.aberto .efe-modal-form,
.efe-modal.aberto .efe-modal-form-full {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  box-sizing: border-box !important;
}
.efe-modal.aberto .efe-obs-modal-item {
  display: block !important;
  width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.55 !important;
}

/* Efetivo - refinamentos de tela */
.efe-filter-card {
  padding: 14px 16px;
}
.efe-filter-card .efe-filtros {
  display: grid !important;
  grid-template-columns: minmax(150px, .8fr) minmax(150px, .9fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(110px, .6fr) auto;
  gap: 10px;
  align-items: end;
}
.efe-filter-card .form-grupo {
  margin-bottom: 0;
}
.efe-filter-card .form-grupo input,
.efe-filter-card .form-grupo select {
  min-height: 38px;
  padding: 8px 10px;
}
.efe-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.efe-toolbar-actions form {
  margin: 0;
}
.efe-toolbar-actions .btn {
  min-height: 36px;
}
.efe-tabela {
  min-width: 1040px;
}
.efe-tabela th {
  padding: 9px 10px;
}
.efe-tabela td {
  padding: 8px 10px;
}
.efe-tabela td:nth-child(1) {
  max-width: 110px;
  white-space: normal;
}
.efe-tabela td:nth-child(2),
.efe-tabela td:nth-child(3),
.efe-tabela td:nth-child(5) {
  max-width: 84px;
}
.efe-tabela td:nth-child(4) {
  min-width: 150px;
  max-width: 190px;
  white-space: normal;
}
.efe-tabela th:last-child,
.efe-tabela td:last-child {
  width: 92px;
  text-align: center;
}
.efe-action-btn {
  min-width: 78px;
}
.efe-modal-open {
  overflow: hidden;
}
.efe-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
}
.efe-modal.aberto {
  display: block;
}
.efe-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(17, 24, 39, .42);
}
.efe-modal-panel {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  margin: 26px auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .22);
}
.efe-modal,
.efe-modal * {
  box-sizing: border-box;
}
.efe-modal-panel,
.efe-modal-panel *,
.efe-modal-form,
.efe-modal-form-full {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
}
.efe-modal-panel {
  overflow-x: hidden;
}
.efe-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.efe-modal-head strong {
  display: block;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
.efe-modal-head span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .82rem;
}
.efe-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}
.efe-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.efe-modal-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}
.efe-modal-form h3 {
  margin: 0 0 4px;
  color: var(--red);
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.efe-modal-form label {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.efe-modal-form input,
.efe-modal-form select,
.efe-modal-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
}
.efe-modal-form textarea {
  min-height: 108px;
  resize: vertical;
}
.efe-modal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 980px) {
  .efe-filter-card .efe-filtros {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .efe-filter-card .efe-filtros,
  .efe-modal-grid,
  .efe-modal-row {
    grid-template-columns: 1fr;
  }
  .efe-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .efe-toolbar-actions .btn,
  .efe-toolbar-actions button {
    width: 100%;
    justify-content: center;
  }
}
.pre-structured-item > b {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
  color: var(--red);
}
.pre-structured-item span {
  color: var(--text);
  font-size: .9rem;
  text-transform: none;
  letter-spacing: 0;
}
.pre-structured-line {
  color: var(--text);
  font-weight: 700;
  font-size: .94rem;
  letter-spacing: .02em;
  line-height: 1.35;
}
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}

.brasao-icon {
  display: inline-block;
  width: 38px;
  height: 38px;
  background: url('../icon/brasao_icone_128px.png') center/contain no-repeat;
  flex-shrink: 0;
}
.brasao-icon.login {
  width: 150px;
  height: 150px;
  margin-bottom: 10px;
}
.brasao-icon.topbar {
  width: 28px;
  height: 28px;
}
.brasao-icon.sm {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
}

/* -- App layout -- */
.app-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.main-layout { display: flex; flex: 1; }
.conteudo { flex: 1; padding: 28px; overflow-x: hidden; }

/* -- Top bar -- */
.top-bar {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  padding: 0 20px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.top-bar-left  { display: flex; align-items: center; gap: 10px; }
.top-bar-dot   { width: 28px; height: 28px; background: url('../icon/brasao_icone_128px.png') center/contain no-repeat; flex-shrink: 0; }
.mobile-menu-toggle { display: none; }
.top-bar-title { font-family: 'Oswald', sans-serif; font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.top-bar-sub   { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.top-bar-right { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--text-muted); }
.top-bar-user,
.top-bar-user * {
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase !important;
}
.badge-perfil  { background: var(--red-light); border: 1px solid var(--red-mid); color: var(--red); border-radius: 4px; padding: 2px 8px; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* -- Sidebar -- */
.sidebar {
  width: var(--sidebar-w); min-height: calc(100vh - 52px);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 58%, #f4f6f8 100%);
  border-right: 1px solid rgba(221,225,232,.8);
  padding: 18px 14px 16px; position: sticky; top: 52px;
  height: calc(100vh - 52px); overflow-y: auto; flex-shrink: 0;
  box-shadow: 10px 0 30px rgba(26,29,35,.03);
  scrollbar-width: thin;
  scrollbar-color: #c8cdd6 transparent;
}
.sidebar-title {
  font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: #9b1c1c;
  margin: 2px 10px 14px; display: flex; align-items: center; gap: 8px;
}
.sidebar-title::before { content:''; display:inline-block; width:18px; height:2px; background:var(--red); border-radius:999px; box-shadow:none; }
.sidebar a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  padding: 10px 13px; border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: .83rem; font-weight: 650; color: #596172;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  margin-bottom: 6px;
  isolation: isolate;
}
.sidebar a::before {
  content: '';
  position: absolute;
  left: 10px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition: background .18s ease, transform .18s ease;
}
.sidebar a:hover {
  background: rgba(26,29,35,.045);
  color: var(--text);
  transform: translateX(3px);
}
.sidebar a.ativo {
  background: linear-gradient(135deg, #ffffff 0%, #fff6f6 100%);
  color: var(--red);
  box-shadow: 0 10px 24px rgba(204,31,31,.12), 0 0 0 1px rgba(232,192,192,.65) inset;
  transform: translateX(2px);
}
.sidebar a.ativo::before { background: var(--red); opacity: 1; transform: translateX(-2px); }
.nav-icon {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  font-size: 1.02rem;
  flex: 0 0 25px;
  transition: background .2s ease, transform .2s ease, filter .2s ease;
}
.sidebar a:hover .nav-icon { transform: scale(1.08); filter: saturate(1.08); }
.sidebar a.ativo .nav-icon { background: rgba(204,31,31,.09); }
.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- Page header -- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h1 { font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); display: flex; align-items: center; gap: 8px; }
.page-header h1::before { content:''; display:inline-block; width:8px; height:8px; background:var(--red); border-radius:50%; }

/* -- Cards -- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-title {
  font-family: 'Oswald', sans-serif; font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: 16px; display: flex; align-items: center; gap: 7px;
}
.card-title::before { content:''; display:inline-block; width:7px; height:7px; background:var(--red); border-radius:50%; }

/* -- Stats box -- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 20px; }
.stats-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; padding: 14px 16px; }
.s-label { font-size: .62rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.s-val { font-family: 'Oswald', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1; }
.s-val.red    { color: var(--red); }
.s-val.green  { color: var(--green); }
.s-val.orange { color: var(--orange); }
.mobile-app-only { display: none; }

.student-drawer { display: none; }
.student-drawer-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(15,18,24,.55);
}
.student-drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: max-content;
  min-width: 210px;
  max-width: calc(100vw - 58px);
  background: #fff;
  border-radius: 0 22px 22px 0;
  box-shadow: 24px 0 54px rgba(15,18,24,.24);
  padding: 18px 16px 20px;
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform .22s ease;
}
.student-drawer.aberto .student-drawer-panel { transform: translateX(0); }
.student-drawer-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin-bottom: 10px;
}
.student-drawer-brand .brasao-icon { margin: 0; }
.student-drawer-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}
.student-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.student-drawer-link {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,18,24,.04);
  color: #293449;
  width: max-content;
  min-width: 178px;
  max-width: 100%;
}
.student-drawer-ico {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef3f8;
  color: #60788f;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 30px;
}
.student-drawer-ico svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.student-drawer-link b {
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 700;
}
.student-drawer-link.ativo {
  background: #eef3fb;
  border-color: #dce6f4;
  color: var(--red);
}
.student-drawer-link.ativo .student-drawer-ico {
  background: #fee2e2;
  color: var(--red);
}
.student-drawer-exit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--red-light);
  color: var(--red);
  font-family: 'Oswald', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.mobile-drawer-open { overflow: hidden; }

/* -- Nota cards -- */
.nota-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-left: 3px solid var(--border2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; margin-bottom: 8px; border-left-width: 3px;
}
.nota-card.aprovado  { border-left-color: var(--green);  background: var(--green-light); }
.nota-card.atencao   { border-left-color: var(--orange); background: var(--orange-light); }
.nota-card.reprovado { border-left-color: var(--red);    background: var(--red-light); }
.nota-media { font-family: 'Oswald', sans-serif; font-size: 1.5rem; font-weight: 700; }
.nota-card.aprovado  .nota-media { color: var(--green); }
.nota-card.atencao   .nota-media { color: var(--orange); }
.nota-card.reprovado .nota-media { color: var(--red); }

/* -- Anotação cards -- */
.anot-card { border-left: 3px solid var(--border2); padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; }
.anot-card.leve   { border-left-color: var(--green); }
.anot-card.media  { border-left-color: var(--orange); }
.anot-card.grave  { border-left-color: var(--red); background: var(--red-light); }
.grav-badge { display: inline-block; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 2px 7px; border-radius: 3px; }
.grav-badge.leve  { background: var(--green-light);  color: var(--green); }
.grav-badge.media { background: var(--orange-light); color: var(--orange); }
.grav-badge.grave { background: var(--red-light);    color: var(--red); }

/* -- Tabela -- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th { background: var(--surface2); border-bottom: 2px solid var(--red); color: var(--text); padding: 10px 12px; text-align: left; font-family: 'Oswald', sans-serif; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* -- Status badges -- */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.status-badge.pendente_identificacao { background: var(--orange-light); color: var(--orange); border: 1px solid var(--orange); }
.status-badge.cancelada,
.status-badge.cancelada_parcialmente { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.status-badge.pendente  { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.status-badge.validada  { background: var(--green-light);  color: var(--green);  border: 1px solid #86efac; }
.status-badge.arquivada { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border2); }

/* -- Abas -- */
.abas { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.abas button {
  padding: 8px 14px; border: none; border-radius: 6px 6px 0 0;
  background: none; font-family: 'Source Sans 3', sans-serif;
  font-size: .82rem; color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
}
.abas button:hover { color: var(--red); }
.abas button.ativo { color: var(--red); font-weight: 600; border-bottom-color: var(--red); }

/* -- Formulários -- */
.form-grupo { margin-bottom: 14px; }
.form-grupo label { display: block; font-size: .67rem; font-weight: 600; color: var(--text-muted); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 5px; }
.form-grupo input[type=text],
.form-grupo input[type=date],
.form-grupo input[type=datetime-local],
.form-grupo input[type=email],
.form-grupo input[type=number],
.form-grupo input[type=password],
.form-grupo select,
.form-grupo textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-family: 'Source Sans 3', sans-serif;
  font-size: .9rem; padding: 9px 12px; outline: none; transition: border-color .2s;
}
.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,31,31,.08); }
.form-grupo textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-grupo { flex: 1; min-width: 140px; }

/* -- Botões -- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 6px; font-family: 'Oswald', sans-serif; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: all .15s; }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--red);   color: #fff; }
.btn-primary:hover { background: var(--red-dark); opacity: 1; }
.btn-success { background: var(--green); color: #fff; }
.btn-outline { background: none; border: 1px solid var(--border2); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--red-mid); color: var(--red); background: var(--red-light); opacity: 1; }
.btn-sm { padding: 5px 12px; font-size: .72rem; }
.btn-sm.danger { border: 1px solid var(--red-mid); color: var(--red); background: none; }
.btn-sm.danger:hover { background: var(--red-light); }
.btn-download { background: var(--red); color: #fff; border-radius: 6px; padding: 10px 20px; display: inline-flex; align-items: center; gap: 8px; font-family: 'Oswald', sans-serif; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s; border: none; }
.btn-download:hover { background: var(--red-dark); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.quick-actions .btn { width: 100%; min-height: 42px; justify-content: center; text-align: center; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* -- QTS card -- */
.qts-card { background: var(--text); border-radius: var(--radius); padding: 20px; color: #fff; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.qts-card h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qts-card p { font-size: .85rem; opacity: .7; margin-top: 3px; }

/* -- Alertas -- */
.alert { padding: 10px 14px; border-radius: 6px; font-size: .85rem; margin-bottom: 14px; }
.alert-ok  { background: var(--green-light); color: var(--green);  border: 1px solid #86efac; }
.alert-err { background: var(--red-light);   color: var(--red);    border: 1px solid var(--red-mid); }

/* -- Login -- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f4f5f7;
  padding: 42px;
  overflow: hidden;
}
.login-shell {
  width: min(100%, 1160px);
  height: min(680px, calc(100vh - 84px));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(400px, 500px) 1fr;
  align-items: stretch;
  border: 1px solid rgba(221,225,232,.9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(26,29,35,.08);
  background: #fff;
}
.login-box {
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 54px 50px;
  width: 100%;
  max-width: none;
  box-shadow: none;
  overflow-y: auto;
}
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.login-panel::before { display: none; }
.login-brand-mobile { display: none; }
.login-heading {
  width: 100%;
  max-width: 300px;
  margin-bottom: 24px;
  text-align: center;
}
.login-kicker {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.login-box h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.48rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.login-heading::after { display: none; }
.login-box p { font-size: .84rem; color: var(--text-muted); text-align: center; margin-bottom: 0; }
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 300px;
}
.login-form .form-grupo input {
  border-radius: 6px;
  border-color: #d7dce4;
  background: #f7f8fa;
  min-height: 36px;
  font-size: .84rem;
  padding: 6px 10px;
}
.login-form .form-grupo input:focus {
  background: #fff;
}
.login-submit { width:100%; justify-content:center; padding:7px 12px; margin-top:2px; }
.login-submit {
  min-height: 36px;
  border-radius: 6px;
  box-shadow: none;
}
.login-links {
  width: 100%;
  max-width: 300px;
  text-align: center;
  margin-top:14px;
  font-size:.86rem;
}
.login-links a { color: var(--red); font-weight: 600; }
.login-copy {
  width: 100%;
  max-width: 300px;
  text-align: center;
  margin-top: 18px;
  padding-top: 0;
  border-top: none;
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.login-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, #cfd4dc, #b9c0ca);
  border-left: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.34), rgba(255,255,255,0) 42%);
}
.login-visual::after {
  display: none;
}
.login-hero {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  background-image: url('logo.png');
  background-size: contain;
  opacity: 1;
  filter: drop-shadow(0 16px 22px rgba(26,29,35,.16));
}
.login-visual-title {
  position: relative;
  z-index: 1;
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 28px;
  box-shadow: none;
  max-width: 520px;
}
.login-visual-title span {
  display: block;
  margin-top: 4px;
}
.login-err { color: var(--red); font-size: .78rem; text-align: center; min-height: 1rem; }
@media (max-width: 860px) {
  .login-body {
    padding: 12px;
    background: var(--bg);
    overflow: auto;
  }
  .login-shell {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .login-box {
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: 10px;
    padding: 26px 22px;
    max-width: 340px;
    margin: 0 auto;
  }
  .brasao-icon.login {
    width: 112px;
    height: 112px;
    margin-bottom: 6px;
  }
  .login-brand-mobile {
    display: block;
    text-align: center;
    margin-bottom: 10px;
  }
  .login-heading {
    margin-bottom: 16px;
    text-align: center;
  }
  .login-kicker { margin-bottom: 6px; }
  .login-box h1 {
    font-size: 1rem;
    text-align: center;
    letter-spacing: .1em;
  }
  .login-box p { text-align: center; font-size: .75rem; }
  .login-heading::after { margin: 12px auto 0; width: 48px; height: 3px; }
  .login-links, .login-copy { text-align: center; }
  .login-visual { display: none; }
}
@media (display-mode: standalone) and (max-width: 860px) {
  .login-body { padding: 8px; }
  .login-box {
    padding: 22px 20px;
    max-width: 320px;
  }
  .brasao-icon.login {
    width: 96px;
    height: 96px;
  }
  .login-heading { margin-bottom: 14px; }
}
.install-card {
  display: none !important;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.install-card strong {
  display: block;
  color: var(--text);
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.install-card ol {
  margin: 8px 0 0 18px;
  text-align: left;
}
.install-card li { margin-bottom: 3px; }
.install-btn {
  display: none;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}
.install-btn.visivel { display: inline-flex; }
.install-gate {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(26,29,35,.72);
  backdrop-filter: blur(4px);
}
.install-gate.aberto { display: flex; }
.install-gate-box {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 24px 22px;
  text-align: center;
}
.install-gate-box .brasao-icon { margin-bottom: 10px; }
.install-gate-box h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.install-gate-box p {
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.45;
  margin-bottom: 12px;
}
.install-gate-actions { display: grid; gap: 8px; margin-top: 12px; }
.install-gate-help {
  margin-top: 12px;
  text-align: left;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
}
.install-gate-help ol { margin-left: 18px; }
.install-gate-help li { margin: 3px 0; }

/* -- Modal -- */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: center; justify-content: center; }
.modal-bg.aberto { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); border-top: 3px solid var(--red); }
.modal-titulo { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; color: var(--text); }

/* -- Vazio / Loading -- */
.vazio { text-align: center; padding: 40px; color: var(--text-muted); font-size: .9rem; }
.loading-txt { text-align: center; padding: 32px; color: var(--text-muted); font-size: .85rem; }

/* -- Progresso bar -- */
.prog-bar { background: var(--surface2); border-radius: 4px; height: 10px; width: 100px; overflow: hidden; }
.prog-fill { height: 10px; border-radius: 4px; }
.prog-fill.ok      { background: var(--green); }
.prog-fill.parcial { background: var(--orange); }
.prog-fill.vazio   { background: var(--red); }

/* -- Responsive -- */
@media (max-width: 720px) {
  :root { --sidebar-w: 0px; }
  .main-layout { display: block; }
  .conteudo { padding: 16px 16px 78px; }
  .student-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
  }
  .student-drawer.aberto {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 50px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 0;
    flex: 0 0 auto;
  }
  .mobile-menu-logo {
    width: 28px;
    height: 28px;
    background: url('../icon/brasao_icone_128px.png') center/contain no-repeat;
    display: inline-block;
  }
  .mobile-menu-bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .mobile-menu-bars i {
    display: block;
    width: 13px;
    height: 2px;
    border-radius: 999px;
    background: #748493;
  }
  .top-bar-left > .top-bar-dot { display: none; }
  .top-bar-user { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 200;
    display: flex;
    width: 100%;
    height: 62px;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    border-right: 0;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(0,0,0,.08);
  }
  .sidebar-title { display: none; }
  .sidebar a {
    flex: 0 0 82px;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    margin: 0;
    font-size: .68rem;
    line-height: 1.1;
    min-height: 50px;
    transform: none;
    box-shadow: none;
  }
  .sidebar a::before {
    top: 0;
    left: 18px;
    right: 18px;
    bottom: auto;
    width: auto;
    height: 3px;
    border-radius: 0 0 4px 4px;
  }
  .sidebar a:hover { transform: none; }
  .sidebar a.ativo { border-left: 0; border-top: 0; box-shadow: none; }
  .nav-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    font-size: .95rem;
    background: transparent;
  }
  .sidebar a.ativo .nav-icon { background: var(--red-light); }
  .sidebar a[data-key="dashboard"] { order: 1; }
  .sidebar a[data-key="notas"] { order: 2; }
  .sidebar a[data-key="recursos"] { order: 3; }
  .sidebar a[data-key="anotacoes"] { order: 4; }
  .sidebar a[data-key="servicos"] { order: 5; }
  .sidebar a[data-key="formularios"],
  .sidebar a[data-key="rancho"],
  .sidebar a[data-key="assentamento"],
  .sidebar a[data-key="avisos"] { display: none; }
  .mobile-app-only { display: block; }
  .top-bar-sub { display: none; }
  .top-bar { padding: 0 12px; }
  .top-bar-title { font-size: 0; }
  .top-bar-title::after { content: 'ESSd'; font-size: .95rem; }
  .top-bar-right { gap: 6px; }
  .form-row { flex-direction: column; }
  .anotacoes-filtros {
    padding: 12px;
    box-shadow: none;
  }
  .anotacoes-filtros .card-title {
    margin-bottom: 10px;
    font-size: .65rem;
  }
  .anotacoes-filtros .form-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 10px;
    align-items: end;
  }
  .anotacoes-filtros .form-grupo {
    min-width: 0;
    margin-bottom: 0;
    width: 100%;
  }
  .anotacoes-filtros .form-grupo:nth-child(n+3) {
    grid-column: 1 / -1;
  }
  .anotacoes-filtros label {
    font-size: .6rem;
    margin-bottom: 3px;
  }
  .anotacoes-filtros input {
    min-height: 34px;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    font-size: .82rem;
  }
  .anotacoes-filtros input[type="date"] {
    height: 34px;
    min-height: 34px;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    line-height: 1;
    padding-right: 4px;
  }
  .anotacoes-filtros input[type="date"]::-webkit-calendar-picker-indicator {
    width: 14px;
    height: 14px;
    padding: 0;
    margin-left: 2px;
  }
  .filter-actions {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 10px;
    margin-top: 10px;
  }
  .filter-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .anot-card {
    padding: 10px 11px;
    box-shadow: none;
  }
  .anot-card p {
    line-height: 1.35;
  }
}

@media (display-mode: standalone) {
  .top-bar-title { font-size: 0; }
  .top-bar-title::after { content: 'ESSd'; font-size: .95rem; }
  .sidebar a[data-key="dashboard"] { order: 1; }
  .sidebar a[data-key="notas"] { order: 2; }
  .sidebar a[data-key="recursos"] { order: 3; }
  .sidebar a[data-key="anotacoes"] { order: 4; }
  .sidebar a[data-key="servicos"] { order: 5; }
  .sidebar a[data-key="formularios"],
  .sidebar a[data-key="rancho"],
  .sidebar a[data-key="assentamento"],
  .sidebar a[data-key="avisos"] { display: none; }
  .mobile-app-only { display: block; }
  .anotacoes-filtros {
    padding: 12px;
    box-shadow: none;
  }
  .anotacoes-filtros .card-title {
    margin-bottom: 10px;
    font-size: .65rem;
  }
  .anotacoes-filtros .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: end;
  }
  .anotacoes-filtros .form-grupo {
    min-width: 0;
    margin-bottom: 0;
    width: 100%;
  }
  .anotacoes-filtros .form-grupo:nth-child(n+3) {
    grid-column: 1 / -1;
  }
  .anotacoes-filtros label {
    font-size: .6rem;
    margin-bottom: 3px;
  }
  .anotacoes-filtros input {
    min-height: 34px;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    font-size: .82rem;
  }
  .anotacoes-filtros input[type="date"] {
    height: 34px;
    min-height: 34px;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    line-height: 1;
    padding-right: 4px;
  }
  .anotacoes-filtros input[type="date"]::-webkit-calendar-picker-indicator {
    width: 14px;
    height: 14px;
    padding: 0;
    margin-left: 2px;
  }
  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .filter-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .anot-card {
    padding: 10px 11px;
    box-shadow: none;
  }
  .anot-card p {
    line-height: 1.35;
  }
}

/* Dashboard de Conduta - Secretaria */
.dash-header {
  align-items: center;
  gap: 12px;
}
.dash-filtros {
  padding: 16px;
}
.dash-filter-head,
.dash-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-filter-head .card-title,
.dash-table-head .card-title {
  margin-bottom: 0;
}
.dash-scope-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: .74rem;
  font-weight: 700;
}
.dash-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.dash-filter-grid .form-grupo {
  margin-bottom: 0;
  min-width: 0;
}
.dash-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dash-filter-actions .btn {
  min-height: 38px;
  justify-content: center;
}
.dash-readonly-field {
  min-height: 39px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
}
.dash-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.dash-shortcuts a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15,18,24,.06);
  color: #525a68;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 700;
}
.dash-shortcuts span {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eef4ff;
  color: #1e64c8;
  flex: 0 0 25px;
}
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.dash-stat-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7dbe3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,18,24,.12);
}
.dash-stat-icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex: 0 0 68px;
  font-size: 2.15rem;
  line-height: 1;
}
.dash-blue { background: #90caf9; color: #1f65c8; }
.dash-green { background: #a5d6a7; color: #178f4a; }
.dash-male { background: #8ec9f5; color: #346bd0; }
.dash-female { background: #ffc1d6; color: #d94d86; }
.dash-orange { background: #ffd5c4; color: #f08a16; }
.dash-stat-label {
  color: #7a7f89;
  font-size: .9rem;
  line-height: 1.05;
}
.dash-stat-value {
  margin-top: 4px;
  color: #5e6065;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.95rem;
  font-weight: 600;
  line-height: 1;
}
.dash-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.dash-chart-card {
  min-width: 0;
  min-height: 336px;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 12px;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,18,24,.12);
}
.dash-chart-title {
  margin-bottom: 22px;
  color: #6b6f78;
  font-family: 'Oswald', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.dash-empty {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #8a909a;
  text-align: center;
  font-size: .86rem;
}
.dash-hbars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.dash-hbar-row {
  display: grid;
  grid-template-columns: minmax(72px, 112px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.dash-hbar-label {
  min-width: 0;
  color: #666b75;
  font-size: .78rem;
  line-height: 1.1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-hbar-track {
  height: 32px;
  background: #edf2f7;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
  position: relative;
}
.dash-hbar-fill {
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  color: var(--bar-text, #fff);
  font-size: .76rem;
  font-weight: 800;
  background: var(--bar-color, #288bdd);
  border-radius: 999px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 5px 10px rgba(15,23,42,.08);
  position: relative;
  overflow: visible;
}
.dash-hbar-fill span {
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  color: inherit;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
  text-align: right;
  line-height: 1;
}
.dash-hbar-row.is-small .dash-hbar-fill {
  min-width: 44px;
  padding-right: 4px;
}
.dash-hbar-row.is-small .dash-hbar-fill span {
  position: static;
  background: rgba(255,255,255,.28);
  color: inherit;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}
.dash-hbar-row.is-zero .dash-hbar-fill {
  min-width: 0;
}
.dash-hbar-row.is-zero .dash-hbar-fill span {
  display: none;
}
.dash-hbars.alunos .dash-hbar-fill { --bar-color: #f3d2cb; --bar-text: #7a2c21; }
.dash-hbars.alunos .dash-hbar-row.destaque .dash-hbar-fill { --bar-color: #ff4e20; --bar-text: #fff; }
.dash-hbars.anotantes .dash-hbar-fill { --bar-color: #34893a; --bar-text: #fff; }
.dash-card-link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 13px;
  color: #0668d8;
  font-size: .84rem;
  text-decoration: underline;
}
.dash-line-svg {
  width: 100%;
  min-height: 220px;
  display: block;
  overflow: visible;
}
.dash-axis {
  stroke: #737980;
  stroke-width: 1;
}
.dash-line-area {
  fill: url(#dashLineArea);
}
.dash-print-grid .dash-line-area {
  fill: url(#dashPdfLineArea);
}
.dash-line-path {
  fill: none;
  stroke: #1f78d1;
  stroke-width: 2;
}
.dash-line-point {
  fill: #1f78d1;
  stroke: #fff;
  stroke-width: 1.5;
}
.dash-line-value {
  fill: #666b75;
  font-size: 13px;
  font-weight: 700;
}
.dash-line-label {
  fill: #666b75;
  font-size: 13px;
}
.dash-vbars {
  position: relative;
  min-height: 228px;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 10px;
  padding: 30px 8px 0;
}
.dash-vbars.has-max-line::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 42px;
  border-top: 2px dashed #2f80ed;
  z-index: 3;
}
.dash-vbar-item {
  min-width: 0;
  position: relative;
  flex: 1 1 0;
  max-width: 68px;
  display: grid;
  grid-template-rows: 158px 28px;
  align-items: end;
  justify-items: stretch;
  z-index: 1;
}
.dash-vbar-value {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  min-width: 26px;
  min-height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  color: var(--bar-text, #fff);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}
.dash-vbar-track {
  width: 100%;
  height: 158px;
  display: flex;
  align-items: flex-end;
  border-bottom: 0;
  background: transparent;
  border-radius: 14px;
  overflow: visible;
}
.dash-vbar-fill {
  position: relative;
  width: 100%;
  min-height: 0;
  background: var(--bar-color, #288bdd);
  border-radius: 14px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 7px 15px rgba(15,23,42,.12);
}
.dash-vbar-item:not(.is-zero) .dash-vbar-fill {
  min-height: 42px;
}
.dash-vbar-item.is-zero .dash-vbar-fill {
  min-height: 0;
}
.dash-vbar-item.is-zero .dash-vbar-value {
  display: none;
}
.dash-vbars.pelotoes .dash-vbar-fill {
  --bar-color: #64748b;
  --bar-text: #fff;
}
.dash-vbars.pelotoes .dash-vbar-item {
  max-width: 38px;
}
.dash-vbars.pelotoes .dash-vbar-item.is-max .dash-vbar-fill {
  --bar-color: #475569;
}
.dash-vbar-label {
  width: 100%;
  min-width: 0;
  color: #666b75;
  font-size: .84rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-max-tag {
  position: absolute;
  top: -23px;
  left: 0;
  padding: 2px 5px;
  background: #64748b;
  color: #fff;
  font-size: .56rem;
  font-weight: 800;
  border-radius: 3px;
}
.dash-max-spacer {
  display: none;
}
.dash-alunos-card {
  margin-top: 16px;
}
.dash-table-head span {
  color: #6b7280;
  font-size: .82rem;
  font-weight: 700;
}
.dash-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: .84rem;
  font-weight: 700;
}
.dash-bottom-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.dash-print-cover {
  padding: 16px 18px;
}
.dash-print-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}
.dash-print-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: #5f6673;
  font-size: .8rem;
}
.dash-print-meta span {
  display: inline-flex;
}
@media (max-width: 1180px) {
  .dash-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .dash-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .dash-filter-head,
  .dash-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .dash-filter-grid,
  .dash-stat-grid,
  .dash-chart-grid {
    grid-template-columns: 1fr;
  }
  .dash-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-shortcuts a {
    min-width: 0;
    font-size: .72rem;
  }
  .dash-stat-card {
    min-height: 92px;
    padding: 13px;
  }
  .dash-stat-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    font-size: 1.7rem;
  }
  .dash-chart-card {
    min-height: 300px;
    padding: 16px 12px 12px;
  }
  .dash-hbar-row {
    grid-template-columns: minmax(64px, 92px) minmax(0, 1fr);
  }
  .dash-hbar-label {
    font-size: .72rem;
  }
  .dash-vbars {
    gap: 6px;
  }
  .dash-vbar-label {
    font-size: .72rem;
  }
  .dash-pagination,
  .dash-bottom-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}
@media print {
  .top-bar,
  .sidebar,
  .dash-filtros,
  .dash-shortcuts,
  .dash-card-link,
  .dash-bottom-actions,
  .dash-print-actions {
    display: none !important;
  }
  html,
  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .conteudo {
    padding: 0 !important;
    overflow: visible !important;
  }
  .main-layout {
    display: block !important;
  }
  .dash-stat-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
  }
  .dash-stat-card {
    min-height: 78px !important;
    padding: 9px !important;
    box-shadow: none !important;
  }
  .dash-stat-icon {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
    font-size: 1.25rem !important;
  }
  .dash-stat-label {
    font-size: .68rem !important;
  }
  .dash-stat-value {
    font-size: 1.2rem !important;
  }
  .dash-chart-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .dash-chart-card,
  .dash-print-cover {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .dash-chart-card {
    min-height: 250px !important;
    padding: 10px !important;
  }
  .dash-chart-title {
    margin-bottom: 10px !important;
    font-size: .65rem !important;
  }
  .dash-line-svg {
    min-height: 185px !important;
  }
}

/* Efetivo - camada final para vencer estilos globais */
.card.efe-filter-card {
  padding: 14px 16px;
}
.card.efe-filter-card .efe-filtros {
  display: grid !important;
  grid-template-columns: minmax(145px, .75fr) minmax(150px, .85fr) minmax(170px, 1fr) minmax(120px, .65fr) auto;
  gap: 10px;
  align-items: end;
}
.card.efe-filter-card .form-grupo {
  margin-bottom: 0;
}
.card.efe-filter-card .form-grupo input,
.card.efe-filter-card .form-grupo select {
  min-height: 38px;
  padding: 8px 10px;
}
.card.efe-filter-card .btn {
  min-height: 38px;
}
.card.efe-filter-card .efe-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card.efe-filter-card .efe-toolbar-actions form {
  margin: 0;
}
@media (max-width: 980px) {
  .card.efe-filter-card .efe-filtros {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .card.efe-filter-card .efe-filtros {
    grid-template-columns: 1fr;
  }
}

/* Efetivo - modais finais */
.efe-modal-panel {
  width: min(900px, calc(100vw - 32px));
  padding: 20px;
}
.efe-modal-panel-sm {
  width: min(560px, calc(100vw - 32px));
}
.efe-modal-grid {
  gap: 16px;
}
.efe-modal-form {
  gap: 10px;
  padding: 14px;
}
.efe-modal-form-full {
  background: var(--surface2);
}
.efe-modal-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.efe-modal-row > div {
  min-width: 0;
}
.efe-modal-form input,
.efe-modal-form select,
.efe-modal-form textarea {
  min-width: 0;
  min-height: 40px;
}
.efe-modal-form .btn {
  margin-top: 2px;
}
.efe-tabela-mensal th:last-child,
.efe-tabela-mensal td:last-child {
  width: 110px;
  text-align: center;
}
@media (max-width: 760px) {
  .efe-modal-panel,
  .efe-modal-panel-sm {
    width: calc(100vw - 18px);
    margin: 9px auto;
    padding: 14px;
  }
  .efe-modal-grid,
  .efe-modal-row {
    grid-template-columns: 1fr;
  }
}

/* Efetivo - correcao dos campos de data no modal */
.efe-modal-form label {
  display: block;
  margin: 0 0 6px;
  line-height: 1.1;
}
.efe-modal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.efe-modal-row > div {
  display: block;
  min-width: 0;
}
.efe-modal-row > div > label {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  white-space: nowrap;
}
.efe-modal-row > div > input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
}
@media (max-width: 760px) {
  .efe-modal-row {
    grid-template-columns: 1fr;
  }
}

/* Efetivo - observação por ícone, histórico e impressão semanal */
.efe-obs-cell {
  width: 78px;
  text-align: center;
}
.efe-obs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: #fff;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 800;
}
.efe-obs-btn.preenchida {
  border-color: rgba(204,31,31,.35);
  background: var(--red-light);
  color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,31,31,.06);
}
.efe-obs-print {
  display: none;
  max-width: 240px;
  white-space: normal;
}
.efe-hist-filtros {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) 150px 150px 150px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}
.efe-hist-filtros .form-grupo {
  margin-bottom: 0;
}
.efe-hist-filtros input,
.efe-hist-filtros select {
  min-height: 36px;
}
@media (max-width: 980px) {
  .efe-hist-filtros {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .efe-hist-filtros {
    grid-template-columns: 1fr;
  }
}
@media print {
  .efe-print-hide,
  .efe-action-btn,
  .efe-modal,
  .efe-obs-btn,
  .efe-historico {
    display: none !important;
  }
  .efe-obs-print {
    display: block !important;
  }
  .efe-print-sheet .efe-tabela,
  .efe-print-afastamentos .efe-tabela {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9px !important;
  }
  .efe-print-sheet .efe-tabela th,
  .efe-print-sheet .efe-tabela td,
  .efe-print-afastamentos .efe-tabela th,
  .efe-print-afastamentos .efe-tabela td {
    padding: 4px !important;
  }
}



