#tab-mi-calendario > .card {
    overflow: hidden;
    padding: 26px;
}

#tab-mi-calendario > .rv-worker-calendar {
    overflow: visible;
}

.rv-worker-calendar .rv-resource-scroll {
    min-height: 470px;
}

.rv-worker-calendar .rv-resource-head,
.rv-worker-calendar .rv-resource-column {
    min-width: 190px;
}

#tab-mi-calendario .card-title {
    margin-bottom: 6px;
    font-size: 20px;
}

.worker-week-grid.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 22px;
    padding: 2px 2px 10px;
    overflow-x: auto;
    scrollbar-color: #c5cad2 transparent;
}

.worker-cal-day {
    min-height: 305px;
    overflow: hidden;
    border: 1px solid #dfe4eb;
    border-radius: 13px;
    background: #f6f7f9;
}

.worker-cal-day > header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 13px 14px;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
}

.worker-cal-day > header span {
    color: #737c89;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.worker-cal-day > header strong {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 50%;
    color: #232831;
    font-size: 15px;
}

.worker-cal-day > header small {
    color: #9aa1ac;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.worker-cal-day.is-today { border-color: #e4c337; background: #fffdf4; }
.worker-cal-day.is-today > header { background: #fffcf0; }
.worker-cal-day.is-today > header strong { background: #ffd21f; color: #17191e; }
.worker-cal-events { display: flex; min-height: 235px; flex-direction: column; gap: 8px; padding: 10px; }

.worker-cal-event {
    position: relative;
    display: flex;
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 11px 10px 10px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
    border-left: 3px solid #d4ae00;
    border-radius: 9px;
    background: #fff;
    color: #222730;
    font: inherit;
    text-align: left;
    box-shadow: 0 3px 10px rgba(26, 31, 40, .055);
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.worker-cal-event:hover {
    border-color: #d3b223;
    box-shadow: 0 8px 19px rgba(26, 31, 40, .1);
    transform: translateY(-2px);
}

.worker-cal-event svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.worker-cal-time { display: flex; align-items: center; gap: 4px; color: #806a0c; font-size: 9px; font-weight: 900; }
.worker-cal-event > strong { width: 100%; overflow: hidden; color: #20242c; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.worker-cal-event > small { width: 100%; overflow: hidden; color: #59616d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.worker-cal-event > em { display: flex; width: 100%; align-items: center; gap: 4px; overflow: hidden; color: #7c8490; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.worker-cal-more { margin-top: 4px; color: #8c7200; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.worker-cal-event--cancelado { border-left-color: #be4a42; background: #fff8f7; opacity: .68; }
.worker-cal-event--cerrado { border-left-color: #7c838d; background: #f0f1f3; opacity: .72; }
.worker-cal-free { display: flex; min-height: 115px; align-items: center; justify-content: center; flex-direction: column; color: #8b93a0; text-align: center; }
.worker-cal-free span { font-size: 11px; font-weight: 750; }
.worker-cal-free small { margin-top: 3px; font-size: 9px; }
.worker-calendar-loading,
.worker-calendar-error { grid-column: 1 / -1; display: flex; min-height: 180px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; color: #747d8a; }
.worker-calendar-error strong { color: #a43e37; }

body.worker-detail-open { overflow: hidden; }
.worker-detail-modal { position: fixed; inset: 0; z-index: 2600; display: none; align-items: center; justify-content: center; padding: 22px; }
.worker-detail-modal.is-open { display: flex; }
.worker-detail-backdrop { position: absolute; inset: 0; background: rgba(7, 10, 15, .72); backdrop-filter: blur(6px); }
.worker-detail-card {
    position: relative;
    width: min(880px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(0, 0, 0, .35);
    animation: worker-detail-in .2s ease-out;
}
@keyframes worker-detail-in { from { opacity: 0; transform: translateY(13px) scale(.985); } }
.worker-detail-card svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.worker-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 27px 21px; border-bottom: 1px solid #e7e9ed; background: linear-gradient(135deg, #171a20, #0d0f13); color: #fff; }
.worker-detail-kicker { display: block; margin-bottom: 5px; color: #e8c623; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.worker-detail-header h3 { margin: 0 0 10px; color: #fff; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.worker-detail-date { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #c0c4cb; font-size: 11px; text-transform: capitalize; }
.worker-detail-date svg { width: 15px; height: 15px; color: #e0bd17; }
.worker-detail-date strong { padding-left: 7px; border-left: 1px solid #4a4e55; color: #fff; font-size: 12px; }
.worker-detail-close { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #c7cbd1; cursor: pointer; }
.worker-detail-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.worker-detail-close svg { width: 17px; height: 17px; }
.worker-detail-status { padding: 9px 27px; border-bottom: 1px solid #e4e7eb; background: #e5f8ed; color: #147446; font-size: 10px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.worker-detail-status--pendiente { background: #fff5cf; color: #806000; }
.worker-detail-status--cancelado { background: #fee9e7; color: #a03831; }
.worker-detail-status--cerrado { background: #e8eaed; color: #555d68; }
.worker-detail-content { display: grid; gap: 14px; padding: 20px 27px 23px; background: #f4f5f7; }
.worker-detail-section { padding: 18px; border: 1px solid #e0e4e9; border-radius: 14px; background: #fff; }
.worker-detail-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 15px; padding-bottom: 11px; border-bottom: 1px solid #eceef1; }
.worker-detail-section-title span { color: #252a32; font-size: 13px; font-weight: 850; }
.worker-detail-section-title small { color: #858c97; font-size: 9px; text-align: right; }
.worker-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.worker-detail-item { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid #e7e9ed; border-radius: 10px; background: #fafbfc; }
.worker-detail-item-icon { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 8px; background: #fff5c7; color: #7d6700; }
.worker-detail-item-icon svg { width: 15px; height: 15px; }
.worker-detail-item > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.worker-detail-item small { color: #888f9a; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.worker-detail-item strong { overflow-wrap: anywhere; color: #343a44; font-size: 11px; line-height: 1.4; }

.worker-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.worker-contact-action,
.worker-location-actions a,
.worker-location-actions button {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #dce0e6;
    border-radius: 9px;
    background: #fff;
    color: #47505c;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}
.worker-contact-action:hover,
.worker-location-actions button:hover { border-color: #bdc3cc; background: #f7f8fa; }
.worker-contact-action--whatsapp { border-color: #bde9ce; background: #effbf4; color: #147b46; }
.worker-contact-action svg,
.worker-location-actions svg { width: 14px; height: 14px; }
.worker-map-frame { height: 235px; overflow: hidden; border: 1px solid #dfe3e8; border-radius: 11px; background: #eceff2; }
.worker-map-frame iframe { width: 100%; height: 100%; border: 0; }
.worker-location-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.worker-location-actions .worker-route-button { border-color: #171a20; background: #171a20; color: #fff; }
.worker-location-actions .worker-route-button:hover { background: #2b3038; }
.worker-no-location { padding: 25px; border: 1px dashed #d4d8df; border-radius: 10px; color: #858d98; font-size: 11px; text-align: center; }
.worker-detail-note { display: flex; align-items: flex-start; gap: 11px; padding: 15px 17px; border: 1px solid #eadb98; border-radius: 12px; background: #fffbed; }
.worker-detail-note > svg { width: 18px; height: 18px; flex: 0 0 18px; color: #866d00; }
.worker-detail-note div { min-width: 0; }
.worker-detail-note span { color: #6b5907; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.worker-detail-note p { margin: 4px 0 0; color: #4d4937; font-size: 11px; line-height: 1.55; white-space: pre-line; }
.worker-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 27px; border-top: 1px solid #e3e6ea; background: #fff; }
.worker-detail-footer span { color: #7e8691; font-size: 9px; }
.worker-detail-footer > div { display: flex; align-items: center; gap: 8px; }
.worker-detail-footer button { min-height: 39px; padding: 0 18px; border: 1px solid #d4b100; border-radius: 9px; background: #ffd21f; color: #17191e; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.worker-detail-footer button:hover { background: #f1c600; }
.worker-detail-footer .worker-close-reservation { border-color: #17191e; background: #17191e; color: #fff; }
.worker-detail-footer .worker-close-reservation:hover { background: #2c3037; }
.worker-detail-footer .worker-close-reservation:disabled { cursor: wait; opacity: .62; }
.worker-detail-footer .worker-detail-dismiss { border-color: #d8dce2; background: #fff; color: #525a66; }
.worker-detail-footer .worker-detail-dismiss:hover { background: #f5f6f7; }

@media (max-width: 760px) {
    #tab-mi-calendario > .card { padding: 18px; }
    .worker-week-grid.calendar-grid { grid-template-columns: repeat(7, minmax(170px, 170px)); margin-left: -3px; margin-right: -3px; }
    .worker-detail-modal { padding: 9px; }
    .worker-detail-card { max-height: calc(100vh - 18px); border-radius: 16px; }
    .worker-detail-header { padding: 21px 18px 18px; }
    .worker-detail-header h3 { font-size: 20px; }
    .worker-detail-status { padding-left: 18px; padding-right: 18px; }
    .worker-detail-content { padding: 14px; }
    .worker-detail-section { padding: 14px; }
    .worker-detail-grid { grid-template-columns: 1fr; }
    .worker-detail-section-title { align-items: flex-start; flex-direction: column; gap: 3px; }
    .worker-detail-section-title small { text-align: left; }
    .worker-map-frame { height: 210px; }
    .worker-detail-footer { padding: 14px 18px; }
}

@media (max-width: 480px) {
    #tab-mi-calendario > .card { padding: 15px; }
    .worker-detail-date { align-items: flex-start; flex-direction: column; }
    .worker-detail-date strong { padding-left: 0; border-left: 0; }
    .worker-contact-actions,
    .worker-location-actions { display: grid; grid-template-columns: 1fr; }
    .worker-contact-action,
    .worker-location-actions a,
    .worker-location-actions button { width: 100%; }
    .worker-detail-footer span { display: none; }
    .worker-detail-footer > div { display: grid; width: 100%; grid-template-columns: 1fr; }
    .worker-detail-footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .worker-detail-card { animation: none; }
    .worker-cal-event { transition: none; }
}
