/* ============================================================
   DASHBOARD AGENDA
============================================================ */

.agenda-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agenda-dashboard-dates,
.agenda-dashboard-list {
    background: #ffffff;
    border: 1px solid #e2e7eb;
    border-radius: 8px;
}

.agenda-dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.agenda-dashboard-dates {
    display: grid;
    gap: 12px;
    padding: 16px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.agenda-dashboard-date-form {
    margin: 0;
}

.agenda-dashboard-date-button {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e7eb;
    border-radius: 8px;
    color: #24313a;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 88px;
    padding: 12px;
    text-align: left;
    width: 100%;
}

.agenda-dashboard-date-button:hover {
    background: #f8fbfd;
    border-color: #c9e5f3;
}

.agenda-dashboard-date-button strong {
    font-size: 1.55rem;
    line-height: 1;
}

.agenda-dashboard-date-button span:last-child {
    color: #5f6872;
    font-size: 0.82rem;
    line-height: 1.2;
}

.agenda-dashboard-date-button.is-feriado {
    background: #fffaf0;
    border-color: #f0d98c;
}

.agenda-dashboard-date-button.is-no-disponible {
    background: #f8fafb;
    border-color: #d7dde1;
}

.agenda-dashboard-date-button.is-active {
    background: #eaf6fb;
    border-color: #1577a1;
}

.agenda-dashboard-date-button:disabled {
    cursor: not-allowed;
}

.agenda-dashboard-date-button.is-disabled,
.agenda-dashboard-date-button.disabled {
    background: #f5f7f8;
    border-color: #d7dde1;
    color: #7b858d;
    cursor: not-allowed;
}

.agenda-dashboard-date-button.is-disabled strong,
.agenda-dashboard-date-button.disabled strong {
    color: #5f6872;
}

.agenda-dashboard-date-button.is-disabled span:last-child,
.agenda-dashboard-date-button.disabled span:last-child {
    color: #7b858d;
}

.agenda-dashboard-date-button.is-feriado:disabled,
.agenda-dashboard-date-button.is-no-disponible:disabled,
.agenda-dashboard-date-button.is-feriado.is-disabled,
.agenda-dashboard-date-button.is-no-disponible.is-disabled,
.agenda-dashboard-date-button.is-feriado.disabled,
.agenda-dashboard-date-button.is-no-disponible.disabled {
    box-shadow: none;
    opacity: 1;
}

.agenda-dashboard-date-button.is-disabled:hover,
.agenda-dashboard-date-button.disabled:hover,
.agenda-dashboard-date-button:disabled:hover {
    background: #f5f7f8;
    border-color: #d7dde1;
}

.agenda-dashboard-date-badge {
    background: #edf1f3;
    border-radius: 8px;
    color: #5f6872;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.agenda-dashboard-date-button.is-active .agenda-dashboard-date-badge {
    background: #136f93;
    color: #ffffff;
}

.agenda-dashboard-date-button.is-feriado .agenda-dashboard-date-badge {
    background: #fff3cd;
    color: #7a5a00;
}

.agenda-dashboard-date-button.is-no-disponible .agenda-dashboard-date-badge {
    background: #edf1f3;
    color: #5f6872;
}

.agenda-dashboard-date-note {
    color: #5f6872;
    display: block;
    line-height: 1.25;
}

.agenda-dashboard-date-note {
    font-size: 0.78rem;
}

.agenda-dashboard-filter-form {
    margin: 0;
}

.agenda-dashboard-filter-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #c9e5f3;
    border-radius: 8px;
    color: #136f93;
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    line-height: 1;
    padding: 10px 14px;
}

.agenda-dashboard-filter-button small {
    background: #eaf6fb;
    border-radius: 999px;
    color: #136f93;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
}

.agenda-dashboard-filter-button:hover {
    background: #eaf6fb;
}

.agenda-dashboard-filter-button.is-todas {
    border-color: #d7dde1;
    color: #4d5963;
}

.agenda-dashboard-filter-button.is-todas small {
    background: #edf1f3;
    color: #4d5963;
}

.agenda-dashboard-filter-button.is-todas:hover {
    background: #f6f8f9;
}

.agenda-dashboard-filter-button.is-contactologia {
    border-color: #bfe9df;
    color: #0d7660;
}

.agenda-dashboard-filter-button.is-contactologia small {
    background: #e7f7f4;
    color: #0d7660;
}

.agenda-dashboard-filter-button.is-contactologia:hover {
    background: #f2fcf9;
}

.agenda-dashboard-filter-button.is-oftalmologia {
    border-color: #cfe1f2;
    color: #1d5e8e;
}

.agenda-dashboard-filter-button.is-oftalmologia small {
    background: #eaf3fb;
    color: #1d5e8e;
}

.agenda-dashboard-filter-button.is-oftalmologia:hover {
    background: #f4f9fd;
}

.agenda-dashboard-filter-button.is-active {
    color: #ffffff;
}

.agenda-dashboard-filter-button.is-todas.is-active {
    background: #5f6872;
    border-color: #5f6872;
    color: #ffffff;
}

.agenda-dashboard-filter-button.is-contactologia.is-active {
    background: #0d7660;
    border-color: #0d7660;
    color: #ffffff;
}

.agenda-dashboard-filter-button.is-oftalmologia.is-active {
    background: #1d5e8e;
    border-color: #1d5e8e;
    color: #ffffff;
}

.agenda-dashboard-filter-button.is-active small {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.agenda-dashboard-list {
    padding: 20px 22px;
}

.agenda-dashboard-title-band {
    background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
    border: 1px solid #d9e8f1;
    border-radius: 8px;
    padding: 20px 22px;
    box-shadow: 0 10px 24px rgba(19, 111, 147, 0.06);
}

.agenda-dashboard-title-band h4 {
    color: #24313a;
    font-size: 1.95rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.agenda-dashboard-title-band p {
    color: #5f6872;
    font-size: 1rem;
    margin: 0;
}

.agenda-dashboard-list-head {
    display: flex;
    margin-bottom: 14px;
}

.agenda-dashboard-list-tools {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    width: 100%;
}

.agenda-dashboard-state-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.agenda-dashboard-state-pill {
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 8px 10px;
}

.agenda-dashboard-state-pill.is-atendida {
    background: #edf1f3;
    color: #4d5963;
}

.agenda-dashboard-state-pill.is-no-asiste {
    background: #fbecec;
    color: #a12f2f;
}

.agenda-day-table-scroll {
    overflow-x: auto;
}

.agenda-day-table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

.agenda-day-table th,
.agenda-day-table td {
    border-bottom: 1px solid #edf1f3;
    color: #5f6872;
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
}

.agenda-day-table th {
    color: #24313a;
    font-size: 0.88rem;
}

.agenda-day-table tbody tr:last-child td {
    border-bottom: 0;
}

.agenda-day-table td strong {
    color: #24313a;
}

.agenda-day-muted {
    color: #7b858d;
    font-size: 0.82rem;
    margin-top: 2px;
}

.agenda-day-service {
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.agenda-day-service.is-contactologia {
    background: #e7f7f4;
    color: #0d7660;
}

.agenda-day-service.is-oftalmologia {
    background: #eaf3fb;
    color: #1d5e8e;
}

.agenda-swal-service-badge {
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.agenda-swal-service-badge.is-contactologia {
    background: #e7f7f4;
    color: #0d7660;
}

.agenda-swal-service-badge.is-oftalmologia {
    background: #eaf3fb;
    color: #1d5e8e;
}

.agenda-swal-detail {
    color: #4d5963;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
}

.agenda-day-status {
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.agenda-day-status.is-activa {
    background: #eaf7ef;
    color: #12663a;
}

.agenda-day-status.is-atendida {
    background: #edf1f3;
    color: #4d5963;
}

.agenda-day-status.is-no-asiste {
    background: #fbecec;
    color: #a12f2f;
}

.agenda-day-actions {
    align-items: center;
    background: #f8fafb;
    border: 1px solid #edf1f3;
    border-radius: 8px;
    display: inline-grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
    white-space: nowrap;
}

.agenda-day-action-form {
    margin: 0;
}

.agenda-day-action-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    line-height: 1;
    min-height: 38px;
    min-width: 104px;
    padding: 9px 11px;
}

.agenda-day-action-button i {
    font-size: 1.08rem;
    line-height: 1;
}

.agenda-day-action-button.is-atendida {
    background: #eaf7ef;
    border-color: #bfe5cf;
    color: #12663a;
}

.agenda-day-action-button.is-atendida:hover {
    background: #ddf1e5;
}

.agenda-day-action-button.is-no-asiste {
    background: #fbecec;
    border-color: #efc8c8;
    color: #a12f2f;
}

.agenda-day-action-button.is-no-asiste:hover {
    background: #f7dfdf;
}

.agenda-day-actions-muted {
    align-items: center;
    background: #f8fafb;
    border: 1px solid #edf1f3;
    border-radius: 8px;
    color: #7b858d;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 6px;
    line-height: 1;
    padding: 9px 10px;
}

.agenda-day-actions-muted i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .agenda-dashboard-dates {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .agenda-dashboard-list {
        padding: 18px;
    }

    .agenda-dashboard-list-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .agenda-dashboard-state-summary {
        justify-content: flex-start;
    }

    .agenda-dashboard-dates {
        padding: 14px;
    }

    .agenda-dashboard-title-band {
        padding: 18px;
    }

    .agenda-dashboard-title-band h4 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .agenda-dashboard {
        gap: 16px;
    }

    .agenda-dashboard-filter-form {
        flex: 1 1 calc(50% - 5px);
    }

    .agenda-dashboard-date-button {
        min-height: 84px;
        padding: 12px;
    }

    .agenda-dashboard-date-button strong {
        font-size: 1.45rem;
    }

    .agenda-dashboard-dates {
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agenda-dashboard-filter-button {
        padding: 10px 12px;
        width: 100%;
    }

}
