.mh5-delivery-app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 205, 170, 0.46), transparent 22%),
        radial-gradient(circle at top right, rgba(255, 233, 196, 0.5), transparent 26%),
        linear-gradient(180deg, #fff7f1 0%, #fffdf9 45%, #fff5ef 100%);
    color: #24140c;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

.mh5-delivery-app-shell * {
    box-sizing: border-box;
}

.mh5-delivery-app-shell button,
.mh5-delivery-app-shell input,
.mh5-delivery-app-shell textarea,
.mh5-delivery-app-shell select {
    font: inherit;
}

.mh5-delivery-app-shell a {
    color: inherit;
    text-decoration: none;
}

.mh5-delivery-container {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 14px 120px;
}

.mh5-delivery-card,
.mh5-delivery-surface {
    border: 1px solid rgba(233, 194, 166, 0.46);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 40px rgba(116, 71, 42, 0.12);
}

.mh5-delivery-topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    margin: -14px -14px 16px;
    padding: 14px 14px 10px;
    background: linear-gradient(180deg, rgba(255, 246, 239, 0.98) 0%, rgba(255, 248, 243, 0.88) 72%, rgba(255, 248, 243, 0) 100%);
    backdrop-filter: blur(16px);
}

.mh5-delivery-profile-card {
    padding: 16px;
}

.mh5-delivery-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mh5-delivery-kicker {
    color: rgba(109, 74, 53, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.mh5-delivery-title {
    margin-top: 6px;
    font-size: 1.55rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.mh5-delivery-subtitle {
    margin-top: 6px;
    color: rgba(103, 73, 57, 0.84);
    font-size: 0.9rem;
    line-height: 1.45;
}

.mh5-delivery-status-chip,
.mh5-delivery-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(233, 194, 166, 0.56);
    background: rgba(255, 249, 245, 0.95);
    color: #6e4934;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.mh5-delivery-status-chip.online,
.mh5-delivery-chip.success {
    background: rgba(69, 180, 109, 0.14);
    border-color: rgba(69, 180, 109, 0.28);
    color: #229256;
}

.mh5-delivery-status-chip.offline,
.mh5-delivery-chip.warning {
    background: rgba(255, 132, 79, 0.12);
    border-color: rgba(255, 132, 79, 0.22);
    color: #df6234;
}

.mh5-delivery-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mh5-delivery-switch {
    position: relative;
    width: 58px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: rgba(206, 187, 174, 0.6);
}

.mh5-delivery-switch::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease;
}

.mh5-delivery-switch.is-on {
    background: linear-gradient(135deg, #7ad25f 0%, #39ae58 100%);
}

.mh5-delivery-switch.is-on::after {
    transform: translateX(24px);
}

.mh5-delivery-panel-switches,
.mh5-delivery-tabbar,
.mh5-delivery-chip-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.mh5-delivery-panel-switches::-webkit-scrollbar,
.mh5-delivery-tabbar::-webkit-scrollbar,
.mh5-delivery-chip-row::-webkit-scrollbar {
    display: none;
}

.mh5-delivery-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(233, 194, 166, 0.5);
    background: rgba(255, 255, 255, 0.96);
    color: #6d4934;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.mh5-delivery-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #ff8454 0%, #ef5d34 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(239, 93, 52, 0.2);
}

.mh5-delivery-grid {
    display: grid;
    gap: 14px;
}

.mh5-delivery-grid.stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mh5-delivery-stat {
    min-height: 128px;
    padding: 18px;
    color: #fff;
    border-radius: 26px;
    box-shadow: 0 18px 34px rgba(114, 70, 42, 0.18);
}

.mh5-delivery-stat.orange {
    background: linear-gradient(135deg, #ff945f 0%, #ee5d34 100%);
}

.mh5-delivery-stat.green {
    background: linear-gradient(135deg, #74cf62 0%, #2ea25a 100%);
}

.mh5-delivery-stat.blue {
    background: linear-gradient(135deg, #6aa8ff 0%, #4265df 100%);
}

.mh5-delivery-stat.cream {
    color: #3d2518;
    background: linear-gradient(135deg, #fff2e6 0%, #ffe0ca 100%);
}

.mh5-delivery-stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.mh5-delivery-stat-label {
    margin-top: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mh5-delivery-section {
    margin-top: 16px;
}

.mh5-delivery-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mh5-delivery-section-title {
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.mh5-delivery-list {
    display: grid;
    gap: 16px;
}

.mh5-delivery-order-card {
    overflow: hidden;
}

.mh5-delivery-order-head {
    padding: 18px 20px;
    background: linear-gradient(135deg, #ff9953 0%, #f06a31 100%);
    color: #fff;
}

.mh5-delivery-order-id {
    font-size: 1.42rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.mh5-delivery-order-time {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.74rem;
    font-weight: 800;
}

.mh5-delivery-order-body {
    padding: 18px 20px 20px;
}

.mh5-delivery-order-name {
    font-size: 1.14rem;
    font-weight: 900;
}

.mh5-delivery-order-meta {
    margin-top: 6px;
    color: rgba(99, 71, 55, 0.84);
    font-size: 0.9rem;
    line-height: 1.5;
}

.mh5-delivery-order-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(230, 196, 170, 0.5);
}

.mh5-delivery-order-line:last-child {
    border-bottom: 0;
}

.mh5-delivery-order-line strong {
    color: #24140c;
}

.mh5-delivery-order-address {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 246, 240, 0.9);
    color: #603d2c;
    font-size: 0.88rem;
    line-height: 1.55;
}

.mh5-delivery-inline-actions,
.mh5-delivery-actions {
    display: grid;
    gap: 10px;
}

.mh5-delivery-inline-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.mh5-delivery-actions {
    margin-top: 18px;
}

.mh5-delivery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff8454 0%, #ef5d34 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(239, 93, 52, 0.2);
}

.mh5-delivery-btn.secondary {
    background: rgba(255, 246, 240, 0.96);
    color: #a35333;
    border: 1px solid rgba(233, 194, 166, 0.56);
    box-shadow: none;
}

.mh5-delivery-btn.green {
    background: linear-gradient(135deg, #68ca67 0%, #2da860 100%);
}

.mh5-delivery-btn.blue {
    background: linear-gradient(135deg, #6ba8ff 0%, #4365df 100%);
}

.mh5-delivery-btn.ghost {
    background: transparent;
    color: #c45c39;
    border: 1px solid rgba(233, 194, 166, 0.56);
    box-shadow: none;
}

.mh5-delivery-input,
.mh5-delivery-textarea,
.mh5-delivery-select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid rgba(233, 194, 166, 0.54);
    border-radius: 18px;
    background: rgba(255, 251, 247, 0.94);
    color: #2f1c13;
}

.mh5-delivery-textarea {
    min-height: 96px;
    resize: vertical;
}

.mh5-delivery-form-stack {
    display: grid;
    gap: 12px;
}

.mh5-delivery-qr-card {
    padding: 18px;
}

.mh5-delivery-qr-layout {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 14px;
}

.mh5-delivery-qr-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh5-delivery-qr-image,
.mh5-delivery-qr-placeholder {
    width: 132px;
    height: 132px;
    border-radius: 24px;
    border: 1px solid rgba(233, 194, 166, 0.52);
    background: rgba(255, 250, 246, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mh5-delivery-qr-image {
    object-fit: cover;
}

.mh5-delivery-qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: #8e6a57;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.mh5-delivery-qr-info {
    display: grid;
    gap: 12px;
}

.mh5-delivery-qr-block {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 245, 237, 0.98) 0%, rgba(255, 251, 247, 0.98) 100%);
    border: 1px solid rgba(233, 194, 166, 0.4);
}

.mh5-delivery-qr-label {
    color: rgba(109, 74, 53, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mh5-delivery-qr-value {
    color: #24140c;
    font-size: 1rem;
    font-weight: 900;
    word-break: break-word;
}

.mh5-delivery-qr-text {
    color: #5c3d2d;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-word;
}

.mh5-delivery-qr-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(107, 168, 255, 0.1);
    color: #3650aa;
    font-size: 0.86rem;
    line-height: 1.6;
}

.mh5-delivery-login-card {
    padding: 18px;
    margin-top: 32px;
}

.mh5-delivery-hero {
    padding: 22px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffcfb7 0%, #ffb085 50%, #ff9260 100%);
    color: #4b2412;
    box-shadow: 0 22px 40px rgba(214, 108, 54, 0.22);
}

.mh5-delivery-hero-title {
    font-size: 2rem;
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.mh5-delivery-auth-note {
    margin-top: 12px;
    color: rgba(73, 38, 20, 0.82);
    line-height: 1.55;
}

.mh5-delivery-error,
.mh5-delivery-success,
.mh5-delivery-info {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.mh5-delivery-error {
    background: rgba(255, 116, 93, 0.12);
    color: #d84f2f;
}

.mh5-delivery-success {
    background: rgba(62, 180, 110, 0.12);
    color: #208952;
}

.mh5-delivery-info {
    background: rgba(107, 168, 255, 0.12);
    color: #385ed9;
}

.mh5-delivery-toast {
    position: fixed;
    left: 50%;
    bottom: calc(98px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    width: min(390px, calc(100vw - 24px));
    padding: 14px 16px;
    border-radius: 18px;
    transform: translateX(-50%);
    background: rgba(36, 20, 12, 0.92);
    color: #fff;
    box-shadow: 0 16px 30px rgba(36, 20, 12, 0.3);
}

.mh5-delivery-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 32;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: min(430px, calc(100vw - 20px));
    padding: 10px;
    border: 1px solid rgba(233, 194, 166, 0.52);
    border-radius: 28px;
    background: rgba(255, 252, 248, 0.96);
    box-shadow: 0 20px 34px rgba(116, 71, 42, 0.18);
    transform: translateX(-50%);
    backdrop-filter: blur(16px);
}

@media (max-width: 360px) {
    .mh5-delivery-qr-layout {
        grid-template-columns: 1fr;
    }

    .mh5-delivery-qr-media {
        justify-content: flex-start;
    }
}

.mh5-delivery-bottom-link {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 62px;
    padding: 10px 6px;
    border-radius: 20px;
    color: #5c3a2a;
    font-size: 0.72rem;
    font-weight: 800;
}

.mh5-delivery-bottom-link.is-active {
    color: #e85e36;
    background: linear-gradient(135deg, rgba(255, 149, 93, 0.18) 0%, rgba(241, 98, 57, 0.14) 100%);
}

.mh5-delivery-bottom-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.mh5-delivery-empty {
    padding: 30px 18px;
    text-align: center;
    color: rgba(99, 71, 55, 0.8);
}

.mh5-delivery-map-link {
    color: #dd5c33;
    font-weight: 800;
}

.mh5-delivery-split {
    display: grid;
    gap: 14px;
}

.mh5-delivery-history-item {
    padding: 16px;
}

.mh5-delivery-label {
    color: rgba(109, 74, 53, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mh5-delivery-proof-note {
    color: rgba(112, 77, 58, 0.82);
    font-size: 0.84rem;
}

.mh5-delivery-hide-desktop {
    display: none;
}

.mh5-delivery-loading-shell {
    min-height: 100vh;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

.mh5-delivery-loading-card {
    overflow: hidden;
}

.mh5-delivery-loading-head {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 84px;
    gap: 14px;
    align-items: center;
}

.mh5-delivery-loading-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.mh5-delivery-loading-lines {
    display: grid;
    gap: 10px;
}

.mh5-delivery-loading-line {
    height: 12px;
    border-radius: 999px;
}

.mh5-delivery-loading-line.sm {
    width: 40%;
}

.mh5-delivery-loading-line.md {
    width: 62%;
}

.mh5-delivery-loading-line.lg {
    width: 78%;
}

.mh5-delivery-loading-line.xl {
    width: 88%;
    height: 18px;
}

.mh5-delivery-loading-pill {
    width: 84px;
    height: 36px;
    border-radius: 999px;
}

.mh5-delivery-loading-pill.small {
    width: 64px;
    height: 28px;
}

.mh5-delivery-loading-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mh5-delivery-loading-chip {
    width: 96px;
    height: 34px;
    border-radius: 999px;
}

.mh5-delivery-loading-hero {
    display: grid;
    gap: 14px;
    padding: 20px;
    margin-bottom: 16px;
    background:
        radial-gradient(circle at top right, rgba(255, 167, 110, 0.3), transparent 34%),
        linear-gradient(135deg, rgba(255, 249, 244, 0.96) 0%, rgba(255, 241, 232, 0.95) 100%);
}

.mh5-delivery-loading-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.mh5-delivery-loading-stat {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.mh5-delivery-loading-list {
    display: grid;
    gap: 14px;
}

.mh5-delivery-loading-order {
    padding: 18px;
}

.mh5-delivery-loading-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mh5-delivery-loading-label {
    margin-top: 16px;
    text-align: center;
    color: rgba(105, 73, 53, 0.82);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.mh5-delivery-shimmer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(242, 225, 214, 0.95) 0%, rgba(255, 249, 244, 1) 48%, rgba(242, 225, 214, 0.95) 100%);
    background-size: 220% 100%;
    animation: mh5DeliveryShimmer 1.5s linear infinite;
}

@keyframes mh5DeliveryShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -20% 0;
    }
}

.mh5-delivery-auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: rgba(101, 72, 53, 0.85);
    font-size: 0.88rem;
    font-weight: 700;
}

.mh5-delivery-auth-footer a {
    color: #de6036;
    font-weight: 900;
}

.mh5-delivery-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.mh5-delivery-form-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mh5-delivery-helper {
    padding: 12px 14px;
    border: 1px dashed rgba(226, 154, 110, 0.46);
    border-radius: 16px;
    background: rgba(255, 250, 246, 0.88);
    color: rgba(103, 71, 51, 0.84);
    font-size: 0.86rem;
    line-height: 1.45;
}

.mh5-delivery-btn-secondary {
    min-height: 54px;
    padding-left: 16px;
    padding-right: 16px;
    white-space: nowrap;
}

.mh5-delivery-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(231, 178, 143, 0.5);
    border-radius: 18px;
    background: rgba(255, 252, 249, 0.94);
    color: #43281d;
    font-size: 0.9rem;
    font-weight: 800;
}

.mh5-delivery-check input {
    width: 18px;
    height: 18px;
}

.mh5-delivery-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mh5-delivery-upload {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px dashed rgba(226, 154, 110, 0.46);
    border-radius: 18px;
    background: rgba(255, 252, 249, 0.92);
    color: rgba(84, 54, 37, 0.88);
    font-size: 0.84rem;
    font-weight: 800;
}

.mh5-delivery-upload input {
    width: 100%;
    font-size: 0.78rem;
}

body[data-route-path^="/delivery"] .whatsapp-chat-button {
    display: none !important;
}

@media (max-width: 370px) {
    .mh5-delivery-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mh5-delivery-grid.stats {
        grid-template-columns: 1fr;
    }

    .mh5-delivery-inline-actions {
        grid-template-columns: 1fr;
    }

    .mh5-delivery-loading-grid,
    .mh5-delivery-form-grid.two-up,
    .mh5-delivery-upload-grid,
    .mh5-delivery-auth-footer {
        flex-direction: column;
    }

    .mh5-delivery-loading-grid,
    .mh5-delivery-form-grid.two-up,
    .mh5-delivery-upload-grid {
        grid-template-columns: 1fr;
    }

    .mh5-delivery-loading-head {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .mh5-delivery-loading-pill {
        display: none;
    }

    .mh5-delivery-bottom-nav {
        width: calc(100vw - 14px);
        padding: 8px;
    }

    .mh5-delivery-bottom-link {
        min-height: 58px;
        font-size: 0.67rem;
    }
}
