@import "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Franklin:wght@700;800&display=swap";
:root {
  font-family:
    DM Sans,
    sans-serif;
  color: #1d281f;
  background: #f3f0e7;
  font-synthesis: none;
  --olive: #253e28;
  --olive2: #315335;
  --gold: #bd9a43;
  --cream: #f3f0e7;
  --surface: #fff;
  --muted: #6d776f;
  --line: #dfe3dc;
  --danger: #9c3535;
}
:root[data-theme="dark"] {
  color: #edf2ed;
  background: #111713;
  --cream: #111713;
  --surface: #1b241d;
  --muted: #9eaaa0;
  --line: #334038;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #172a1a;
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font: 800 22px Libre Franklin;
}
.brand small {
  color: #b8c6b9;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav button {
  border: 0;
  background: transparent;
  color: #bdc9be;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 9px;
  text-align: left;
}
.sidebar nav button:hover,
.sidebar nav button.active {
  background: #2b472f;
  color: #fff;
}
.sidebar nav button.active {
  box-shadow: inset 3px 0 var(--gold);
}
.profile {
  margin-top: auto;
  border-top: 1px solid #365039;
  padding-top: 16px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 9px;
}
.profile strong,
.profile small {
  display: block;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  color: #aab9ab;
  font-size: 11px;
}
.avatar {
  width: 38px;
  height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.icon-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 7px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.icon-button:hover {
  background: #ffffff12;
}
.app-shell > main {
  grid-column: 2;
}
.topbar {
  height: 75px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 34px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar span,
.topbar strong {
  display: block;
}
.topbar span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.topbar strong {
  font-size: 18px;
}
.page {
  padding: 30px 34px 60px;
  max-width: 1500px;
  margin: auto;
}
.welcome {
  background: linear-gradient(120deg, #1b3220, #315237);
  border-radius: 18px;
  padding: 28px 32px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 30px #14261924;
}
.welcome span {
  color: #d5dcd5;
}
.welcome h1 {
  font: 800 30px Libre Franklin;
  margin: 4px 0;
}
.welcome p {
  margin: 0;
  color: #c5d0c6;
}
.unit-badge {
  border: 1px solid #ffffff30;
  background: #ffffff0c;
  border-radius: 13px;
  padding: 13px 17px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.unit-badge small,
.unit-badge strong {
  display: block;
}
.unit-badge small {
  color: #bdc9be;
  font-size: 11px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 18px;
  gap: 16px;
}
.section-heading h1,
.section-heading h2 {
  font-family: Libre Franklin;
  margin: 0;
}
.section-heading h1 {
  font-size: 26px;
}
.section-heading h2 {
  font-size: 20px;
}
.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}
.week-nav {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.week-nav button {
  border: 0;
  background: transparent;
  padding: 8px;
  color: inherit;
}
.week-nav span {
  font-size: 13px;
  min-width: 90px;
  text-align: center;
}
.meal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
}
.day-card,
.panel,
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.day-card {
  padding: 18px;
}
.day-title {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.day-title svg {
  color: var(--gold);
}
.day-title small,
.day-title strong {
  display: block;
}
.day-title small {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.meal-list {
  padding-top: 12px;
  display: grid;
  gap: 8px;
}
.meal {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 7px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
}
.meal:hover {
  background: #6e8e7020;
}
.meal.selected {
  background: #5579571b;
  border-color: #7e9b80;
}
.meal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.meal .check {
  width: 20px;
  height: 20px;
  border: 1.5px solid #92a294;
  border-radius: 5px;
  display: grid;
  place-items: center;
}
.meal.selected .check {
  background: var(--olive2);
  border-color: var(--olive2);
  color: #fff;
}
.meal strong,
.meal small {
  display: block;
}
.meal strong {
  font-size: 13px;
}
.meal small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat:after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.08;
  right: -15px;
  top: -15px;
}
.stat span,
.stat small {
  display: block;
  color: var(--muted);
}
.stat strong {
  font: 800 34px Libre Franklin;
  display: block;
  margin: 7px 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  margin-top: 16px;
}
.panel {
  padding: 22px;
}
.panel h2 {
  font: 700 17px Libre Franklin;
  margin: 0 0 20px;
}
.panel > p {
  color: var(--muted);
  font-size: 13px;
}
.bars {
  display: grid;
  gap: 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 35px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.bar-row > div {
  height: 8px;
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.bar-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--olive2), #6f8b58);
  border-radius: 8px;
}
.timeline {
  display: grid;
  gap: 14px;
}
.timeline > div {
  display: flex;
  gap: 10px;
}
.timeline i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 5px;
}
.timeline span,
.timeline b,
.timeline small {
  display: block;
}
.timeline span {
  font-size: 12px;
}
.timeline b {
  font-size: 11px;
}
.timeline small {
  color: var(--muted);
  margin-top: 3px;
}
.table-panel {
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
}
.table-panel h2 {
  padding: 20px 22px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #8794880a;
}
tbody tr:hover {
  background: #7386750a;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}
.primary {
  border: 0;
  background: var(--olive2);
  color: #fff;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary:hover {
  background: #3f6744;
}
.primary:disabled {
  opacity: 0.5;
}
.primary.small {
  padding: 9px 13px;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  color: #3c7041;
  padding: 4px;
}
.text-button.danger {
  color: var(--danger);
}
input,
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  padding: 10px 12px;
  min-width: 0;
}
label {
  font-size: 12px;
  font-weight: 600;
  display: grid;
  gap: 6px;
}
.toolbar {
  margin-bottom: 12px;
}
.toolbar input {
  width: min(420px, 100%);
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: #142719;
}
.login-art {
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8vw;
  background: radial-gradient(circle at 30% 30%, #56704c, #18301d 55%);
}
.login-art .hero-mark {
  font: 800 clamp(120px, 25vw, 350px) "Libre Franklin";
  line-height: 0.75;
  color: #ffffff0d;
  position: absolute;
  top: 10%;
  left: 5%;
}
.login-art p {
  font: 700 clamp(25px, 4vw, 48px) "Libre Franklin";
  max-width: 600px;
  line-height: 1.1;
}
.login-card {
  background: var(--surface);
  padding: 9vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.login-card > img {
  width: 70px;
}
.login-card h1 {
  font: 800 32px Libre Franklin;
  margin: 6px 0;
}
.login-card p,
.login-card > small,
.login-card span {
  color: var(--muted);
}
.login-card input {
  padding: 13px;
}
.alert {
  padding: 11px;
  border-radius: 7px;
  font-size: 12px;
}
.alert.error {
  background: #a23c3c18;
  color: #b04444;
}
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle, #355239, #172a1a);
}
.modal-card {
  background: var(--surface);
  border-radius: 15px;
  padding: 28px;
  box-shadow: 0 20px 60px #0004;
  width: min(430px, 100%);
  position: relative;
  display: grid;
  gap: 15px;
}
.modal-card.wide {
  width: min(720px, 94vw);
}
.modal-card h1,
.modal-card h2 {
  font-family: Libre Franklin;
  margin: 0;
}
.modal-card p {
  color: var(--muted);
  margin: 0;
}
.round-icon {
  width: 48px;
  height: 48px;
  background: #5f7d6220;
  color: var(--olive2);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0008;
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 15px;
}
.close {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 0;
  background: transparent;
  color: inherit;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.inline-form {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
}
.form-stack {
  display: grid;
  gap: 16px;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.switch-row input {
  min-width: auto;
  width: 20px;
  height: 20px;
}
.upload-box {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  margin: 18px 0;
}
.upload-box input {
  display: none;
}
.report-actions {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}
.report-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.report-sheet {
  padding: 28px;
}
.report-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid var(--olive2);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.report-header img {
  width: 55px;
}
.report-header h2 {
  margin: 3px 0;
}
.report-header span {
  font-size: 12px;
  color: var(--muted);
}
.report-header .report-dependency {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background: #263e2a;
  color: #fff;
  border: 1px solid #6e8c71;
  padding: 13px 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 60;
  box-shadow: 0 10px 30px #0004;
}
.loading,
.splash {
  min-height: 50vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.splash {
  min-height: 100vh;
  background: #172a1a;
  color: #fff;
  align-content: center;
  gap: 12px;
  font: 800 26px Libre Franklin;
}
.splash img {
  width: 80px;
}
.mobile-only,
.scrim {
  display: none;
}
@media (max-width: 1050px) {
  .meal-grid,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .app-shell > main {
    display: block;
  }
  .sidebar {
    transform: translate(-100%);
    transition: 0.2s;
  }
  .sidebar.open {
    transform: none;
  }
  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 15;
  }
  .mobile-only {
    display: grid;
  }
  .topbar {
    padding: 0 15px;
  }
  .page {
    padding: 20px 15px 50px;
  }
  .meal-grid,
  .stats,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .welcome {
    align-items: flex-start;
    padding: 22px;
    gap: 18px;
  }
  .unit-badge {
    display: none;
  }
  .section-heading {
    align-items: flex-start;
  }
  .inline-form,
  .form-grid,
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-card {
    min-height: 100vh;
    padding: 35px 25px;
  }
  .report-actions {
    flex-wrap: wrap;
  }
}
@media print {
  .sidebar,
  .topbar,
  .section-heading,
  .report-filters,
  .report-actions {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .app-shell > main {
    display: block;
  }
  .page {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  .report-sheet {
    box-shadow: none;
  }
  .toast {
    display: none;
  }
}
.login-page {
  grid-template-columns: 1.18fr 0.82fr;
  background:
    linear-gradient(90deg, #101a12aa, #101a1266),
    url(/aprov/login-background.png) center/cover no-repeat fixed;
}
.login-art {
  padding: 7vw;
  background: none;
}
.login-art p {
  max-width: 570px;
  margin: 0;
  line-height: 1.08;
  text-shadow: 0 3px 22px #000;
}
.login-card {
  margin: 4vh 4vw 4vh 0;
  padding: 7vh 6vw;
  border: 1px solid #ffffff32;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 25px 80px #0008;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.meal-rule {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  display: grid;
  gap: 9px;
}
.meal-rule > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.meal-rule strong,
.meal-rule small {
  display: block;
}
.meal-rule strong {
  font-size: 13px;
}
.meal-rule small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9a4747;
}
.meal-rule.released .status-dot {
  background: #4f8255;
}
.rule-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.rule-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 6px 3px;
  font-size: 10px;
}
.rule-actions button.active {
  background: var(--olive2);
  border-color: var(--olive2);
  color: #fff;
}
.rule-actions button:disabled {
  opacity: 0.55;
}
.brand img {
  width: 42px;
  height: 48px;
  object-fit: contain;
}
.login-card > img {
  width: 76px;
  height: 106px;
  object-fit: contain;
}
.report-header img {
  width: 58px;
  height: 80px;
  object-fit: contain;
}
.report-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.report-filters label {
  min-width: 220px;
}
.service-form:has(input) {
  grid-template-columns: 1fr 190px 220px auto;
}
.deadline-notice {
  margin-top: 16px;
  border: 1px solid #b59647;
  background: linear-gradient(90deg, #c3a34b20, #c3a34b0c);
  border-radius: 12px;
  padding: 15px 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.deadline-notice > svg {
  color: var(--gold);
  flex: none;
  margin-top: 2px;
}
.deadline-notice strong,
.deadline-notice p,
.deadline-notice small {
  display: block;
}
.deadline-notice p {
  margin: 4px 0;
  font-size: 13px;
}
.deadline-notice small {
  color: var(--muted);
  line-height: 1.45;
}
.report-actions .save-report {
  background: var(--olive2);
  border-color: var(--olive2);
  color: #fff;
}
.archive-alert {
  background: #b9983d20;
  color: var(--gold);
  margin-bottom: 12px;
}
.report-history {
  margin-top: 16px;
}
.day-title em {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: var(--gold);
  margin-top: 3px;
}
.compare-page {
  height: 100vh;
  display: grid;
  grid-template-rows: 58px 1fr;
  background: #101713;
}
.compare-page > header {
  background: #172a1a;
  color: #fff;
  border-bottom: 1px solid #3d503f;
  padding: 7px 18px;
  display: flex;
  align-items: center;
}
.compare-page > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compare-page > header img {
  width: 34px;
  height: 44px;
  object-fit: contain;
}
.compare-page > header strong,
.compare-page > header small {
  display: block;
}
.compare-page > header small {
  color: #aebcaf;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  min-height: 0;
}
.compare-grid section {
  display: grid;
  grid-template-rows: 35px 1fr;
  min-width: 0;
  min-height: 0;
  background: #243727;
}
.compare-grid h2 {
  font-size: 13px;
  color: #fff;
  margin: 0;
  padding: 8px 14px;
}
.compare-grid iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--cream);
}
@media (max-width: 760px) {
  .login-page {
    grid-template-columns: 1fr;
    background-position: 34% center;
    padding: 18px;
  }
  .login-card {
    min-height: calc(100vh - 36px);
    margin: 0;
    padding: 35px 25px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
  }
  .report-filters {
    display: grid;
  }
  .report-filters label {
    min-width: 0;
  }
  .compare-page {
    height: auto;
    min-height: 100vh;
  }
  .compare-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 800px 800px;
  }
  .compare-grid section {
    min-height: 800px;
  }
}
/* Conferência do Sargento de Dia */
.attendance-filters{display:flex;gap:.7rem;align-items:center}.attendance-filters input,.attendance-filters select{min-width:170px}.attendance-summary{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:1rem;margin-bottom:1rem}.summary-card{background:var(--surface,#fff);border:1px solid var(--border,#dce3dc);border-radius:14px;padding:1rem 1.15rem;display:flex;flex-direction:column;box-shadow:0 5px 18px #102b1710}.summary-card small{color:var(--muted,#667085);font-weight:700}.summary-card strong{font-size:1.8rem;margin-top:.2rem}.summary-card.present{border-left:5px solid #238636}.summary-card.absent{border-left:5px solid #c9362b}.summary-card.pending{border-left:5px solid #d79a16}.attendance-status{display:inline-flex;padding:.3rem .65rem;border-radius:999px;font-size:.82rem;font-weight:800}.attendance-status.present{background:#dff5e5;color:#176b2a}.attendance-status.absent{background:#fee5e2;color:#a5261e}.attendance-status.pending{background:#fff3cf;color:#8a6000}.attendance-actions{display:flex;gap:.35rem;flex-wrap:wrap}.present-button{color:#187231!important}.absence-total{margin-top:1rem;text-align:right;font-size:1rem}.absence-print-sheet{margin-top:1rem}
@media screen{.absence-print-sheet{display:none}}
@media(max-width:760px){.attendance-filters{width:100%;flex-direction:column;align-items:stretch}.attendance-summary{grid-template-columns:repeat(2,1fr)}.attendance-actions{min-width:210px}}
@media print{.no-print-attendance,.attendance-summary,.attendance-filters,.report-actions,.section-heading{display:none!important}.absence-print-sheet{display:block!important}}
