/* Agenda > Listar. Medidas e cores lidas da captura agendamentos (janela de 1440x900). Tudo preso a .agenda-page. */

#page-title .agenda-icon { width: 24px; height: 24px; fill: currentColor; vertical-align: -4px; }
.agenda-icon { width: 16px; height: 16px; fill: currentColor; flex: none; }

.agenda-page { font-family: 'Source Sans Pro', system-ui, sans-serif; color: #222529; gap: 16px; position: relative; }

.agenda-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.agenda-toolbar-left, .agenda-toolbar-right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.agenda-toolbar-right { flex: 0 1 auto; justify-content: flex-end; }

.agenda-add, .agenda-dark-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 4px; color: #fff; font: inherit; font-size: 16px; cursor: pointer;
}
.agenda-add { background: #119b55; border-color: #119b55; }
.agenda-add:hover { background: #0e8648; border-color: #0e8648; }
.agenda-dark-button { background: #0f1921; border-color: #0f1921; }
.agenda-dark-button:hover:not(:disabled) { background: #1b2a35; }
.agenda-dark-button:disabled { cursor: default; opacity: 1; }

.agenda-more { position: relative; }
.agenda-more-menu {
  position: absolute; left: 0; top: 42px; z-index: 20; min-width: 200px; padding: 6px 0;
  border: 1px solid #d9dee2; border-radius: 4px; background: #fff; box-shadow: 0 6px 16px rgba(15, 25, 33, .14);
}
.agenda-more-menu[hidden] { display: none; }
.agenda-more-item { display: block; width: 100%; padding: 8px 16px; border: 0; background: none; color: #222529; font: inherit; text-align: left; cursor: pointer; }
.agenda-more-item:hover { background: #f3f3f3; }

.agenda-search { display: flex; width: 313px; max-width: 100%; margin-right: 4px; }
.agenda-page .agenda-search-input {
  flex: 1; min-width: 0; box-sizing: border-box; height: 38px; min-height: 38px; padding: 0 12px; border: 1px solid #ced4da; border-right: 0;
  border-radius: 4px 0 0 4px; background: #fff; color: #222529; font: inherit; font-size: 16px;
}
.agenda-search-button { width: 41px; padding: 0; border-radius: 0 4px 4px 0; }

.agenda-dynamic { margin-top: 8px; }
.agenda-card { padding: 22px 20px 20px; border: 1px solid #d9dee2; border-radius: 6px; background: #fff; }

.agenda-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 21px; }
.agenda-nav { display: flex; align-items: center; gap: 0; grid-column: 1; grid-row: 1; justify-self: start; }
.agenda-nav-button {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 34px;
  border: 1px solid #0f1921; background: #0f1921; color: #fff; cursor: pointer;
}
.agenda-nav-button:first-child { border-radius: 4px 0 0 4px; }
.agenda-nav-button:last-child { border-radius: 0 4px 4px 0; }
.agenda-nav-button .agenda-icon { width: 14px; height: 14px; }
.agenda-today {
  grid-column: 1; grid-row: 1; justify-self: start; margin-left: 99px; height: 34px; padding: 0 12px; border: 1px solid #636a6f;
  border-radius: 4px; background: #636a6f; color: #fff; font: inherit; font-size: 16px; cursor: pointer;
}
.agenda-period { grid-column: 2; grid-row: 1; margin: 0; font-size: 20px; font-weight: 600; text-align: center; color: #222529; }
.agenda-views { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; border-radius: 4px; background: #0f1921; overflow: hidden; }
.agenda-view { height: 34px; padding: 0 12px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
.agenda-view.is-active { background: #2a3a46; }

.agenda-grid { border: 1px solid #d8d8d8; background: #f8f8f8; }
.agenda-grid-head, .agenda-grid-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.agenda-grid-day .agenda-grid-head, .agenda-grid-day .agenda-grid-row { grid-template-columns: minmax(0, 1fr); }
.agenda-grid-weekday {
  height: 38px; display: flex; align-items: center; justify-content: center; border-left: 1px solid #dcdbdc;
  border-bottom: 1px solid #dcdbdc; background: #f3f3f3; font-size: 15px; font-weight: 700;
}
.agenda-grid-weekday:first-child, .agenda-cell:first-child { border-left: 0; }
.agenda-cell {
  position: relative; min-height: 93px; padding: 22px 4px 4px; border-left: 1px solid #dcdbdc; border-top: 1px solid #dcdbdc;
  background: #f8f8f8; box-sizing: border-box;
}
.agenda-grid-head + .agenda-grid-row .agenda-cell { border-top: 0; }
.agenda-grid-week .agenda-cell { min-height: 240px; }
.agenda-grid-day .agenda-cell { min-height: 360px; }
.agenda-cell.is-weekend { background: #e9e9e9; }
.agenda-cell.is-today { background: #f2f2f2; outline: 2px solid #222529; outline-offset: -2px; z-index: 1; }
.agenda-daynumber {
  position: absolute; top: 2px; right: 6px; color: #222529; font-size: 14px; text-decoration: underline;
}
.agenda-cell.is-outside .agenda-daynumber { color: #b5b5b5; }
.agenda-weeknumber {
  position: absolute; top: 0; left: 0; min-width: 20px; padding: 1px 3px; background: #e0e0e0; color: #555;
  font-size: 14px; text-align: center; text-decoration: underline;
}
.agenda-events { display: flex; flex-direction: column; gap: 2px; }
.agenda-event {
  display: block; width: 100%; padding: 1px 4px; border: 1px solid transparent; border-radius: 3px; overflow: hidden;
  color: #fff; font: inherit; font-size: 13px; line-height: 1.35; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.agenda-event-scheduled { background: #2f6fa8; border-color: #2f6fa8; }
.agenda-event-done { background: #119b55; border-color: #119b55; }
.agenda-event-canceled { background: #9aa1a6; border-color: #9aa1a6; text-decoration: line-through; cursor: default; }
.agenda-event-time { font-weight: 700; }

.agenda-list-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.agenda-list-title .agenda-icon { width: 20px; height: 20px; }
.agenda-empty { margin: 0; padding: 12px 0; color: #222529; font-size: 15px; }

.agenda-modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 16px 16px; background: rgba(15, 25, 33, .5); overflow-y: auto;
}
.agenda-modal[hidden] { display: none; }
.agenda-modal-card { position: relative; width: min(920px, 100%); padding: 20px; border-radius: 6px; background: #fff; }
.agenda-modal-close {
  position: absolute; top: 10px; right: 10px; display: inline-flex; padding: 4px; border: 0; background: none; color: #222529; cursor: pointer;
}
.agenda-modal-close .agenda-icon { width: 16px; height: 16px; }

@media (max-width: 760px) {
  .agenda-controls { grid-template-columns: 1fr; justify-items: center; }
  .agenda-nav, .agenda-today, .agenda-period, .agenda-views { grid-column: 1; grid-row: auto; justify-self: center; margin-left: 0; }
  .agenda-search { width: 100%; }
  .agenda-cell { min-height: 64px; padding-top: 20px; }
  .agenda-event-title { display: none; }
}

/* Compromisso colorido pela situação configurada (lista de cores do cadastro de situações). */
.agenda-event-color-gray { background: #868686; border-color: #868686; }
.agenda-event-color-yellow { background: #f6b73c; border-color: #c98a12; color: #3d2a00; }
.agenda-event-color-green { background: #119b55; border-color: #119b55; }
.agenda-event-color-red { background: #c95c54; border-color: #c95c54; }
.agenda-event-color-orange { background: #f19e39; border-color: #d98720; color: #590500; }
.agenda-event-color-blue { background: #2f6fa8; border-color: #2f6fa8; }
.agenda-event-color-brown { background: #b87a2b; border-color: #b87a2b; }
.agenda-event-color-indigo { background: #3b2a86; border-color: #3b2a86; }
.agenda-event-color-purple { background: #b5476f; border-color: #b5476f; }

/* Agenda > Configurações > Situações: aviso e colunas centralizadas (captura do original). */
.agenda-sit-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 8px 12px;
  border: 1px solid #cbe9ee; border-radius: 4px; background: #cbe9ee; color: #31708f; font-size: 13px;
}
/* Botões de ação coloridos da lista de situações da agenda: azul (ver), laranja (editar) e vermelho (excluir). */
.agenda-sit-table .situation-action { width: 24px; height: 24px; border: 0; border-radius: 3px; color: #fff; }
.agenda-sit-table .situation-action:nth-child(1) { background: #11b8e9; }
.agenda-sit-table .situation-action:nth-child(2) { background: #f0922a; }
.agenda-sit-table .situation-action.situation-action-delete { background: #f25f4e; color: #fff; }
.agenda-sit-table .situation-action:hover { filter: brightness(.94); }
/* Etiquetas de cor cheias (texto branco), como na lista do original; cores medidas na captura. */
.agenda-sit-table .situation-pill { padding: 2px 8px; border: 0; border-radius: 3px; background: var(--agenda-sit-pill, var(--situation-line, #8e8e8e)); color: #fff; font-size: 10px; font-weight: 700; }
.agenda-sit-table .situation-pill .situation-dot { display: none; }
.agenda-sit-table .situation-color-gray { --agenda-sit-pill: #8e8e8e; }
.agenda-sit-table .situation-color-yellow { --agenda-sit-pill: #eda44f; }
.agenda-sit-table .situation-color-green { --agenda-sit-pill: #53af58; }
.agenda-sit-table .situation-color-red { --agenda-sit-pill: #d34a48; }
.agenda-sit-alert { color: #104a55; }
.agenda-sit-check { fill: #289d44; }
.agenda-sit-table tbody tr:nth-child(even) td { background: #f3f3f3; }
.agenda-sit-table .situation-actions { height: auto; gap: 4px; padding: 7px 0; }
.agenda-sit-alert-close { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .6; }
.agenda-sit-center { text-align: center; }
.agenda-sit-check { width: 14px; height: 14px; fill: #289d44; vertical-align: middle; }
.agenda-sit-table th, .agenda-sit-table td { vertical-align: middle; }

/* Agenda > Gerar relatório (captura do original: Responsável, Período, Situação, Entidade, Cliente). */
.agenda-report-card { padding: 16px; border: 1px solid #e3e3e3; border-radius: 4px; background: #fff; }
.agenda-report-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 16px; }
.agenda-report-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: #222529; }
.agenda-report-field > span, .agenda-report-field > label { font-size: 13px; font-weight: 400; margin: 0; }
.agenda-report-field input, .agenda-report-field select {
  box-sizing: border-box; height: 38px; padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; background: #fff; font: inherit; font-size: 14px;
}
.agenda-report-responsible { grid-column: span 4; }
.agenda-report-period { grid-column: span 5; }
.agenda-report-situation { grid-column: span 3; }
.agenda-report-entity { grid-column: span 4; }
.agenda-report-customer { grid-column: span 5; }
.agenda-report-range { display: flex; align-items: center; gap: 8px; }
.agenda-report-range input { flex: 1; min-width: 0; }
.agenda-report-range em { font-style: normal; }
.agenda-report-actions { display: flex; gap: 6px; margin-top: 12px; }
.agenda-report-generate { min-height: 38px; }
.agenda-report-clear {
  display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px;
  background: #fff; color: #222529; font: inherit; font-size: 14px; cursor: pointer;
}
.agenda-report-clear .agenda-icon, .agenda-report-generate .agenda-icon { width: 14px; height: 14px; fill: currentColor; }
.agenda-report-result { margin-top: 16px; }
@media (max-width: 760px) {
  .agenda-report-responsible, .agenda-report-period, .agenda-report-situation, .agenda-report-entity, .agenda-report-customer { grid-column: span 12; }
}

/* Busca avançada: painel branco com Responsável, Cliente/pessoa, CPF/CNPJ, Período e Situação; Buscar verde e Limpar vermelho. */
.agenda-advanced.is-open { background: #f8f9fa; border-color: #ced4da; color: #222529; }
.agenda-adv-panel { padding: 14px 16px 16px; border: 1px solid #d9dee2; border-radius: 6px; background: #fff; }
.agenda-adv-panel[hidden] { display: none; }
.agenda-adv-row { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.agenda-adv-field { display: flex; flex: 1 1 220px; flex-direction: column; gap: 3px; min-width: 0; }
.agenda-adv-field.is-period { flex: 0 1 auto; }
.agenda-adv-field label { font-size: 13px; font-weight: 600; color: #222529; }
.agenda-adv-field input, .agenda-adv-field select { box-sizing: border-box; height: 38px; min-height: 38px; padding: 0 10px; border: 1px solid #ced4da; border-radius: 4px; background: #fff; color: #222529; font: inherit; font-size: 15px; }
.agenda-adv-field:not(.is-period) select { width: 100%; }
.agenda-adv-period { display: flex; align-items: center; gap: 8px; }
.agenda-adv-period input { width: 160px; }
.agenda-adv-actions { display: flex; gap: 6px; }
.agenda-adv-submit, .agenda-adv-clear { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.agenda-adv-submit { background: #119b55; border-color: #119b55; }
.agenda-adv-clear { background: #f25f4e; border-color: #f25f4e; }

/* Leva 3 (G4), auditoria por imagem. */

/* Calendário: botões de 15 px, visão sem destaque (no original Mês, Semana e Dia ficam da mesma cor) e hoje com contorno de 1 px. */
.agenda-today, .agenda-view { font-size: 15px; }
.agenda-view.is-active { background: transparent; }
.agenda-cell.is-today { outline-width: 1px; border-radius: 3px; }

/* Situações: barra, aviso, tabela com divisórias verticais e rodapé nas medidas do original. */
.agenda-sit-page .situations-add { height: 38px; font-size: 15px; }
.agenda-sit-page .situations-search { width: 471px; }
.agenda-sit-page .situations-search input { height: 38px; min-height: 38px; }
.agenda-sit-page .situations-search-button { width: 41px; height: 38px; }
.agenda-sit-alert { min-height: 46px; padding: 0 31px; font-size: 14px; }
.agenda-sit-page { gap: 17px; }
.agenda-sit-page .situations-toolbar { margin-bottom: 7px; }
.agenda-sit-table { min-width: 0; }
.agenda-sit-table th { height: 46px; padding: 0 12px; font-size: 14px; font-weight: 600; }
.agenda-sit-table td { height: 50px; padding: 0 12px; font-size: 14px; }
.agenda-sit-table th, .agenda-sit-table td { border-right: 1px solid #dee2e6; }
.agenda-sit-table th:last-child, .agenda-sit-table td:last-child { border-right: 0; }
.agenda-sit-table td.situation-name { display: table-cell; height: 50px; font-weight: 400; }
.agenda-sit-table td.situation-actions { display: table-cell; height: 50px; padding: 0; text-align: center; white-space: nowrap; }
.agenda-sit-table .situation-action { width: 26px; height: 26px; margin: 0 1.5px; vertical-align: middle; }
.agenda-sit-check { width: 15px; height: 15px; }
.agenda-sit-check path { stroke: #289d44; stroke-width: 2.4; }
.agenda-sit-page .situations-count { align-items: center; height: 32px; font-size: 13px; }
.agenda-sit-page .situations-count span { align-self: stretch; display: inline-flex; align-items: center; padding: 0 11px; }
.agenda-sit-page .situations-count strong { padding: 0 6px 0 11px; font-size: 13px; }

/* Relatório de agendamentos: grade de quatro colunas com 30 px entre elas (Responsável; Período em duas colunas; Situação),
   campos de 38 px e cartão a 36 px do cabeçalho, como no original. */
#view-root[data-view='appointment-report'] .agenda-report-card { margin-top: 16px; padding: 20px; border-radius: 6px; }
#view-root[data-view='appointment-report'] .agenda-report-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px 30px; }
#view-root[data-view='appointment-report'] .agenda-report-responsible,
#view-root[data-view='appointment-report'] .agenda-report-situation,
#view-root[data-view='appointment-report'] .agenda-report-entity { grid-column: span 1; }
#view-root[data-view='appointment-report'] .agenda-report-period,
#view-root[data-view='appointment-report'] .agenda-report-customer { grid-column: span 2; }
#view-root[data-view='appointment-report'] .agenda-report-field { gap: 10px; font-size: 14px; }
#view-root[data-view='appointment-report'] .agenda-report-field > span,
#view-root[data-view='appointment-report'] .agenda-report-field > label { font-size: 14px; line-height: 18px; }
#view-root[data-view='appointment-report'] .agenda-report-field input,
#view-root[data-view='appointment-report'] .agenda-report-field select { height: 38px; min-height: 38px; }
#view-root[data-view='appointment-report'] .agenda-report-actions { margin-top: 16px; }
@media (max-width: 900px) {
  #view-root[data-view='appointment-report'] .agenda-report-grid { grid-template-columns: minmax(0, 1fr); }
  #view-root[data-view='appointment-report'] .agenda-report-field { grid-column: span 1 !important; }
}

/* Busca avançada nas medidas da captura: painel com 20 px de margem, três colunas iguais na primeira linha,
   período em dois campos de 264 px e Situação de 275 px na segunda, botões de 92 x 38 px. */
.agenda-adv-panel { padding: 20px; border-radius: 6px; }
.agenda-adv-row { gap: 12px; margin-bottom: 14px; }
.agenda-adv-field { flex: 1 1 0; }
.agenda-adv-field label { font-size: 12.5px; }
.agenda-adv-row + .agenda-adv-row .agenda-adv-field:not(.is-period) { flex: 0 0 275px; }
.agenda-adv-period input { width: 264px; }
.agenda-adv-submit, .agenda-adv-clear { justify-content: center; width: 92px; height: 38px; padding: 0; }
.agenda-adv-actions { margin-top: 11px; }
@media (max-width: 900px) {
  .agenda-adv-field, .agenda-adv-row + .agenda-adv-row .agenda-adv-field:not(.is-period) { flex: 1 1 100%; }
  .agenda-adv-period input { width: 100%; }
}
