:root {
  --bg: #f5f7fa;
  --ink: #172033;
  --muted: #667085;
  --brand: #1f6feb;
  --line: #d8dee8;
  --panel: #ffffff;
  --head: #dbeafe;
  --sat: #f3f8ff;
  --sun: #fff5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.layout {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #111827;
  color: white;
  padding: 22px 16px;
}

.sidebar h1 {
  font-size: 1.05rem;
  margin-bottom: 26px;
}

.sidebar a {
  display: block;
  color: #dbe4f0;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.sidebar a:hover {
  background: #243145;
  color: white;
}

.user-box {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: #dbe4f0;
  font-size: .9rem;
}

.user-box span {
  display: block;
  margin-bottom: 8px;
}

.user-box button {
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent;
  color: #ffffff;
  border-radius: 6px;
  padding: 6px 10px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #eaf1fb 100%);
  padding: 18px;
}

.login-card {
  width: min(100%, 360px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .12);
}

.login-card h1 {
  font-size: 1.35rem;
  text-align: center;
  margin: 10px 0 24px;
  font-weight: 900;
}

.login-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 8px;
  background: #eaf2ff;
  color: #174ea6;
  font-weight: 900;
}

.forgot-link {
  display: inline-block;
  margin-top: 26px;
  font-size: .86rem;
  color: #0b66d8;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  font-size: .86rem;
}

.login-links a {
  color: #0b66d8;
  text-decoration: none;
}

.access-request-card {
  width: min(100%, 680px);
}

.module-page {
  max-width: 760px;
}

.module-welcome {
  margin-bottom: 26px;
}

.module-welcome h2 {
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 26px;
}

.module-welcome p {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.module-list {
  display: grid;
  gap: 16px;
}

.module-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink);
  text-decoration: none;
  background: white;
  border: 1px solid #d1d7e2;
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .08);
}

.module-card:hover {
  border-color: #8bb6f8;
  box-shadow: 0 8px 18px rgba(31, 111, 235, .14);
  transform: translateY(-1px);
}

.module-pin {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  position: relative;
}

.module-pin::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 6px;
  width: 5px;
  height: 7px;
  background: var(--brand);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.module-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 10px;
}

.module-card p {
  margin: 0 0 5px;
  font-size: .86rem;
}

.module-card small {
  color: var(--muted);
}

.module-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.module-workspace {
  max-width: 980px;
}

.module-intro h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 900;
}

.module-feature {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  font-weight: 800;
  background: #f8fafc;
}

.exam-dashboard {
  max-width: 1180px;
}

.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.exam-header h2 {
  margin: 0;
  font-weight: 900;
}

.exam-date {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

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

.exam-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.exam-kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, .05);
}

.exam-kpi span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: .86rem;
}

.exam-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 1.9rem;
  line-height: 1;
}

.exam-kpi.primary {
  border-color: #8bb6f8;
  background: #f8fbff;
}

.exam-kpi.alert-kpi {
  border-color: #fecaca;
  background: #fffafa;
}

.agenda-panel,
.next-panel,
.quick-access,
.secondary-info {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(17, 24, 39, .04);
}

.agenda-panel {
  padding: 18px;
  margin-bottom: 14px;
}

.agenda-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.agenda-title h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agenda-title span {
  color: var(--muted);
  font-weight: 800;
}

.agenda-list {
  display: grid;
  gap: 8px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 76px minmax(220px, 1fr) 118px minmax(270px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #94a3b8;
  border-radius: 7px;
  padding: 12px;
}

.agenda-time {
  font-size: 1.2rem;
  font-weight: 900;
}

.agenda-main strong,
.agenda-main span,
.agenda-main small,
.agenda-main em {
  display: block;
}

.agenda-main span {
  font-weight: 800;
}

.agenda-main small,
.agenda-main em {
  color: var(--muted);
}

.agenda-status {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .78rem;
  font-weight: 900;
  background: #eef4ff;
  color: #174ea6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
  background: #eef4ff;
  color: #174ea6;
  white-space: nowrap;
}

.status-pill.status-realizado {
  background: #dcfce7;
  color: #166534;
}

.status-pill.status-cancelado {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.status-pendente {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-aguardando {
  background: #e0f2fe;
  color: #075985;
}

.status-pill.status-ativo,
.status-pill.status-disponivel {
  background: #dcfce7;
  color: #166534;
}

.status-pill.status-inativo {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.status-manutencao,
.status-pill.status-folga,
.status-pill.status-ferias,
.status-pill.status-afastado,
.status-pill.status-reservado {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-finalizado {
  background: #e0e7ff;
  color: #3730a3;
}

.driver-screen {
  max-width: 520px;
  margin: 0 auto;
}

.driver-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.driver-header h2 {
  margin: 0;
  width: 100%;
  font-size: 1.7rem;
  font-weight: 800;
}

.driver-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}

.driver-facts li,
.checkout-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.driver-facts span,
.checkout-summary span {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.driver-facts strong,
.checkout-summary strong {
  font-size: 1.05rem;
}

.driver-empty {
  text-align: center;
  padding: 28px 18px;
  font-size: 1.05rem;
  font-weight: 700;
}

.driver-actions {
  display: grid;
  gap: 10px;
}

.driver-active h3,
.driver-start h3 {
  margin-top: 0;
  font-weight: 800;
}

.tank-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
}

.tank-field legend {
  float: none;
  width: auto;
  padding: 0 6px;
  font-size: .92rem;
  font-weight: 800;
}

.tank-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 18px;
  font-weight: 800;
  cursor: pointer;
}

.tank-option input {
  width: 1.15rem;
  height: 1.15rem;
}

.fuel-form .form-control-lg,
.fuel-form .form-select-lg {
  min-height: 48px;
}

.viagem-paciente-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.status-pill.status-escala-aguardando-escala,
.status-pill.status-escala-aguardando-motorista,
.status-pill.status-escala-aguardando-veículo,
.status-pill.status-escala-aguardando-veiculo {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-escala-completa {
  background: #dcfce7;
  color: #166534;
}

.stack-form .form-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-action-form {
  max-width: 480px;
}

.period-shortcuts a.active {
  font-weight: 700;
  text-decoration: underline;
}

.report-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  gap: 8px;
  align-items: center;
}

.chart-bar-label {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

.chart-bar-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.chart-bar-track > span {
  display: block;
  height: 100%;
  background: #0f766e;
  border-radius: inherit;
}

.chart-bar-value {
  font-size: 0.85rem;
  text-align: right;
}

.pagination-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.section-label {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill.status-prazo-normal,
.status-pill.status-doc-valido { background: #dcfce7; color: #166534; }
.status-pill.status-prazo-atencao,
.status-pill.status-doc-proximo { background: #fef3c7; color: #92400e; }
.status-pill.status-prazo-urgente,
.status-pill.status-doc-urgente { background: #ffedd5; color: #9a3412; }
.status-pill.status-prazo-vencida,
.status-pill.status-doc-vencido { background: #fee2e2; color: #991b1b; }
.status-pill.status-em_andamento { background: #fee2e2; color: #991b1b; }
.status-pill.status-agendada { background: #e0f2fe; color: #075985; }

.full-span { grid-column: 1 / -1; }

@media print {
  .report-page .no-print,
  .sidebar,
  .alert {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .content {
    padding: 0;
  }
}

.status-pill.status-agendada,
.status-pill.status-confirmada {
  background: #e0f2fe;
  color: #075985;
}

.status-pill.status-em_viagem {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-concluida {
  background: #dcfce7;
  color: #166534;
}

.row-cancelada {
  opacity: .72;
}


.frota-checkin {
  margin-bottom: 18px;
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .driver-screen {
    max-width: none;
  }

  .checkout-summary {
    grid-template-columns: 1fr;
  }

  .frota-checkin .row > [class*="col-"] {
    margin-bottom: 4px;
  }

  .driver-header a {
    width: 100%;
  }
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-actions form {
  margin: 0;
}

.status-actions .btn {
  font-weight: 800;
}

.status-actions-compact {
  justify-content: flex-end;
}

.linked-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  position: relative;
}

.linked-field .search-results {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 46px;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 35px rgba(17, 24, 39, .18);
}

.linked-field .search-results.open {
  display: block;
}

.search-results button,
.search-empty {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: white;
  padding: 10px 12px;
  text-align: left;
}

.search-results button:hover {
  background: #f8fbff;
}

.search-results strong,
.search-results span {
  display: block;
}

.search-results span,
.search-empty {
  color: var(--muted);
  font-size: .82rem;
}

.report-patient-filter {
  grid-template-columns: 1fr;
}

.report-patient-filter .search-results {
  right: 0;
}

.quick-modal-grid {
  display: grid;
  gap: 10px;
}

.quick-modal-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
  font-size: .86rem;
}

.status-realizado {
  border-left-color: #16a34a;
}

.status-cancelado {
  border-left-color: #dc2626;
}

.status-pendente,
.status-aguardando {
  border-left-color: #f59e0b;
}

.agenda-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 220px;
  text-align: center;
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 160px;
  color: var(--muted);
  text-align: center;
}

.exam-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) 1.2fr;
  gap: 14px;
  margin-bottom: 14px;
}

.next-panel,
.quick-access {
  padding: 16px;
}

.next-panel h3,
.quick-access h3 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.next-panel strong,
.next-panel span,
.next-panel small {
  display: block;
}

.next-panel strong {
  font-size: 1.6rem;
}

.next-panel span {
  font-weight: 900;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.quick-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  background: #f8fafc;
}

.secondary-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
}

.secondary-info div {
  padding: 12px;
  background: #f8fafc;
}

.secondary-info span,
.secondary-info strong {
  display: block;
}

.secondary-info span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.secondary-info strong {
  font-size: 1.35rem;
}

.content {
  padding: 22px;
}

.page-head,
.calendar-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.page-head h2,
.calendar-top h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 800;
}

.actions,
.filters,
.toolbar,
.calendar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filters {
  margin-bottom: 14px;
}

.filters .form-control,
.filters .form-select {
  max-width: 190px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-primary {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-bottom: 12px;
}

.metric,
.panel,
.calendar-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 6px 16px rgba(17, 24, 39, .04);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.metric.accent {
  border-color: #b7cdfb;
  background: #f8fbff;
}

.small .metric strong {
  font-size: 1.35rem;
}

.panel h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.line,
.total-line {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 8px;
}

.total-line {
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.report-page {
  max-width: 1280px;
}

.report-filters {
  margin-bottom: 14px;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.filter-title h3 {
  margin: 0;
}

.filter-title span {
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
}

.report-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
  font-size: .82rem;
}

.report-filter-actions {
  display: flex;
  gap: 8px;
  grid-column: span 2;
}

.period-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.period-shortcuts a {
  color: #174ea6;
  background: #eef4ff;
  border: 1px solid #c7d7f5;
  border-radius: 999px;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: .84rem;
}

.report-metrics {
  margin-bottom: 14px;
}

.quantity-type-panel {
  margin-bottom: 14px;
}

.quantity-type-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.quantity-type-head h3 {
  margin: 0;
  text-transform: uppercase;
  font-weight: 900;
}

.quantity-type-head strong {
  min-width: 84px;
  border: 1px solid #b7cdfb;
  border-radius: 8px;
  padding: 10px 14px;
  background: #f8fbff;
  color: #174ea6;
  font-size: 1.7rem;
  text-align: center;
}

.quantity-type-list {
  display: grid;
  gap: 8px;
}

.quantity-type-row {
  display: grid;
  grid-template-columns: max-content 1fr 56px;
  gap: 10px;
  align-items: end;
  font-size: .98rem;
}

.quantity-type-row i {
  border-bottom: 1px dotted #aab5c6;
  transform: translateY(-5px);
}

.quantity-type-row b {
  text-align: right;
  font-size: 1.05rem;
}

.quantity-type-row.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 6px;
  padding-left: 10px;
  padding-right: 10px;
  font-weight: 900;
}

.quantity-type-row.total b {
  color: #174ea6;
  font-size: 1.25rem;
}

.quantity-type-empty {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.total-row td {
  border-top: 2px solid var(--line);
  background: #f8fbff;
  font-weight: 900;
}

.report-summary-grid,
.report-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.daily-bars {
  display: grid;
  gap: 9px;
}

.daily-bar-row {
  display: grid;
  grid-template-columns: 62px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.daily-bar-row span,
.daily-bar-row b {
  font-size: .86rem;
}

.daily-bar-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.daily-bar-row i {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: #1f6feb;
}

.print-title {
  display: none;
}

.month-total {
  min-width: 152px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: right;
  background: #f8fafc;
}

.month-total span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.month-total strong {
  font-size: 1.7rem;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-nav a:last-child {
  justify-self: end;
}

.current-month {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.calendar-actions {
  margin-bottom: 12px;
}

.calendar-actions form {
  margin: 0;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  border: 1px solid #bfc9d8;
  background: #bfc9d8;
  gap: 1px;
}

.cal-head {
  background: var(--head);
  padding: 7px 8px;
  font-weight: 900;
  text-align: center;
  color: #1f3b63;
  font-size: .84rem;
}

.cal-day {
  display: flex;
  flex-direction: column;
  min-height: 138px;
  background: white;
  color: var(--ink);
  text-align: left;
  border: 0;
  padding: 8px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.cal-day:hover {
  outline: 2px solid var(--brand);
  z-index: 1;
}

.day-header {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  align-items: baseline;
  font-weight: 900;
  font-size: .83rem;
  line-height: 1.1;
  margin-bottom: 5px;
}

.day-header span {
  font-weight: 900;
}

.day-entries {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 2px;
  line-height: 1.35;
}

.entry,
.empty-note {
  font-size: .78rem;
  line-height: 1.35;
}

.empty-note {
  color: #98a2b3;
  font-style: italic;
}

.day-total {
  flex: 0 0 auto;
  margin-top: 6px;
  padding-top: 5px;
  font-weight: 800;
  font-size: .8rem;
  line-height: 1.2;
  border-top: 1px solid #e5e7eb;
}

.today {
  box-shadow: inset 0 0 0 3px #1f6feb;
}

.saturday {
  background: var(--sat);
}

.sunday {
  background: var(--sun);
}

.holiday-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
}

.muted-day {
  opacity: .42;
}

.launch-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(4, minmax(100px, 1fr));
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.launch-row small {
  display: block;
  color: var(--muted);
}

.row-total {
  font-size: 1.2rem;
}

.modal-title {
  font-size: 1.45rem;
  font-weight: 900;
}

.modal-subtitle {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.quick-fields {
  display: grid;
  gap: 10px;
}

.quick-row {
  display: grid;
  grid-template-columns: 170px 1fr 54px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quick-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stepper {
  display: grid;
  grid-template-columns: 64px 34px 58px 34px;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}

.stepper input {
  width: 58px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font-weight: 800;
}

.step-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #b9c5d6;
  background: #eef4ff;
  color: #174ea6;
  border-radius: 6px;
  font-weight: 900;
}

.quick-row-total {
  justify-self: end;
  font-weight: 900;
  font-size: 1.15rem;
}

.quick-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  font-size: 1.2rem;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .sidebar a {
    margin: 0;
  }

  .dashboard-primary {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .calendar-board {
    grid-template-columns: repeat(7, minmax(112px, 1fr));
  }
}

@media (max-width: 720px) {
  .content {
    padding: 14px;
  }

  .page-head,
  .calendar-top,
  .calendar-nav,
  .launch-row,
  .quick-row {
    display: block;
  }

  .calendar-nav a,
  .month-total,
  .quick-place,
  .quick-controls,
  .exam-header-actions {
    margin-top: 8px;
  }

  .dashboard-primary {
    grid-template-columns: 1fr;
  }

  .calendar-board {
    display: block;
    border: 0;
    background: transparent;
  }

  .cal-head {
    display: none;
  }

  .cal-day {
    display: block;
    width: 100%;
    min-height: 118px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .muted-day {
    display: none;
  }

  .exam-header,
  .agenda-title,
  .agenda-item {
    display: block;
  }

  .exam-kpis,
  .exam-grid,
  .secondary-info,
  .report-summary-grid,
  .report-two-columns {
    grid-template-columns: 1fr;
  }

  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-actions {
    grid-column: auto;
  }

  .filter-title {
    display: block;
  }

  .quantity-type-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    font-size: .92rem;
  }

  .quantity-type-row i {
    display: none;
  }

  .quantity-type-row span {
    overflow-wrap: anywhere;
  }

  .agenda-status,
  .agenda-actions {
    margin-top: 8px;
  }
}

@page {
  size: A4 landscape;
  margin: 8mm;
}

@media print {
  body {
    background: white;
  }

  .sidebar,
  .no-print,
  .modal,
  .toast-container,
  .alert {
    display: none !important;
  }

  .layout,
  .content {
    display: block;
    padding: 0;
    min-height: 0;
  }

  .calendar-shell {
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .print-title {
    display: block;
    text-align: center;
    font-weight: 900;
    font-size: 16pt;
    margin-bottom: 6mm;
  }

  .calendar-board {
    grid-template-columns: repeat(7, 1fr);
    page-break-inside: avoid;
    break-inside: avoid;
    border-color: #111827;
    background: #111827;
  }

  .cal-head {
    display: block;
    background: #dbeafe !important;
    color: #111827 !important;
    border: 0;
    padding: 5px;
    font-size: 8pt;
  }

  .cal-day {
    display: flex;
    min-height: 98px;
    padding: 5px;
    page-break-inside: avoid;
    break-inside: avoid;
    border: 0;
    box-shadow: none;
  }

  .entry,
  .empty-note,
  .day-total,
  .day-header {
    font-size: 7.3pt;
  }

  .day-total {
    margin-top: 4px;
    padding-top: 3px;
    border-top: 1px solid #d1d5db;
  }
}
