:root {
    --navy: #0a3b78;
    --navy-dark: #062d5d;
    --blue: #1777e6;
    --blue-dark: #0b56b0;
    --light-blue: #eef6ff;
    --yellow: #ffd247;
    --yellow-soft: #fff6d7;
    --green: #22a652;
    --green-soft: #edf9f1;
    --red: #e50000;
    --red-soft: #fff1f1;
    --text: #13335b;
    --muted: #667b96;
    --border: #c9d9ee;
    --panel: #ffffff;
    --shadow: 0 16px 40px rgba(10, 59, 120, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 210, 71, 0.14), transparent 23%),
        radial-gradient(circle at 92% 15%, rgba(23, 119, 230, 0.12), transparent 24%),
        linear-gradient(180deg, #d8e8f5 0%, #edf5fb 45%, #dceaf6 100%);
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 12px;
}

.card {
    width: 100%;
    max-width: 720px;
    background: var(--panel);
    border: 3px solid var(--navy);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.panel { max-width: 860px; }

.hero {
    padding: 14px 18px 15px;
    text-align: center;
    background: #fff;
    border-bottom: 6px solid var(--navy);
}

.hero.compact { padding: 13px 18px 15px; }

.brand-logo {
    display: block;
    width: 100%;
    max-width: 260px;
    max-height: 68px;
    object-fit: contain;
    margin: 0 auto 8px;
    border-radius: 12px;
}

.conductor-logo {
    max-width: 230px;
    max-height: 58px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--navy);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(10, 59, 120, .14);
}

h1 {
    margin: 6px 0 6px;
    font-size: clamp(31px, 7.4vw, 56px);
    line-height: 1;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: -0.8px;
    font-weight: 950;
}

.panel h1 {
    color: var(--navy);
    font-size: clamp(28px, 5.2vw, 44px);
}

.subtitle {
    margin: 0;
    font-size: clamp(17px, 3.4vw, 23px);
    line-height: 1.2;
    font-weight: 800;
    color: var(--navy);
}

.status {
    margin: 12px;
    padding: 13px 14px;
    border-radius: 18px;
    border: 2px solid var(--border);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
}

.status-icon {
    font-size: 19px;
    line-height: 1.1;
}

.status strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 3px;
}

.status span,
.status small {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.status small {
    margin-top: 7px;
    color: var(--muted);
    font-weight: 700;
}

.status-ok {
    background: var(--green-soft);
    border-color: #a2d8b6;
}

.status-warn {
    background: #fff8de;
    border-color: #f2d464;
}

.status-danger {
    background: var(--red-soft);
    border-color: #f3b6b6;
}

.block {
    margin: 12px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: #fff;
}

.block h2 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 23px;
    line-height: 1.1;
    font-weight: 900;
}

.section-intro {
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
}

.stop-selected {
    background: #edf4fc;
    text-align: center;
}

.stop-selected h2 {
    margin-bottom: 5px;
    font-size: clamp(25px, 5.4vw, 34px);
}

.stop-label {
    color: var(--muted);
    font-weight: 850;
    font-size: 14px;
    margin-bottom: 5px;
}

.direction-line {
    margin: 6px 0 0;
    color: var(--navy);
    font-weight: 850;
    font-size: 16px;
}

.next-time {
    margin: 7px 0 0;
    color: var(--muted);
    font-weight: 750;
    font-size: 15px;
}

.big-help {
    margin: 0 0 14px;
    font-size: 19px;
    line-height: 1.32;
    font-weight: 900;
    text-align: center;
    color: var(--navy-dark);
}

.cta-sticky {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 5;
}

.main-button {
    width: 100%;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #1d7be8 0%, #0d61c4 62%, #084c9a 100%);
    color: #fff;
    font-size: clamp(25px, 6vw, 43px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: 0.2px;
    padding: 19px 12px;
    box-shadow: 0 8px 0 #06386f;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 11px;
    text-align: center;
}

.main-button:active {
    transform: translateY(2px);
    box-shadow: 0 6px 0 #06386f;
}

.main-button:disabled {
    background: linear-gradient(180deg, #88a8cf, #6c86a8);
    box-shadow: 0 7px 0 #556c89;
    cursor: not-allowed;
}

.main-button.sent {
    background: linear-gradient(180deg, #22a652, #147a37);
    box-shadow: 0 7px 0 #0d5727;
}

.admin-main-button {
    font-size: 26px;
}

.small-button {
    border: 0;
    background: linear-gradient(180deg, #1a77e2, #0b58b6);
    color: #fff;
    font-weight: 900;
    border-radius: 13px;
    padding: 12px 16px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 0 #083e7e;
}

.stop-grid {
    display: grid;
    gap: 10px;
}

.stop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    text-decoration: none;
    background: linear-gradient(180deg, var(--navy), var(--navy-dark));
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    padding: 15px;
    border-radius: 17px;
    box-shadow: 0 5px 16px rgba(10, 59, 120, .14);
}

.stop-btn small {
    display: block;
    font-size: 13px;
    opacity: .88;
    margin-top: 4px;
}

.result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #eef5ff;
    border: 2px solid var(--border);
    font-size: 16px;
    line-height: 1.42;
    font-weight: 700;
}

.result.ok {
    background: #ebf9f0;
    border-color: #93d3a8;
}

.result.warn {
    background: #fff4f4;
    border-color: #efb2b2;
}

.schedule-details summary {
    cursor: pointer;
    color: var(--navy);
    font-size: 20px;
    font-weight: 900;
}

.schedule-mini {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.schedule-mini > div {
    background: #f6f9fd;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}

.schedule-mini strong {
    display: block;
    color: var(--navy);
    font-weight: 900;
    margin-bottom: 4px;
    font-size: 15px;
}

.schedule-mini span {
    display: block;
    color: var(--text);
    font-weight: 750;
    line-height: 1.35;
    font-size: 15px;
}

.schedule-extra-times {
    display: block;
    margin-top: 7px;
    color: #176d35;
    font-size: 13px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 900;
}

.phone-box {
    margin: 12px;
    padding: 18px 15px;
    background: var(--yellow-soft);
    border: 2px solid #f0c51c;
    border-radius: 22px;
    display: grid;
    gap: 11px;
    text-align: center;
}

.phone-box strong {
    font-size: 20px;
    color: var(--navy);
    line-height: 1.2;
    font-weight: 900;
}

.phone-box p {
    margin: 5px 0 0;
    font-size: 15px;
    line-height: 1.35;
}

.phone-link {
    display: block;
    font-size: clamp(31px, 7vw, 48px);
    color: var(--navy);
    text-decoration: none;
    font-weight: 950;
    letter-spacing: 1.2px;
    line-height: 1;
}

.phone-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.call-link,
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 17px;
    min-width: 128px;
    padding: 11px 18px;
    border-radius: 999px;
}

.call-link {
    background: var(--navy);
    box-shadow: 0 4px 0 var(--navy-dark);
}

.whatsapp-link {
    background: #2dd15d;
    box-shadow: 0 4px 0 #1a9f43;
}

.footer {
    padding: 16px 12px;
    background: var(--navy);
    color: #fff;
    display: grid;
    gap: 6px;
    text-align: center;
    font-weight: 800;
}

.footer a {
    color: #fff;
    font-size: 15px;
}

.footer span {
    font-size: 14px;
}

.muted { color: var(--muted); }

.small-note {
    margin: 11px 0 0;
    font-size: 14px;
    line-height: 1.4;
}

.driver-alert {
    margin: 12px;
    background: linear-gradient(180deg, #ef2b2b, #cb1111);
    color: #fff;
    padding: 16px;
    border-radius: 17px;
    font-size: 25px;
    font-weight: 950;
    text-align: center;
    box-shadow: 0 10px 24px rgba(203, 17, 17, 0.18);
    animation: pulse 1.2s infinite;
}

.driver-clear {
    margin: 12px;
    background: var(--green-soft);
    border: 2px solid #a2d8b6;
    color: #146b33;
    padding: 14px;
    border-radius: 17px;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.014); }
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title-row h2 { margin: 0; }

.counter {
    min-width: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #e7f0fb;
    color: var(--navy);
    font-weight: 900;
    font-size: 15px;
}

.counter.danger {
    background: #ffe3e3;
    color: #b60000;
}

.empty-state {
    margin: 0;
    padding: 13px;
    background: #f6f9fd;
    border-radius: 13px;
    font-weight: 700;
}

.notice-list {
    display: grid;
    gap: 12px;
}

.compact-list { gap: 9px; }

.notice {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    border-radius: 17px;
    padding: 14px;
    border: 2px solid var(--border);
    background: #fff;
}

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-state {
    display: inline-block;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .35px;
    margin-bottom: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
}

.notice h2 {
    margin: 0 0 7px;
    font-size: 23px;
    line-height: 1.1;
    color: var(--navy);
    font-weight: 900;
}

.notice-direction {
    margin: 0 0 7px;
    color: var(--navy);
    font-weight: 800;
    font-size: 15px;
}

.notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 14px;
    color: #546983;
    line-height: 1.35;
    font-weight: 650;
}

.notice-actions { flex-shrink: 0; }

.notice.pending {
    background: #fff7f7;
    border-color: #edb0b0;
    box-shadow: inset 5px 0 0 #dd2d2d;
}

.notice.pending .notice-state {
    background: #ffe2e2;
    color: #b20c0c;
}

.notice.done {
    background: #f4fbf6;
    border-color: #b9dfc2;
    opacity: 0.92;
}

.notice.done .notice-state {
    background: #e1f4e7;
    color: #197a38;
}

.notice.done h2 { font-size: 20px; }

.admin-links {
    margin: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-links a {
    color: #fff;
    background: var(--navy);
    border-radius: 12px;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 800;
}

.admin-form {
    display: grid;
    gap: 13px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 13px;
    padding: 11px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.url-list code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    background: #f3f6fb;
    padding: 8px;
    border-radius: 8px;
}

@media (max-width: 700px) {
    .page { padding: 8px; }

    .card {
        border-radius: 20px;
        border-width: 2px;
    }

    .hero,
    .hero.compact {
        padding: 12px 11px 13px;
    }

    .brand-logo {
        max-width: 220px;
        max-height: 56px;
        margin-bottom: 7px;
    }

    .conductor-logo {
        max-width: 200px;
        max-height: 50px;
    }

    .hero-badge {
        font-size: 14px;
        padding: 7px 12px;
        margin-bottom: 7px;
    }

    h1 {
        font-size: clamp(29px, 8.3vw, 43px);
        margin: 5px 0 5px;
    }

    .panel h1 {
        font-size: clamp(26px, 7.2vw, 36px);
    }

    .subtitle {
        font-size: 16px;
    }

    .block,
    .phone-box,
    .status,
    .driver-alert,
    .driver-clear {
        margin: 9px;
        padding: 12px;
    }

    .status {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .status-icon {
        display: none;
    }

    .status strong {
        font-size: 18px;
    }

    .status span,
    .status small {
        font-size: 14px;
    }

    .block h2 {
        font-size: 22px;
    }

    .stop-selected h2 {
        font-size: 24px;
    }

    .direction-line {
        font-size: 15px;
    }

    .big-help {
        font-size: 17px;
    }

    .main-button {
        font-size: 24px;
        padding: 17px 9px;
        border-radius: 17px;
        gap: 8px;
    }

    .phone-link {
        font-size: 28px;
        letter-spacing: .4px;
    }

    .call-link,
    .whatsapp-link {
        min-width: 122px;
        font-size: 16px;
        padding: 10px 15px;
    }

    .schedule-details summary {
        font-size: 18px;
    }

    .schedule-mini strong,
    .schedule-mini span {
        font-size: 14px;
    }

    .notice {
        display: grid;
    }

    .notice-actions,
    .notice-actions .small-button {
        width: 100%;
    }

    .notice h2 {
        font-size: 21px;
    }

    .notice.done h2 {
        font-size: 19px;
    }

    .driver-alert {
        font-size: 21px;
    }

    .driver-clear {
        font-size: 17px;
    }
}

@media (max-width: 380px) {
    .main-button { font-size: 22px; }
    .phone-link { font-size: 25px; }
    .brand-logo { max-width: 200px; }
}

/* Seguimiento de solicitudes v2 */

.scheduled-trip {
    width: min(100%, 390px);
    margin: 13px auto 10px;
    padding: 12px 16px;
    border: 2px solid #98bce5;
    border-radius: 17px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.scheduled-trip span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 850;
}

.scheduled-trip strong {
    color: var(--red);
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
}

.no-extra-warning,
.driver-no-extra,
.tracking-reminder,
.schedule-warning {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--yellow-soft);
    border: 1px solid #e4bd28;
    color: #684e00;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 750;
}

.schedule-warning {
    margin-top: 12px;
}

.no-margin {
    margin-top: 0;
}

.tracking-card {
    border-width: 3px;
    background: #f4f8fd;
    transition: border-color .2s ease, background .2s ease;
}

.tracking-pending {
    border-color: #e0b938;
    background: #fffaf0;
}

.tracking-seen,
.tracking-on_way,
.tracking-custom,
.tracking-extra_service {
    border-color: #77aee9;
    background: #eef6ff;
}

.public-extra-badge,
.extra-service-badge {
    width: fit-content;
    margin: 8px auto;
    padding: 7px 10px;
    border: 1px solid #75bd8d;
    border-radius: 999px;
    background: #e9f8ee;
    color: #176d35;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 900;
}

.extra-service-badge {
    margin: 7px 0;
}

.tracking-delay_5,
.tracking-delay_10,
.tracking-delay_15 {
    border-color: #ec9a42;
    background: #fff6e9;
}

.tracking-attended {
    border-color: #77c28f;
    background: #edf9f1;
}

.tracking-header {
    display: flex;
    align-items: center;
    gap: 13px;
}

.tracking-emoji {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    font-size: 25px;
}

.tracking-kicker {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 900;
}

.tracking-header h2 {
    margin: 0;
}

.tracking-message {
    margin: 14px 0 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 800;
}

.driver-message,
.saved-driver-message {
    margin: 12px 0 0;
    padding: 12px 13px;
    border: 2px solid #87b6e8;
    border-radius: 14px;
    background: #fff;
    color: var(--navy-dark);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 800;
}

.tracking-meta {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.secondary-button {
    width: 100%;
    margin-top: 13px;
    border: 2px solid var(--navy);
    border-radius: 13px;
    padding: 11px 14px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.driver-rule {
    margin: 12px;
    padding: 13px 14px;
    border: 2px solid #e1b82f;
    border-radius: 16px;
    background: var(--yellow-soft);
    color: #5f4700;
    line-height: 1.4;
    font-weight: 750;
}

.driver-scheduled-time {
    width: fit-content;
    min-width: 220px;
    margin: 10px 0;
    padding: 10px 12px;
    border: 2px solid #93b9e5;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-scheduled-time span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 850;
}

.driver-scheduled-time strong {
    color: var(--red);
    font-size: 27px;
    line-height: 1;
    font-weight: 950;
}

.admin-scheduled-time {
    min-width: 0;
}

.driver-no-extra {
    margin: 8px 0 10px;
}

.driver-response-form {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 2px dashed #e3a9a9;
    display: grid;
    gap: 12px;
}

.quick-response-grid,
.driver-final-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.response-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 10px;
    background: #e9f2fd;
    color: var(--navy);
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #a9c5e5;
}

.response-button:active {
    transform: translateY(1px);
}

.response-seen,
.response-on_way {
    background: #e8f3ff;
}

.response-delay_5,
.response-delay_10,
.response-delay_15 {
    background: #fff2df;
    color: #8a4a00;
    box-shadow: inset 0 0 0 1px #e1ad6d;
}

.response-custom {
    background: #ede8ff;
    color: #4f3487;
    box-shadow: inset 0 0 0 1px #baa8e4;
}

.response-attended {
    background: #e4f6e9;
    color: #176d35;
    box-shadow: inset 0 0 0 1px #90cda2;
}

.driver-message-label {
    display: grid;
    gap: 6px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 900;
}

.driver-message-label textarea {
    width: 100%;
    resize: vertical;
    min-height: 62px;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
}

.scope-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
    padding: 10px;
    border-radius: 12px;
    background: #f3f7fc;
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;
}

.scope-check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.driver-flash,
.admin-result {
    margin: 12px;
}

.driver-links {
    justify-content: center;
}

.notice:target {
    outline: 4px solid var(--yellow);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .scheduled-trip {
        display: grid;
        gap: 6px;
    }

    .scheduled-trip strong {
        font-size: 30px;
    }

    .tracking-message {
        font-size: 16px;
    }

    .driver-scheduled-time {
        width: 100%;
        justify-content: space-between;
    }

    .quick-response-grid,
    .driver-final-actions {
        grid-template-columns: 1fr;
    }

    .response-button {
        min-height: 48px;
        font-size: 15px;
    }
}

/* Gestión diaria de servicios adicionales */

.extra-service-manager {
    border-color: #82bd98;
    background: #f7fcf8;
}

.manager-kicker {
    display: block;
    margin-bottom: 3px;
    color: #176d35;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 12px;
    font-weight: 950;
}

.extra-service-manager .section-title-row h2 {
    margin: 0;
}

.extra-help,
.extra-reassign-note {
    margin: 11px 0;
    padding: 11px 12px;
    border-radius: 13px;
    background: #eaf7ee;
    color: #175d31;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
}

.extra-date-form {
    margin: 13px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: end;
}

.extra-date-form label,
.extra-create-form > label:not(.scope-check) {
    display: grid;
    gap: 5px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 900;
}

.extra-date-form input,
.extra-create-form input[type="time"],
.extra-create-form select {
    width: 100%;
    min-height: 45px;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 9px 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.extra-date-form button,
.extra-create-button {
    min-height: 45px;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.extra-day-summary {
    margin: 12px 0 15px;
    padding: 12px;
    border: 1px solid #a7c7b2;
    border-radius: 14px;
    background: #fff;
}

.extra-day-summary > strong {
    color: var(--navy);
    font-weight: 950;
}

.extra-day-summary .schedule-warning {
    font-size: 12px;
}

.extra-quick-group {
    margin-top: 16px;
}

.extra-quick-group h3,
.extra-service-list h3 {
    margin: 0 0 9px;
    color: var(--navy);
    font-size: 16px;
}

.extra-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.extra-quick-grid form {
    min-width: 0;
}

.extra-button {
    width: 100%;
    min-height: 64px;
    border: 2px solid #6ba783;
    border-radius: 13px;
    padding: 8px 6px;
    background: #fff;
    color: #176d35;
    font: inherit;
    cursor: pointer;
}

.extra-button strong,
.extra-button span {
    display: block;
}

.extra-button strong {
    font-size: 20px;
    font-weight: 950;
}

.extra-button span {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 850;
}

.extra-button.active {
    border-color: #298149;
    background: #dff3e5;
}

.extra-button:disabled {
    opacity: .62;
    cursor: not-allowed;
}

.extra-custom-details {
    margin-top: 13px;
    border: 1px solid #a7c7b2;
    border-radius: 14px;
    background: #fff;
}

.extra-custom-details summary {
    padding: 12px;
    color: var(--navy);
    cursor: pointer;
    font-weight: 900;
}

.extra-create-form {
    padding: 0 12px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.extra-reassign-check,
.extra-create-button {
    grid-column: 1 / -1;
}

.extra-service-list {
    margin-top: 17px;
    padding-top: 15px;
    border-top: 2px dashed #a7c7b2;
}

.extra-service-item {
    margin-top: 8px;
    padding: 11px;
    border: 1px solid #b8d5c2;
    border-radius: 13px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.extra-service-item > div {
    display: grid;
    gap: 3px;
}

.extra-service-item strong {
    color: var(--navy);
    font-size: 15px;
    font-weight: 950;
}

.extra-service-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.extra-delete-button {
    border: 1px solid #d68484;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff3f3;
    color: #a32626;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.extra-delete-button:disabled {
    border-color: var(--border);
    background: #f2f4f7;
    color: var(--muted);
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .extra-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .extra-date-form,
    .extra-create-form {
        grid-template-columns: 1fr;
    }

    .extra-reassign-check,
    .extra-create-button {
        grid-column: auto;
    }
}

/* Confirmación real de respuesta conductor ↔ cliente */

.driver-response-sent {
    margin-top: 13px;
    padding: 13px 14px;
    border: 2px solid #6eb68a;
    border-radius: 15px;
    background: #edf9f1;
    color: #175d31;
    display: grid;
    gap: 5px;
}

.driver-response-sent > strong {
    font-size: 16px;
    font-weight: 950;
}

.driver-response-sent > span {
    color: var(--navy);
    font-size: 17px;
    font-weight: 900;
}

.driver-response-sent > p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 750;
}

.driver-response-sent > small {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(23, 93, 49, .2);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 850;
}

.client-delivery-ok {
    color: #176d35;
}

.client-delivery-waiting {
    color: #8a5b00;
}

.response-button:disabled {
    opacity: .55;
    cursor: wait;
}

.driver-submit-state {
    padding: 11px 12px;
    border-radius: 12px;
    background: #eef5ff;
    color: var(--navy);
    text-align: center;
    font-size: 14px;
    font-weight: 900;
}

body.client-reply-open {
    overflow: hidden;
}

.client-reply-overlay[hidden] {
    display: none !important;
}

.client-reply-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 18px;
    background: rgba(3, 28, 58, .76);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity .18s ease;
}

.client-reply-overlay.visible {
    opacity: 1;
}

.client-reply-dialog {
    width: min(100%, 520px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 24px 20px 20px;
    border: 4px solid var(--yellow);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
    text-align: center;
    transform: translateY(16px) scale(.97);
    transition: transform .18s ease;
}

.client-reply-overlay.visible .client-reply-dialog {
    transform: translateY(0) scale(1);
}

.client-reply-emoji {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--yellow-soft);
    border: 2px solid #e8c13b;
    font-size: 38px;
}

.client-reply-kicker {
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-size: 13px;
    font-weight: 950;
}

.client-reply-dialog h2 {
    margin: 6px 0 10px;
    color: var(--navy);
    font-size: clamp(25px, 6vw, 35px);
    line-height: 1.08;
    font-weight: 950;
}

.client-reply-message {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
}

.client-reply-driver-message {
    margin: 14px 0 0;
    padding: 13px;
    border: 2px solid #87b6e8;
    border-radius: 14px;
    background: #eef6ff;
    color: var(--navy-dark);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 850;
}

.client-reply-time {
    margin-top: 16px;
    padding: 11px;
    border-radius: 13px;
    background: var(--yellow-soft);
    color: #684e00;
    font-size: 15px;
    font-weight: 800;
}

.client-reply-time strong {
    color: var(--red);
    font-size: 21px;
    font-weight: 950;
}

.client-reply-close {
    width: 100%;
    margin-top: 17px;
    padding: 15px 14px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, #1d7be8, #0b56b0);
    color: #fff;
    font: inherit;
    font-size: 20px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 5px 0 #06386f;
}

@media (max-width: 420px) {
    .client-reply-overlay {
        padding: 10px;
    }

    .client-reply-dialog {
        max-height: calc(100vh - 20px);
        padding: 20px 14px 16px;
        border-radius: 20px;
    }

    .client-reply-emoji {
        width: 62px;
        height: 62px;
        font-size: 32px;
    }

    .client-reply-message {
        font-size: 16px;
    }
}
