/* Inicio del trabajador · diseño Mi jornada de MaxControl */
body:has(#main.worker-home) {
    --journey-gutter: clamp(22px, 4vw, 70px);
    background: #f4f7f9;
}
body:has(#main.worker-home) .workspace.frame {
    max-width: 1380px;
    padding-inline: var(--journey-gutter);
}
body:has(#main.worker-home) .mc-group a[aria-current="page"] {
    color: #154fae;
    background: #eaf1fd;
    box-shadow: none;
}
#main.worker-home {
    display: block;
    padding-block: clamp(25px, 3.1vw, 51px) 44px;
}
.jornada-ui {
    --ink: #14283e;
    --muted: #536678;
    --line: #dce3e9;
    --blue: #1658c6;
    --navy: #122b46;
    --orange: #fb8d45;
    min-width: 0;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
.jornada-ui :is(.title, .shift, .action, .history) { min-width: 0; }
.jornada-ui :is(a, button, summary, select, input):focus-visible {
    outline: 3px solid #df761f;
    outline-offset: 3px;
}
.jornada-ui time, .jornada-ui .num { font-variant-numeric: tabular-nums; }
.jornada-ui .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.jornada-ui .title h1 {
    color: var(--ink);
    font-size: clamp(2.2rem, 3vw, 3.15rem);
    font-weight: 710;
    line-height: 1.08;
    letter-spacing: -.058em;
}
.jornada-ui .title :is(p, .long-date) {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: .94rem;
}
.jornada-ui .title p .long-date { margin: 0; }
.jornada-ui .local-time { display: flex; align-items: center; gap: 11px; flex: none; }
.jornada-ui .clock-icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: #536a7e;
}
.jornada-ui .local-time :is(b, .time-value, strong) {
    display: block;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 680;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.jornada-ui .local-time small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; }
.jornada-ui .deck {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(0, 1.4fr);
    gap: 20px;
}
.jornada-ui :is(.shift, .action, .history) { border-radius: 16px; }
.jornada-ui .shift {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 25px clamp(20px, 2.25vw, 36px) 24px;
    background: linear-gradient(115deg, #102940 5%, #173b5b 70%, #254866);
    color: #fff;
    box-shadow: 0 6px 16px #122b4613;
}
.jornada-ui .shift::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -35%;
    right: -5%;
    width: 37%;
    height: 150%;
    transform: rotate(32deg);
    background: repeating-linear-gradient(90deg, transparent 0 12px, #9fc7de1d 12px 13px);
    mask-image: linear-gradient(to bottom, #000, transparent 93%);
    pointer-events: none;
}
.jornada-ui .shift-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jornada-ui .shift h2 { color: #fff; font-size: 1rem; font-weight: 620; letter-spacing: -.012em; }
.jornada-ui .state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #62778a;
    border-radius: 20px;
    background: #233f52;
    color: #f3fbfd;
    font-size: .78rem;
    font-weight: 620;
    line-height: 1.3;
}
.jornada-ui .state::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #7ee0bd; }
.jornada-ui .slot {
    margin: 16px 0 7px;
    color: #fff;
    font-size: clamp(2.5rem, 4.05vw, 4.9rem);
    font-weight: 620;
    line-height: 1.08;
    letter-spacing: -.07em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.jornada-ui .slot:is(.is-empty, .empty-slot) {
    font-size: clamp(1.65rem, 3vw, 2.6rem);
    white-space: normal;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}
.jornada-ui .dash { color: #a0bbcc; font-weight: 350; padding-inline: .06em; }
.jornada-ui .shift-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px 7px;
    margin: 0;
    padding: 0;
    border: 0;
    color: #d2e1e9;
    font-size: .87rem;
    overflow-wrap: anywhere;
}
.jornada-ui .shift-meta .ico { width: 15px; height: 15px; color: #f5a063; }
.jornada-ui .meta-divider { margin: 0 2px; color: #93afc1; }
.jornada-ui .shift-note, .jornada-ui .shift .shift-detail { color: #d2e1e9; font-size: .84rem; margin-top: 7px; }
.jornada-ui .shift a { color: #fff; text-underline-offset: 3px; }
.jornada-ui .timeline {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0,1fr);
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}
.jornada-ui .timeline li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding-top: 19px;
}
.jornada-ui .timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 5px;
    inset-inline: 0;
    border-top: 1px dashed #7f98aa;
}
.jornada-ui .timeline li.done:not(:last-child)::before {
    height: 2px;
    border: 0;
    background: linear-gradient(90deg, var(--orange), #f8ae70 77%, #8098a9 77%);
}
.jornada-ui .point {
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #95acbd;
    border-radius: 50%;
    background: #1f425d;
}
.jornada-ui .done .point { border-color: var(--orange); background: var(--orange); }
.jornada-ui .now .point { border-color: #e8a468; background: #fff; box-shadow: 0 0 0 3px #f6b17325; }
.jornada-ui .timeline :is(b, strong) { font-size: .84rem; font-weight: 620; }
.jornada-ui .timeline small { color: #c9d9e5; font-size: .78rem; }
.jornada-ui :is(.action, .history) {
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 3px 12px #203b4e06;
}
.jornada-ui .action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 23px clamp(18px, 2vw, 29px) 16px;
}
.jornada-ui .act-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #eaf1fd;
    color: var(--blue);
}
.jornada-ui .act-icon .ico { width: 24px; height: 24px; }
.jornada-ui :is(.action, .history, .dialog) h2 { font-size: 1.28rem; font-weight: 675; letter-spacing: -.035em; }
.jornada-ui .action > p { margin: 6px 0 17px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.jornada-ui .primary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 45px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.35;
}
.jornada-ui .primary:hover { background: #124ba8; }
.jornada-ui .action .primary { margin-top: auto; }
.jornada-ui .link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #2158a2;
    font-size: .88rem;
    font-weight: 620;
    text-decoration: none;
}
.jornada-ui .link-btn:hover { text-decoration: underline; }
.jornada-ui .action-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 .75rem;
    width: 100%;
}
.jornada-ui .action .pin-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #2158a2;
    font-size: .88rem;
    font-weight: 620;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.jornada-ui .action-tools .link-btn { padding-inline: 0; }
.jornada-ui .action-tools .pin-link:only-child { margin-inline: auto; }
.jornada-ui .link-btn .ico { width: 15px; height: 15px; }
.jornada-ui .history { margin-top: 22px; overflow: hidden; }
.jornada-ui .history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px 24px 16px;
}
.jornada-ui .history-head p { margin-top: 4px; color: var(--muted); font-size: .87rem; }
.jornada-ui .history-head > span {
    flex: none;
    align-self: flex-start;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: .8rem;
}
.jornada-ui .list { margin: 0; padding: 0; list-style: none; }
.jornada-ui .row {
    display: grid;
    grid-template-columns: minmax(135px, 1.25fr) minmax(92px, .75fr) minmax(64px, .5fr) minmax(64px, .7fr) 44px;
    align-items: center;
    gap: 8px;
    min-height: 59px;
    padding: 5px 20px;
    border-top: 1px solid #e6ebef;
    overflow-wrap: anywhere;
}
.jornada-ui .kind { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .9rem; font-weight: 640; }
.jornada-ui .row .activity-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #edf4fa;
    color: #355c80;
}
.jornada-ui .activity-icon .ico { width: 17px; height: 17px; }
.jornada-ui .row :is(.place, .date) { color: var(--muted); font-size: .84rem; }
.jornada-ui .row time { font-size: .9rem; font-weight: 620; }
.jornada-ui .receipt-btn {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #3e6688;
}
.jornada-ui .receipt-btn:hover { background: #edf3f8; }
.jornada-ui .colhdr { min-height: 31px; background: #f8fafb; color: #566b7b; font-size: .78rem; font-weight: 640; }
.jornada-ui .colhdr span:last-child { visibility: hidden; }
.jornada-ui .history-empty { padding: 17px 24px; border-top: 1px solid var(--line); color: var(--muted); }
.jornada-ui .history-footer { padding: 0 24px; border-top: 1px solid var(--line); }
.jornada-ui .jornada-dialog {
    width: min(465px, calc(100% - 28px));
    max-height: calc(100% - 36px);
    max-height: calc(100dvh - 36px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 17px 100px #10294033;
    overflow: auto;
    overscroll-behavior: contain;
}
.jornada-ui .jornada-dialog::backdrop { background: #0d243e99; }
.jornada-ui .dialog { padding: 24px; }
.jornada-ui .dialog-head { position: relative; margin-bottom: 13px; }
.jornada-ui .dialog-head h2 { padding-right: 35px; }
.jornada-ui .close {
    position: absolute;
    top: -11px;
    right: -9px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.65rem;
}
.jornada-ui .close:hover { background: #eef2f6; }
.jornada-ui .dialog .note { margin: 10px 0 18px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.jornada-ui .dialog select, .jornada-ui .dialog input:not([type="checkbox"]) {
    width: 100%;
    min-height: 44px;
    border-color: #a9b8c4;
    border-radius: 7px;
}
.jornada-ui .dialog .primary { margin-top: 18px; }
.jornada-ui .dialog .data {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: baseline;
    gap: 0;
    margin: 15px 0;
    font-size: .88rem;
}
.jornada-ui .data :is(dt, dd) { margin: 0; padding-block: 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.jornada-ui .data dt { padding-right: 12px; color: var(--muted); }
.jornada-ui .data dd { text-align: right; font-weight: 620; }
.jornada-ui .dialog-feedback:not(:empty) { margin-top: 10px; font-size: .9rem; }
.jornada-ui .dialog [role="alert"]:not(:empty) { color: #923323; }
.jornada-ui .dialog .id-proof { margin-block: 14px 10px; }
.jornada-ui .dialog .mark-location-choice { display: flex; align-items: center; }
.jornada-ui .dialog .mark-skip { margin-right: 5px; }
.jornada-ui .dialog .mark-workplace { margin-block: 13px 5px; }
.jornada-ui .dialog button:disabled { cursor: default; opacity: .6; }
.jornada-ui section[id] { scroll-margin-top: calc(var(--mc-height) + 10px); }

@media (max-width: 1100px) {
    body:has(#main.worker-home) { --journey-gutter: 24px; }
    .jornada-ui .deck { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.3fr); gap: 14px; }
    .jornada-ui .shift { padding: 21px; }
    .jornada-ui .slot { font-size: clamp(2.45rem, 4.5vw, 4rem); }
    .jornada-ui .row { padding-inline: 16px; }
}
@media (max-width: 1023px) {
    .jornada-ui .title { margin-bottom: 18px; }
}
@media (max-width: 650px) {
    body:has(#main.worker-home) { --journey-gutter: 15px; }
    #main.worker-home { padding-bottom: 28px; }
    .jornada-ui .clock-icon { display: none; }
    .jornada-ui .title { gap: 10px; margin-bottom: 14px; }
    .jornada-ui .title h1 { font-size: clamp(1.8rem, 8vw, 2.12rem); }
    .jornada-ui .title :is(p, .long-date) { margin-top: 4px; font-size: .82rem; }
    .jornada-ui .local-time { gap: 6px; }
    .jornada-ui .local-time :is(b, strong, .time-value) { text-align: right; font-size: 1rem; }
    .jornada-ui .local-time small { font-size: .72rem; }
    .jornada-ui .deck { display: flex; flex-direction: column; gap: 11px; }
    .jornada-ui :is(.shift, .action, .history) { border-radius: 13px; }
    .jornada-ui .shift { padding: 16px 19px; }
    .jornada-ui .slot { margin: 11px 0 5px; font-size: clamp(2.38rem, 9.5vw, 3.5rem); }
    .jornada-ui .shift h2 { font-size: .94rem; }
    .jornada-ui .shift-meta { gap: 5px; font-size: .8rem; }
    .jornada-ui .state { font-size: .72rem; padding: 5px 8px; }
    .jornada-ui .timeline { margin-top: 19px; }
    .jornada-ui .timeline li { gap: 1px; padding-top: 16px; }
    .jornada-ui .timeline :is(b, strong) { font-size: .78rem; }
    .jornada-ui .timeline small { font-size: .74rem; }
    .jornada-ui .action {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        column-gap: 9px;
        padding: 14px 16px 9px;
    }
    .jornada-ui .act-icon { grid-row: 1 / 3; width: 32px; height: 32px; margin: 0; border-radius: 8px; }
    .jornada-ui .act-icon .ico { width: 18px; height: 18px; }
    .jornada-ui .action h2 { font-size: 1.08rem; }
    .jornada-ui .action > p { margin: 4px 0 0; font-size: .81rem; line-height: 1.35; }
    .jornada-ui .action .primary { grid-column: 1 / -1; margin-top: 13px; }
    .jornada-ui .action :is(.action-tools, .pin-link) { grid-column: 1 / -1; }
    .jornada-ui .history { margin-top: 14px; }
    .jornada-ui .history-head { gap: 6px; padding: 15px 16px 12px; }
    .jornada-ui .history-head h2 { font-size: 1.08rem; }
    .jornada-ui .history-head p { font-size: .8rem; }
    .jornada-ui .history-head > span { font-size: .72rem; }
    .jornada-ui .colhdr { display: none; }
    .jornada-ui .row:not(.colhdr) {
        grid-template-columns: minmax(0, 1fr) max-content 44px;
        gap: 1px 5px;
        min-height: 60px;
        padding: 8px 7px 8px 13px;
    }
    .jornada-ui .kind { grid-area: 1 / 1; gap: 8px; font-size: .86rem; }
    .jornada-ui .row .activity-icon, .jornada-ui .row .place { display: none; }
    .jornada-ui .row .date { grid-area: 2 / 1; font-size: .78rem; }
    .jornada-ui .row .receipt-btn { grid-area: 1 / 3 / 3 / 4; justify-self: center; }
    .jornada-ui .row time { grid-area: 1 / 2 / 3 / 3; font-size: .85rem; }
    .jornada-ui .history-empty, .jornada-ui .history-footer { padding-inline: 16px; }
    .jornada-ui .dialog { padding: 20px; }
}

.jornada-ui .shift .schedule-link {
    align-self: flex-start;
    min-height: 32px;
    margin: 7px 0 -7px;
    padding: 5px 0;
    color: #deebf6;
    font-size: .82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.jornada-ui .shift .schedule-link:hover { color: #fff; background: transparent; }
.jornada-ui .history-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #2158a2;
    font-size: .87rem;
    font-weight: 620;
    text-decoration: none;
}
.jornada-ui .history-footer a:hover { text-decoration: underline; }
.jornada-ui .loading { color: var(--muted); }
.jornada-ui .notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px 14px;
    border: 1px solid #e5c89b;
    border-left: 3px solid #a06326;
    border-radius: 7px;
    color: #604528;
    background: #fff6e7;
    font-size: .9rem;
}
.jornada-ui .notice button {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: #614324;
    text-decoration: underline;
}

.receipt-print { display: none; }
@media print {
    body:has(> .receipt-print) > :not(.receipt-print),
    body:has(> .receipt-print) dialog { display: none !important; }
    body:has(> .receipt-print) dialog::backdrop { background: transparent; }
    body > .receipt-print {
        display: block;
        color: #111;
        font: 11pt/1.5 Arial, sans-serif;
    }
    .receipt-print h1 { font: bold 16pt Arial, sans-serif; margin: 0 0 1em; }
    .receipt-print dl { display: grid; grid-template-columns: 34% 1fr; }
    .receipt-print dt, .receipt-print dd {
        margin: 0;
        padding: 0.35em 0;
        border-bottom: 1px solid #aaa;
        overflow-wrap: anywhere;
    }
    .receipt-print dt { font-weight: bold; padding-right: 1em; }
}
