.agenda-color-vistas { --agenda-mark: #d79011; --agenda-fill: #f8e6b9; }
.agenda-color-terminos { --agenda-mark: #8d1930; --agenda-fill: #edc8cf; }
.agenda-color-escrituras { --agenda-mark: #159fc6; --agenda-fill: #c4eef9; }
.agenda-color-notas { --agenda-mark: #227126; --agenda-fill: #c4e4c3; }
.agenda-color-general { --agenda-mark: #d83786; --agenda-fill: #f9d2e6; }
.agenda-color-privado { --agenda-mark: #68768a; --agenda-fill: #edf0f4; }
.agenda-colors { display:flex; flex-wrap:wrap; gap:.5rem; list-style:none; padding:0; }
.agenda-colors li { padding:.3rem .65rem; border-radius:.35rem; background:var(--agenda-fill); border-left:4px solid var(--agenda-mark); font-size:.85rem; }
.schedule-card[class*="agenda-color-"] { border-left:4px solid var(--agenda-mark); }
.agenda-month { background:#fff; border:1px solid #dce4ee; border-radius:.8rem; overflow:hidden; margin:1rem 0; }
.agenda-month-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem; padding:1rem; }
.agenda-month-header h2 { margin:0; font-size:1.25rem; }
.agenda-month-header nav { display:flex; gap:.6rem 1rem; flex-wrap:wrap; }
.agenda-month-scroll { overflow-x:auto; }
.agenda-month-grid { width:100%; min-width:49rem; table-layout:fixed; border-collapse:collapse; }
.agenda-month-grid th { background:#edf3fa; text-align:left; padding:.6rem; }
.agenda-month-grid td { vertical-align:top; height:6rem; padding:.45rem; border:1px solid #e1e7f0; }
.agenda-month-grid time { display:inline-block; margin-bottom:.35rem; font-weight:650; }
.agenda-month-grid time[aria-current] { background:#173b66; color:white; border-radius:1rem; padding:.13rem .48rem; }
.agenda-outside-month { background:#f7f9fc; color:#657489; }
.agenda-event { background:var(--agenda-fill); border-left:4px solid var(--agenda-mark); border-radius:.3rem; margin:.25rem 0; padding:.25rem .35rem; color:#17263b; overflow-wrap:anywhere; font-size:.8rem; line-height:1.3; }
.agenda-event small { display:block; color:#344156; font-size:.72rem; }
.agenda-event a { color:inherit; text-decoration:underline; text-underline-offset:2px; }

/* Keep the month readable without letting long titles stretch the weeks. */
.agenda-month-header { padding: .5rem .7rem; }
.agenda-month-header h2 { color: #fff; }
.agenda-month-grid { min-width: 0; }
.agenda-month-grid th { padding: .25rem .3rem; font-size: .72rem; }
.agenda-month-grid td { height: clamp(2rem, 5.8dvh, 3.6rem); padding: .18rem .24rem; }
.agenda-month-grid time { margin: 0; font-size: .8rem; }
.agenda-month-grid .agenda-event { margin: .12rem 0; padding: .1rem .22rem; font-size: .72rem; }
.agenda-month-grid .agenda-event small { display: inline; font-size: .65rem; margin-right: .22rem; }
.agenda-month-grid .agenda-event { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-more { display: inline-block; font-size: .68rem; font-weight: 650; }
@media (max-width: 620px) {
    .agenda-month-grid th, .agenda-month-grid td { padding-inline: .12rem; }
    .agenda-month-grid .agenda-event small { display: none; }
}

.agenda-view-menu, .agenda-shortcut-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: static;
    border: 0;
    gap: .3rem;
}
.agenda-view-menu {
    width: fit-content;
    max-width: 100%;
    background: #e5eef8;
    border: 1px solid #cfdeef;
    border-radius: .8rem;
    padding: .3rem;
}
.agenda-view-menu a {
    border-radius: .55rem;
    color: #173b66;
    padding: .55rem clamp(.65rem, 1.6vw, 1.15rem);
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none;
}
.agenda-view-menu a:hover { background: #d4e3f4; }
.agenda-view-menu a[aria-current] { background: #173b66; color: #fff; }
.agenda-shortcut-menu {
    background: transparent;
    margin: .4rem 0 .65rem;
    padding: 0;
    column-gap: .85rem;
}
.agenda-shortcut-menu a {
    color: #475569;
    padding: .28rem 0;
    font-size: .84rem;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.agenda-shortcut-menu a:hover, .agenda-shortcut-menu a[aria-current] { color: #173b66; }
.agenda-shortcut-menu a[aria-current] { font-weight: 700; }

.agenda-week {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8rem, calc((100% - 3rem) / 7))), 1fr));
    gap: .5rem;
    margin: .8rem 0;
}
.agenda-week-day {
    min-width: 0;
    min-height: 8rem;
    padding: .5rem;
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: .65rem;
}
.agenda-week-day h3 { margin: 0 0 .45rem; font-size: .9rem; }
.agenda-week-day h3 a {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .2rem;
    padding: .4rem;
    border-radius: .35rem;
    color: #173b66;
    background: #edf3fa;
}
.agenda-week-today { border-color: #173b66; }
.agenda-week-today h3 a { background: #173b66; color: #fff; }
.agenda-week-empty { margin: .5rem 0; color: #59667a; font-size: .8rem; }

.schedule-card.agenda-day-card[class*="agenda-color-"] {
    border: 2px solid var(--agenda-mark);
    background: var(--agenda-fill);
}
.schedule-card.agenda-day-card .schedule-time small {
    color: #344156;
}
