/* MedTrack NC Public Stylesheet */

:root {
    --mt-navy: #00152c;
    --mt-navy-light: #002855;
    --mt-teal: #0096c7;
    --mt-teal-hover: #0077b6;
    --mt-cyan: #00d2ff;
    --mt-charcoal: #0f172a;
    --mt-slate: #334155;
    --mt-slate-muted: #475569;
    --mt-border: #cbd5e1;
    --mt-border-light: #e2e8f0;
    --mt-bg-light: #f8fafc;
    --mt-success: #059669;
    --mt-danger: #dc2626;
}

.medtrack-booking-wrapper {
    max-width: 980px;
    margin: 6px auto 10px auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--mt-charcoal);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.medtrack-portal-wrapper,
.medtrack-driver-wrapper,
.medtrack-tracker-wrapper,
.medtrack-auth-wrapper {
    max-width: 980px;
    margin: 28px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--mt-charcoal);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* Remove excessive theme top & bottom spacing between Header, Content & Footer */
body .site-content,
body #content,
body #content.site-content,
body .ast-container,
body #primary,
body #primary.content-area,
body .site-main,
body #main,
body #main.site-main,
body article.ast-article-single,
body article.page,
body .entry-content,
body .entry-content > .elementor,
body:has(.medtrack-booking-wrapper) .site-content,
body:has(.medtrack-booking-wrapper) #content,
body:has(.medtrack-booking-wrapper) #primary,
body:has(.medtrack-booking-wrapper) .entry-content,
body:has(.medtrack-booking-wrapper) article,
body:has(.medtrack-booking-wrapper) .ast-container,
body:has(.medtrack-booking-wrapper) .site-main,
body:has(.medtrack-booking-wrapper) #main,
body:has(.medtrack-booking-wrapper) .elementor-section,
.page:has(.medtrack-booking-wrapper) .entry-content,
.page:has(.medtrack-booking-wrapper) .site-content,
.page:has(.medtrack-booking-wrapper) article {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Eliminate empty entry-header markup gap */
header.entry-header,
.entry-header.ast-no-title,
.entry-header.ast-header-without-markup {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure Elementor Location Header & Footer seamlessly abut page content */
header.elementor-location-header {
    margin-bottom: 0 !important;
}

footer.elementor-location-footer {
    margin-top: 0 !important;
}

/* Ensure no gap after last pre-footer element */
.elementor-element-88137a1,
.entry-content > .elementor:last-child {
    margin-bottom: 0 !important;
}

.medtrack-booking-wrapper *,
.medtrack-portal-wrapper *,
.medtrack-driver-wrapper *,
.medtrack-tracker-wrapper *,
.medtrack-auth-wrapper * {
    box-sizing: border-box !important;
}

/* Universal Theme Override & Reset against Astra, Elementor, Divi, etc. */
.medtrack-booking-wrapper h1,
.medtrack-booking-wrapper h2,
.medtrack-booking-wrapper h3,
.medtrack-booking-wrapper h4,
.medtrack-booking-wrapper h5,
.medtrack-booking-wrapper h6,
.medtrack-portal-wrapper h1,
.medtrack-portal-wrapper h2,
.medtrack-portal-wrapper h3,
.medtrack-portal-wrapper h4,
.medtrack-portal-wrapper h5,
.medtrack-portal-wrapper h6,
.medtrack-driver-wrapper h1,
.medtrack-driver-wrapper h2,
.medtrack-driver-wrapper h3,
.medtrack-driver-wrapper h4,
.medtrack-driver-wrapper h5,
.medtrack-driver-wrapper h6,
.medtrack-tracker-wrapper h1,
.medtrack-tracker-wrapper h2,
.medtrack-tracker-wrapper h3,
.medtrack-tracker-wrapper h4,
.medtrack-tracker-wrapper h5,
.medtrack-tracker-wrapper h6,
.medtrack-auth-wrapper h1,
.medtrack-auth-wrapper h2,
.medtrack-auth-wrapper h3,
.medtrack-auth-wrapper h4,
.medtrack-auth-wrapper h5,
.medtrack-auth-wrapper h6 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.medtrack-booking-wrapper p,
.medtrack-portal-wrapper p,
.medtrack-driver-wrapper p,
.medtrack-tracker-wrapper p,
.medtrack-auth-wrapper p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
}

.medtrack-booking-wrapper button,
.medtrack-portal-wrapper button,
.medtrack-driver-wrapper button,
.medtrack-tracker-wrapper button,
.medtrack-auth-wrapper button {
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Base Container Cards */
.medtrack-form-card {
    background: #ffffff !important;
    border: 1.5px solid var(--mt-border-light) !important;
    border-radius: 14px !important;
    padding: 16px 22px 14px 22px !important;
    box-shadow: 0 10px 30px -5px rgba(0, 21, 44, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
}

.medtrack-portal-card,
.tracker-result-card {
    background: #ffffff !important;
    border: 1.5px solid var(--mt-border-light) !important;
    border-radius: 14px !important;
    padding: 22px 24px !important;
    box-shadow: 0 10px 30px -5px rgba(0, 21, 44, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
}

.medtrack-form-header {
    display: block !important;
    text-align: center !important;
    margin-bottom: 12px !important;
}

.medtrack-form-header .header-icon {
    display: none !important;
}

.medtrack-form-header h2 {
    margin: 0 0 4px 0 !important;
    color: #00152c !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

.medtrack-form-header p {
    margin: 0 auto !important;
    max-width: 680px !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    line-height: 1.45 !important;
    text-align: center !important;
}

.form-required-note {
    font-size: 13.5px !important;
    color: #475569 !important;
    margin-bottom: 22px !important;
}

.req { 
    color: #dc2626 !important; 
    font-weight: 800 !important; 
    margin-left: 2px !important; 
}

.optional { 
    font-size: 12px !important; 
    color: #64748b !important; 
    font-weight: 600 !important; 
    margin-left: 4px !important; 
}

/* Modern Section Cards */
.medtrack-section-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 21, 44, 0.03) !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.medtrack-section-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 18px rgba(0, 21, 44, 0.05) !important;
}

.section-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.section-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.section-badge-icon svg {
    width: 17px;
    height: 17px;
}

.section-badge-icon.origin-icon {
    background: #ecfdf5;
    color: #047857;
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.12);
}

.section-badge-icon.dest-icon {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

.section-card-header h3 {
    margin: 0 0 2px 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.2px;
}

.section-card-header p {
    margin: 0;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.35;
    font-weight: 500;
}

/* 2-Column Route Endpoints Grid */
.medtrack-route-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 840px) {
    .medtrack-route-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Form Fields & Rows */
.form-field {
    margin-bottom: 11px !important;
}

.form-field label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

.form-row {
    display: flex !important;
    gap: 12px !important;
    align-items: stretch !important;
}

.form-row .form-field,
.form-row .form-group {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
        align-items: stretch !important;
    }
    .form-row .form-field,
    .form-row .form-group {
        width: 100% !important;
        flex: none !important;
    }
}

.field-error {
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 3px 0 0 0 !important;
}

/* High-Contrast Inputs, Selects & Textareas */
.medtrack-form input[type="text"],
.medtrack-form input[type="password"],
.medtrack-form input[type="email"],
.medtrack-form input[type="tel"],
.medtrack-form input[type="date"],
.medtrack-form select,
.medtrack-form textarea,
.medtrack-input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    line-height: normal !important;
    padding: 8px 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 14.5px !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    font-weight: 500 !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
}

.medtrack-form textarea {
    height: auto !important;
    min-height: 64px !important;
    padding: 9px 12px !important;
    font-family: inherit !important;
    resize: vertical !important;
    line-height: 1.45 !important;
}

.medtrack-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 42px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.medtrack-form input:hover,
.medtrack-form select:hover,
.medtrack-form textarea:hover {
    border-color: #94a3b8;
}

.medtrack-form input:focus,
.medtrack-form select:focus,
.medtrack-form textarea:focus,
.medtrack-input:focus {
    outline: none;
    border-color: #0096c7 !important;
    box-shadow: 0 0 0 3.5px rgba(0, 150, 199, 0.22) !important;
    background-color: #ffffff;
}

.medtrack-form input::placeholder,
.medtrack-form textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Dynamic Stop Card */
.medtrack-stop-row {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 16px;
    box-shadow: 0 2px 6px rgba(0, 21, 44, 0.03);
}

.medtrack-stop-row h5 {
    margin: 0;
    color: #00152c;
    font-size: 14px;
    font-weight: 800;
}

.btn-remove-stop {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-remove-stop:hover {
    background: #fca5a5;
    color: #7f1d1d;
    transform: translateY(-1px);
}

.stop-duplicate-warning {
    animation: fadeInWarning 0.25s ease-in-out;
}

@keyframes fadeInWarning {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.medtrack-form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

/* ========================================================
   Step Form Wizard (MedTrack Courier Pickup)
   ======================================================== */
.medtrack-stepper-container {
    position: relative;
    margin-bottom: 16px;
    padding: 4px 0 2px 0;
}

.medtrack-stepper-progress-track {
    position: absolute;
    top: 21px;
    left: 8%;
    right: 8%;
    height: 2.5px;
    background: #e2e8f0;
    z-index: 1;
    border-radius: 2px;
}

.medtrack-stepper-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mt-teal) 0%, var(--mt-cyan) 100%);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.medtrack-stepper-items {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    flex: 1;
    max-width: 25%;
    outline: none;
    transition: transform 0.15s ease;
}

.stepper-item:hover .stepper-circle {
    transform: scale(1.05);
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stepper-item .stepper-check {
    display: none;
}

.stepper-item.active .stepper-circle {
    border-color: #00d2ff;
    background: #00152c;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25), 0 3px 8px rgba(0, 21, 44, 0.2);
}

.stepper-item.completed .stepper-circle {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.22);
}

.stepper-item.completed .stepper-num {
    display: none;
}

.stepper-item.completed .stepper-check {
    display: block;
}

.stepper-text {
    margin-top: 5px;
}

.stepper-title {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    transition: color 0.2s ease;
}

.stepper-desc {
    display: block;
    font-size: 10.5px;
    color: #64748b;
    margin-top: 1px;
    font-weight: 500;
}

.stepper-item.active .stepper-title {
    color: #00152c;
    font-weight: 800;
}

.stepper-item.completed .stepper-title {
    color: #047857;
    font-weight: 800;
}

/* Step Status & Mini Total Banner */
.medtrack-step-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px -2px rgba(0, 21, 44, 0.04);
}

.step-badge-indicator {
    display: flex;
    align-items: center;
    gap: 9px;
}

.step-indicator-pill {
    background: #00152c;
    color: #00d2ff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 21, 44, 0.15);
}

.step-indicator-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #00152c;
    letter-spacing: -0.2px;
}

.step-live-estimate-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #eff6ff;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1.5px solid #93c5fd;
    box-shadow: 0 1px 4px rgba(0, 180, 216, 0.1);
}

.step-live-estimate-chip .chip-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.step-live-estimate-chip .chip-value {
    font-size: 14.5px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.2px;
}

/* Step Panes */
.medtrack-step-pane {
    display: none;
}

.medtrack-step-pane.active {
    display: block;
    animation: medtrackStepFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes medtrackStepFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Navigation Rows & Buttons */
.step-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1.5px solid #e2e8f0;
}

.medtrack-btn-prev {
    background: #ffffff;
    color: #1e293b !important;
    border: 1.5px solid #94a3b8;
    border-radius: 8px;
    padding: 10px 18px;
    height: 42px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.medtrack-btn-prev:hover {
    background: #f1f5f9;
    color: #0f172a !important;
    border-color: #64748b;
    transform: translateX(-2px);
}

.medtrack-btn-next {
    background: linear-gradient(135deg, #0096c7 0%, #0077b6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    height: 42px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 150, 199, 0.3);
    text-decoration: none;
}

.medtrack-btn-next:hover {
    background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 150, 199, 0.4);
}

.medtrack-btn-submit {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 11px 26px;
    height: 44px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.35);
    text-decoration: none;
}

.medtrack-btn-submit:hover {
    background: linear-gradient(135deg, #0096c7 0%, #023e8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 180, 216, 0.45);
}

.medtrack-btn-submit .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.medtrack-btn-submit .btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
}

.medtrack-btn-submit .btn-loader[style*="display: none"],
.medtrack-btn-submit .btn-loader[style*="display:none"] {
    display: none !important;
}

.medtrack-btn-submit.is-submitting .btn-loader,
.medtrack-btn-submit .btn-loader:not([style*="display: none"]):not([style*="display:none"]) {
    display: inline-flex;
}

.medtrack-btn-submit .btn-loader svg.spin,
.medtrack-btn-submit .btn-loader .spin {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
    animation: medtrackSpin 0.8s linear infinite;
    transform-origin: center center;
}

.medtrack-btn-submit .btn-loader span {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.2px;
}

.medtrack-btn-submit:disabled,
.medtrack-btn-submit[disabled],
.medtrack-btn-submit.is-submitting {
    opacity: 0.94;
    cursor: not-allowed;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.25);
}

@keyframes medtrackSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Validation Highlights */
.medtrack-form input.is-invalid,
.medtrack-form select.is-invalid,
.medtrack-form textarea.is-invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3.5px rgba(220, 38, 38, 0.2) !important;
}

/* ========================================================
   Step 4: Modern Review Summary Cards
   ======================================================== */
.medtrack-review-section {
    margin-bottom: 24px;
}

.review-intro {
    margin-bottom: 20px;
}

.review-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.review-intro h3 {
    font-size: 20px;
    font-weight: 800;
    color: #00152c;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.review-intro p {
    font-size: 14.5px;
    color: #334155;
    margin: 0;
    line-height: 1.55;
}

.medtrack-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
    align-items: stretch;
}

.review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.review-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* Color-coded top accent borders for instant visual orientation */
.review-card-facility {
    border-top: 3.5px solid #0284c7;
}

.review-card-route {
    border-top: 3.5px solid #10b981;
}

.review-card-schedule {
    border-top: 3.5px solid #f59e0b;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 13px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.review-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-card-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.review-card:hover .review-card-icon-badge {
    transform: scale(1.05);
}

.review-card-icon-badge.facility-badge {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.16);
}

.review-card-icon-badge.route-badge,
.review-card-icon-badge.origin-badge {
    background: linear-gradient(135deg, #ecfdf5 0%, #a7f3d0 100%);
    color: #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.16);
}

.review-card-icon-badge.package-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.16);
}

.review-card-title h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.2px;
}

.review-card-title .card-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 1px;
    letter-spacing: 0.2px;
}

.review-edit-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.18s ease;
}

.review-edit-btn:hover {
    background: #00152c;
    color: #00d2ff !important;
    border-color: #00152c;
    box-shadow: 0 2px 8px rgba(0, 21, 44, 0.18);
    transform: translateY(-1px);
}

.review-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

/* ========================================================
   Hero Header Block inside Cards
   ======================================================== */
.review-hero-group {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-entry {
    display: flex;
    flex-direction: column;
}

.entry-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 3px;
}

.entry-label svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.entry-val-primary {
    font-size: 14.5px;
    font-weight: 800;
    color: #00152c;
    line-height: 1.35;
    word-break: break-word;
}

.entry-val-secondary {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

/* ========================================================
   Clean Key-Value Meta Rows with Micro-Dividers
   ======================================================== */
.review-meta-group {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 2px 12px;
}

.review-meta-row {
    padding: 9px 0;
    border-bottom: 1px solid #f1f5f9;
}

.review-meta-row:last-child {
    border-bottom: none;
}

.review-meta-row.dual-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.review-meta-row.single-col {
    display: block;
}

.meta-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.entry-val {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
}

.entry-val.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    color: #334155;
}

.entry-val.val-email {
    color: #0284c7;
    word-break: break-all;
    font-weight: 700;
}

.item-type-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

/* ========================================================
   Service, Priority & Temp Badges
   ======================================================== */
.tile-badge-service {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    align-self: flex-start;
    line-height: 1.3;
}

.tile-badge-priority {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #fde68a;
    align-self: flex-start;
    line-height: 1.3;
}

.tile-badge-temp {
    display: inline-block;
    background: #ecfdf5;
    color: #047857;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    align-self: flex-start;
    line-height: 1.3;
}

.tile-val-handling {
    font-size: 12.5px;
    color: #475569;
    font-style: italic;
    line-height: 1.45;
    word-break: break-word;
    background: #f8fafc;
    border-radius: 6px;
    padding: 7px 10px;
    border-left: 3px solid #cbd5e1;
    margin-top: 2px;
}

/* ========================================================
   Timing Strip in Card 3 (Zero awkward wrapping)
   ======================================================== */
.review-timing-strip {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timing-col {
    flex: 1;
    min-width: 0;
}

.timing-divider {
    width: 1px;
    height: 34px;
    background: #cbd5e1;
    margin: 0 12px;
    flex-shrink: 0;
}

.timing-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #00152c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

/* ========================================================
   Route Itinerary Timeline in Card 2
   ======================================================== */
.route-timeline-flow {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 4px;
}

.route-endpoint-tile {
    border-radius: 12px;
    padding: 12px 14px;
    position: relative;
    transition: transform 0.18s ease;
}

.origin-tile {
    background: linear-gradient(145deg, #f0fdf4 0%, #f7fee7 100%);
    border: 1.5px solid #bbf7d0;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.06);
}

.dest-tile {
    background: linear-gradient(145deg, #fef2f2 0%, #fff1f2 100%);
    border: 1.5px solid #fecaca;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.06);
}

.endpoint-header {
    margin-bottom: 6px;
}

.endpoint-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.origin-tag {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.dest-tag {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.dot-beacon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.green-beacon {
    background: #10b981;
    box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.3);
}

.red-beacon {
    background: #ef4444;
    box-shadow: 0 0 0 2.5px rgba(239, 68, 68, 0.3);
}

.endpoint-address {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
}

.endpoint-contact {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(100, 116, 139, 0.22);
    font-weight: 500;
}

.route-connector-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2px 0;
    position: relative;
}

.connector-track {
    width: 2px;
    height: 10px;
    background: repeating-linear-gradient(to bottom, #94a3b8 0, #94a3b8 3px, transparent 3px, transparent 6px);
}

.connector-stops-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 3.5px 11px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.connector-stops-badge svg {
    color: #0284c7;
}

/* Backwards compatibility for older markup if referenced */
.review-tile {
    background: #f8fafc;
    border: 1.5px solid #f1f5f9;
    border-radius: 10px;
    padding: 11px 13px;
    margin-bottom: 10px;
}

.review-tile:last-child {
    margin-bottom: 0;
}

.tile-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 3px;
}

.tile-val {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
}

.tile-val-highlight {
    font-size: 15px;
    font-weight: 800;
    color: #00152c;
    line-height: 1.35;
    word-break: break-word;
}

.tile-val-email {
    color: #0369a1;
    font-weight: 700;
    word-break: break-all;
}

.review-tile-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 10px;
}

.review-tile-split .review-tile {
    margin-bottom: 0;
}

/* ========================================================
   Live Estimate Box (Compact Premium Healthcare Dark Theme)
   ======================================================== */
.medtrack-estimate-box {
    background: linear-gradient(145deg, #00152c 0%, #002247 55%, #00152c 100%);
    border: 1px solid rgba(0, 210, 255, 0.22);
    border-top: 3px solid #00d2ff;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 18px 0;
    color: #ffffff;
    box-shadow: 0 14px 32px -8px rgba(0, 21, 44, 0.35), 0 0 20px rgba(0, 210, 255, 0.06);
}

.estimate-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.est-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.est-icon-shield {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.est-icon-shield svg {
    width: 16px;
    height: 16px;
}

.estimate-header-row h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.est-header-sub {
    margin: 1px 0 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
}

.est-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(0, 210, 255, 0.12);
    color: #00d2ff;
    padding: 3px 9px;
    border-radius: 12px;
    border: 1px solid rgba(0, 210, 255, 0.35);
    line-height: 1.2;
}

.est-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00d2ff;
    box-shadow: 0 0 6px #00d2ff;
    display: inline-block;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
}

.estimate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    font-size: 13px;
}

.est-line {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 11px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-height: 50px;
    box-sizing: border-box;
}

.est-line:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 210, 255, 0.25);
}

.est-label {
    display: block;
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.est-line strong,
.est-val-num {
    font-size: 13px;
    font-weight: 750;
    color: #ffffff;
    line-height: 1.25;
    word-break: break-word;
}

@media (min-width: 901px) {
    .estimate-grid .est-line:last-child {
        grid-column: span 2;
    }
}

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

.estimate-total-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-info-col .total-caption {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.total-info-col .total-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.total-info-col .total-note svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.total-amount-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.total-amount {
    font-size: 26px;
    font-weight: 900;
    color: #00d2ff;
    letter-spacing: -0.4px;
    line-height: 1;
    text-shadow: 0 0 16px rgba(0, 210, 255, 0.35);
}

.est-mileage-pill {
    display: inline-block;
    background: rgba(0, 210, 255, 0.15);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.35);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.estimate-disclaimer-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 7px 11px;
    margin-top: 10px;
}

.estimate-disclaimer-card svg {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.estimate-disclaimer-card p {
    margin: 0;
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.4;
}

/* Test Mode Notice Banner */
.medtrack-test-mode-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    padding: 12px 18px;
    margin: 18px 0 24px 0;
    color: #92400e;
    font-size: 13.5px;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}

.medtrack-test-mode-notice .test-mode-pill {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 14px;
    flex-shrink: 0;
}

.medtrack-test-mode-notice .test-mode-text {
    font-weight: 600;
}

/* ========================================================
   Confirmation / Success State Presentation
   ======================================================== */
.medtrack-success-box {
    margin: 10px 0 20px 0;
    animation: mtFadeScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mtFadeScaleIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.medtrack-success-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 44px 36px 36px 36px;
    text-align: center;
    box-shadow: 0 14px 35px -10px rgba(0, 21, 44, 0.08);
    position: relative;
    overflow: hidden;
}

.medtrack-success-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #00b4d8 50%, #10b981 100%);
}

.medtrack-success-badge-icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.45);
}

.medtrack-success-badge-icon .success-icon-pulse {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.35);
    animation: mtSuccessPulse 2.4s infinite ease-out;
}

@keyframes mtSuccessPulse {
    0% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.96);
        opacity: 0.8;
    }
}

.medtrack-success-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.status-test-mode-chip {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 800;
    margin-left: 4px;
}

.portal-pay.pay-test_mode {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.medtrack-success-status-tag .status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.medtrack-booking-wrapper .medtrack-success-card .medtrack-success-heading,
.medtrack-success-heading {
    font-size: 25px !important;
    font-weight: 800 !important;
    color: #00152c !important;
    margin: 0 auto 24px auto !important;
    line-height: 1.3 !important;
    letter-spacing: -0.3px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.medtrack-booking-wrapper .medtrack-success-card p.medtrack-success-message,
.medtrack-booking-wrapper p.medtrack-success-message,
p.medtrack-success-message,
.medtrack-success-message {
    text-align: center !important;
    font-size: 15px !important;
    color: #475569 !important;
    max-width: 640px !important;
    margin: 0 auto 28px auto !important;
    line-height: 1.6 !important;
    display: block !important;
    width: 100% !important;
}

.medtrack-booking-wrapper .medtrack-success-card .medtrack-trip-ref-banner,
.medtrack-trip-ref-banner {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1.5px solid #bae6fd !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    margin: 0 auto 32px auto !important;
    max-width: 100% !important;
}

.trip-ref-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.trip-ref-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0284c7;
    letter-spacing: 0.5px;
}

.success-trip-badge {
    font-size: 16.5px;
    font-weight: 800;
    color: #0369a1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.btn-copy-trip-id {
    background: #ffffff;
    border: 1px solid #7dd3fc;
    color: #0284c7;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-copy-trip-id:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.btn-copy-trip-id.is-copied {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* 3 Dispatch Progress Steps */
.medtrack-success-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0 auto 34px auto;
    max-width: 780px;
    text-align: left;
}

.success-step-card {
    border-radius: 12px;
    padding: 16px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s;
}

.success-step-card.is-done {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.success-step-card.is-done .step-card-num {
    background: #10b981;
    color: #ffffff;
}

.success-step-card.is-current {
    border-color: #7dd3fc;
    background: #f0f9ff;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.08);
}

.success-step-card.is-current .step-card-num {
    background: #00b4d8;
    color: #ffffff;
}

.success-step-card.is-upcoming {
    border-color: #e2e8f0;
    background: #f8fafc;
    opacity: 0.85;
}

.success-step-card.is-upcoming .step-card-num {
    background: #e2e8f0;
    color: #64748b;
}

.step-card-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.step-card-content h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #00152c;
    margin: 0 0 4px 0;
}

.step-card-content p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Success Action Buttons */
.success-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.medtrack-btn-submit-another,
#btn-submit-another {
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 180, 216, 0.35) !important;
    border-radius: 10px !important;
    padding: 13px 26px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    transition: all 0.22s ease !important;
    box-shadow: 0 4px 14px rgba(0, 21, 44, 0.18) !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    outline: none !important;
}

.medtrack-btn-submit-another:hover,
#btn-submit-another:hover {
    background: linear-gradient(135deg, #002855 0%, #003a73 100%) !important;
    border-color: #00b4d8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(0, 180, 216, 0.28) !important;
    color: #ffffff !important;
}

.medtrack-btn-submit-another:active,
#btn-submit-another:active {
    transform: translateY(0) !important;
}

.medtrack-btn-track-action,
#success-track-btn {
    background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px 26px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    transition: all 0.22s ease !important;
    box-shadow: 0 6px 18px rgba(0, 180, 216, 0.35) !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}

.medtrack-btn-track-action:hover,
#success-track-btn:hover {
    background: linear-gradient(135deg, #0096c7 0%, #0077b6 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 9px 24px rgba(0, 180, 216, 0.45) !important;
    color: #ffffff !important;
}

.medtrack-btn-pay,
#success-pay-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px 26px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    transition: all 0.22s ease !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.medtrack-btn-pay:hover,
#success-pay-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 9px 24px rgba(16, 185, 129, 0.45) !important;
    color: #ffffff !important;
}

/* ========================================================
   Responsive Breakpoints & Mobile Optimization
   ======================================================== */
@media (max-width: 960px) {
    .medtrack-booking-wrapper {
        margin: 18px auto;
        padding: 0 20px;
    }

    .medtrack-review-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 840px) {
    .medtrack-form-card {
        padding: 22px 18px !important;
    }

    .medtrack-route-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stepper-desc {
        display: none !important;
    }

    .stepper-circle {
        width: 34px !important;
        height: 34px !important;
        font-size: 13px !important;
    }

    .stepper-title {
        font-size: 12px !important;
    }

    .medtrack-stepper-progress-track {
        top: 26px !important;
    }
}

/* ========================================================
   Mobile Optimization (Phones & Small Viewports)
   Strict 20px left/right padding, compact & user-friendly
   ======================================================== */
@media (max-width: 768px) {
    .medtrack-booking-wrapper {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        margin-top: 10px !important;
        margin-bottom: 24px !important;
        margin-left: calc((100% - (100vw - 40px)) / 2) !important;
        margin-right: calc((100% - (100vw - 40px)) / 2) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    .medtrack-form-card {
        padding: 16px 14px !important;
        border-radius: 14px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 18px rgba(0, 21, 44, 0.05) !important;
        box-sizing: border-box !important;
    }

    /* Form Header - Crisp & Compact */
    .medtrack-form-header {
        display: block !important;
        text-align: center !important;
        margin-bottom: 12px !important;
    }

    .medtrack-form-header .header-icon {
        display: none !important;
    }

    .medtrack-form-header h2 {
        font-size: 18px !important;
        line-height: 1.25 !important;
        margin: 0 0 4px 0 !important;
        font-weight: 800 !important;
        color: #00152c !important;
        letter-spacing: -0.3px !important;
        text-align: center !important;
    }

    .medtrack-form-header p {
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: #64748b !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    /* Stepper Progress Bar */
    .medtrack-stepper-container {
        margin-bottom: 12px !important;
        padding: 2px 0 4px 0 !important;
    }

    .medtrack-stepper-progress-track {
        top: 15px !important;
        height: 2px !important;
        left: 12% !important;
        right: 12% !important;
    }

    .stepper-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 11.5px !important;
        font-weight: 800 !important;
    }

    .stepper-text {
        margin-top: 3px !important;
    }

    .stepper-title {
        font-size: 10.5px !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
    }

    .stepper-desc {
        display: none !important;
    }

    /* Step Status & Live Total Bar - Sleek Single Compact Row */
    .medtrack-step-banner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        margin-bottom: 12px !important;
        border-radius: 9px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 3px rgba(0, 21, 44, 0.03) !important;
        box-sizing: border-box !important;
    }

    .step-badge-indicator {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .step-indicator-pill {
        font-size: 9.5px !important;
        padding: 3px 7px !important;
        border-radius: 5px !important;
        letter-spacing: 0.3px !important;
        white-space: nowrap !important;
        font-weight: 800 !important;
        flex-shrink: 0 !important;
        background: #00152c !important;
        color: #00d2ff !important;
    }

    .step-indicator-title {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #00152c !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }

    .step-live-estimate-chip {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px 8px !important;
        border-radius: 7px !important;
        background: #e0f2fe !important;
        border: 1px solid #bae6fd !important;
        flex-shrink: 0 !important;
        width: auto !important;
    }

    .step-live-estimate-chip .chip-label {
        display: none !important;
    }

    .step-live-estimate-chip .chip-value {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #0284c7 !important;
    }

    .step-live-estimate-chip .chip-distance {
        font-size: 10px !important;
        font-weight: 700 !important;
        padding: 1px 4px !important;
        border-radius: 4px !important;
        background: #ffffff !important;
        color: #0369a1 !important;
    }

    /* Section Cards - Compact Container */
    .medtrack-section-card {
        padding: 12px 12px !important;
        margin-bottom: 10px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 21, 44, 0.02) !important;
        box-sizing: border-box !important;
    }

    .section-card-header {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding-bottom: 10px !important;
        margin-bottom: 12px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .section-badge-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 9px !important;
        flex-shrink: 0 !important;
    }

    .section-badge-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .section-card-header h3 {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #00152c !important;
        margin: 0 !important;
        line-height: 1.25 !important;
        letter-spacing: -0.2px !important;
    }

    .section-card-header p {
        font-size: 13px !important;
        line-height: 1.35 !important;
        color: #64748b !important;
        margin: 2px 0 0 0 !important;
    }

    /* Form Fields & Rows */
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
        align-items: stretch !important;
    }

    .form-row .form-field,
    .form-row .form-group,
    .form-field,
    .form-group {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 10px !important;
    }

    .form-field label {
        white-space: normal !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
        color: #1e293b !important;
        display: block !important;
    }

    .medtrack-form input[type="text"],
    .medtrack-form input[type="password"],
    .medtrack-form input[type="email"],
    .medtrack-form input[type="tel"],
    .medtrack-form input[type="date"],
    .medtrack-form select {
        height: 42px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        padding: 0 12px !important;
        border: 1px solid #cbd5e1 !important;
        box-sizing: border-box !important;
    }

    .medtrack-form select {
        padding-right: 32px !important;
        background-size: 14px 14px !important;
    }

    .medtrack-form textarea {
        min-height: 60px !important;
        padding: 8px 12px !important;
        font-size: 16px !important;
        line-height: 1.35 !important;
        border-radius: 8px !important;
        border: 1px solid #cbd5e1 !important;
        box-sizing: border-box !important;
    }

    .field-error {
        font-size: 10.5px !important;
        margin-top: 2px !important;
    }

    /* Live Route & Distance Calculation Card */
    .medtrack-route-estimate-card {
        padding: 10px 10px !important;
        margin-top: 10px !important;
        border-radius: 9px !important;
    }

    .medtrack-route-estimate-card > div:first-child {
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
        gap: 8px !important;
    }

    #step2-route-metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
    }

    #step2-route-metrics-grid > div {
        padding: 8px 10px !important;
        border-radius: 7px !important;
    }

    #step2-metric-distance,
    #step2-metric-duration,
    #step2-metric-price {
        font-size: 18px !important;
    }

    /* Step Navigation Buttons - Up/Down Stacked for Mobile */
    .step-nav-row {
        display: flex !important;
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        margin-top: 12px !important;
        padding-top: 10px !important;
        border-top: 1px solid #f1f5f9 !important;
    }

    .step-nav-left,
    .step-nav-right {
        width: 100% !important;
        flex: none !important;
        display: flex !important;
    }

    .step-nav-left:empty,
    .step-nav-left:not(:has(*)) {
        display: none !important;
    }

    .medtrack-btn-next,
    .medtrack-btn-submit {
        width: 100% !important;
        height: 44px !important;
        padding: 0 16px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        white-space: normal !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .medtrack-btn-submit .btn-loader {
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .medtrack-btn-submit .btn-loader[style*="display: none"],
    .medtrack-btn-submit .btn-loader[style*="display:none"] {
        display: none !important;
    }

    .medtrack-btn-submit.is-submitting .btn-loader,
    .medtrack-btn-submit .btn-loader:not([style*="display: none"]):not([style*="display:none"]) {
        display: inline-flex !important;
    }

    .medtrack-btn-submit .btn-loader svg.spin {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0 !important;
        animation: medtrackSpin 0.8s linear infinite !important;
    }

    .medtrack-btn-submit .btn-loader span {
        font-size: 14px !important;
        font-weight: 700 !important;
        letter-spacing: -0.2px !important;
        color: #ffffff !important;
        line-height: 1 !important;
    }

    .medtrack-btn-prev {
        width: 100% !important;
        height: 38px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        white-space: normal !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Review & Estimation Step 4 */
    .review-intro {
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
    }

    .review-intro h3 {
        font-size: 14px !important;
        margin-bottom: 3px !important;
    }

    .review-intro p {
        font-size: 11px !important;
        line-height: 1.35 !important;
    }

    .medtrack-review-grid {
        gap: 8px !important;
    }

    .review-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
    }

    .review-card-header {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }

    .review-hero-group,
    .review-timing-strip {
        padding: 10px 11px !important;
        border-radius: 10px !important;
    }

    .timing-val {
        font-size: 12.5px !important;
    }

    .timing-divider {
        margin: 0 8px !important;
        height: 28px !important;
    }

    .entry-label {
        font-size: 10px !important;
    }

    .entry-val-primary {
        font-size: 13.5px !important;
    }

    .entry-val,
    .entry-val-secondary {
        font-size: 12px !important;
    }

    .review-tile {
        margin-bottom: 5px !important;
    }

    .tile-label {
        font-size: 10px !important;
    }

    .tile-val,
    .tile-val-highlight {
        font-size: 12.5px !important;
    }

    /* Live Estimate Breakdown Box (Step 4) */
    .medtrack-estimate-box {
        padding: 14px 12px !important;
        margin: 12px 0 10px 0 !important;
        border-radius: 12px !important;
    }

    .estimate-header-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .est-header-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .est-icon-shield {
        width: 28px !important;
        height: 28px !important;
        border-radius: 7px !important;
        flex-shrink: 0 !important;
    }

    .est-icon-shield svg {
        width: 16px !important;
        height: 16px !important;
    }

    .estimate-header-row h3 {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        line-height: 1.25 !important;
        margin: 0 !important;
    }

    .est-header-sub {
        font-size: 11px !important;
        line-height: 1.3 !important;
        color: #94a3b8 !important;
        margin: 2px 0 0 0 !important;
    }

    .est-header-right {
        width: 100% !important;
    }

    .est-badge-live {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 0.4px !important;
        padding: 3px 9px !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }

    .est-pulse-dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* 2-Column Clean Breakdown Grid */
    .estimate-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-auto-flow: dense !important;
        gap: 6px !important;
    }

    .est-line {
        padding: 7px 9px !important;
        border-radius: 7px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .est-line:first-child, /* Service Level */
    #est-distance-line,    /* Total Driving Distance & Duration */
    .est-line:last-child {  /* Out-of-Area Mileage */
        grid-column: 1 / -1 !important;
    }

    .est-label {
        font-size: 9.5px !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        margin-bottom: 2px !important;
        color: #94a3b8 !important;
    }

    .est-line strong,
    .est-val-num {
        font-size: 12.5px !important;
        font-weight: 800 !important;
        line-height: 1.3 !important;
        color: #ffffff !important;
    }

    /* Total Row */
    .estimate-total-row {
        margin-top: 12px !important;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .total-info-col .total-caption {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        line-height: 1.25 !important;
    }

    .total-info-col .total-note {
        font-size: 10px !important;
        color: #94a3b8 !important;
        margin-top: 2px !important;
        gap: 4px !important;
    }

    .total-info-col .total-note svg {
        width: 12px !important;
        height: 12px !important;
        flex-shrink: 0 !important;
    }

    .total-amount-display {
        align-items: flex-end !important;
    }

    .total-amount {
        font-size: 24px !important;
        font-weight: 900 !important;
        color: #00d2ff !important;
        line-height: 1.1 !important;
        text-shadow: 0 0 14px rgba(0, 210, 255, 0.35) !important;
    }

    .est-mileage-pill {
        font-size: 9.5px !important;
        padding: 2px 7px !important;
        border-radius: 8px !important;
        margin-top: 3px !important;
    }

    /* Disclaimer */
    .estimate-disclaimer-card {
        padding: 8px 10px !important;
        margin-top: 10px !important;
        gap: 7px !important;
        border-radius: 7px !important;
    }

    .estimate-disclaimer-card svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
        margin-top: 1px !important;
    }

    .estimate-disclaimer-card p {
        font-size: 10.5px !important;
        line-height: 1.35 !important;
        color: #94a3b8 !important;
        margin: 0 !important;
    }

    /* Payment Test Mode Notice Banner */
    .medtrack-test-mode-notice {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        padding: 10px 12px !important;
        margin: 10px 0 12px 0 !important;
        border-radius: 9px !important;
        border: 1px solid #fde68a !important;
        background: #fffbeb !important;
        box-sizing: border-box !important;
    }

    .medtrack-test-mode-notice .test-mode-pill {
        display: inline-flex !important;
        align-items: center !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 0.4px !important;
        padding: 3px 9px !important;
        border-radius: 12px !important;
    }

    .medtrack-test-mode-notice .test-mode-text {
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        color: #92400e !important;
    }

    /* When booking success panel is active, hide wizard header, stepper & step banner */
    .medtrack-booking-wrapper:has(#medtrack-booking-success:not([style*="display: none"])) .medtrack-form-header,
    .medtrack-booking-wrapper:has(#medtrack-booking-success:not([style*="display: none"])) .medtrack-stepper-container,
    .medtrack-booking-wrapper:has(#medtrack-booking-success:not([style*="display: none"])) .medtrack-step-banner {
        display: none !important;
    }

    /* Success Confirmation Screen Mobile Refinement (Strict 20px padding) */
    .medtrack-success-box {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .medtrack-success-card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 6px 2px 10px 2px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .medtrack-success-card::before {
        display: none !important;
    }

    .medtrack-success-badge-icon {
        width: 60px !important;
        height: 60px !important;
        margin: 4px auto 14px auto !important;
    }

    .medtrack-success-badge-icon svg {
        width: 28px !important;
        height: 28px !important;
    }

    .medtrack-success-status-tag {
        font-size: 10.5px !important;
        padding: 4px 10px !important;
        margin-bottom: 12px !important;
        gap: 6px !important;
    }

    .status-test-mode-chip {
        font-size: 9.5px !important;
        padding: 2px 6px !important;
    }

    .medtrack-booking-wrapper .medtrack-success-card .medtrack-success-heading,
    .medtrack-success-card .medtrack-success-heading,
    .medtrack-success-heading {
        font-size: 17px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        margin: 0 auto 8px auto !important;
        color: #00152c !important;
        padding: 0 4px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

    .medtrack-booking-wrapper .medtrack-success-card p.medtrack-success-message,
    .medtrack-booking-wrapper p.medtrack-success-message,
    .medtrack-success-card p.medtrack-success-message,
    p.medtrack-success-message,
    .medtrack-success-message {
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        margin: 0 auto 12px auto !important;
        color: #475569 !important;
        padding: 0 4px !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Trip Reference Banner - Full Width & Clean Alignment */
    .medtrack-booking-wrapper .medtrack-success-card .medtrack-trip-ref-banner,
    .medtrack-success-card .medtrack-trip-ref-banner,
    .medtrack-trip-ref-banner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 8px 12px !important;
        margin: 0 auto 12px auto !important;
        border-radius: 9px !important;
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
        border: 1.5px solid #bae6fd !important;
        box-sizing: border-box !important;
        gap: 8px !important;
    }

    .trip-ref-meta {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .trip-ref-label {
        font-size: 9.5px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        color: #0284c7 !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 2px !important;
    }

    .success-trip-badge {
        font-size: 13.5px !important;
        font-weight: 800 !important;
        color: #0369a1 !important;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .btn-copy-trip-id {
        height: 32px !important;
        padding: 0 10px !important;
        font-size: 11.5px !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    /* Next Steps Micro-Cards */
    .medtrack-success-steps-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        margin-bottom: 14px !important;
    }

    .success-step-card {
        padding: 9px 10px !important;
        border-radius: 8px !important;
        gap: 8px !important;
        display: flex !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .step-card-num {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
    }

    .step-card-content h4 {
        font-size: 12.5px !important;
        font-weight: 800 !important;
        margin: 0 0 2px 0 !important;
    }

    .step-card-content p {
        font-size: 11px !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        color: #64748b !important;
    }

    .success-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }

    .medtrack-btn-track-action,
    .medtrack-btn-submit-another,
    .medtrack-btn-pay {
        height: 42px !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        padding: 0 14px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .medtrack-booking-wrapper {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        margin-left: calc((100% - (100vw - 40px)) / 2) !important;
        margin-right: calc((100% - (100vw - 40px)) / 2) !important;
        margin-top: 6px !important;
        margin-bottom: 16px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    .medtrack-form-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
    }

    .medtrack-stepper-container {
        padding: 2px 0 2px 0 !important;
    }

    .stepper-circle {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    .medtrack-stepper-progress-track {
        top: 14px !important;
    }

    .stepper-title {
        font-size: 9.5px !important;
    }

    .medtrack-step-banner {
        padding: 6px 8px !important;
    }

    .step-indicator-title {
        font-size: 11.5px !important;
    }

    .step-live-estimate-chip .chip-value {
        font-size: 12.5px !important;
    }
}

/* Mapbox Autocomplete Dropdown */
.medtrack-mapbox-wrap {
    position: relative;
    width: 100%;
}

.medtrack-mapbox-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 21, 44, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 99999;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    padding: 4px 0;
}

.medtrack-mapbox-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.1s ease;
}

.medtrack-mapbox-item:last-child {
    border-bottom: none;
}

.medtrack-mapbox-item:hover,
.medtrack-mapbox-item.active {
    background-color: #f0f9ff;
}

.medtrack-mapbox-item-icon {
    color: var(--mt-teal);
    flex-shrink: 0;
    margin-top: 2px;
}

.medtrack-mapbox-item-text {
    display: flex;
    flex-direction: column;
}

.medtrack-mapbox-item-main {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}

.medtrack-mapbox-item-sub {
    font-size: 12px;
    color: #475569;
    margin-top: 2px;
}

.medtrack-mapbox-attribution {
    font-size: 10.5px;
    color: #475569;
    font-weight: 600;
    text-align: right;
    padding: 5px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Success Card */
.medtrack-success-box {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    margin-bottom: 16px;
}

.success-trip-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 16px;
    margin: 8px 0 16px 0;
}

/* Driver Mobile Workspace */
.driver-header-card {
    background: var(--mt-navy);
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.driver-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-avatar {
    font-size: 32px;
}

.driver-badge {
    background: rgba(0, 180, 216, 0.2);
    color: var(--mt-cyan);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.driver-trip-card {
    background: #ffffff;
    border: 1px solid var(--mt-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.trip-stat-card {
    border: 2px solid #ef4444;
    background: #fffafa;
}

.trip-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trip-num {
    font-weight: 800;
    font-size: 18px;
    color: var(--mt-navy);
    margin-right: 8px;
}

.trip-prio {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.prio-stat {
    background: #fee2e2;
    color: #b91c1c;
}

.trip-stop-block {
    background: var(--mt-bg-light);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.stop-indicator {
    font-size: 10px;
    font-weight: 800;
    color: var(--mt-slate);
    letter-spacing: 0.5px;
}

.trip-stop-block h5 {
    margin: 4px 0 2px 0;
    font-size: 16px;
    color: var(--mt-navy);
}

.address-text {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 500;
}

.btn-navigate {
    display: inline-block;
    background: var(--mt-navy);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    margin-top: 6px;
}

.driver-actions-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.btn-action-status,
.btn-open-pod-modal {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary { background: var(--mt-teal); color: #fff; }
.btn-secondary { background: var(--mt-navy); color: #fff; }
.btn-success { background: var(--mt-success); color: #fff; }

/* Signature Pad Canvas */
.signature-pad-wrapper {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    padding: 6px;
}

#pod-signature-canvas {
    max-width: 100%;
    touch-action: none;
    background: #ffffff;
    cursor: crosshair;
}

.sig-controls {
    margin-top: 6px;
}

/* Stepper for Tracker */
.tracker-stepper {
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
    position: relative;
}

.step-item {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-bullet {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px auto;
    font-weight: 700;
    font-size: 13px;
}

.step-done .step-bullet {
    background: var(--mt-teal);
    color: #ffffff;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.step-done .step-label {
    color: var(--mt-navy);
}

.tracker-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: var(--mt-bg-light);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

/* ─────────────────────────────────────────────────────────────
   First-Class Auth Card & Tabs Styles (Bulletproof High-Contrast)
───────────────────────────────────────────────────────────── */
.medtrack-auth-wrapper {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.medtrack-auth-wrapper *,
.medtrack-auth-wrapper *::before,
.medtrack-auth-wrapper *::after {
    box-sizing: border-box;
}

.medtrack-auth-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 40px 36px !important;
    box-shadow: 0 20px 40px -10px rgba(0, 21, 44, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    position: relative;
    box-sizing: border-box !important;
}

.auth-brand-head {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand-icon {
    width: 64px !important;
    height: 64px !important;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    border: 2px solid #00b4d8 !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 16px auto !important;
    box-shadow: 0 8px 24px -2px rgba(0, 180, 216, 0.35), 0 4px 12px rgba(0, 21, 44, 0.2) !important;
    transition: transform 0.2s ease;
}

.auth-brand-icon:hover {
    transform: translateY(-2px);
}

.auth-brand-icon svg {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.auth-brand-head h2 {
    margin: 0 0 8px 0 !important;
    font-size: 23px !important;
    color: #00152c !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.25 !important;
}

.auth-brand-head p {
    margin: 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* Bulletproof Tab Switcher (Guaranteed Light Surface & AAA Contrast) */
.medtrack-auth-tabs {
    display: flex !important;
    background: #f1f5f9 !important;
    padding: 5px !important;
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    margin-bottom: 26px !important;
    gap: 4px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
}

.auth-tab-btn {
    flex: 1 1 0% !important;
    background: transparent !important;
    border: none !important;
    padding: 10px 8px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    text-align: center !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

.auth-tab-btn:hover {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.auth-tab-btn.is-active {
    background: #ffffff !important;
    color: #00152c !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(0, 21, 44, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.is-active {
    display: block;
    animation: authFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-tab-intro {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-left: 4px solid #10b981 !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-bottom: 22px !important;
}

#tab-register-driver .auth-tab-intro {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-left: 4px solid #00b4d8 !important;
}

#tab-register-dispatcher .auth-tab-intro {
    background: #f5f3ff !important;
    border: 1px solid #ddd6fe !important;
    border-left: 4px solid #7c3aed !important;
}

@media (max-width: 560px) {
    .medtrack-auth-tabs {
        flex-direction: column !important;
        gap: 6px !important;
    }
    .auth-tab-btn {
        width: 100% !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }
}

.auth-tab-intro h4 {
    margin: 0 0 4px 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.auth-tab-intro p {
    margin: 0 !important;
    font-size: 12.5px !important;
    color: #475569 !important;
    line-height: 1.4 !important;
}

/* Explicit Form Inputs Inside Auth Card (High Specificity) */
.medtrack-auth-card .form-field {
    margin-bottom: 18px !important;
}

.medtrack-auth-card label {
    display: block !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
}

.medtrack-auth-card .label-with-aside {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px !important;
}

.medtrack-auth-card .label-with-aside label {
    margin-bottom: 0 !important;
}

.medtrack-auth-card .auth-forgot-link {
    font-size: 12.5px !important;
    color: #0284c7 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.15s ease !important;
}

.medtrack-auth-card .auth-forgot-link:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

.medtrack-auth-card input[type="text"],
.medtrack-auth-card input[type="password"],
.medtrack-auth-card input[type="email"],
.medtrack-auth-card input[type="tel"],
.medtrack-auth-card select {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    font-family: inherit !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.medtrack-auth-card input:focus,
.medtrack-auth-card select:focus {
    border-color: #00b4d8 !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.22) !important;
}

.medtrack-auth-card input::placeholder {
    color: #94a3b8 !important;
}

/* Bulletproof Centered Password Toggle Inside Input */
.medtrack-auth-card .password-input-wrap {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.medtrack-auth-card .password-input-wrap input {
    padding-right: 48px !important;
    margin: 0 !important;
}

.medtrack-auth-card .btn-toggle-password {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
    padding: 6px !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748b !important;
    cursor: pointer !important;
    z-index: 10 !important;
    border-radius: 6px !important;
    outline: none !important;
    line-height: 1 !important;
    transition: color 0.15s ease, background 0.15s ease !important;
}

.medtrack-auth-card .btn-toggle-password:hover {
    color: #00b4d8 !important;
    background: rgba(0, 180, 216, 0.08) !important;
}

.medtrack-auth-card .btn-toggle-password svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    pointer-events: none !important;
}

/* Checkbox Row */
.medtrack-auth-card .form-checkbox-row {
    margin: 4px 0 22px 0 !important;
}

.medtrack-auth-card .checkbox-container {
    font-size: 13.5px !important;
    color: #475569 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    user-select: none !important;
}

.medtrack-auth-card .checkbox-container input {
    width: 17px !important;
    height: 17px !important;
    accent-color: #00b4d8 !important;
    cursor: pointer !important;
    margin: 0 !important;
}

/* Premium MedTrack Action Button (Never Black) */
.medtrack-auth-card .medtrack-btn-submit {
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%) !important;
    color: #ffffff !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.38) !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    margin: 8px 0 0 0 !important;
    padding: 0 20px !important;
    transition: all 0.2s ease !important;
}

.medtrack-auth-card .medtrack-btn-submit:hover {
    background: linear-gradient(135deg, #00c0e8 0%, #0084c7 100%) !important;
    box-shadow: 0 6px 18px rgba(0, 180, 216, 0.48) !important;
    transform: translateY(-1px) !important;
}

.medtrack-auth-card .medtrack-btn-submit:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.28) !important;
}

.medtrack-auth-card .medtrack-btn-submit:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Alert Box */
.auth-alert-box {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Logged-In Card */
.medtrack-logged-in-card .auth-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.user-avatar-circle {
    width: 56px;
    height: 56px;
    background: var(--mt-navy);
    color: var(--mt-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
}

.auth-card-header h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    color: var(--mt-navy);
}

.auth-card-header p {
    margin: 0;
    font-size: 13px;
    color: var(--mt-slate);
}

.auth-role-badges {
    margin-bottom: 24px;
}

.auth-role-pill {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: 6px;
    text-transform: uppercase;
}

.logged-in-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.medtrack-btn-secondary {
    background: var(--mt-navy);
    color: #ffffff !important;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    display: block;
}

.medtrack-btn-logout {
    background: #f1f5f9;
    color: #475569 !important;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    display: block;
    font-size: 13px;
}

.medtrack-btn-logout:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   LIVE MEDICAL COURIER TRACKER STYLES (High-Contrast & Medical-Grade)
   ========================================================================== */

.medtrack-tracker-wrapper {
    max-width: 980px;
    margin: 20px auto 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #0f172a;
}

.medtrack-tracker-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 21, 44, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 32px 36px;
    box-sizing: border-box;
}

/* Tracker Header */
.tracker-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.tracker-header-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 21, 44, 0.2);
}

.tracker-header-text h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.4px;
}

.tracker-header-text p {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.45;
}

/* Unified High-Contrast Search Bar */
.tracker-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    align-items: stretch;
}

.tracker-search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.tracker-search-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.tracker-input {
    width: 100% !important;
    height: 50px !important;
    padding: 0 42px 0 48px !important;
    font-size: 15.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.tracker-input:focus {
    background: #ffffff !important;
    border-color: #0096c7 !important;
    outline: none !important;
    box-shadow: 0 0 0 3.5px rgba(0, 150, 199, 0.22) !important;
}

.tracker-clear-btn {
    position: absolute;
    right: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tracker-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.tracker-submit-btn {
    height: 50px !important;
    padding: 0 28px !important;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 21, 44, 0.2) !important;
    transition: all 0.2s ease !important;
}

.tracker-submit-btn:hover {
    background: linear-gradient(135deg, #002855 0%, #004080 100%) !important;
    box-shadow: 0 6px 16px rgba(0, 21, 44, 0.28) !important;
    transform: translateY(-1px);
}

.tracker-submit-btn:active {
    transform: translateY(0);
}

/* Initial State: Feature Grid */
.tracker-initial-state {
    padding: 12px 0;
}

.tracker-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tracker-feature-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.tracker-feature-item .feature-icon {
    font-size: 26px;
    line-height: 1;
}

.tracker-feature-item .feature-text {
    display: flex;
    flex-direction: column;
}

.tracker-feature-item .feature-text strong {
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 2px;
}

.tracker-feature-item .feature-text span {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
}

/* Error Notice Box */
.tracker-notice-box {
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tracker-notice-error {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
}

.notice-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #991b1b;
}

.notice-content p {
    margin: 0;
    font-size: 13.5px;
    color: #7f1d1d;
    line-height: 1.45;
}

.notice-content code {
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
}

/* Tracking Result Container */
.tracker-result-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 1. Hero Status Bar */
.tracker-hero-bar {
    background: linear-gradient(135deg, #00152c 0%, #002244 100%);
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 21, 44, 0.2);
}

.hero-meta-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #00d2ff;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.hero-trip-num-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hero-trip-number {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-copy-trip {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-copy-trip:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.hero-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tracker-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.tag-stat {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
}

.tag-routine {
    background: rgba(0, 180, 216, 0.2);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.tag-temp {
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-service {
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Hero Status Pill */
.hero-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.status-pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00d2ff;
    display: inline-block;
    box-shadow: 0 0 0 rgba(0, 210, 255, 0.7);
    animation: trackerPulse 1.8s infinite;
}

@keyframes trackerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 210, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    }
}

.status-box-text {
    display: flex;
    flex-direction: column;
}

.status-sub {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.status-main {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

/* Status Pill Variants */
.status-box-pod_submitted .status-pulse-dot,
.status-box-pending_review .status-pulse-dot,
.status-box-pending_payment .status-pulse-dot {
    background: #f59e0b;
    animation: trackerPulseAmber 1.8s infinite;
}

@keyframes trackerPulseAmber {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.status-box-completed .status-pulse-dot,
.status-box-delivered .status-pulse-dot {
    background: #10b981;
    animation: none;
    box-shadow: 0 0 8px #10b981;
}

.status-box-cancelled .status-pulse-dot {
    background: #ef4444;
    animation: none;
}

/* 2. Timeline Section */
.tracker-timeline-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 28px;
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.timeline-header-row h4 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.2px;
}

.timeline-meta-time {
    font-size: 12.5px;
    color: #475569;
    font-weight: 600;
}

/* Connected Stepper Line */
.tracker-timeline-wrapper {
    position: relative;
    padding: 10px 0 6px 0;
}

.tracker-track-bg {
    position: absolute;
    top: 25px;
    left: 8.33%;
    right: 8.33%;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    z-index: 1;
}

.tracker-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669 0%, #00b4d8 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.tracker-nodes-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
}

.tracker-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
}

.node-bullet {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #94a3b8;
    color: #475569;
    font-size: 12.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.node-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.node-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
    line-height: 1.2;
    word-break: break-word;
}

.node-sub {
    font-size: 9.5px;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
}

/* Completed Node State */
.tracker-node.is-completed .node-bullet {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35);
}

.tracker-node.is-completed .node-name {
    color: #047857;
    font-weight: 800;
}

/* Active Node State */
.tracker-node.is-active .node-bullet {
    background: #00152c;
    border-color: #00d2ff;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.25), 0 3px 8px rgba(0, 21, 44, 0.2);
}

.tracker-node.is-active .node-name {
    color: #00152c;
    font-weight: 900;
}

.tracker-node.is-active .node-sub {
    color: #0284c7;
    font-weight: 700;
}

/* POD Pending Node State */
.tracker-node.is-pod-pending .node-bullet {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25), 0 3px 8px rgba(245, 158, 11, 0.15);
}

.tracker-node.is-pod-pending .node-name {
    color: #92400e;
    font-weight: 900;
}

.tracker-node.is-pod-pending .node-sub {
    color: #d97706;
    font-weight: 700;
}

/* Node Name Responsive Helpers */
.node-name-full {
    display: inline;
}
.node-name-short {
    display: none;
}

/* 2.2 Active Summary Bar */
.tracker-active-summary-bar {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.summary-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.summary-bar-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.25);
    animation: trackerPulseRing 2s infinite ease-in-out;
}

@keyframes trackerPulseRing {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 180, 216, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
}

.summary-bar-step {
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-bar-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #00152c;
    text-align: right;
}

/* 2.5 Detailed Tracking Workflow (AliExpress / Daraz Style) */
.tracker-vertical-workflow-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    margin-top: 18px;
}

.workflow-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.workflow-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workflow-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0fdf4;
    color: #059669;
}

.workflow-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #00152c;
    letter-spacing: -0.2px;
}

.workflow-header-status-pill {
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
}

.workflow-header-status-pill.pill-live {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.workflow-header-status-pill.pill-review {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.workflow-header-status-pill.pill-completed {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.workflow-timeline-list {
    display: flex;
    flex-direction: column;
}

.workflow-timeline-item {
    display: flex;
    position: relative;
    gap: 16px;
}

.workflow-item-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    flex-shrink: 0;
}

.workflow-bullet-node {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    z-index: 2;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Completed Workflow Item */
.workflow-timeline-item.is-completed .workflow-bullet-node {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.workflow-timeline-item.is-completed .bullet-check-icon {
    stroke: #ffffff;
}

/* Current / Active Workflow Item */
.workflow-timeline-item.is-current .workflow-bullet-node {
    background: #00152c;
    color: #ffffff;
    border: 2.5px solid #00d2ff;
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.25);
    position: relative;
}

.bullet-pulse-core {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00d2ff;
}

/* Upcoming Workflow Item */
.workflow-timeline-item.is-upcoming .workflow-bullet-node {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
}

.workflow-rail-line {
    width: 3px;
    flex: 1 1 auto;
    min-height: 42px;
    margin: 4px 0;
    border-radius: 2px;
}

.workflow-rail-line.line-completed {
    background: #059669;
}

.workflow-rail-line.line-active {
    background: linear-gradient(180deg, #059669 0%, #cbd5e1 100%);
}

.workflow-rail-line.line-pending {
    background: #e2e8f0;
}

.workflow-item-body {
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 26px;
}

.workflow-timeline-item:last-child .workflow-item-body {
    padding-bottom: 0;
}

.workflow-item-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.workflow-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.workflow-stage-number {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.workflow-timeline-item.is-current .workflow-stage-number {
    color: #0284c7;
}

.workflow-stage-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.workflow-timeline-item.is-current .workflow-stage-title {
    color: #00152c;
}

.workflow-badge-current {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    font-size: 11px;
    font-weight: 800;
    border-radius: 12px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.badge-dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0284c7;
    animation: trackerPulseRing 1.8s infinite;
}

.workflow-badge-done {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    padding: 2px 8px;
    white-space: nowrap;
}

.workflow-badge-pending {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    padding: 2px 8px;
    white-space: nowrap;
}

.workflow-item-timestamp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 7px;
}

.workflow-item-timestamp svg {
    flex-shrink: 0;
    color: #0284c7;
}

.workflow-timeline-item.is-completed .workflow-item-timestamp {
    color: #475569;
}

.workflow-timeline-item.is-completed .workflow-item-timestamp svg {
    color: #64748b;
}

.workflow-item-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
}

.workflow-timeline-item.is-current .workflow-item-desc {
    background: #f0f9ff;
    border-left-color: #00b4d8;
    color: #0f172a;
    font-weight: 500;
}

.workflow-timeline-item.is-completed .workflow-item-desc {
    border-left-color: #10b981;
}

/* 3. Structured Route Flow Grid */
.tracker-route-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.route-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.route-title {
    font-size: 15px;
    font-weight: 800;
    color: #00152c;
}

.route-metrics-chip {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.tracker-locations-grid {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 16px;
}

.location-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 18px 20px;
}

.location-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.loc-bullet {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loc-bullet-pickup {
    background: #00152c;
}

.loc-bullet-delivery {
    background: #059669;
}

.loc-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #475569;
}

.facility-title {
    margin: 0 0 6px 0;
    font-size: 16.5px;
    font-weight: 800;
    color: #0f172a;
}

.location-address {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.45;
    margin-bottom: 10px;
}

.location-meta-items {
    font-size: 12.5px;
    color: #475569;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    line-height: 1.45;
}

/* Arrow Divider between Origin & Destination */
.route-arrow-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.arrow-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00152c;
    color: #00d2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 21, 44, 0.2);
}

/* 4. Courier & Specimen Handling Grid */
.tracker-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spec-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
}

.spec-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.spec-card-head .spec-icon {
    font-size: 20px;
}

.spec-card-head h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #00152c;
}

.spec-data {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.45;
}

.driver-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.driver-name-row strong {
    font-size: 15px;
    color: #0f172a;
}

.badge-driver-verified {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.spec-sub {
    font-size: 12.5px;
    color: #475569;
    margin-top: 3px;
}

.spec-sub code {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
}

/* 5. Proof of Delivery (POD) Section */
.tracker-pod-card {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08);
}

.pod-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #bbf7d0;
}

.pod-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pod-shield-icon {
    font-size: 28px;
}

.pod-header-left h4 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 800;
    color: #14532d;
}

.pod-header-left p {
    margin: 0;
    font-size: 12.5px;
    color: #166534;
}

.pod-verified-seal {
    background: #16a34a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.pod-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.pod-info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13.5px;
}

.pod-lbl {
    color: #166534;
    font-weight: 600;
    width: 120px;
    flex-shrink: 0;
}

.pod-val {
    color: #0f172a;
}

.pod-sig-col {
    display: flex;
    flex-direction: column;
}

.pod-sig-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 6px;
}

.pod-sig-box {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px;
    display: inline-block;
    max-width: 260px;
}

.pod-sig-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 6. Chain of Custody Audit Trail Card */
.tracker-audit-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.audit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}

.audit-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audit-header-icon {
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border-radius: 10px;
}

.audit-header-title h4 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #00152c;
}

.audit-header-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

.audit-count-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.tracker-audit-timeline {
    position: relative;
    padding-left: 14px;
}

.tracker-audit-timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 28px;
    width: 2px;
    background: #e2e8f0;
}

.audit-log-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
}

.audit-log-item:last-child {
    padding-bottom: 0;
}

.audit-icon-wrap {
    position: relative;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.audit-log-item.is-latest .audit-icon-wrap {
    border-color: #0284c7;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.audit-log-content {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 12px 14px;
}

.audit-log-item.is-latest .audit-log-content {
    background: #ffffff;
    border-color: #7dd3fc;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.audit-log-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.audit-action-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}

.audit-time-tag {
    font-size: 11px;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 12px;
}

.audit-note {
    font-size: 12.5px;
    color: #334155;
    margin: 4px 0 8px 0;
    line-height: 1.4;
}

.audit-actor-meta {
    font-size: 11px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.audit-status-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}

/* Footer Telemetry Strip */
.tracker-footer-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.footer-telemetry-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.telemetry-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: trackerPulseRing 2s infinite ease-in-out;
    flex-shrink: 0;
}

.footer-hint {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}

.btn-refresh-tracker {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-refresh-tracker:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   RESPONSIVE STYLES FOR TRACKER
   ========================================================================== */

@media (max-width: 840px) {
    .medtrack-tracker-card {
        padding: 24px 20px;
    }

    .tracker-feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tracker-hero-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-status-box {
        align-self: flex-start;
    }

    .tracker-locations-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .route-arrow-divider {
        display: none;
    }

    .tracker-specs-grid {
        grid-template-columns: 1fr;
    }

    .pod-content-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   Mobile Optimization for Track Delivery View
   Strict 20px padding, compact spacing, responsive flow
   ======================================================== */
@media (max-width: 768px) {
    .medtrack-tracker-wrapper {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        margin-left: calc((100% - (100vw - 40px)) / 2) !important;
        margin-right: calc((100% - (100vw - 40px)) / 2) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 10px !important;
        margin-bottom: 24px !important;
        box-sizing: border-box !important;
    }

    .medtrack-tracker-card {
        padding: 16px 14px !important;
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 18px rgba(0, 21, 44, 0.05) !important;
        box-sizing: border-box !important;
    }

    /* Tracker Header */
    .tracker-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
        padding-bottom: 12px !important;
    }

    .tracker-header-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 9px !important;
    }

    .tracker-header-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .tracker-header-text h2 {
        font-size: 17px !important;
        font-weight: 800 !important;
        margin: 0 0 3px 0 !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    .tracker-header-text p {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
        color: #64748b !important;
        text-align: center !important;
    }

    /* Unified Search Bar */
    .tracker-search-bar {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }

    .tracker-search-input-wrap {
        width: 100% !important;
    }

    .tracker-input {
        height: 42px !important;
        font-size: 14px !important;
        padding: 0 36px 0 38px !important;
        border-radius: 8px !important;
    }

    .tracker-search-icon {
        left: 12px !important;
    }

    .tracker-search-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .tracker-clear-btn {
        right: 10px !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 15px !important;
    }

    .tracker-submit-btn {
        width: 100% !important;
        height: 42px !important;
        font-size: 14px !important;
        padding: 0 16px !important;
        border-radius: 8px !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* Initial State 3 Pillars */
    .tracker-feature-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .tracker-feature-item {
        padding: 10px 12px !important;
        border-radius: 8px !important;
        gap: 10px !important;
    }

    .tracker-feature-item .feature-icon {
        font-size: 20px !important;
    }

    .tracker-feature-item .feature-text strong {
        font-size: 13px !important;
    }

    .tracker-feature-item .feature-text span {
        font-size: 11.5px !important;
    }

    /* Notice Box */
    .tracker-notice-box {
        padding: 12px 14px !important;
        border-radius: 8px !important;
        gap: 10px !important;
    }

    /* Result Container */
    .tracker-result-container {
        gap: 12px !important;
    }

    /* 1. Hero Status Bar */
    .tracker-hero-bar {
        padding: 14px 12px !important;
        border-radius: 10px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .hero-trip-meta {
        width: 100% !important;
    }

    .hero-meta-label {
        font-size: 9.5px !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 2px !important;
    }

    .hero-trip-num-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
        width: 100% !important;
    }

    .hero-trip-number {
        font-size: 16px !important;
        font-weight: 900 !important;
        letter-spacing: -0.3px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .btn-copy-trip {
        height: 30px !important;
        padding: 0 10px !important;
        font-size: 11.5px !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
    }

    .hero-tags-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }

    .tracker-tag {
        font-size: 10.5px !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
    }

    .hero-status-box {
        padding: 8px 12px !important;
        border-radius: 20px !important;
        gap: 8px !important;
        align-self: flex-start !important;
        width: auto !important;
    }

    .status-pulse-dot {
        width: 8px !important;
        height: 8px !important;
    }

    .status-sub {
        font-size: 8.5px !important;
    }

    .status-main {
        font-size: 13px !important;
    }

    /* 2. Chain of Custody Milestones */
    .tracker-timeline-section {
        padding: 12px 10px !important;
        border-radius: 10px !important;
    }

    .timeline-header-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 14px !important;
        gap: 6px !important;
    }

    .timeline-header-row h4 {
        font-size: 13.5px !important;
    }

    .timeline-meta-time {
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }

    .tracker-timeline-wrapper {
        overflow: visible !important;
        width: 100% !important;
        padding: 4px 0 2px 0 !important;
        box-sizing: border-box !important;
    }

    .tracker-track-bg {
        position: absolute !important;
        top: 17px !important;
        left: 8.33% !important;
        right: 8.33% !important;
        width: auto !important;
        height: 3px !important;
        background: #cbd5e1 !important;
        border-radius: 3px !important;
        z-index: 1 !important;
    }

    .tracker-track-fill {
        height: 100% !important;
        border-radius: 3px !important;
    }

    .tracker-nodes-row {
        position: relative !important;
        z-index: 2 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .tracker-node {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: 16.66% !important;
        max-width: 16.66% !important;
        padding: 0 1px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .node-bullet {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
        margin-bottom: 5px !important;
        border-width: 2.5px !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }

    .node-bullet svg {
        width: 12px !important;
        height: 12px !important;
    }

    .node-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .node-name-full {
        display: none !important;
    }

    .node-name-short {
        display: inline !important;
    }

    .node-name {
        font-size: 10px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        word-break: normal !important;
        white-space: nowrap !important;
        color: #1e293b !important;
    }

    .node-sub {
        display: none !important;
    }

    .tracker-active-summary-bar {
        margin-top: 12px !important;
        padding: 8px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        gap: 6px !important;
    }

    .summary-bar-badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    .summary-bar-step {
        font-size: 10.5px !important;
        font-weight: 800 !important;
        color: #475569 !important;
    }

    .summary-bar-title {
        font-size: 11.5px !important;
        font-weight: 800 !important;
        color: #00152c !important;
        text-align: right !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    /* Mobile AliExpress / Daraz Style Workflow */
    .tracker-vertical-workflow-card {
        padding: 14px 12px !important;
        border-radius: 10px !important;
        margin-top: 14px !important;
    }

    .workflow-card-header {
        margin-bottom: 14px !important;
        padding-bottom: 10px !important;
        gap: 8px !important;
    }

    .workflow-card-header h3 {
        font-size: 14px !important;
    }

    .workflow-header-icon {
        width: 26px !important;
        height: 26px !important;
    }

    .workflow-header-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .workflow-header-status-pill {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    .workflow-timeline-item {
        gap: 12px !important;
    }

    .workflow-item-rail {
        width: 24px !important;
    }

    .workflow-bullet-node {
        width: 24px !important;
        height: 24px !important;
        font-size: 10.5px !important;
    }

    .workflow-bullet-node svg {
        width: 12px !important;
        height: 12px !important;
    }

    .bullet-pulse-core {
        width: 8px !important;
        height: 8px !important;
    }

    .workflow-rail-line {
        width: 2.5px !important;
        min-height: 34px !important;
    }

    .workflow-item-body {
        padding-bottom: 18px !important;
    }

    .workflow-stage-number {
        font-size: 9.5px !important;
    }

    .workflow-stage-title {
        font-size: 13.5px !important;
    }

    .workflow-badge-current,
    .workflow-badge-done,
    .workflow-badge-pending {
        font-size: 10px !important;
        padding: 2px 7px !important;
    }

    .workflow-item-timestamp {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }

    .workflow-item-desc {
        font-size: 12px !important;
        line-height: 1.45 !important;
        padding: 6px 10px !important;
    }

    /* 3. Route Details */
    .tracker-route-card {
        padding: 14px 12px !important;
        border-radius: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .route-header-bar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .route-title {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #00152c !important;
    }

    .route-metrics-chip {
        font-size: 11px !important;
        font-weight: 700 !important;
        padding: 3px 9px !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .tracker-locations-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .location-box {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 14px !important;
        border-radius: 8px !important;
        border: 1px solid #cbd5e1 !important;
        background: #f8fafc !important;
    }

    .location-badge {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .loc-bullet {
        width: 18px !important;
        height: 18px !important;
        font-size: 9.5px !important;
    }

    .loc-label {
        font-size: 9.5px !important;
        letter-spacing: 0.4px !important;
    }

    .facility-title {
        font-size: 14px !important;
        font-weight: 800 !important;
        margin-bottom: 4px !important;
        word-break: break-word !important;
    }

    .location-address {
        font-size: 12px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        word-break: break-word !important;
    }

    .location-meta-items {
        font-size: 11px !important;
        padding-top: 6px !important;
        line-height: 1.4 !important;
    }

    .route-arrow-divider {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 28px !important;
        margin: 2px auto !important;
        width: 100% !important;
    }

    .arrow-line {
        display: none !important;
    }

    .arrow-circle {
        width: 26px !important;
        height: 26px !important;
        font-size: 12px !important;
        transform: rotate(90deg) !important;
        margin: 0 auto !important;
    }

    /* 4. Courier & Handling Grid */
    .tracker-specs-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .spec-card {
        padding: 10px 12px !important;
        border-radius: 8px !important;
    }

    .spec-card-header {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .spec-title {
        font-size: 12.5px !important;
    }

    .spec-content p {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }

    .tracker-footer-strip {
        padding: 10px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
        border-radius: 8px !important;
    }

    .tracker-footer-strip p {
        font-size: 11px !important;
        text-align: center !important;
    }

    .btn-refresh-tracker {
        height: 36px !important;
        font-size: 12px !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   WORLD-CLASS ROLE-BASED DASHBOARD & PORTAL STYLES (MEDTRACK NC)
   ========================================================================== */

.medtrack-portal-wrapper {
    max-width: 1200px;
    margin: 24px auto 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #0f172a;
}

.medtrack-dispatcher-portal {
    max-width: 1440px !important;
}

.medtrack-portal-wrapper *,
.medtrack-portal-wrapper *::before,
.medtrack-portal-wrapper *::after {
    box-sizing: border-box;
}

/* Notice Card for Unauthenticated Guests */
.medtrack-portal-notice-card {
    max-width: 620px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 21, 44, 0.06);
}

.notice-icon-box {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.medtrack-portal-notice-card h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--mt-navy, #00152c);
}

.medtrack-portal-notice-card p {
    color: #64748b;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.notice-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Header Hero Bar */
.medtrack-portal-hero {
    background: linear-gradient(135deg, #00152c 0%, #002855 60%, #003566 100%);
    border-radius: 16px;
    padding: 22px 28px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(0, 21, 44, 0.16);
    position: relative;
    overflow: visible;
    z-index: 100;
}

.medtrack-portal-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 260px;
    height: 100%;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    background: radial-gradient(circle at top right, rgba(0, 210, 255, 0.15) 0%, rgba(0, 210, 255, 0) 70%);
    pointer-events: none;
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
}

.portal-user-avatar {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.35);
}

.portal-user-avatar.facility-avatar {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    font-size: 26px;
}

.portal-user-avatar.driver-avatar-main {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    font-size: 26px;
}

.avatar-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2.5px solid #002855;
    box-shadow: 0 0 8px #10b981;
}

.portal-user-meta {
    min-width: 0;
}

.portal-user-meta .portal-role-tag {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #93c5fd;
    margin-bottom: 4px;
}

.verified-pill {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.portal-user-meta h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.portal-user-meta p {
    margin: 0;
    font-size: 13.5px;
    color: #cbd5e1;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: nowrap;
    position: relative;
    z-index: 110;
    flex-shrink: 0;
}

.cta-label-short {
    display: none;
}

.portal-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8.5px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-new-request {
    background: linear-gradient(135deg, #00d2ff 0%, #00b4d8 100%);
    color: #00152c !important;
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.35);
}

.btn-new-request:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 210, 255, 0.45);
}

.btn-command-center {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-command-center:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-secondary-outline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-logout-subtle {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-logout-subtle:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Driver Duty Toggle Box in Hero */
.driver-duty-toggle-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.driver-duty-toggle-box .switch-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Hide raw checkbox while keeping accessible */
.driver-duty-toggle-box input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

.duty-pill-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1.5px solid transparent;
}

/* ON-DUTY State */
.driver-duty-toggle-box.is-on-duty .duty-pill-toggle,
.driver-duty-toggle-box:has(input:checked) .duty-pill-toggle {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24) 0%, rgba(5, 150, 105, 0.42) 100%);
    border-color: rgba(16, 185, 129, 0.75);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.driver-duty-toggle-box.is-on-duty:hover .duty-pill-toggle,
.driver-duty-toggle-box:has(input:checked):hover .duty-pill-toggle {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.34) 0%, rgba(5, 150, 105, 0.54) 100%);
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
}

.duty-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.driver-duty-toggle-box.is-on-duty .duty-indicator-dot,
.driver-duty-toggle-box:has(input:checked) .duty-indicator-dot {
    background: #10b981;
    box-shadow: 0 0 10px #10b981, 0 0 4px #34d399;
    animation: mtDutyPulse 2s infinite ease-in-out;
}

@keyframes mtDutyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px #10b981, 0 0 2px #34d399;
    }
    50% {
        transform: scale(1.25);
        box-shadow: 0 0 16px #10b981, 0 0 8px #34d399;
    }
}

/* OFF-DUTY State */
.driver-duty-toggle-box.is-off-duty .duty-pill-toggle,
.driver-duty-toggle-box:not(:has(input:checked)) .duty-pill-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    box-shadow: none;
}

.driver-duty-toggle-box.is-off-duty:hover .duty-pill-toggle,
.driver-duty-toggle-box:not(:has(input:checked)):hover .duty-pill-toggle {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.driver-duty-toggle-box.is-off-duty .duty-indicator-dot,
.driver-duty-toggle-box:not(:has(input:checked)) .duty-indicator-dot {
    background: #64748b;
    box-shadow: none;
}

/* Driver Hero Actions Desktop Alignment */
.driver-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.driver-quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Direct Dispatch Mode Card (Medical Logistics Command Style) */
.driver-empty-mode-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 38px 24px;
    box-shadow: 0 4px 16px rgba(0, 21, 44, 0.04);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.driver-mode-empty-state {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.driver-mode-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    margin-bottom: 16px;
}

.driver-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.driver-mode-badge.badge-runs-ready {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.driver-mode-badge.badge-standby {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.mode-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: mtDotPulse 1.8s infinite ease-in-out;
}

@keyframes mtDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.driver-mode-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.driver-mode-desc {
    font-size: 14.5px !important;
    color: #475569 !important;
    line-height: 1.65 !important;
    margin: 0 0 12px 0 !important;
    text-align: center !important;
    max-width: 560px !important;
}

.driver-mode-action {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.btn-driver-view-assigned {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-driver-view-assigned:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-driver-view-assigned:active {
    transform: translateY(0);
}

/* Route Steps Refined Layout (Fixes line wrapping) */
.step-header-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.step-type-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 7px;
    border-radius: 4px;
    width: fit-content;
}

.step-dest-pill {
    color: #059669;
    background: #d1fae5;
}

.step-facility-title {
    margin: 4px 0 0 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
}

.step-contact-text {
    font-size: 12.5px;
    color: #64748b;
    margin: 0 0 6px 0;
}

.step-action-strip {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.step-action-strip .btn-step-nav {
    flex: 1;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.step-action-strip .btn-step-nav:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
}

.step-action-strip .contact-phone-link {
    flex: 1;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f0f9ff;
    color: #0284c7 !important;
    border: 1.5px solid #bae6fd;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.step-action-strip .contact-phone-link:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

/* KPI Metrics Grid */
.portal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.metric-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.metric-active .metric-icon-wrap {
    background: #ecfeff;
    color: #0891b2;
}

.metric-urgent .metric-icon-wrap {
    background: #fffbeb;
    color: #d97706;
}

.metric-completed .metric-icon-wrap {
    background: #ecfdf5;
    color: #059669;
}

.metric-drivers .metric-icon-wrap {
    background: #f0f9ff;
    color: #0284c7;
}

.metric-info {
    margin-bottom: 6px;
}

.metric-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.metric-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-top: 4px;
}

.metric-sub {
    font-size: 12px;
    color: #64748b;
    display: block;
}

/* Portal Tabs Navigation */
.portal-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.portal-tabs-nav::-webkit-scrollbar {
    display: none;
}

.portal-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.portal-tab-btn .tab-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-tab-btn .tab-count-badge {
    display: none;
}

.portal-tab-btn .label-badge-pill {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.portal-tab-btn.is-active .label-badge-pill {
    background: #0284c7;
    color: #ffffff;
}

.portal-tab-btn .label-short {
    display: none;
}

.portal-tab-btn .label-full {
    display: inline;
}

.portal-tab-btn:hover {
    color: var(--mt-navy, #00152c);
}

.portal-tab-btn.is-active {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

/* Portal Content Cards */
.portal-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.card-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.search-box input:focus {
    background: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
    outline: none !important;
}

.table-filter-pills {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-pill {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.filter-pill.is-active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

/* Empty State */
.portal-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.portal-empty-state h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #0f172a;
    font-weight: 800;
}

.portal-empty-state p {
    margin: 0;
    font-size: 13.5px;
}

/* Desktop Table View */
.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.medtrack-portal-table {
    width: 100%;
    min-width: 880px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.medtrack-portal-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.medtrack-portal-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

.medtrack-portal-table td:first-child strong {
    white-space: nowrap !important;
    word-break: keep-all !important;
}

.medtrack-portal-table th:nth-child(1),
.medtrack-portal-table td:nth-child(1) {
    min-width: 125px;
    white-space: nowrap;
}

.medtrack-portal-table th:nth-child(2),
.medtrack-portal-table td:nth-child(2) {
    min-width: 135px;
    white-space: nowrap;
}

.medtrack-portal-table th:nth-child(3),
.medtrack-portal-table td:nth-child(3) {
    min-width: 170px;
    white-space: normal;
}

.medtrack-portal-table th:nth-child(4),
.medtrack-portal-table td:nth-child(4) {
    min-width: 125px;
    white-space: normal;
}

.medtrack-portal-table th:nth-child(5),
.medtrack-portal-table td:nth-child(5) {
    min-width: 95px;
    white-space: nowrap;
}

.medtrack-portal-table th:nth-child(6),
.medtrack-portal-table td:nth-child(6) {
    min-width: 110px;
    white-space: nowrap;
}

.medtrack-portal-table th:nth-child(7),
.medtrack-portal-table td:nth-child(7) {
    min-width: 120px;
    white-space: nowrap;
}

.medtrack-portal-table tr:hover td {
    background: #f8fafc;
}

.row-stat td {
    background: #fffdfa !important;
}

.trip-number-tag {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
    font-size: 12px;
    color: #00152c;
    background: #f1f5f9;
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    white-space: nowrap !important;
    word-break: keep-all !important;
}

.portal-priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.prio-stat,
.prio-routine-stat {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.15);
}

.prio-90-min,
.prio-90-minute {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.prio-2-hour {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.prio-routine,
.prio-routine--within-4-hours,
.prio-routine---within-4-hours,
.prio-within-4-hours,
.prio-standard {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.portal-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-pending,
.status-pending_dispatch,
.status-pending_review,
.status-pending_payment,
.status-unpaid {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-confirmed {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-assigned,
.status-driver_assigned {
    background: #e0f2fe;
    color: #0369a1;
}

.status-in_transit {
    background: #ecfeff;
    color: #0891b2;
    box-shadow: 0 0 6px rgba(8, 145, 178, 0.2);
}

.status-arrived_pickup {
    background: #f5f3ff;
    color: #6d28d9;
}

.status-picked_up {
    background: #e0e7ff;
    color: #3730a3;
}

.status-arrived_delivery {
    background: #f0fdfa;
    color: #0f766e;
}

.status-pod_submitted,
.status-pod-submitted {
    background: #ecfdf5;
    color: #065f46;
}

.status-completed {
    background: #dcfce7;
    color: #15803d;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.temp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
}

.temp-refrigerated,
.temp-frozen {
    background: #e0f2fe;
    color: #0284c7;
}

.temp-ambient,
.temp-room-temperature {
    background: #f1f5f9;
    color: #475569;
}

.route-point {
    font-size: 12.5px;
    line-height: 1.4;
}

.driver-tag {
    font-weight: 700;
    color: #0f172a;
    font-size: 12.5px;
}

.unassigned-tag {
    color: #d97706;
    font-size: 12px;
    font-weight: 700;
}

.btn-table-track {
    display: inline-block;
    background: #0284c7;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-table-track:hover {
    background: #0369a1;
}

.btn-view-pod-modal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: #ecfdf5 !important;
    border: 1.5px solid #6ee7b7 !important;
    color: #065f46 !important;
    padding: 6.5px 14px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15) !important;
    text-decoration: none !important;
    width: auto !important;
}

.btn-view-pod-modal:hover,
.btn-view-pod-modal:focus {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35) !important;
}

.btn-table-action {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b !important;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.btn-table-action:hover {
    background: #e2e8f0;
}

/* Customer Portal Deliveries Table Styles (Full-width, zero horizontal scrollbar on desktop) */
#portal-tab-deliveries .portal-content-card,
.customer-deliveries-card {
    padding: 12px 14px 16px 14px !important;
}

#portal-tab-deliveries .card-action-bar,
.customer-deliveries-card .card-action-bar {
    margin-bottom: 12px !important;
}

.customer-deliveries-card .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

#customer-trips-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 13px !important;
}

#customer-trips-table th,
#customer-trips-table td {
    min-width: 0 !important;
    padding: 14px 15px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

#customer-trips-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

#customer-trips-table th:not(:last-child) {
    border-right: 1px solid #e2e8f0 !important;
}

#customer-trips-table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 12.5px !important;
}

#customer-trips-table td:not(:last-child) {
    border-right: 1px solid #f1f5f9 !important;
}

#customer-trips-table th:nth-child(1),
#customer-trips-table td:nth-child(1) {
    min-width: 155px !important;
    white-space: nowrap !important;
    text-align: left !important;
    padding-left: 18px !important;
    padding-right: 28px !important;
}

#customer-trips-table th:nth-child(2),
#customer-trips-table td:nth-child(2) {
    min-width: 130px !important;
    white-space: nowrap !important;
    text-align: left !important;
    padding-left: 20px !important;
    padding-right: 18px !important;
}

#customer-trips-table th:nth-child(3),
#customer-trips-table td:nth-child(3) {
    min-width: 75px !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#customer-trips-table th:nth-child(4),
#customer-trips-table td:nth-child(4) {
    min-width: 150px !important;
    text-align: left !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

#customer-trips-table th:nth-child(5),
#customer-trips-table td:nth-child(5) {
    min-width: 135px !important;
    text-align: left !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

#customer-trips-table th:nth-child(6),
#customer-trips-table td:nth-child(6) {
    min-width: 95px !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#customer-trips-table th:nth-child(7),
#customer-trips-table td:nth-child(7) {
    min-width: 75px !important;
    white-space: nowrap !important;
    text-align: right !important;
    padding-left: 10px !important;
    padding-right: 16px !important;
}

#customer-trips-table th:nth-child(8),
#customer-trips-table td:nth-child(8) {
    min-width: 95px !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 18px !important;
}

#customer-trips-table .portal-status-pill {
    padding: 3.5px 9px !important;
    font-size: 11.5px !important;
    line-height: 1.2 !important;
    display: inline-block !important;
}

#customer-trips-table tr:last-child td {
    border-bottom: none !important;
}

#customer-trips-table tr:hover td {
    background: #f8fafc !important;
}

#customer-trips-table .trip-link-tag {
    display: inline-block;
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    text-decoration: none !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
}

#customer-trips-table .trip-link-tag:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
}

#customer-trips-table .trip-date-val strong {
    font-size: 12.5px !important;
    color: #0f172a !important;
    display: block !important;
    line-height: 1.25 !important;
}

#customer-trips-table .trip-time-val {
    font-size: 11px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    display: block !important;
    margin-top: 2px !important;
}

.route-cell-flow {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.route-flow-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.flow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.flow-dot-origin {
    background: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.flow-dot-dest {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.route-flow-connector {
    width: 1px;
    height: 5px;
    background: #cbd5e1;
    margin-left: 2.5px;
}

.flow-city {
    color: #1e293b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.specimen-cell-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.specimen-type-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 12.5px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

.specimen-cell-box .temp-badge {
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 4px;
    margin-top: 0;
    white-space: nowrap;
    max-width: 100%;
}

.trip-table-price {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table-actions-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
}

#customer-trips-table .btn-table-track {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: #0284c7 !important;
    color: #ffffff !important;
    padding: 7px 15px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    border: none !important;
    width: auto !important;
}

#customer-trips-table .btn-table-track:hover {
    background: #0369a1 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(2, 132, 199, 0.35) !important;
    color: #ffffff !important;
}

.btn-track-secondary {
    background: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
    box-shadow: none !important;
}

.btn-track-secondary:hover {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

#customer-trips-table .btn-view-pod-modal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: #ecfdf5 !important;
    border: 1.5px solid #6ee7b7 !important;
    color: #065f46 !important;
    padding: 7px 15px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15) !important;
    text-decoration: none !important;
    width: auto !important;
}

#customer-trips-table .btn-view-pod-modal:hover,
#customer-trips-table .btn-view-pod-modal:focus {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35) !important;
}

/* Mobile Cards Container (Shown on Small Screens) */
.mobile-only-cards-container {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.customer-mobile-trip-card,
.dispatcher-mobile-trip-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    width: 100%;
}

.card-facility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-specimen-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.customer-mobile-trip-card.card-stat {
    border-left: 4px solid #ef4444;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.card-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #64748b;
}

.card-date-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.35;
}

.card-route-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.route-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pickup-dot {
    background: #0284c7;
}

.dest-dot {
    background: #10b981;
}

.route-line-connect {
    width: 2px;
    height: 10px;
    background: #cbd5e1;
    margin-left: 3px;
}

.card-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.card-bottom-actions {
    display: flex;
    gap: 8px;
}

.btn-block {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px !important;
}

/* ==========================================================================
   Dispatcher Order History & Archived Records (Tab 5)
   ========================================================================== */
.btn-history-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 21, 44, 0.04);
    line-height: 1.2;
    white-space: nowrap;
    font-family: inherit;
}

.btn-history-filter:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 21, 44, 0.06);
}

.btn-history-filter.is-active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28) !important;
}

.btn-history-filter.filter-cancelled-btn {
    border-color: #fecaca;
    color: #991b1b;
    background: #ffffff;
}

.btn-history-filter.filter-cancelled-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #7f1d1d;
}

.btn-history-filter.filter-cancelled-btn.is-active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3) !important;
}

.btn-history-filter.filter-completed-btn,
.btn-history-filter[data-history-filter="completed"] {
    border-color: #bbf7d0;
    color: #166534;
    background: #ffffff;
}

.btn-history-filter.filter-completed-btn:hover,
.btn-history-filter[data-history-filter="completed"]:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

.btn-history-filter.filter-completed-btn.is-active,
.btn-history-filter[data-history-filter="completed"].is-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3) !important;
}

.btn-history-filter .disp-count-chip {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #f1f5f9;
    color: #475569;
    line-height: 1.2;
    transition: all 0.15s ease;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-history-filter .disp-count-chip.chip-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-history-filter .disp-count-chip.chip-completed {
    background: #dcfce7;
    color: #15803d;
}

.btn-history-filter.is-active .disp-count-chip {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.disp-history-stream-wrap {
    padding: 16px 0 10px 0 !important;
}

.disp-history-table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 21, 44, 0.03) !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

.disp-history-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 13px !important;
    table-layout: fixed !important;
    min-width: 960px !important;
    box-sizing: border-box !important;
}

.disp-history-table th,
.disp-history-table td {
    padding: 14px 15px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.disp-history-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    white-space: nowrap !important;
    text-align: left !important;
}

.disp-history-table th:not(:last-child) {
    border-right: 1px solid #e2e8f0 !important;
}

.disp-history-table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
}

.disp-history-table td:not(:last-child) {
    border-right: 1px solid #f1f5f9 !important;
}

.disp-history-table th:first-child,
.disp-history-table td:first-child {
    padding-left: 18px !important;
    padding-right: 14px !important;
}

.disp-history-table th:nth-child(5),
.disp-history-table td:nth-child(5) {
    text-align: center !important;
}

.disp-history-table th:nth-child(7),
.disp-history-table td:nth-child(7) {
    text-align: right !important;
    white-space: nowrap !important;
    padding-right: 14px !important;
}

.disp-history-table th:last-child,
.disp-history-table td:last-child {
    text-align: right !important;
    padding-left: 10px !important;
    padding-right: 18px !important;
    white-space: nowrap !important;
}

.disp-history-table tr.disp-history-row {
    transition: background-color 0.15s ease;
}

.disp-history-table tr.disp-history-row:hover td {
    background-color: #f8fafc !important;
}

.disp-history-table tr.disp-history-row:last-child td {
    border-bottom: none !important;
}

.disp-history-table .disp-trip-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #0f172a;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* 2-Line Layout: Date & Route Flow */
.disp-history-table .disp-cell-date-route {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.disp-history-table .disp-history-date {
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
}

.disp-history-table .disp-route-flow {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.disp-history-table .disp-flow-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    line-height: 1.3 !important;
}

.disp-history-table .disp-flow-connector {
    width: 1px !important;
    height: 4px !important;
    background: #cbd5e1 !important;
    margin-left: 2.5px !important;
}

.disp-history-table .disp-flow-city {
    color: #475569 !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* 2-Line Layout: Facility & Contact */
.disp-history-table .disp-cell-facility {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
}

.disp-history-table .disp-facility-title {
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.disp-history-table .disp-contact-sub {
    font-size: 11.5px !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* 2-Line Layout: Specimen & Urgency */
.disp-history-table .disp-cell-specimen {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    width: 100% !important;
}

.disp-history-table .disp-specimen-name {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

.disp-history-table .disp-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.disp-history-table .disp-status-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.disp-history-table .disp-status-badge.badge-completed {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.disp-history-table .disp-status-badge.badge-completed .badge-dot {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.disp-history-table .disp-status-badge.badge-cancelled {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.disp-history-table .disp-status-badge.badge-cancelled .badge-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.disp-history-table .disp-status-badge.badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.disp-history-note-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.disp-history-note-chip.chip-denial {
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #9f1239;
}

.disp-history-note-chip.chip-general {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.note-chip-icon {
    font-size: 11px;
    flex-shrink: 0;
}

.note-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.disp-notes-empty {
    color: #94a3b8;
    font-size: 12px;
}

.disp-history-fare {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: nowrap;
}

.btn-history-details {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #1e293b !important;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 21, 44, 0.04);
    white-space: nowrap !important;
    text-decoration: none;
}

.btn-history-details:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.28);
}

.btn-history-details .btn-arrow {
    transition: transform 0.15s ease;
}

.btn-history-details:hover .btn-arrow {
    transform: translateX(2px);
}

/* ==========================================================================
   Mobile Responsive Card Transformation for Order History Stream (Tab 5)
   ========================================================================== */
@media (max-width: 768px) {
    .disp-history-table-responsive {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .disp-history-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .disp-history-table thead {
        display: none !important;
    }

    .disp-history-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .disp-history-table tr.disp-history-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "ref status"
            "date date"
            "facility facility"
            "specimen specimen"
            "notes notes"
            "fare action" !important;
        row-gap: 9px !important;
        column-gap: 8px !important;
        align-items: center !important;
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 13px 14px !important;
        box-shadow: 0 1px 4px rgba(0, 21, 44, 0.04) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 0 !important;
        transition: box-shadow 0.18s ease, border-color 0.18s ease !important;
    }

    .disp-history-table tr.disp-history-row:hover,
    .disp-history-table tr.disp-history-row:active {
        border-color: #cbd5e1 !important;
        box-shadow: 0 3px 8px rgba(0, 21, 44, 0.08) !important;
    }

    .disp-history-table tr.disp-history-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        width: auto !important;
        min-width: 0 !important;
    }

    /* 1. Ref # */
    .disp-history-table tr.disp-history-row td:nth-child(1) {
        grid-area: ref !important;
        justify-self: start !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(1) .disp-trip-tag {
        font-size: 11px !important;
        padding: 2.5px 7px !important;
    }

    /* 2. Date & Route */
    .disp-history-table tr.disp-history-row td:nth-child(2) {
        grid-area: date !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(2) .disp-cell-date-route {
        background: #f8fafc !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 8px !important;
        padding: 8px 10px !important;
        gap: 5px !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(2) .disp-history-date {
        font-size: 12px !important;
        color: #0284c7 !important;
        font-weight: 700 !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(2) .disp-flow-item {
        font-size: 12px !important;
    }

    /* 3. Facility / Contact */
    .disp-history-table tr.disp-history-row td:nth-child(3) {
        grid-area: facility !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(3) .disp-facility-title {
        font-size: 13px !important;
        color: #0f172a !important;
        font-weight: 700 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(3) .disp-contact-sub {
        font-size: 11.5px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* 4. Specimen & Priority */
    .disp-history-table tr.disp-history-row td:nth-child(4) {
        grid-area: specimen !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(4) .disp-cell-specimen {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: #fafafa !important;
        border-radius: 6px !important;
        padding: 6px 10px !important;
        border: 1px solid #f1f5f9 !important;
        gap: 8px !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(4) .disp-specimen-name {
        font-size: 12px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* 5. Status Badge */
    .disp-history-table tr.disp-history-row td:nth-child(5) {
        grid-area: status !important;
        justify-self: end !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(5) .disp-status-badge {
        font-size: 10.5px !important;
        padding: 3px 8px !important;
    }

    /* 6. Notes / Denial Reason */
    .disp-history-table tr.disp-history-row td:nth-child(6) {
        grid-area: notes !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(6) .disp-notes-empty {
        display: none !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(6):has(.disp-notes-empty) {
        display: none !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(6) .disp-history-note-chip {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: normal !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(6) .disp-history-note-chip .note-chip-text {
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* 7. Fare */
    .disp-history-table tr.disp-history-row td:nth-child(7) {
        grid-area: fare !important;
        justify-self: start !important;
        text-align: left !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e2e8f0 !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(7)::before {
        content: 'Fare: ';
        font-size: 11px;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .disp-history-table tr.disp-history-row td:nth-child(7) .disp-history-fare {
        font-size: 14px !important;
        color: #0f172a !important;
        font-weight: 800 !important;
    }

    /* 8. Action Button */
    .disp-history-table tr.disp-history-row td:nth-child(8) {
        grid-area: action !important;
        justify-self: end !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e2e8f0 !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(8) .btn-history-details {
        padding: 7px 14px !important;
        font-size: 12px !important;
        background: #0284c7 !important;
        color: #ffffff !important;
        border-color: #0284c7 !important;
        border-radius: 8px !important;
        box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
    }

    .disp-history-table tr.disp-history-row td:nth-child(8) .btn-history-details:hover {
        background: #0369a1 !important;
    }
}

/* ==========================================================================
   Live Queue Run Card Layout Safeguards (.disp-trip-card)
   ========================================================================== */
.disp-trip-card .disp-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.disp-trip-card .disp-cell-facility {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 10px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.disp-trip-card .disp-facility-icon {
    font-size: 20px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.disp-trip-card .disp-facility-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
}

.disp-trip-card .disp-facility-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: left !important;
}

.disp-trip-card .disp-specimen-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    margin-top: 3px !important;
    flex-wrap: wrap !important;
}

.disp-trip-card .disp-cell-route {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    flex: none !important;
    height: auto !important;
    margin: 0 !important;
}

@media (min-width: 900px) {
    .disp-trip-card .disp-card-body {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 24px !important;
    }

    .disp-trip-card .disp-cell-facility {
        flex: 0 1 280px !important;
        max-width: 320px !important;
        min-width: 180px !important;
        width: auto !important;
    }

    .disp-trip-card .disp-cell-route {
        flex: 1 1 auto !important;
        width: auto !important;
    }
}

/* ==========================================================================
   Quick Tracking Section (Live GPS Telemetry Lookup)
   ========================================================================== */
.portal-tracking-lookup-card {
    padding: 24px 28px;
}

.quicktrack-hero-modern {
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
    border: 1.5px solid #bae6fd;
    border-radius: 14px;
    padding: 38px 28px 32px 28px !important;
    text-align: center;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.05);
    margin-bottom: 24px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quicktrack-badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    color: #0369a1;
    padding: 5px 14px !important;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0 !important;
    line-height: 1.3;
    white-space: nowrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.pill-text-mobile {
    display: none;
}

.live-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
    animation: mt-pulse-dot 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
    flex-shrink: 0;
}

@keyframes mt-pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(2, 132, 199, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
}

.quicktrack-title {
    margin: 0 0 12px 0 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.3px;
    line-height: 1.3 !important;
}

.quicktrack-desc {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    max-width: 620px;
    margin: 0 auto 0 auto !important;
    text-wrap: balance;
}

.quicktrack-search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 580px;
    margin: 32px auto 20px auto !important;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 4px 4px 4px 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.quicktrack-search-bar:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.16);
}

.search-input-affix {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.search-field-icon {
    position: static;
    color: #94a3b8;
    pointer-events: none;
    flex-shrink: 0;
    margin-right: 10px;
}

.portal-tracking-search-field {
    width: 100% !important;
    height: 42px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.portal-tracking-search-field:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

.btn-portal-locate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    height: 42px;
    padding: 0 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-portal-locate:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-portal-locate:active {
    transform: translateY(0);
}

.quicktrack-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    flex-wrap: wrap;
}

.hint-label {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 500;
}

.btn-sample-track {
    background: #ffffff;
    border: 1px solid #bae6fd;
    border-radius: 9999px;
    padding: 2.5px 9px;
    font-size: 11.5px;
    font-weight: 600;
    color: #0284c7;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-sample-track:hover {
    border-color: #0284c7;
    background: #e0f2fe;
    color: #0369a1;
}

/* Active Deliveries Quick Jump */
.quicktrack-active-section {
    margin-top: 26px;
}

.quicktrack-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-header-left h4 {
    margin: 0 0 2px 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.section-header-left p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.active-count-tag {
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
}

.quick-track-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.quick-jump-card-modern {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none !important;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.quick-jump-card-modern:hover {
    border-color: #0284c7;
    background: #fafcff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.1);
}

.jump-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.jump-trip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #0f172a;
}

.jump-trip-badge svg {
    color: #0284c7;
    flex-shrink: 0;
}

.jump-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jump-dest-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}

.jump-dest-row svg {
    color: #64748b;
    flex-shrink: 0;
}

.jump-time-text {
    font-size: 12px;
    color: #94a3b8;
    padding-left: 20px;
}

.jump-card-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    color: #0284c7;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px dashed #f1f5f9;
    transition: color 0.15s ease;
}

.quick-jump-card-modern:hover .jump-card-action {
    color: #0369a1;
}

.quick-jump-card-modern:hover .jump-card-action svg {
    transform: translate(2px, -2px);
    transition: transform 0.2s ease;
}

.quicktrack-empty-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 13.5px;
    margin-top: 24px;
}

/* Tablet & Mobile Responsiveness for Quick Tracking */
@media (max-width: 991px) {
    .portal-tracking-lookup-card {
        padding: 24px 20px;
    }

    .quicktrack-hero-modern {
        padding: 28px 20px;
    }
}

@media (max-width: 768px) {
    .portal-tracking-lookup-card {
        padding: 16px 14px !important;
    }

    .quicktrack-hero-modern {
        padding: 20px 14px !important;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .quicktrack-badge-pill {
        font-size: 10px !important;
        letter-spacing: 0.3px !important;
        padding: 4px 10px !important;
        gap: 6px !important;
        margin: 0 0 14px 0 !important;
        white-space: nowrap !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .quicktrack-title {
        font-size: 18px !important;
    }

    .quicktrack-desc {
        font-size: 13px !important;
        margin-bottom: 0 !important;
    }

    .quicktrack-search-bar {
        margin: 24px auto 16px auto !important;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        border-radius: 10px;
    }

    .search-input-affix {
        width: 100%;
        padding: 0 4px;
    }

    .portal-tracking-search-field {
        height: 40px !important;
    }

    .btn-portal-locate {
        width: 100%;
        height: 42px;
        padding: 0 16px;
        border-radius: 8px;
    }

    .quick-track-cards-grid {
        grid-template-columns: 1fr;
    }

    .quicktrack-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .pill-text-desktop {
        display: none !important;
    }

    .pill-text-mobile {
        display: inline !important;
    }

    .quicktrack-badge-pill {
        font-size: 9.5px !important;
        padding: 4px 10px !important;
        letter-spacing: 0.25px !important;
    }
}

/* Profile & Security Settings Grid */
.portal-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card-header-styled {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.header-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f0f9ff;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-header-styled h3 {
    margin: 0 0 2px 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.card-header-styled p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

.portal-styled-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.portal-styled-form .form-group {
    margin-bottom: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.portal-styled-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.portal-styled-form .form-row-three {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.portal-styled-form label {
    display: block !important;
    width: 100% !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 5px !important;
}

.portal-styled-form input[type="text"],
.portal-styled-form input[type="email"],
.portal-styled-form input[type="tel"],
.portal-styled-form input[type="password"],
.portal-styled-form select,
.portal-styled-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: block !important;
}

.portal-styled-form input:focus,
.portal-styled-form select:focus,
.portal-styled-form textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.portal-styled-form .password-input-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.portal-styled-form .password-input-wrap input {
    padding-right: 42px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.portal-styled-form .btn-toggle-password {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    width: 32px !important;
    height: 32px !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    outline: none !important;
    transition: color 0.15s ease, background 0.15s ease !important;
}

.portal-styled-form .btn-toggle-password:hover {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
}

.portal-styled-form .btn-toggle-password svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    pointer-events: none !important;
}

.portal-submit-btn {
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 11px 20px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 21, 44, 0.2) !important;
}

.portal-submit-btn:hover {
    background: linear-gradient(135deg, #002855 0%, #003566 100%) !important;
    transform: translateY(-1px) !important;
}

.portal-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.account-alert-box {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Driver Specific Stack & Timeline */
.driver-routes-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.driver-route-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 21, 44, 0.04);
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.driver-route-card:hover {
    box-shadow: 0 6px 20px rgba(0, 21, 44, 0.07);
    border-color: #cbd5e1;
}

.driver-route-card.card-stat {
    border-left: 5px solid #ef4444;
}

.route-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.route-specimen-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
}

.handling-chip {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 2-Column Side-by-Side Route Journey on Desktop (Cuts height in half & looks professional) */
.driver-route-timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
}

.timeline-step {
    display: flex;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-step:hover {
    border-color: #bae6fd;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.06);
}

.timeline-step.step-pickup {
    border-left: 3.5px solid #0284c7;
}

.timeline-step.step-destination {
    border-left: 3.5px solid #10b981;
}

.step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.step-destination .step-badge {
    background: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

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

.step-addr {
    margin: 0 0 4px 0;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
    word-break: break-word;
}

.step-contact {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

/* Compact, Well-Proportioned Workflow Actions on Desktop */
.driver-workflow-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.driver-workflow-actions button,
.driver-workflow-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 13.5px;
    font-weight: 800;
    border-radius: 9px;
    min-height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    width: auto;
}

.btn-flow-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.3) !important;
}

.btn-flow-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4) !important;
}

.btn-flow-secondary {
    background: #334155 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(51, 65, 85, 0.25) !important;
}

.btn-flow-secondary:hover {
    background: #1e293b !important;
    transform: translateY(-1px);
}

.btn-flow-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-flow-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4) !important;
}

/* Dispatcher Driver Cards Grid */
.drivers-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.driver-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.driver-summary-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.driver-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #00152c;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
}

.driver-summary-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.badge-code {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
}

.driver-status-chip {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
}

.driver-status-chip.is-on-duty {
    background: #dcfce7;
    color: #15803d;
}

.driver-status-chip.is-off-duty {
    background: #f1f5f9;
    color: #64748b;
}

.driver-details-list {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.6;
}

.driver-details-list strong {
    color: #0f172a;
}

/* ==========================================================================
   AVAILABLE RIDES POOL & CLAIMING STYLES (FIRST-COME, FIRST-SERVED)
   ========================================================================== */
.available-counter-pill {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

.tab-live-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Available Rides Toolbar Header */
.avail-toolbar-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.avail-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.avail-toolbar-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avail-badge-count {
    font-size: 11.5px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.avail-toolbar-sub {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.btn-refresh-pool {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 5px 11px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
}

.btn-refresh-pool:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.btn-refresh-pool svg {
    color: #0284c7;
    flex-shrink: 0;
}

.available-ride-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    width: 100%;
    position: relative;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.available-ride-card:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 26px rgba(2, 132, 199, 0.12);
    transform: translateY(-2px);
}

.available-ride-card.card-stat-urgent {
    border-left: 5px solid #ef4444 !important;
    background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
}

.available-ride-card.pulse-highlight {
    animation: highlightCard 2.5s ease-out;
}

@keyframes highlightCard {
    0% { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.6); }
    100% { box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05); }
}

/* Card Header */
.avail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.avail-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avail-header-left .trip-number-tag {
    background: #00152c;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.stat-urgent-pill {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Price Badge */
.avail-price-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 6px 14px;
    border-radius: 8px;
    text-align: right;
}

.avail-payout-label {
    font-size: 10px;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avail-payout-amount {
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.2;
}

/* Facility & Schedule Strip */
.avail-info-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 9px 14px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.info-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.info-strip-item svg {
    color: #0284c7;
    flex-shrink: 0;
}

.dot-sep {
    color: #94a3b8;
    margin: 0 2px;
}

/* Route Flow / Visual Journey */
.avail-route-box {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 2px 0;
}

.avail-stop-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
}

.stop-marker-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
    flex-shrink: 0;
}

.stop-marker {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.marker-a {
    background: #0284c7;
}

.marker-b {
    background: #10b981;
}

.stop-line {
    width: 2px;
    min-height: 32px;
    background: repeating-linear-gradient(to bottom, #cbd5e1, #cbd5e1 4px, transparent 4px, transparent 8px);
    margin: 4px 0;
}

.stop-details {
    flex: 1;
    min-width: 0;
    padding-bottom: 12px;
}

.stop-delivery .stop-details {
    padding-bottom: 0;
}

.stop-label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 2px;
}

.stop-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 2px;
    word-break: break-word;
}

.stop-address {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.35;
    word-break: break-word;
}

/* Specimen Chips Strip */
.avail-specimen-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.specimen-chip,
.temp-chip,
.handling-warning-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.specimen-chip {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.temp-chip {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.handling-warning-chip {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Footer & Claim CTA */
.avail-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

.avail-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    position: relative;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(2, 132, 199, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.avail-status-text {
    font-size: 12.5px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-claim-ride {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.btn-claim-ride:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45) !important;
}

.btn-claim-ride:active {
    transform: translateY(0) !important;
}

.btn-claim-ride:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 680px) {
    .available-ride-card {
        padding: 16px 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .avail-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
    }

    .avail-price-badge {
        padding: 5px 10px;
    }

    .avail-payout-amount {
        font-size: 16px;
    }

    .avail-info-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .avail-route-box {
        padding: 12px;
    }

    .stop-marker-col {
        width: 24px;
    }

    .stop-marker {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .stop-line {
        min-height: 24px;
    }

    .stop-title {
        font-size: 13.5px;
    }

    .stop-address {
        font-size: 12px;
    }

    .avail-specimen-strip {
        gap: 6px;
    }

    .specimen-chip,
    .temp-chip,
    .handling-warning-chip {
        font-size: 11px;
        padding: 4px 8px;
    }

    .avail-meta-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 12px;
    }

    .avail-status-indicator {
        justify-content: flex-start;
    }

    .btn-claim-ride {
        width: 100% !important;
        padding: 12px 18px !important;
        font-size: 14.5px !important;
    }
}

/* Modal Overlay & Box */
.medtrack-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 21, 44, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    margin: 0 !important;
}

.medtrack-modal-overlay.is-active,
.medtrack-modal-overlay.is-open {
    display: flex !important;
}

.medtrack-modal-box,
#dispatcher-quick-modal .medtrack-modal-box,
#customer-pod-modal .medtrack-modal-box {
    background: #ffffff !important;
    border-radius: 16px !important;
    max-width: 620px !important;
    width: 100% !important;
    max-height: 90vh !important;
    margin: auto !important;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45) !important;
    overflow: hidden !important;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    z-index: 1000000 !important;
    display: flex !important;
    flex-direction: column !important;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 12px 20px;
    text-align: right;
}

.pod-check-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.pod-verified-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pod-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13px;
    background: #f8fafc;
    padding: 14px;
    border-radius: 8px;
}

.pod-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
}

.sig-preview-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-pad-wrapper canvas {
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    height: 160px;
    touch-action: none;
}

.sig-controls {
    margin-top: 8px;
    text-align: right;
}

/* ==========================================================================
   DRIVER PROOF OF DELIVERY (POD) CAPTURE MODAL
   ========================================================================== */
#driver-pod-modal.medtrack-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 21, 44, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#driver-pod-modal .pod-modal-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 21, 44, 0.35);
    overflow: hidden;
    animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

#driver-pod-modal .modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#driver-pod-modal .pod-check-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

#driver-pod-modal .modal-close-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

#driver-pod-modal .modal-close-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

#driver-pod-modal .pod-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* Form layout */
#driver-pod-modal .pod-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

#driver-pod-modal .pod-label-title {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 6px !important;
    width: 100% !important;
    line-height: 1.4 !important;
}

#driver-pod-modal .pod-label-title .req {
    color: #ef4444 !important;
    margin-left: 2px !important;
    font-weight: 800 !important;
}

#driver-pod-modal .pod-label-title .label-hint {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    margin-left: auto !important;
    white-space: nowrap !important;
}

/* Recipient First & Last Name Layout (Stacked Up-Down on Mobile for maximum touch comfort) */
#driver-pod-modal .pod-recipient-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Live Recipient Printed Name Display Card */
#driver-pod-modal .pod-printed-name-card {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

#driver-pod-modal .pod-printed-name-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#driver-pod-modal .pod-printed-name-label {
    font-size: 10.5px !important;
    font-weight: 800 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 3px !important;
    line-height: 1.2 !important;
}

#driver-pod-modal .pod-printed-name-val {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
    color: #0f172a !important;
}

#driver-pod-modal .pod-name-validation-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Specimen Handover Temperature Verification */
#driver-pod-modal .pod-temp-input-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
}

#driver-pod-modal .pod-temp-unified-box {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 3px 6px 3px 12px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#driver-pod-modal .pod-temp-unified-box:focus-within {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

#driver-pod-modal .pod-temp-icon {
    font-size: 16px !important;
    line-height: 1 !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    user-select: none !important;
}

#driver-pod-modal .pod-temp-num-input {
    flex: 1 1 auto !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    min-width: 0 !important;
    height: auto !important;
}

#driver-pod-modal .pod-temp-num-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

#driver-pod-modal .pod-temp-unit-toggle {
    display: inline-flex !important;
    background: #f1f5f9 !important;
    padding: 3px !important;
    border-radius: 6px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
}

#driver-pod-modal .pod-unit-btn {
    border: none !important;
    background: transparent !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    line-height: 1 !important;
}

#driver-pod-modal .pod-unit-btn:hover {
    color: #0f172a !important;
}

#driver-pod-modal .pod-unit-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.35) !important;
}

/* Inputs & Textareas */
#driver-pod-modal input[type="text"],
#driver-pod-modal textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

#driver-pod-modal input[type="text"]:focus,
#driver-pod-modal textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
    outline: none !important;
}

#driver-pod-modal input[type="text"]::placeholder,
#driver-pod-modal textarea::placeholder {
    color: #94a3b8 !important;
    font-size: 13px !important;
}

#driver-pod-modal textarea {
    min-height: 72px !important;
    resize: vertical !important;
}

/* Signature Mode Switcher Tabs */
#driver-pod-modal .pod-sig-mode-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#driver-pod-modal .pod-sig-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
}

#driver-pod-modal .pod-sig-tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

#driver-pod-modal .pod-sig-tab-btn.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 420px) {
    #driver-pod-modal .pod-sig-tab-btn {
        font-size: 11px;
        padding: 7px 4px;
    }
}

/* Upload & Direct Camera Capture Box for Signature */
#driver-pod-modal .pod-sig-upload-box {
    border: 1.5px dashed #94a3b8;
    border-radius: 10px;
    background: #f8fafc;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    box-sizing: border-box;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#driver-pod-modal .pod-sig-upload-box:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

#driver-pod-modal .pod-sig-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#driver-pod-modal .pod-sig-upload-icon {
    font-size: 32px;
    margin-bottom: 4px;
    line-height: 1;
}

#driver-pod-modal .pod-sig-upload-content strong {
    font-size: 13.5px;
    color: #0f172a;
}

#driver-pod-modal .pod-sig-upload-content p {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
}

#driver-pod-modal .pod-sig-preview-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#driver-pod-modal .pod-sig-preview-img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    padding: 4px;
}

#driver-pod-modal .pod-sig-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

#driver-pod-modal .pod-sig-preview-name {
    font-size: 11.5px;
    color: #0284c7;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#driver-pod-modal .pod-btn-retake {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

#driver-pod-modal .pod-btn-retake:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Signature Pad Canvas Box */
#driver-pod-modal .signature-pad-wrapper.pod-signature-box {
    border: 1.5px dashed #94a3b8 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    width: 100% !important;
}

#driver-pod-modal .pod-canvas-wrap {
    position: relative !important;
    width: 100% !important;
    height: 160px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

#driver-pod-modal .pod-sig-lock-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(248, 250, 252, 0.96) !important;
    backdrop-filter: blur(2px) !important;
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: opacity 0.18s ease;
}

#driver-pod-modal .pod-sig-lock-overlay.is-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#driver-pod-modal #pod-signature-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    touch-action: none !important;
    cursor: crosshair !important;
    display: block !important;
    box-sizing: border-box !important;
}

#driver-pod-modal .pod-sig-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#driver-pod-modal .sig-hint {
    font-size: 11.5px !important;
    color: #64748b !important;
    font-style: italic !important;
    line-height: 1.3 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#driver-pod-modal #btn-clear-sig,
#driver-pod-modal .portal-btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

#driver-pod-modal #btn-clear-sig:hover,
#driver-pod-modal .portal-btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* File Upload Card */
#driver-pod-modal .pod-file-upload-box {
    position: relative;
    border: 1.5px dashed #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

#driver-pod-modal .pod-file-upload-box:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

#driver-pod-modal .pod-file-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

#driver-pod-modal .pod-file-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

#driver-pod-modal .pod-file-info {
    display: flex;
    flex-direction: column;
}

#driver-pod-modal .pod-file-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

#driver-pod-modal .pod-file-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.3;
}

/* Submit POD Button */
#driver-pod-modal #btn-submit-pod {
    width: 100% !important;
    display: block !important;
    padding: 13px 20px !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 21, 44, 0.2) !important;
    text-align: center !important;
}

#driver-pod-modal #btn-submit-pod:hover {
    background: linear-gradient(135deg, #002855 0%, #003566 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 21, 44, 0.28) !important;
}

#driver-pod-modal #btn-submit-pod:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mobile Responsiveness for POD Modal (<= 520px and <= 420px) */
@media (max-width: 520px) {
    #driver-pod-modal.medtrack-modal-overlay {
        padding: 10px !important;
    }

    #driver-pod-modal .pod-modal-box {
        max-height: 94vh !important;
        border-radius: 14px !important;
        width: 100% !important;
    }

    #driver-pod-modal .modal-header {
        padding: 12px 14px !important;
    }

    #driver-pod-modal .modal-header h3 {
        font-size: 15px !important;
    }

    #driver-pod-modal .modal-header p {
        font-size: 11px !important;
    }

    #driver-pod-modal .pod-modal-body {
        padding: 14px 14px 18px 14px !important;
    }

    #driver-pod-modal .pod-printed-name-card {
        padding: 10px 12px !important;
    }

    #driver-pod-modal .pod-printed-name-label {
        font-size: 10px !important;
    }

    #driver-pod-modal .pod-printed-name-val {
        font-size: 12.5px !important;
    }

    #driver-pod-modal .pod-name-validation-badge {
        font-size: 10.5px !important;
        padding: 4px 8px !important;
    }

    #driver-pod-modal .pod-label-title {
        flex-wrap: wrap !important;
        gap: 2px 6px !important;
        font-size: 12.5px !important;
    }

    #driver-pod-modal .pod-label-title .label-hint {
        margin-left: 0 !important;
        font-size: 10.5px !important;
    }

    #driver-pod-modal .pod-canvas-wrap {
        height: 150px !important;
    }

    #driver-pod-modal .pod-sig-lock-overlay span:nth-child(3) {
        font-size: 11px !important;
        max-width: 250px !important;
    }

    #driver-pod-modal .pod-sig-controls {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    #driver-pod-modal #btn-clear-sig {
        margin-left: auto !important;
        padding: 5px 10px !important;
        font-size: 11.5px !important;
    }
}

@media (max-width: 420px) {
    #driver-pod-modal .pod-printed-name-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    #driver-pod-modal .pod-name-validation-badge {
        align-self: flex-start !important;
    }

    #driver-pod-modal .pod-temp-unified-box {
        padding: 2px 4px 2px 10px !important;
    }

    #driver-pod-modal .pod-temp-num-input {
        font-size: 13px !important;
    }

    #driver-pod-modal .pod-unit-btn {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (WORLD-CLASS MOBILE EXPERIENCE)
   ========================================================================== */

/* Laptops & Scaled Desktops (1025px - 1280px) - Ensure Single-Line Alignment */
@media (max-width: 1280px) and (min-width: 1025px) {
    .cta-label-full {
        display: none !important;
    }
    .cta-label-short {
        display: inline !important;
    }
    .hero-actions {
        gap: 7px !important;
        flex-wrap: nowrap !important;
    }
    .portal-cta-btn {
        padding: 8px 11px !important;
        font-size: 12.5px !important;
        gap: 5px !important;
    }
    .btn-notif-bell {
        padding: 8px 10px !important;
        font-size: 12.5px !important;
        gap: 5px !important;
    }
}

/* Tablets Landscape & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .portal-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .portal-settings-grid {
        grid-template-columns: 1fr;
    }

    .medtrack-portal-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 22px 20px;
    }

    .hero-left {
        width: 100%;
    }

    .cta-label-full {
        display: none !important;
    }
    .cta-label-short {
        display: inline !important;
    }

    .hero-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 8px !important;
    }

    .hero-actions .portal-cta-btn,
    .hero-actions .btn-notif-bell,
    .hero-actions .medtrack-notif-bell-wrap {
        width: 100% !important;
        justify-content: center !important;
        text-align: center;
        padding: 9px 12px !important;
        font-size: 13px !important;
        box-sizing: border-box !important;
    }

    .hero-actions .medtrack-notif-bell-wrap {
        display: flex !important;
    }
}

/* Tablet Viewports (769px to 1024px) - Strictly Non-Mobile (Keeps Mobile View Exactly As It Is) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Driver Portal Hero Header - Tablet Layout (Clean Side-by-Side, No Overlap) */
    .medtrack-driver-portal .driver-hero-main-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .hero-left {
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-user-avatar.driver-avatar-main {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        font-size: 22px !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-user-meta {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-role-tag {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        font-size: 11px !important;
        margin-bottom: 3px !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-role-tag span,
    .medtrack-driver-portal .driver-hero-main-row .portal-role-tag .role-icon {
        white-space: nowrap !important;
        display: inline-block !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-role-tag .verified-pill {
        max-width: 260px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        display: inline-block !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-user-meta h2 {
        font-size: 20px !important;
        line-height: 1.2 !important;
        margin: 0 0 3px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .portal-user-meta p {
        font-size: 12.5px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #94a3b8 !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .hero-actions.driver-hero-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        flex-shrink: 0 !important;
        gap: 10px !important;
        margin: 0 !important;
        grid-template-columns: none !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .driver-duty-toggle-box {
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .driver-duty-toggle-box .duty-pill-toggle {
        padding: 7px 16px !important;
        min-height: 38px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        width: auto !important;
        box-sizing: border-box !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .driver-quick-actions {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .medtrack-driver-portal .driver-hero-main-row .driver-quick-actions .portal-cta-btn {
        padding: 7px 16px !important;
        min-height: 38px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        width: auto !important;
        box-sizing: border-box !important;
    }

    /* Driver Metrics Grid (Tablet 3x2) */
    .driver-hero-metrics-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .hero-metric-tile.hero-wallet-tile {
        grid-column: span 3 !important;
    }

    /* Driver Tabs Tablet Navigation */
    .medtrack-driver-portal .driver-tabs-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        border-bottom: 2px solid #e2e8f0 !important;
        margin-bottom: 20px !important;
        scrollbar-width: none !important;
    }

    .medtrack-driver-portal .driver-tabs-nav::-webkit-scrollbar {
        display: none !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Tablet Tables - Generous min-width & Explicit Column Widths to Prevent Squishing */
    .table-responsive {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
    }

    .medtrack-portal-table {
        min-width: 960px !important;
        width: 100% !important;
    }

    .medtrack-portal-table th,
    .medtrack-portal-table td {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .medtrack-portal-table th:nth-child(1),
    .medtrack-portal-table td:nth-child(1) {
        min-width: 140px !important;
        white-space: nowrap !important;
    }

    .medtrack-portal-table th:nth-child(2),
    .medtrack-portal-table td:nth-child(2) {
        min-width: 150px !important;
        white-space: nowrap !important;
    }

    .medtrack-portal-table th:nth-child(3),
    .medtrack-portal-table td:nth-child(3) {
        min-width: 220px !important;
        white-space: normal !important;
    }

    .medtrack-portal-table th:nth-child(4),
    .medtrack-portal-table td:nth-child(4) {
        min-width: 160px !important;
        white-space: normal !important;
    }

    .medtrack-portal-table th:nth-child(5),
    .medtrack-portal-table td:nth-child(5) {
        min-width: 110px !important;
        white-space: nowrap !important;
    }

    .medtrack-portal-table th:nth-child(6),
    .medtrack-portal-table td:nth-child(6) {
        min-width: 120px !important;
        white-space: nowrap !important;
    }

    .medtrack-portal-table th:nth-child(7),
    .medtrack-portal-table td:nth-child(7) {
        min-width: 170px !important;
        white-space: nowrap !important;
    }

    /* Customer Portal Deliveries: Tablet 2-Column Responsive Card Grid (769px to 1024px) */
    .customer-deliveries-card .desktop-only-table {
        display: none !important;
    }

    .customer-deliveries-card .mobile-only-cards-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
        width: 100% !important;
    }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
    .medtrack-portal-wrapper,
    .medtrack-driver-wrapper {
        margin: 12px auto 40px auto;
        padding: 0 10px;
    }

    .desktop-only-table {
        display: none !important;
    }

    .mobile-only-cards-container {
        display: flex !important;
    }

    /* Customer Portal on 641px - 768px: Maintain Balanced 2-Column Cards */
    .customer-deliveries-card .mobile-only-cards-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .portal-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    /* Customer Portal 4 KPI Cards: Balanced 2x2 Grid */
    .medtrack-customer-portal .portal-metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .metric-card {
        padding: 14px 10px;
    }

    .metric-value {
        font-size: 20px;
    }

    .medtrack-portal-hero {
        padding: 20px 16px;
        border-radius: 14px;
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .hero-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .hero-actions .btn-command-center {
        order: 1 !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 13.5px !important;
    }

    .hero-actions .btn-new-request,
    .medtrack-customer-portal .hero-actions .btn-new-request {
        order: 2 !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
    }

    .hero-actions #disp-notif-bell-wrap,
    .hero-actions .medtrack-notif-bell-wrap {
        order: 3 !important;
        grid-column: 1 / 2 !important;
        width: 100% !important;
        display: flex !important;
        margin: 0 !important;
    }

    .hero-actions #disp-notif-bell-wrap .btn-notif-bell,
    .hero-actions .medtrack-notif-bell-wrap .btn-notif-bell {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
    }

    .hero-actions .btn-logout-subtle {
        order: 4 !important;
        grid-column: 2 / 3 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 8px !important;
    }

    .hero-actions .btn-secondary-outline {
        order: 3 !important;
        grid-column: 1 / 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 8px !important;
    }

    .portal-user-meta h2 {
        font-size: 20px;
    }

    .portal-styled-form .form-row,
    .portal-styled-form .form-row-three {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    .portal-styled-form .form-group {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 0 !important;
    }

    .portal-styled-form .password-input-wrap {
        width: 100% !important;
        max-width: 100% !important;
    }

    .portal-styled-form input[type="text"],
    .portal-styled-form input[type="email"],
    .portal-styled-form input[type="tel"],
    .portal-styled-form input[type="password"],
    .portal-styled-form select,
    .portal-styled-form textarea {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .card-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-filter-pills {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Phones & Mobile Devices (<= 640px) */
@media (max-width: 640px) {
    /* Strict Viewport Overflow Guard */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    body {
        position: relative;
    }

    /* Allow full width inside theme entry-content & Gutenberg block wrappers */
    .entry-content:has(.medtrack-portal-wrapper),
    .wp-block-post-content:has(.medtrack-portal-wrapper),
    .entry-content:has(.medtrack-auth-wrapper),
    .wp-block-post-content:has(.medtrack-auth-wrapper),
    .wp-site-blocks:has(.medtrack-portal-wrapper),
    .wp-block-group:has(.medtrack-portal-wrapper),
    main:has(.medtrack-portal-wrapper),
    :where(.is-layout-constrained) > .medtrack-portal-wrapper,
    :where(.is-layout-constrained) > .medtrack-auth-wrapper,
    :where(.is-layout-constrained) > .medtrack-driver-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .medtrack-portal-wrapper,
    .medtrack-auth-wrapper,
    .medtrack-driver-wrapper {
        margin: 8px auto 28px auto !important;
        padding: 0 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Hero Card Mobile Optimization */
    .medtrack-portal-hero {
        padding: 18px 14px;
        border-radius: 14px;
        gap: 14px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-left {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        min-width: 0;
    }

    .portal-user-avatar {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 22px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .portal-user-meta {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .portal-user-meta .portal-role-tag {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
        font-size: 10.5px;
        letter-spacing: 0.3px;
        margin-bottom: 4px;
        max-width: 100%;
    }

    .verified-pill {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: middle;
        font-size: 9.5px;
        padding: 1px 6px;
    }

    .portal-user-meta h2 {
        font-size: 19px;
        line-height: 1.25;
        margin: 0 0 3px 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .portal-user-meta p {
        font-size: 12px;
        line-height: 1.35;
        color: #cbd5e1;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Mobile Hero Action Buttons: Adaptive Grid */
    .hero-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 6px !important;
        box-sizing: border-box !important;
    }

    /* Primary buttons in Dispatcher & Customer hero take full width */
    .hero-actions .btn-command-center {
        order: 1 !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 10.5px 14px !important;
        font-size: 13.5px !important;
        min-height: 42px;
    }

    .hero-actions .btn-new-request,
    .medtrack-customer-portal .hero-actions .btn-new-request {
        order: 2 !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 10.5px 14px !important;
        font-size: 13px !important;
        min-height: 42px;
    }

    /* Utility buttons share row 3 50/50 */
    .hero-actions #disp-notif-bell-wrap,
    .hero-actions .medtrack-notif-bell-wrap {
        order: 3 !important;
        grid-column: 1 / 2 !important;
        width: 100% !important;
        display: flex !important;
        margin: 0 !important;
    }

    .hero-actions #disp-notif-bell-wrap .btn-notif-bell,
    .hero-actions .medtrack-notif-bell-wrap .btn-notif-bell {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
        min-height: 40px;
    }

    .hero-actions .btn-logout-subtle {
        order: 4 !important;
        grid-column: 2 / 3 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 8px !important;
        min-height: 40px;
    }

    .hero-actions .btn-secondary-outline {
        order: 3 !important;
        grid-column: 1 / 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 8px !important;
        font-size: 12.5px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 8px !important;
        min-height: 40px;
    }

    /* Mobile Driver Hero Actions Layout (Strict 50/50 Equal Width Side-by-Side) */
    .medtrack-driver-portal .driver-hero-actions,
    .driver-hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 10px !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
    }

    .medtrack-driver-portal .driver-hero-actions .driver-duty-toggle-box,
    .driver-hero-actions .driver-duty-toggle-box {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        display: flex !important;
        border-radius: 999px !important;
        box-sizing: border-box !important;
    }

    .medtrack-driver-portal .driver-hero-actions .driver-duty-toggle-box .switch-label,
    .driver-hero-actions .driver-duty-toggle-box .switch-label {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

    .medtrack-driver-portal .driver-hero-actions .duty-pill-toggle,
    .driver-hero-actions .duty-pill-toggle {
        width: 100% !important;
        height: 100% !important;
        min-height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 7px 12px !important;
        font-size: 12.5px !important;
        font-weight: 700 !important;
        box-sizing: border-box !important;
        border-radius: 999px !important;
        white-space: nowrap !important;
    }

    .medtrack-driver-portal .driver-hero-actions .driver-quick-actions,
    .driver-hero-actions .driver-quick-actions {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: stretch !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .medtrack-driver-portal .driver-hero-actions .driver-quick-actions .btn-logout-subtle,
    .driver-hero-actions .driver-quick-actions .btn-logout-subtle,
    .driver-hero-actions .btn-logout-subtle {
        width: 100% !important;
        height: 100% !important;
        min-height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 7px 12px !important;
        font-size: 12.5px !important;
        font-weight: 700 !important;
        box-sizing: border-box !important;
        border-radius: 999px !important;
        white-space: nowrap !important;
        margin: 0 !important;
        gap: 6px !important;
    }

    /* KPI Metrics: Adaptive Grid */
    /* 4-card Portals (Dispatcher, Customer, Driver) -> Balanced 2x2 Grid (No Orphan Cards!) */
    .portal-metrics-grid,
    .medtrack-dispatcher-portal .portal-metrics-grid,
    .medtrack-customer-portal .portal-metrics-grid,
    .medtrack-driver-portal .portal-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }

    .metric-card {
        padding: 12px 6px;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        box-sizing: border-box;
    }

    .metric-card .metric-icon-wrap {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
        border-radius: 8px;
    }

    .metric-card .metric-icon-wrap svg {
        width: 16px;
        height: 16px;
    }

    .metric-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .metric-value {
        font-size: 18px;
        line-height: 1.1;
        font-weight: 800;
    }

    .metric-label {
        font-size: 10.5px;
        line-height: 1.2;
        font-weight: 700;
        color: #475569;
        margin-top: 3px;
        text-align: center;
    }

    .metric-sub {
        display: none !important;
    }

    /* Segmented Control: All Options 100% Visible on Mobile (No Hidden Tabs!) */
    .portal-tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        background: #f1f5f9 !important;
        padding: 4px !important;
        border-radius: 12px !important;
        border-bottom: none !important;
        gap: 4px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    /* 4-Tab Portals (Customer Portal) */
    .portal-tabs-nav:has(> button:nth-child(4)):not(:has(> button:nth-child(5))):not(.driver-tabs-nav):not(.disp-portal-tabs-nav) {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        background: #f1f5f9 !important;
        padding: 4px !important;
        border-radius: 14px !important;
        gap: 4px !important;
        margin-bottom: 20px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5-Tab Portals (Dispatcher Portal & Driver Portal Dedicated 5-Tab App Bar) */
    .driver-tabs-nav,
    .disp-portal-tabs-nav,
    .portal-tabs-nav.disp-portal-tabs-nav,
    .portal-tabs-nav:has(> button:nth-child(5)) {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        background: #f1f5f9 !important;
        padding: 3px !important;
        border-radius: 14px !important;
        gap: 2px !important;
        margin-bottom: 18px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .driver-tabs-nav .portal-tab-btn,
    .disp-portal-tabs-nav .portal-tab-btn,
    .portal-tabs-nav:has(> button:nth-child(4)) .portal-tab-btn,
    .portal-tabs-nav:has(> button:nth-child(5)) .portal-tab-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 6px 1px 5px 1px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        background: transparent !important;
        border-radius: 10px !important;
        border: none !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
        gap: 2px !important;
        line-height: 1.15 !important;
        min-height: 50px !important;
        box-shadow: none !important;
        position: relative !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .driver-tabs-nav .portal-tab-btn .tab-icon-wrap {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 22px !important;
    }

    .driver-tabs-nav .portal-tab-btn svg {
        width: 19px !important;
        height: 19px !important;
        color: #64748b !important;
        flex-shrink: 0 !important;
        transition: color 0.2s ease !important;
    }

    /* Notification Count Badges Pinned to Icon Top-Right */
    .tab-count-badge {
        position: absolute !important;
        top: -6px !important;
        right: -8px !important;
        min-width: 17px !important;
        height: 17px !important;
        padding: 0 4px !important;
        border-radius: 999px !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        border: 1.5px solid #ffffff !important;
        box-sizing: border-box !important;
        z-index: 2 !important;
    }

    .tab-count-badge.badge-avail {
        background: #0284c7 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 5px rgba(2, 132, 199, 0.4) !important;
    }

    .tab-count-badge.badge-routes {
        background: #f59e0b !important;
        color: #ffffff !important;
        box-shadow: 0 2px 5px rgba(245, 158, 11, 0.4) !important;
    }

    .tab-count-badge.badge-neutral {
        background: #94a3b8 !important;
        color: #ffffff !important;
    }

    .driver-tabs-nav .portal-tab-btn .label-full {
        display: none !important;
    }

    .driver-tabs-nav .portal-tab-btn .label-short {
        display: block !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        letter-spacing: -0.2px !important;
        color: #64748b !important;
        line-height: 1.2 !important;
    }

    .driver-tabs-nav .portal-tab-btn:hover {
        color: #0f172a !important;
    }

    .portal-tab-btn:not(.is-active) {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 9px 4px !important;
        font-size: 11.5px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        background: transparent !important;
        border-radius: 9px !important;
        border: none !important;
        border-bottom: none !important;
        margin-bottom: 0 !important;
        white-space: normal !important;
        gap: 4px !important;
        line-height: 1.2 !important;
        box-shadow: none !important;
        transition: all 0.2s ease !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .portal-tab-btn svg {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0 !important;
    }

    .portal-tab-btn:hover {
        color: #0f172a !important;
    }

    .portal-tab-btn.is-active,
    .driver-tabs-nav .portal-tab-btn.is-active,
    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active {
        background: #ffffff !important;
        color: #0284c7 !important;
        box-shadow: 0 3px 10px rgba(0, 21, 44, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        border-radius: 11px !important;
        border: 1px solid rgba(0, 0, 0, 0.04) !important;
    }

    .driver-tabs-nav .portal-tab-btn.is-active svg,
    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active svg {
        color: #0284c7 !important;
    }

    .driver-tabs-nav .portal-tab-btn.is-active .label-short,
    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active .label-short {
        color: #0284c7 !important;
        font-weight: 800 !important;
    }

    .driver-tabs-nav .portal-tab-btn.is-active::after,
    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active::after {
        display: none !important;
    }

    .portal-tab-btn .label-full {
        display: none !important;
    }

    .portal-tab-btn .label-short {
        display: inline !important;
    }

    /* Portal Content Cards & Form Inputs */
    .portal-content-card {
        padding: 16px 14px;
        border-radius: 12px;
        margin-bottom: 16px;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .card-action-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .card-action-bar .search-box {
        min-width: 0 !important;
        width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
    }

    .card-action-bar .table-filter-pills {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .card-action-bar .filter-pill {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 8px 4px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .customer-deliveries-card .mobile-only-cards-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .card-action-bar .action-buttons-group,
    .card-action-bar .action-buttons-group a,
    .card-action-bar .portal-btn-secondary {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .drivers-cards-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .card-header-styled {
        gap: 10px;
        margin-bottom: 14px;
    }

    .card-header-styled .header-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 15px;
    }

    .card-header-styled h3 {
        font-size: 15.5px;
    }

    .card-header-styled p {
        font-size: 12px;
    }

    .portal-styled-form .form-group input,
    .portal-styled-form .form-group select,
    .portal-styled-form .form-group textarea {
        font-size: 16px !important; /* Prevents iOS Safari auto-zoom */
        padding: 11px 12px;
        border-radius: 8px;
        box-sizing: border-box;
        width: 100%;
    }

    .portal-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 13px 16px;
        font-size: 14.5px;
        border-radius: 8px;
    }

    /* Driver Route Cards on Mobile */
    .driver-route-card {
        padding: 16px 14px;
        border-radius: 14px;
        border-left: 4px solid #0284c7;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }

    .driver-route-card.card-stat {
        border-left: 5px solid #ef4444 !important;
    }

    .route-card-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 12px;
        gap: 8px;
    }

    .route-card-header > div {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .driver-route-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
    }

    .route-specimen-banner {
        padding: 6px 10px !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
        gap: 8px !important;
    }

    .driver-route-timeline {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .timeline-step {
        padding: 12px 10px !important;
        gap: 10px !important;
        border-radius: 10px !important;
    }

    .step-header-block {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 4px;
    }

    .step-type-pill {
        font-size: 9.5px !important;
        font-weight: 800 !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
    }

    .step-facility-title {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        line-height: 1.3 !important;
        color: #0f172a !important;
        word-break: break-word !important;
        margin: 2px 0 0 0 !important;
    }

    .step-addr {
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: #475569 !important;
        margin: 0 0 4px 0 !important;
        word-break: break-word !important;
    }

    .step-contact-text {
        font-size: 11.5px !important;
        color: #64748b !important;
        margin: 0 0 4px 0 !important;
    }

    .step-action-strip {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 8px !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e2e8f0 !important;
        box-sizing: border-box !important;
    }

    .step-action-strip:has(> :only-child) {
        grid-template-columns: 1fr !important;
    }

    .step-action-strip .btn-step-nav,
    .step-action-strip .contact-phone-link {
        width: 100% !important;
        min-height: 38px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        border-radius: 8px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        text-decoration: none !important;
    }

    .step-action-strip .btn-step-nav {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
    }

    .step-action-strip .contact-phone-link {
        background: #f0f9ff !important;
        color: #0284c7 !important;
        border: 1px solid #bae6fd !important;
    }

    .driver-workflow-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding-top: 10px !important;
        margin-top: 10px !important;
    }

    .driver-workflow-actions button,
    .driver-workflow-actions a {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 16px !important;
        font-size: 14.5px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        min-height: 46px !important;
        box-shadow: 0 3px 12px rgba(2, 132, 199, 0.25) !important;
    }

    /* Mobile Notification Dropdown Sheet */
    #driver-notif-dropdown,
    #disp-notif-dropdown {
        position: fixed !important;
        top: 60px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 80px) !important;
        z-index: 9999999 !important;
        border-radius: 16px !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: 0 25px 60px rgba(0, 15, 35, 0.45), 0 0 0 100vmax rgba(15, 23, 42, 0.5) !important;
        overflow: hidden !important;
    }

    #driver-notif-dropdown .notif-dropdown-header,
    #disp-notif-dropdown .notif-dropdown-header {
        padding: 12px 14px !important;
    }

    #driver-notif-dropdown .notif-hdr-title,
    #disp-notif-dropdown .notif-hdr-title {
        font-size: 13.5px !important;
    }

    #driver-notif-dropdown .notif-hdr-actions,
    #disp-notif-dropdown .notif-hdr-actions {
        gap: 6px !important;
    }

    #driver-notif-dropdown .btn-mark-all-read,
    #disp-notif-dropdown .btn-mark-all-read {
        padding: 4px 10px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    #driver-notif-dropdown .btn-close-notif-dd,
    #disp-notif-dropdown .btn-close-notif-dd {
        width: 26px !important;
        height: 26px !important;
        font-size: 16px !important;
    }

    #driver-notif-dropdown .notif-dropdown-quick-tabs,
    #disp-notif-dropdown .notif-dropdown-quick-tabs {
        margin: 8px 10px 6px 10px !important;
        padding: 3px !important;
        gap: 3px !important;
    }

    #driver-notif-dropdown .notif-quick-filter,
    #disp-notif-dropdown .notif-quick-filter {
        font-size: 11px !important;
        padding: 6px 2px !important;
    }

    #driver-notif-dropdown .notif-dropdown-body,
    #disp-notif-dropdown .notif-dropdown-body {
        max-height: calc(100vh - 210px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Modal Sheet on Mobile */
    .medtrack-modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .medtrack-modal-box {
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .signature-pad-canvas {
        height: 180px;
    }
}

/* Very Small Phones (<= 380px) */
@media (max-width: 380px) {
    .portal-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .portal-metrics-grid .metric-card:last-child {
        grid-column: span 2;
    }

    .portal-metrics-grid:has(> .metric-card:nth-child(4)) .metric-card:last-child,
    .medtrack-driver-portal .portal-metrics-grid .metric-card:last-child,
    .medtrack-dispatcher-portal .portal-metrics-grid .metric-card:last-child {
        grid-column: span 1 !important;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .driver-tabs-nav .portal-tab-btn {
        padding: 6px 0 5px 0 !important;
        font-size: 9.5px !important;
    }

    .driver-tabs-nav .portal-tab-btn svg {
        width: 17px !important;
        height: 17px !important;
    }

    .driver-tabs-nav .portal-tab-btn .tab-icon-wrap {
        width: 22px !important;
        height: 20px !important;
    }
}

/* ==========================================================================
   DRIVER INFORMATION COMPLIANCE & ADMIN APPROVAL LOCK STYLES
   ========================================================================== */
.badge-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.driver-compliance-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.driver-compliance-notice-box .compliance-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.2;
}

.driver-locked-form .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    margin-bottom: 8px !important;
}

.driver-locked-form .form-group {
    margin-bottom: 0 !important;
    min-width: 0 !important;
}

.driver-locked-form label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-bottom: 3px !important;
    line-height: 1.25 !important;
    min-width: 0 !important;
}

.driver-locked-form label .field-label-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
}

.field-lock-tag,
.driver-locked-form .field-lock-tag {
    font-size: 9.5px !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    margin-left: 4px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.driver-locked-form .locked-input-wrap {
    width: 100% !important;
    min-width: 0 !important;
}

.input-locked,
.driver-locked-form .input-locked {
    height: 36px !important;
    padding: 6px 9px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    cursor: not-allowed !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
}

.badge-val-input,
.driver-locked-form .badge-val-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    color: #0369a1 !important;
    font-weight: 700 !important;
}

.driver-pending-request-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.driver-pending-request-card .pending-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.pending-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    animation: pendingPulse 2s infinite;
}

@keyframes pendingPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pending-title {
    font-size: 14px;
    color: #92400e;
    display: flex;
    align-items: center;
}

.pending-date-tag {
    font-size: 11.5px;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.pending-subtext {
    font-size: 12.5px;
    color: #78350f;
    margin: 0 0 10px 0;
}

.changes-diff-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.diff-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.diff-item-full {
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    margin-top: 4px;
}

.diff-label {
    font-weight: 700;
    color: #475569;
    min-width: 100px;
}

.diff-old {
    color: #94a3b8;
    text-decoration: line-through;
}

.diff-arrow {
    color: #f59e0b;
    font-weight: 800;
}

.diff-new {
    color: #0369a1;
}

.diff-reason {
    color: #475569;
    font-style: italic;
}

.pending-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pending-footer-note {
    font-size: 12px;
    color: #92400e;
}

.request-changes-cta-wrap {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.request-changes-cta-wrap #btn-open-change-form,
#btn-open-change-form {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 11px 20px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 21, 44, 0.2) !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

.request-changes-cta-wrap #btn-open-change-form:hover,
#btn-open-change-form:hover {
    background: linear-gradient(135deg, #002855 0%, #003566 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 21, 44, 0.25) !important;
    color: #ffffff !important;
}

.request-changes-cta-wrap #btn-open-change-form .btn-icon {
    font-size: 14px;
    line-height: 1;
}

.request-cta-hint {
    font-size: 12.5px;
    color: #64748b;
    max-width: 380px;
    line-height: 1.4;
}

.driver-locked-form .request-changes-cta-wrap {
    margin-top: 14px !important;
    padding-top: 12px !important;
    gap: 10px !important;
}

.driver-change-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    align-items: stretch;
}

.driver-change-form-actions .portal-submit-btn,
.driver-change-form-actions button[type="submit"] {
    width: 100%;
    height: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    font-size: 13.5px;
    border-radius: 8px;
    box-sizing: border-box;
    margin: 0;
}

.driver-change-form-actions .portal-btn-secondary,
.driver-change-form-actions #btn-cancel-change-form {
    width: 100%;
    height: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
    box-sizing: border-box;
    margin: 0;
}

@media (max-width: 768px) {
    .driver-locked-form .request-changes-cta-wrap {
        margin-top: 10px !important;
        padding-top: 10px !important;
        width: 100% !important;
    }

    .driver-locked-form .request-changes-cta-wrap #btn-open-change-form {
        width: 100% !important;
    }

    .driver-compliance-notice-box {
        margin-bottom: 12px !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}

/* ========================================================
   MedTrack NC - Stylish Modern Popups & Alerts
   ======================================================== */
.medtrack-ui-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99999999 !important;
    display: none !important;
    opacity: 0;
    pointer-events: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    transition: opacity 0.18s ease;
}

.medtrack-ui-popup-overlay.is-active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.medtrack-ui-popup-box {
    background: #ffffff !important;
    max-width: 480px !important;
    width: 100% !important;
    border-radius: 20px !important;
    padding: 32px 28px 26px 28px !important;
    box-shadow: 0 25px 60px -12px rgba(0, 21, 44, 0.35), 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    text-align: center !important;
    animation: mtPopupEntry 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    position: relative !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
}

@keyframes mtPopupEntry {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(14px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.medtrack-ui-popup-icon-wrap {
    width: 66px !important;
    height: 66px !important;
    border-radius: 50% !important;
    margin: 0 auto 18px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    transition: transform 0.2s ease !important;
}

.medtrack-ui-popup-icon-wrap.is-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.15), 0 10px 22px -3px rgba(16, 185, 129, 0.45) !important;
}

.medtrack-ui-popup-icon-wrap.is-error,
.medtrack-ui-popup-icon-wrap.is-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.15), 0 10px 22px -3px rgba(239, 68, 68, 0.45) !important;
}

.medtrack-ui-popup-icon-wrap.is-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.15), 0 10px 22px -3px rgba(245, 158, 11, 0.45) !important;
}

.medtrack-ui-popup-icon-wrap.is-confirm,
.medtrack-ui-popup-icon-wrap.is-question,
.medtrack-ui-popup-icon-wrap.is-info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 0 0 7px rgba(2, 132, 199, 0.15), 0 10px 22px -3px rgba(2, 132, 199, 0.45) !important;
}

.medtrack-ui-popup-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 10px 0 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.25 !important;
}

.medtrack-ui-popup-message {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    margin: 0 0 24px 0 !important;
    word-break: break-word !important;
}

.medtrack-ui-popup-actions {
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 12px !important;
    position: relative !important;
    z-index: 5 !important;
}

.mt-popup-btn {
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.18s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    outline: none !important;
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
}

.mt-popup-btn * {
    pointer-events: none !important;
}

.mt-popup-btn:active {
    transform: scale(0.98) !important;
}

.mt-popup-btn-confirm {
    flex: 1 1 auto !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 6px 18px -2px rgba(2, 132, 199, 0.35) !important;
}

.mt-popup-btn-confirm:hover {
    box-shadow: 0 10px 22px -2px rgba(2, 132, 199, 0.45) !important;
    transform: translateY(-2px) !important;
}

.mt-popup-btn-confirm.is-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 6px 18px -2px rgba(16, 185, 129, 0.35) !important;
}

.mt-popup-btn-confirm.is-success:hover {
    box-shadow: 0 10px 22px -2px rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-2px) !important;
}

.mt-popup-btn-confirm.is-error,
.mt-popup-btn-confirm.is-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 6px 18px -2px rgba(239, 68, 68, 0.35) !important;
}

.mt-popup-btn-confirm.is-error:hover,
.mt-popup-btn-confirm.is-danger:hover {
    box-shadow: 0 10px 22px -2px rgba(239, 68, 68, 0.45) !important;
    transform: translateY(-2px) !important;
}

.mt-popup-btn-cancel {
    flex: 0 0 auto !important;
    min-width: 110px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1.5px solid #cbd5e1 !important;
}

.mt-popup-btn-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}
/* MedTrack UI Prompt Input & Presets Styling */
.medtrack-ui-popup-box.is-prompt {
    max-width: 520px !important;
    text-align: left !important;
}

.medtrack-ui-popup-box.is-prompt .medtrack-ui-popup-title {
    text-align: center !important;
}

.medtrack-ui-popup-box.is-prompt .medtrack-ui-popup-message {
    text-align: center !important;
    margin-bottom: 18px !important;
}

.medtrack-ui-popup-input-area {
    margin: 0 0 20px 0 !important;
    text-align: left !important;
}

.medtrack-ui-popup-presets {
    margin-bottom: 12px !important;
    background: #f8fafc !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px dashed #cbd5e1 !important;
}

.mt-presets-label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #64748b !important;
    margin-bottom: 7px !important;
}

.mt-presets-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.mt-preset-chip {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1.25 !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.mt-preset-chip:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.08) !important;
}

.mt-preset-chip:active {
    transform: translateY(0) scale(0.98) !important;
}

.mt-preset-chip.is-selected {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.medtrack-ui-popup-textarea,
.medtrack-ui-popup-input {
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    outline: none !important;
    resize: vertical !important;
    min-height: 78px !important;
}

.medtrack-ui-popup-textarea:focus,
.medtrack-ui-popup-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.18) !important;
}

.medtrack-ui-popup-box.is-danger .medtrack-ui-popup-textarea:focus,
.medtrack-ui-popup-box.is-danger .medtrack-ui-popup-input:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.18) !important;
}

.medtrack-ui-popup-textarea.has-error,
.medtrack-ui-popup-input.has-error {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.2) !important;
    animation: mtShake 0.3s ease !important;
}

@keyframes mtShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.mt-popup-validation-error {
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 7px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

@media (max-width: 480px) {
    .medtrack-ui-popup-box {
        padding: 24px 18px 20px 18px !important;
        max-width: calc(100vw - 28px) !important;
        border-radius: 16px !important;
    }
    .medtrack-ui-popup-actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }
    .mt-popup-btn {
        width: 100% !important;
        flex: none !important;
        min-width: 0 !important;
        padding: 12px 16px !important;
    }
    .mt-popup-btn-cancel,
    .mt-popup-btn-confirm {
        width: 100% !important;
        flex: none !important;
    }
}

/* ========================================================
   MedTrack In-App Notification Center & Activity Stream Styles
   ======================================================== */

.medtrack-notif-bell-wrap {
    position: relative;
    display: inline-flex;
}

.btn-notif-bell {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
    padding: 8px 14px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-notif-bell:hover {
    background: rgba(2, 132, 199, 0.18) !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18) !important;
}

.notif-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.notif-tab-badge {
    margin-left: 6px;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 12px !important;
    display: inline-block;
}

.notif-tab-badge[style*="display: none"],
.notif-tab-badge[style*="display:none"],
.notif-tab-badge.is-hidden {
    display: none !important;
}

/* Activity Dropdown */
.medtrack-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 390px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.22), 0 8px 16px -4px rgba(15, 23, 42, 0.12);
    z-index: 999999 !important;
    overflow: hidden;
    animation: mtNotifFadeDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-dropdown-bottom-bar {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.btn-dd-view-all-notifs {
    background: transparent;
    border: none;
    color: #0284c7;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.18s ease;
}

.btn-dd-view-all-notifs:hover {
    color: #0369a1;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .medtrack-notif-dropdown {
        position: fixed;
        top: 60px;
        left: 16px;
        right: 16px;
        width: auto;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 100px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    }
}

@keyframes mtNotifFadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #00152c 0%, #002855 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-hdr-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    min-width: 0;
    flex: 1;
}

.notif-hdr-title .notif-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-hdr-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.notif-hdr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-mark-all-read {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.18s ease !important;
    line-height: 1.2 !important;
}

.btn-mark-all-read:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-close-notif-dd {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.18s ease !important;
}

.btn-close-notif-dd:hover {
    background: rgba(239, 68, 68, 0.4) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    transform: scale(1.08);
}

.notif-dropdown-quick-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    background: #f1f5f9 !important;
    padding: 4px !important;
    margin: 10px 14px 8px 14px !important;
    border-radius: 10px !important;
    gap: 4px !important;
    border: 1px solid #e2e8f0 !important;
}

.notif-quick-filter {
    background: transparent !important;
    border: none !important;
    padding: 6px 4px !important;
    border-radius: 7px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.18s ease !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.notif-quick-filter:hover {
    color: #0f172a !important;
}

.notif-quick-filter.is-active {
    background: #ffffff !important;
    color: #0284c7 !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.notif-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notif-dropdown-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.18s ease;
}

.notif-dropdown-item:last-child {
    border-bottom: none;
}

.notif-dropdown-item.is-unread {
    background: #f0f9ff;
    border-left: 3.5px solid #0284c7;
}

.notif-dropdown-item.is-read {
    background: #ffffff;
    opacity: 0.85;
}

.notif-dropdown-item:hover {
    background: #f8fafc;
}

.notif-dd-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.notif-dd-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.notif-dd-title-row strong {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.notif-dd-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.notif-dd-text {
    margin: 0 0 6px 0;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
    word-break: break-word;
}

.notif-dd-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-dd-view-trip {
    background: transparent;
    border: none;
    color: #0284c7;
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.btn-dd-view-trip:hover {
    color: #0369a1;
}

.btn-dd-mark-read {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

.btn-dd-mark-read:hover {
    color: #0f172a;
    text-decoration: underline;
}

.notif-empty-state {
    text-align: center;
    padding: 36px 20px;
    color: #94a3b8;
}

.notif-empty-state span {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.notif-empty-state p {
    margin: 0;
    font-size: 13px;
}

/* Full History List in Tab Panel */
.notif-panel-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.notif-filter-btn-group {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.btn-notif-filter {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-notif-filter.is-active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-mark-all-read-main {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mark-all-read-main:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.notif-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-record-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.notif-record-card.is-unread {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #7dd3fc;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
    border-left: 4px solid #0284c7;
}

.notif-record-card.is-read {
    background: #ffffff;
    border-color: #e2e8f0;
    opacity: 0.92;
}

.notif-record-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.notif-record-title-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.notif-record-icon-box {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 7px;
    background: rgba(2, 132, 199, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notif-record-card.is-unread .notif-record-icon-box {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.15);
}

.notif-record-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notif-record-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.notif-record-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.notif-record-time {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-record-msg {
    margin: 0;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

.notif-record-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed rgba(226, 232, 240, 0.7);
}

.notif-trip-link-btn,
.disp-notif-manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #00152c;
    color: #ffffff !important;
    border: none;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.2;
}

.notif-trip-link-btn:hover,
.disp-notif-manage-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.notif-badge-read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #16a34a;
    font-size: 11px;
    font-weight: 700;
    background: rgba(22, 163, 74, 0.08);
    padding: 2px 7px;
    border-radius: 5px;
}

.notif-badge-unviewed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
}

.btn-mark-single-read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #0284c7;
    color: #0284c7;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.2;
}

.btn-mark-single-read:hover {
    background: #f0f9ff;
    color: #0284c7;
}

.unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0284c7;
    display: inline-block;
}

.empty-notif-box {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.empty-notif-box .empty-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 12px;
}

.empty-notif-box h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #0f172a;
    font-weight: 800;
}

.empty-notif-box p {
    margin: 0;
    font-size: 13.5px;
    color: #64748b;
}

#btn-dismiss-driver-alert:hover {
    background: rgba(22, 163, 74, 0.28) !important;
    transform: scale(1.05);
}

.notif-badge-unviewed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0284c7;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(2, 132, 199, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.notif-record-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.notif-record-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.notif-dropdown-item {
    cursor: pointer;
    transition: background 0.15s ease;
}

.notif-dropdown-item:hover {
    background: #f8fafc;
}

.driver-live-sync-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: driverPulse 2s infinite;
}

@keyframes driverPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   PROOF OF DELIVERY (POD) ASSET REVIEW, VIEW & DOWNLOAD STYLES
   ========================================================================== */

.pod-review-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.pod-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 2px;
}

.pod-review-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.pod-review-title {
    color: #065f46;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pod-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.pod-status-badge.badge-awaiting {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.pod-status-badge.badge-accepted {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.pod-status-badge.badge-missing {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.pod-review-cards-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.pod-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    width: 100%;
}

.pod-info-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.pod-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 7px;
    border-bottom: 1px dashed #e2e8f0;
}

.pod-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pod-split-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pod-field-unit {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pod-field-label {
    font-size: 10.5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #64748b;
}

.pod-field-value {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.pod-full-name-banner {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pod-full-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 800;
    width: fit-content;
}

.pod-verified-tick {
    font-size: 10.5px;
    font-weight: 700;
    background: #16a34a;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 4px;
    display: inline-block;
    line-height: 1.2;
}

.pod-handover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.pod-datetime-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    box-sizing: border-box;
}

.pod-datetime-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.pod-date-val {
    font-size: 13.5px;
    color: #0f172a;
    font-weight: 800;
    white-space: nowrap;
}

.pod-time-val {
    font-size: 13px;
    color: #0369a1;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: nowrap;
}

.pod-tz-tag {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.pod-temp-box {
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 12.5px;
    box-sizing: border-box;
}

.pod-temp-box strong {
    color: #1e40af;
    font-weight: 800;
    font-size: 13.5px;
    word-break: break-word;
}

.pod-temp-unified-box {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 3px 4px 3px 12px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 44px !important;
}

.pod-temp-unified-box:focus-within {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.pod-temp-icon {
    font-size: 16px !important;
    margin-right: 8px !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.pod-temp-unified-box .pod-temp-num-input {
    flex: 1 1 auto !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    min-width: 80px !important;
    margin: 0 !important;
    height: auto !important;
}

.pod-temp-unified-box .pod-temp-num-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.pod-temp-unified-box .pod-temp-num-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.pod-temp-unit-toggle {
    display: inline-flex !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 2px !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
    margin-left: 8px !important;
}

.pod-unit-btn {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    line-height: 1.2 !important;
}

.pod-unit-btn:hover {
    color: #0f172a !important;
}

.pod-unit-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3) !important;
}

.pod-notes-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #78350f;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
}

.pod-notes-banner strong {
    color: #92400e;
    font-weight: 700;
    flex-shrink: 0;
}

.pod-review-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 12.5px;
    color: #1e293b;
    line-height: 1.5;
}

.pod-meta-cell {
    display: flex;
    align-items: baseline;
    gap: 6px;
    word-break: break-word;
}

.pod-meta-cell strong {
    color: #475569;
    font-weight: 600;
    flex-shrink: 0;
}

.pod-meta-cell-wide {
    grid-column: 1 / -1;
}

.pod-temp-value {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11.5px;
}

.pod-assets-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
}

.pod-assets-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 2px;
}

.pod-assets-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pod-assets-counter {
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 12px;
}

.pod-assets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.pod-asset-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.pod-asset-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
    transform: translateY(-1px);
}

.pod-asset-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    min-height: 38px;
    box-sizing: border-box;
}

.pod-asset-label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pod-asset-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.pod-asset-badge.badge-photo {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.pod-asset-badge.badge-missing {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pod-asset-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11.5px;
    min-height: 32px;
    box-sizing: border-box;
}

.pod-subbar-label {
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
}

.pod-subbar-value {
    color: #0f172a;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.pod-asset-preview-wrap {
    height: 125px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    padding: 8px;
    box-sizing: border-box;
}

.pod-asset-thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.pod-thumb-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.pod-asset-card:hover .pod-asset-thumb {
    transform: scale(1.03);
}

.pod-asset-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.pod-asset-preview-wrap:hover .pod-asset-overlay {
    opacity: 1;
}

.pod-overlay-hint {
    background: #ffffff;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pod-asset-actions {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
    box-sizing: border-box;
}

.btn-pod-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-pod-action:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-pod-action.btn-pod-download-asset:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.pod-asset-card-empty {
    border-style: dashed;
    background: #f8fafc;
}

.pod-asset-empty-state {
    height: 165px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
}

.pod-empty-icon {
    font-size: 26px;
    opacity: 0.45;
}

.pod-empty-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* POD Decision Action Toolbar */
.pod-review-toolbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
    width: 100%;
    box-sizing: border-box;
}

.btn-pod-decision {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.btn-pod-decision:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.btn-pod-decision:active:not(:disabled) {
    transform: translateY(0);
}

.btn-disp-accept-pod {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #059669;
    color: #ffffff;
}

.btn-disp-accept-pod:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-disp-accept-pod.is-locked,
.btn-disp-accept-pod:disabled {
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    color: #ffffff !important;
    opacity: 0.65;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-disp-correction-pod {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    border-color: #c2410c;
    color: #ffffff;
}

.btn-disp-correction-pod:hover {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-disp-reject-pod {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-color: #b91c1c;
    color: #ffffff;
}

.btn-disp-reject-pod:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

@media (max-width: 540px) {
    .pod-review-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .pod-assets-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ==========================================================================
   CHAIN OF CUSTODY ARCHIVE (IMMUTABLE AUDIT TRAIL)
   ========================================================================== */

.pod-history-section,
.pod-history-archive-wrap {
    margin-top: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pod-history-details {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px -2px rgba(0, 21, 44, 0.06) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
    box-sizing: border-box !important;
}

.pod-history-details:hover {
    border-color: #94a3b8 !important;
}

.pod-history-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    background: #f8fafc !important;
    cursor: pointer !important;
    user-select: none !important;
    list-style: none !important;
    transition: background-color 0.18s ease, border-color 0.18s ease !important;
    box-sizing: border-box !important;
}

.pod-history-summary::-webkit-details-marker,
.pod-history-summary::marker {
    display: none !important;
    content: "" !important;
}

.pod-history-summary:hover {
    background: #f1f5f9 !important;
}

.pod-history-details[open] .pod-history-summary {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.pod-history-summary-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
}

.pod-history-icon-badge {
    font-size: 16px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.pod-history-title-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.pod-history-title {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
}

.pod-history-counter-pill {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0369a1 !important;
    background: #e0f2fe !important;
    border: 1px solid #bae6fd !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.pod-history-summary-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

.pod-history-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #047857 !important;
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    padding: 3px 9px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px !important;
}

.pod-history-toggle-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease !important;
}

.pod-history-details[open] .pod-history-toggle-icon {
    transform: rotate(180deg) !important;
    color: #0f172a !important;
}

/* History Body & Revision Cards */
.pod-history-body {
    padding: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
}

.pod-revision-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 21, 44, 0.04) !important;
    box-sizing: border-box !important;
}

.pod-revision-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.pod-revision-tag-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.pod-revision-tag {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: #00152c !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
    letter-spacing: 0.2px !important;
}

.pod-revision-subtag {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
}

.pod-revision-date {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11.5px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.pod-revision-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pod-rev-meta-tile {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 7px !important;
    padding: 7px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    box-sizing: border-box !important;
}

.pod-rev-meta-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
}

.pod-rev-meta-val {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    word-break: break-word !important;
}

.pod-revision-note {
    background: #fffbeb !important;
    border: 1px solid #fef3c7 !important;
    border-left: 3.5px solid #f59e0b !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    color: #92400e !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

.pod-revision-assets-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pod-rev-asset-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    min-height: 110px !important;
}

.pod-rev-asset-card.is-empty {
    border-style: dashed !important;
    border-color: #cbd5e1 !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
}

.pod-rev-asset-head {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    width: 100% !important;
    text-align: center !important;
}

.pod-rev-asset-preview {
    width: 100% !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
}

.pod-rev-asset-img {
    max-height: 65px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 2px !important;
}

.pod-rev-asset-img.pod-rev-photo {
    object-fit: cover !important;
    height: 65px !important;
    width: 100% !important;
}

.pod-rev-asset-actions {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
}

.pod-rev-asset-actions .btn-pod-action {
    padding: 4px 8px !important;
    font-size: 11px !important;
}

@media (max-width: 560px) {
    .pod-history-summary {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .pod-history-summary-right {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .pod-revision-assets-grid {
        grid-template-columns: 1fr !important;
    }
    .pod-revision-meta-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   LIGHTBOX MODAL FOR HIGH-RES POD ASSET VIEWING
   ========================================================================== */

.medtrack-pod-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.medtrack-pod-lightbox-dialog {
    width: 94%;
    max-width: 820px;
    max-height: 92vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: podLightboxPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes podLightboxPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pod-lightbox-header {
    background: #090e1a;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pod-lightbox-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pod-lightbox-tag {
    background: rgba(0, 210, 255, 0.16);
    color: #00d2ff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pod-lightbox-header h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
}

.pod-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-lightbox-download:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-lightbox-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.btn-lightbox-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.pod-lightbox-body {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    min-height: 240px;
}

.pod-lightbox-viewport {
    max-height: calc(88vh - 150px);
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pod-lightbox-image {
    max-width: 100%;
    max-height: calc(88vh - 170px);
    object-fit: contain;
    display: block;
}

.pod-lightbox-footer {
    background: #090e1a;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
}

.pod-lightbox-meta-note {
    color: #94a3b8;
    font-size: 12px;
}

.btn-lightbox-accept-pod {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-lightbox-accept-pod:hover {
    background: #059669;
}

/* Mobile Responsive Adjustments */
@media (max-width: 580px) {
    .pod-assets-grid {
        grid-template-columns: 1fr;
    }
    .medtrack-pod-lightbox-dialog {
        width: 98%;
        max-height: 95vh;
    }
    .pod-lightbox-header {
        padding: 10px 12px;
    }
    .pod-lightbox-header h3 {
        font-size: 13px;
    }
    .btn-lightbox-download span {
        display: none;
    }
    .btn-lightbox-download {
        padding: 7px 10px;
    }
}

/* ==========================================================================
   MEDTRACK PROOF OF DELIVERY (POD) REVIEW WORKFLOW: APPROVE / CORRECTION / REJECT
   ========================================================================== */

/* 1. Dispatcher Action Buttons */
.disp-btn-correction-pod-action,
.btn-disp-correction-pod {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 13px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: 1px solid #c2410c !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.28) !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.disp-btn-correction-pod-action:hover,
.btn-disp-correction-pod:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.42) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.disp-btn-correction-pod-action:active,
.btn-disp-correction-pod:active {
    transform: translateY(0) !important;
}

.disp-btn-reject-pod-action,
.btn-disp-reject-pod {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 13px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: 1px solid #b91c1c !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.28) !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.disp-btn-reject-pod-action:hover,
.btn-disp-reject-pod:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.42) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.disp-btn-reject-pod-action:active,
.btn-disp-reject-pod:active {
    transform: translateY(0) !important;
}

/* 2. Driver Portal POD Correction Alert Box & Buttons */
.driver-pod-correction-box {
    background: #fff7ed !important;
    border: 1.5px solid #fed7aa !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
    color: #9a3412 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-flow-warning {
    background: #ea580c !important;
    border-color: #c2410c !important;
    color: #ffffff !important;
}

.btn-flow-warning:hover {
    background: #c2410c !important;
    border-color: #9a3412 !important;
    color: #ffffff !important;
}

/* 3. Under Investigation (pod_rejected) Hero & Milestone Styling */
.hero-status-box.status-box-pod_rejected {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

.hero-status-box.status-box-pod_rejected .status-pulse-dot {
    background: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
}

.hero-status-box.status-box-pod_rejected .status-sub {
    color: #b91c1c !important;
}

.hero-status-box.status-box-pod_rejected .status-main {
    color: #991b1b !important;
}

.tracker-node.is-pod-rejected .node-bullet {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
    font-weight: 800 !important;
}

.tracker-node.is-pod-rejected .node-name {
    color: #b91c1c !important;
}

.tracker-node.is-pod-rejected .node-sub {
    color: #ef4444 !important;
}

/* Dispatcher Quick Manage Modal Header, Summary Card & Footer */
.disp-modal-header {
    background: #00152c !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 14px 18px !important;
    box-sizing: border-box !important;
}

.disp-modal-header-main {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.disp-modal-ref-badge {
    background: rgba(0, 210, 255, 0.18) !important;
    color: #00d2ff !important;
    border: 1px solid rgba(0, 210, 255, 0.35) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.2px !important;
}

.disp-modal-header-info {
    min-width: 0 !important;
    flex: 1 !important;
}

.disp-modal-header-title {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
}

.disp-modal-header-route {
    margin: 3px 0 0 0 !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
}

#dispatcher-quick-modal .modal-close-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #cbd5e1 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

#dispatcher-quick-modal .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.disp-modal-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
}

.disp-modal-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.disp-modal-summary-field {
    min-width: 0;
}

.disp-modal-customer-line {
    font-size: 12.5px;
    color: #334155;
}

.disp-modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 12px 18px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.disp-modal-footer .disp-modal-footer-brand {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.disp-modal-footer .btn-close-disp-modal,
#dispatcher-quick-modal .portal-btn-secondary.btn-close-disp-modal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 18px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    line-height: 1.3 !important;
}

.disp-modal-footer .btn-close-disp-modal:hover,
#dispatcher-quick-modal .portal-btn-secondary.btn-close-disp-modal:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* 4. Responsive Layout for Dispatcher Cards and Actions */
@media (max-width: 680px) {
    .disp-card-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .disp-cell-driver {
        width: 100% !important;
        min-width: 0 !important;
    }

    .disp-driver-card-badge {
        width: 100% !important;
    }

    .disp-cell-actions {
        width: 100% !important;
        margin-left: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .disp-cell-actions > button,
    .disp-cell-actions > a,
    .disp-cell-actions > span {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 8px 8px !important;
        font-size: 11.5px !important;
        white-space: nowrap !important;
    }

    .disp-cell-actions > button svg,
    .disp-cell-actions > a svg {
        flex-shrink: 0 !important;
    }

    .disp-cell-actions > :only-child {
        grid-column: 1 / -1 !important;
    }

    .disp-cell-actions > :nth-child(3):last-child {
        grid-column: 1 / -1 !important;
    }

    /* Segmented Tab Navigation for Dispatcher (All 5 Tabs in 1 Clean Row) */
    .portal-tabs-nav.disp-portal-tabs-nav,
    .disp-portal-tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 3px !important;
        gap: 2px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .disp-portal-tabs-nav .portal-tab-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 2px !important;
        padding: 6px 1px 5px 1px !important;
        min-height: 48px !important;
        border-radius: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
    }

    .disp-portal-tabs-nav .portal-tab-btn svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }

    .disp-portal-tabs-nav .tab-label-text .label-full {
        display: none !important;
    }

    .disp-portal-tabs-nav .tab-label-text .label-short {
        display: inline !important;
        font-size: 10.5px !important;
        font-weight: 700 !important;
    }

    .disp-portal-tabs-nav .disp-tab-badge {
        font-size: 9.5px !important;
        min-width: 16px !important;
        height: 16px !important;
        padding: 0 4px !important;
        line-height: 1 !important;
        border-radius: 999px !important;
        flex-shrink: 0 !important;
    }

    /* Modal Container & Padding */
    .medtrack-modal-overlay {
        padding: 6px !important;
    }

    #dispatcher-quick-modal .medtrack-modal-box {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px !important;
    }

    #dispatcher-quick-modal .modal-header,
    .disp-modal-header {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .disp-modal-header-main {
        gap: 8px !important;
    }

    .disp-modal-ref-badge {
        font-size: 10.5px !important;
        padding: 3px 6px !important;
    }

    .disp-modal-header-title {
        font-size: 13.5px !important;
    }

    .disp-modal-header-route {
        font-size: 11px !important;
    }

    .disp-modal-summary-card {
        padding: 10px 11px !important;
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    .disp-modal-summary-row {
        flex-direction: column !important;
        gap: 4px !important;
        margin-bottom: 5px !important;
    }

    #dispatcher-quick-modal .modal-body {
        padding: 10px 8px !important;
    }

    #dispatcher-quick-modal .modal-footer,
    .disp-modal-footer {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 10px 12px !important;
    }

    .disp-modal-footer .disp-modal-footer-brand {
        display: none !important;
    }

    .disp-modal-footer .btn-close-disp-modal,
    #dispatcher-quick-modal .portal-btn-secondary.btn-close-disp-modal {
        width: 100% !important;
        padding: 11px 16px !important;
        font-size: 13px !important;
        background: #00152c !important;
        color: #ffffff !important;
        border: 1px solid #00152c !important;
        box-shadow: 0 2px 6px rgba(0, 21, 44, 0.25) !important;
        border-radius: 8px !important;
        text-align: center !important;
    }

    .disp-modal-footer .btn-close-disp-modal:hover,
    #dispatcher-quick-modal .portal-btn-secondary.btn-close-disp-modal:hover {
        background: #0284c7 !important;
        border-color: #0284c7 !important;
        color: #ffffff !important;
    }

    /* POD Review Container inside Modal */
    #disp-modal-pod-card,
    .disp-modal-pod-card-wrap {
        padding: 10px 8px !important;
        border-radius: 10px !important;
        border-width: 1.5px !important;
        margin-bottom: 12px !important;
    }

    .pod-review-container {
        gap: 10px !important;
        width: 100% !important;
    }

    .pod-review-header {
        padding-bottom: 8px !important;
        margin-bottom: 4px !important;
    }

    .pod-review-cards-row {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .pod-info-card {
        padding: 10px 10px !important;
        gap: 8px !important;
        border-radius: 8px !important;
    }

    /* Chain of Custody Archive Details & Revision Card */
    .pod-history-section,
    .pod-history-archive-wrap {
        margin-top: 10px !important;
    }

    .pod-history-details {
        border-radius: 9px !important;
    }

    .pod-history-summary {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .pod-history-body {
        padding: 8px !important;
        gap: 8px !important;
    }

    .pod-revision-card {
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .pod-revision-header {
        gap: 6px !important;
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }

    .pod-revision-meta-grid {
        gap: 6px !important;
        margin-bottom: 8px !important;
    }

    .pod-rev-meta-tile {
        padding: 6px 8px !important;
        gap: 2px !important;
        border-radius: 6px !important;
    }

    .pod-rev-meta-label {
        font-size: 9.5px !important;
    }

    .pod-rev-meta-val {
        font-size: 12px !important;
    }

    .pod-revision-note {
        padding: 7px 10px !important;
        font-size: 11.5px !important;
        margin-bottom: 8px !important;
        gap: 6px !important;
        border-radius: 6px !important;
    }

    .pod-revision-assets-grid {
        gap: 8px !important;
    }

    .pod-rev-asset-card {
        padding: 7px !important;
        min-height: 90px !important;
        border-radius: 7px !important;
    }

    .pod-rev-asset-preview {
        height: 60px !important;
        margin-bottom: 4px !important;
    }

    .pod-rev-asset-img {
        max-height: 55px !important;
    }
}

@media (max-width: 480px) {
    .disp-modal-header {
        padding: 8px 10px !important;
    }

    .disp-modal-ref-badge {
        font-size: 10px !important;
        padding: 2.5px 5px !important;
    }

    .disp-modal-header-title {
        font-size: 12.5px !important;
    }

    .disp-modal-summary-card {
        padding: 8px 10px !important;
        font-size: 11.5px !important;
    }

    #dispatcher-quick-modal .modal-body {
        padding: 8px 6px !important;
    }

    #disp-modal-pod-card,
    .disp-modal-pod-card-wrap {
        padding: 8px 6px !important;
        border-radius: 8px !important;
    }

    .pod-history-summary {
        padding: 8px 10px !important;
    }

    .pod-history-body {
        padding: 6px !important;
        gap: 6px !important;
    }

    .pod-revision-card {
        padding: 8px 7px !important;
    }

    .pod-rev-meta-tile {
        padding: 5px 7px !important;
    }

    .pod-rev-meta-val {
        font-size: 11.5px !important;
    }

    .disp-cell-actions {
        gap: 6px !important;
    }

    .disp-btn-accept-pod-action,
    .disp-btn-correction-pod-action,
    .disp-btn-reject-pod-action,
    .disp-btn-approve-card-action,
    .disp-btn-manage-run,
    .disp-cell-actions > button,
    .disp-cell-actions > a,
    .disp-cell-actions > span {
        padding: 7px 6px !important;
        font-size: 11px !important;
        gap: 4px !important;
    }

    .disp-cell-actions button svg,
    .disp-cell-actions a svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* ==========================================================================
   DRIVER BALANCE, WALLET & TRANSACTION AUDIT STYLES
   ========================================================================== */

/* Compact Single Driver Portal Hero Banner */
.medtrack-portal-hero.driver-portal-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #00152c 0%, #002855 50%, #064e3b 100%) !important;
    box-shadow: 0 10px 24px rgba(0, 21, 44, 0.22) !important;
    border-radius: 14px !important;
    position: relative !important;
    overflow: hidden !important;
}

.medtrack-portal-hero.driver-portal-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    background: radial-gradient(circle at top right, rgba(52, 211, 153, 0.16) 0%, rgba(52, 211, 153, 0) 70%);
    pointer-events: none;
}

.driver-hero-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.driver-hero-main-row .hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-hero-main-row .driver-avatar-main {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 21px;
    flex-shrink: 0;
}

.driver-hero-main-row .portal-role-tag {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 11px;
}

.driver-hero-main-row .portal-user-meta h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 2px 0;
    line-height: 1.2;
    color: #ffffff;
}

.driver-hero-main-row .portal-user-meta p {
    font-size: 12px;
    margin: 0;
    color: #94a3b8;
    line-height: 1.3;
}

.driver-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.driver-duty-toggle-box .duty-pill-toggle {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 20px;
}

.driver-quick-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.driver-quick-actions .portal-cta-btn {
    padding: 5px 12px !important;
    font-size: 12px !important;
    height: auto !important;
    border-radius: 8px !important;
}

/* Symmetrical 8-Cell 4-Column Metrics & Wallet Grid (Zero Empty Spaces) */
.driver-hero-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.hero-metric-tile {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 8px 12px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58px;
}

.hero-metric-tile:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.hero-metric-tile:not(.hero-wallet-tile) {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.hero-metric-tile:not(.hero-wallet-tile) .metric-tile-label {
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-metric-tile:not(.hero-wallet-tile) .metric-tile-val {
    text-align: center;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.hero-metric-tile:not(.hero-wallet-tile) .metric-tile-val .val-sub {
    margin-left: 0;
}

.metric-tile-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.metric-tile-val {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.metric-tile-val.text-compact {
    font-size: 13.5px;
    font-weight: 700;
}

.metric-tile-val .val-sub {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

.metric-tile-val.text-emerald {
    color: #34d399;
}

.metric-tile-val.text-amber {
    color: #fbbf24;
}

.dot-amber {
    color: #f59e0b;
    font-size: 11px;
    line-height: 1;
}

.dot-emerald {
    color: #10b981;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
}

.hero-metric-tile.tile-active-runs {
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.28);
}

.hero-metric-tile.tile-active-runs:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.5);
}

.hero-metric-tile.tile-completed-runs {
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.28);
}

.hero-metric-tile.tile-completed-runs:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
}

/* Featured Courier Wallet Card (Spans 2 columns on desktop) */
.hero-metric-tile.hero-wallet-tile {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.65) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1.5px solid rgba(52, 211, 153, 0.45);
    padding: 15px 18px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(6, 78, 59, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-metric-tile.hero-wallet-tile:hover {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: rgba(52, 211, 153, 0.65);
    box-shadow: 0 6px 20px rgba(6, 78, 59, 0.35);
    transform: translateY(-1px);
}

.wallet-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.wallet-tile-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wallet-tile-icon {
    font-size: 14px;
}

.wallet-live-chip {
    background: rgba(52, 211, 153, 0.2);
    color: #a7f3d0;
    font-size: 10px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}

.wallet-live-chip .live-dot {
    width: 6px;
    height: 6px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #34d399;
}

.wallet-tile-amount {
    font-size: 27px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 3px 0 6px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wallet-tile-note {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.35;
    white-space: normal;
}

.wallet-note-highlight {
    color: #fbbf24;
    font-weight: 800;
    font-size: 11.5px;
}

/* Responsive Grid Adaptation (Tablets Only - Keeps Mobile 2-col Untouched) */
@media (min-width: 769px) and (max-width: 992px) {
    .driver-hero-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-metric-tile.hero-wallet-tile {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .medtrack-portal-hero.driver-portal-hero {
        padding: 14px 16px !important;
        gap: 12px !important;
    }
    .driver-hero-main-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .driver-hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        align-items: stretch !important;
    }
    .driver-hero-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .hero-metric-tile.hero-wallet-tile {
        grid-column: span 2 !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
    }
    .hero-metric-tile.hero-wallet-tile .wallet-tile-header {
        margin-bottom: 5px !important;
    }
    .hero-metric-tile.hero-wallet-tile .wallet-tile-amount {
        font-size: 26px !important;
        margin: 2px 0 5px 0 !important;
        line-height: 1.15 !important;
    }
    .hero-metric-tile.hero-wallet-tile .wallet-tile-note {
        font-size: 11px !important;
        margin-top: 5px !important;
        padding-top: 6px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
    }
    .hero-metric-tile {
        min-width: 0 !important;
        border-radius: 9px !important;
        padding: 9px 11px !important;
        min-height: 56px !important;
        box-sizing: border-box !important;
    }
    .metric-tile-label {
        font-size: 10px !important;
        letter-spacing: 0.4px !important;
        margin-bottom: 2px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .metric-tile-val {
        font-size: 15.5px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .metric-tile-val.text-compact {
        font-size: 13px !important;
    }
    .hero-metric-tile:not(.hero-wallet-tile) {
        align-items: center !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .hero-metric-tile:not(.hero-wallet-tile) .metric-tile-label {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    .hero-metric-tile:not(.hero-wallet-tile) .metric-tile-val {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        align-items: baseline !important;
        gap: 3px !important;
    }
    .desktop-only-table {
        display: none !important;
    }
    .mobile-only-cards {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .medtrack-portal-hero.driver-portal-hero {
        padding: 14px 12px !important;
    }
    .driver-hero-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }
    .hero-metric-tile.hero-wallet-tile {
        grid-column: span 2 !important;
        padding: 13px 15px !important;
        border-radius: 11px !important;
    }
    .hero-metric-tile.hero-wallet-tile .wallet-tile-amount {
        font-size: 25px !important;
        margin: 2px 0 4px 0 !important;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS ENHANCEMENTS (DRIVER TABS & NOTIFICATION HEADER)
   ========================================================================== */

/* 1. Dedicated 5-Tab Navigation Bar on Mobile */
@media (max-width: 768px) {
    .medtrack-driver-portal .driver-tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        background: #f1f5f9 !important;
        padding: 3px !important;
        border-radius: 14px !important;
        gap: 2px !important;
        margin-bottom: 18px !important;
        border: 1px solid #e2e8f0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 6px 1px 5px 1px !important;
        font-size: 10.5px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        background: transparent !important;
        border-radius: 10px !important;
        border: none !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
        min-height: 48px !important;
        box-shadow: none !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active {
        background: #ffffff !important;
        color: #0284c7 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active svg {
        color: #0284c7 !important;
    }

    .medtrack-driver-portal .driver-tabs-nav .portal-tab-btn.is-active .label-short {
        color: #0284c7 !important;
        font-weight: 800 !important;
    }
}

/* 2. Responsive Notification History & Alerts Header */
.notif-panel-header-responsive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
}

.notif-header-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 0 1 auto;
}

.notif-header-title-group .header-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-header-text {
    min-width: 0;
}

.notif-header-text h3 {
    margin: 0;
    font-size: 17px;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.25;
}

.notif-header-text p {
    margin: 2px 0 0 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.35;
}

.notif-panel-header-responsive .notif-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .notif-panel-header-responsive {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
        padding-bottom: 12px !important;
    }

    .notif-header-title-group {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .notif-header-title-group .header-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 9px !important;
        margin-top: 1px !important;
    }

    .notif-header-text h3 {
        font-size: 15.5px !important;
        line-height: 1.25 !important;
    }

    .notif-header-text p {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
        margin-top: 2px !important;
    }

    .notif-panel-header-responsive .notif-actions-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        gap: 7px !important;
        margin-top: 2px !important;
    }

    .notif-panel-header-responsive .notif-filter-btn-group {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
        padding: 3px !important;
        background: #f1f5f9 !important;
        border-radius: 8px !important;
        gap: 2px !important;
        box-sizing: border-box !important;
    }

    .notif-panel-header-responsive .btn-notif-filter {
        padding: 6px 4px !important;
        font-size: 11px !important;
        text-align: center !important;
        white-space: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
    }

    .notif-panel-header-responsive .btn-mark-all-read-main {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
}

/* 3. Compact Mobile Trip Cards & In-Progress Header (Driver Portal History Tab) */
@media (max-width: 768px) {
    .portal-tab-panel#portal-tab-history .in-progress-history-card,
    .in-progress-history-card {
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
        border-radius: 10px !important;
    }

    .in-progress-header {
        margin-bottom: 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .in-progress-header .header-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .in-progress-hdr-flex h3 {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
    }

    .in-progress-hdr-flex .in-progress-desc {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .in-progress-hdr-flex .in-progress-badge {
        font-size: 11px !important;
        padding: 2px 8px !important;
    }

    .mobile-only-cards-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .customer-mobile-trip-card {
        padding: 15px 14px !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
        box-sizing: border-box !important;
        width: 100% !important;
        margin-bottom: 4px !important;
    }

    .customer-mobile-trip-card.card-stat {
        border-left: 4px solid #ef4444 !important;
    }

    .customer-mobile-trip-card .card-top-row {
        margin-bottom: 8px !important;
        gap: 8px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .customer-mobile-trip-card .trip-number-tag {
        font-size: 12px !important;
        font-weight: 800 !important;
        padding: 3.5px 8px !important;
        border-radius: 6px !important;
        background: #f1f5f9 !important;
        color: #1e293b !important;
        letter-spacing: 0.2px !important;
        line-height: 1.2 !important;
    }

    .customer-mobile-trip-card .portal-status-pill {
        font-size: 11px !important;
        font-weight: 700 !important;
        padding: 3.5px 10px !important;
        border-radius: 999px !important;
        line-height: 1.2 !important;
        display: inline-flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }

    .customer-mobile-trip-card .portal-status-pill.status-pending_payment,
    .customer-mobile-trip-card .portal-status-pill.status-pending-payment,
    .customer-mobile-trip-card .portal-status-pill.status-pending,
    .customer-mobile-trip-card .portal-status-pill.status-unpaid {
        background: #fef3c7 !important;
        color: #92400e !important;
        border: 1px solid #fde68a !important;
    }

    .customer-mobile-trip-card .portal-status-pill.status-confirmed {
        background: #ecfdf5 !important;
        color: #065f46 !important;
        border: 1px solid #a7f3d0 !important;
    }

    .customer-mobile-trip-card .card-meta-line {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .customer-mobile-trip-card .portal-priority-badge {
        font-size: 10.5px !important;
        font-weight: 800 !important;
        padding: 3px 8px !important;
        border-radius: 6px !important;
        letter-spacing: 0.4px !important;
        text-transform: uppercase !important;
    }

    .customer-mobile-trip-card .card-date-text {
        font-size: 11.5px !important;
        font-weight: 600 !important;
        padding: 3px 7px !important;
        border-radius: 6px !important;
        gap: 5px !important;
        line-height: 1.2 !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #475569 !important;
    }

    .customer-mobile-trip-card .card-route-box {
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
        background: #f8fafc !important;
        border: 1px solid #f1f5f9 !important;
    }

    .customer-mobile-trip-card .route-row {
        gap: 8px !important;
        line-height: 1.35 !important;
        font-size: 12.5px !important;
        color: #334155 !important;
    }

    .customer-mobile-trip-card .route-dot {
        width: 7px !important;
        height: 7px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }

    .customer-mobile-trip-card .route-line-connect {
        width: 2px !important;
        height: 8px !important;
        background: #cbd5e1 !important;
        margin-left: 2.5px !important;
    }

    .customer-mobile-trip-card .card-details-row {
        margin-top: 8px !important;
        padding-top: 10px !important;
        margin-bottom: 12px !important;
        border-top: 1px solid #f1f5f9 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .customer-mobile-trip-card .card-specimen-info {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .customer-mobile-trip-card .card-specimen-line {
        font-size: 13px !important;
        line-height: 1.35 !important;
        color: #1e293b !important;
    }

    .customer-mobile-trip-card .package-label {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #64748b !important;
        margin-right: 3px !important;
    }

    .customer-mobile-trip-card .specimen-val {
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .customer-mobile-trip-card .card-temp-line {
        margin-top: 2px !important;
    }

    .customer-mobile-trip-card .temp-badge {
        display: inline-flex !important;
        align-items: center !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        padding: 2.5px 8px !important;
        border-radius: 6px !important;
        line-height: 1.25 !important;
        background: #f1f5f9 !important;
        color: #475569 !important;
        border: 1px solid #e2e8f0 !important;
    }

    .customer-mobile-trip-card .temp-badge.temp-ambient {
        background: #f8fafc !important;
        color: #64748b !important;
        border-color: #e2e8f0 !important;
    }

    .customer-mobile-trip-card .card-price-info {
        flex-shrink: 0 !important;
        text-align: right !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
    }

    .customer-mobile-trip-card .price-sub-label {
        font-size: 10px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #94a3b8 !important;
        line-height: 1 !important;
        margin-bottom: 2px !important;
    }

    .customer-mobile-trip-card .card-total-val {
        font-size: 17px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        line-height: 1.2 !important;
    }

    .customer-mobile-trip-card .card-bottom-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .customer-mobile-trip-card .card-bottom-actions .btn-block {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 42px !important;
        padding: 9px 14px !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        line-height: 1.3 !important;
        transition: all 0.2s ease !important;
    }

    .customer-mobile-trip-card .btn-pay-now-mobile {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    }

    .customer-mobile-trip-card .btn-pay-now-mobile:hover,
    .customer-mobile-trip-card .btn-pay-now-mobile:active {
        background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4) !important;
    }

    .customer-mobile-trip-card .btn-table-track {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
    }

    .customer-mobile-trip-card .btn-table-track.btn-track-secondary {
        background: #f8fafc !important;
        color: #0284c7 !important;
        border: 1.5px solid #bae6fd !important;
        box-shadow: none !important;
    }

    .customer-mobile-trip-card .btn-view-pod-modal {
        background: #ecfdf5 !important;
        color: #065f46 !important;
        border: 1.5px solid #6ee7b7 !important;
        cursor: pointer !important;
        box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12) !important;
        transition: all 0.15s ease !important;
    }

    .customer-mobile-trip-card .btn-view-pod-modal:hover,
    .customer-mobile-trip-card .btn-view-pod-modal:active {
        background: #059669 !important;
        color: #ffffff !important;
        border-color: #059669 !important;
        box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35) !important;
    }
}

/* 4. Compact Mobile Layout for Driver Profile Forms (Update Request & Password) */
@media (max-width: 768px) {
    .driver-change-form-box {
        padding: 14px 12px !important;
        margin-top: 14px !important;
        border-radius: 9px !important;
    }

    #form-driver-request-changes .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    #form-driver-request-changes .form-group {
        margin-bottom: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #form-driver-request-changes label {
        font-size: 12px !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
        color: #334155 !important;
        white-space: normal !important;
        display: block !important;
    }

    #form-driver-request-changes input[type="text"],
    #form-driver-request-changes input[type="email"],
    #form-driver-request-changes input[type="tel"],
    #form-driver-request-changes select {
        height: 40px !important;
        padding: 8px 11px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        border: 1.5px solid #cbd5e1 !important;
        background: #ffffff !important;
        color: #0f172a !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .driver-change-form-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 12px !important;
        align-items: stretch !important;
    }

    .driver-change-form-actions .portal-submit-btn,
    .driver-change-form-actions button[type="submit"] {
        width: 100% !important;
        height: 100% !important;
        min-height: 42px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .portal-btn-secondary.btn-cancel-change-req,
    #btn-cancel-change-form {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 42px !important;
        padding: 8px 10px !important;
        font-size: 12.5px !important;
        font-weight: 700 !important;
        color: #334155 !important;
        background: #ffffff !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        line-height: 1.25 !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .portal-btn-secondary.btn-cancel-change-req:hover,
    #btn-cancel-change-form:hover {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border-color: #94a3b8 !important;
    }

    /* Password Fields Row (New & Confirm Password side by side on mobile) */
    .password-fields-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px 10px !important;
        margin-bottom: 12px !important;
    }

    .password-fields-row .form-group {
        margin-bottom: 0 !important;
        min-width: 0 !important;
    }

    .password-fields-row label {
        font-size: 11.5px !important;
        font-weight: 700 !important;
        margin-bottom: 3px !important;
        color: #334155 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .password-fields-row .password-input-wrap input,
    #form-medtrack-update-password input[type="password"] {
        height: 38px !important;
        padding: 7px 32px 7px 10px !important;
        font-size: 13px !important;
        border-radius: 7px !important;
        border: 1.5px solid #cbd5e1 !important;
        box-sizing: border-box !important;
    }

    .password-fields-row .btn-toggle-password,
    #form-medtrack-update-password .btn-toggle-password {
        height: 100% !important;
        width: 32px !important;
        padding: 0 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   Driver Portal: Single Order Notification Focus Toolbar & Highlights
   ========================================================================== */
.single-order-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border: 1.5px solid #7dd3fc;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
    animation: fadeInFilterBar 0.25s ease-out;
    box-sizing: border-box;
}

@keyframes fadeInFilterBar {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.filter-focus-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0284c7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 11px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    white-space: nowrap;
}

.filter-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

.filter-bar-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.filter-bar-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.filter-bar-sub {
    font-size: 11.5px;
    color: #475569;
    line-height: 1.25;
}

.btn-clear-order-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 15px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-clear-order-filter:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.driver-route-card.active-route-focused-order {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22), 0 12px 28px -6px rgba(0, 0, 0, 0.12) !important;
    animation: pulseFocusedCard 0.4s ease-out;
}

.history-row-focused {
    background: #f0fdf4 !important;
    box-shadow: inset 4px 0 0 #10b981;
}

@keyframes pulseFocusedCard {
    0% { transform: scale(0.99); opacity: 0.85; }
    50% { transform: scale(1.008); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .single-order-filter-bar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .btn-clear-order-filter {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   MedTrack WooCommerce Checkout (order-pay) & Order Confirmation Modern Styling
   ========================================================================== */

/* Universal Font & Container Polish for WooCommerce Pay & Received */
body.woocommerce-order-pay,
body.woocommerce-order-received,
body.woocommerce-checkout {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #0f172a !important;
    background-color: #f8fafc !important;
}

body.woocommerce-order-pay main,
body.woocommerce-order-received main,
body.woocommerce-order-pay .entry-content,
body.woocommerce-order-received .entry-content,
body.woocommerce-order-pay .woocommerce,
body.woocommerce-order-received .woocommerce {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    max-width: 930px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --------------------------------------------------------------------------
   1. Order Pay Checkout Screen (/checkout/order-pay/...)
   -------------------------------------------------------------------------- */

body.woocommerce-order-pay #order_review {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 36px -6px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    padding: 32px 34px !important;
    margin: 28px auto 40px auto !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Optional Top Header Brand Ribbon inside Order Review */
body.woocommerce-order-pay #order_review::before {
    content: "MEDTRACK MEDICAL DISPATCH • ORDER PAYMENT SETTLEMENT";
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #f1f5f9;
}

/* Shop Table Styling */
body.woocommerce-order-pay #order_review table.shop_table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 0 24px 0 !important;
    background: #ffffff !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 14px 18px !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-top: none !important;
}

/* Service Header Replacement (Replaces generic retail "Product" with "Dispatch Service") */
body.woocommerce-order-pay #order_review table.shop_table thead th.product-name,
body.woocommerce-order-received table.wc-block-order-confirmation-totals__table thead th:first-child,
body.woocommerce-order-received table.order_details thead th.product-name,
body.woocommerce-order-received table.woocommerce-table--order-details thead th:first-child {
    font-size: 0 !important;
    width: 75% !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead th.product-name::after,
body.woocommerce-order-received table.wc-block-order-confirmation-totals__table thead th:first-child::after,
body.woocommerce-order-received table.order_details thead th.product-name::after,
body.woocommerce-order-received table.woocommerce-table--order-details thead th:first-child::after {
    content: "DISPATCH SERVICE" !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #475569 !important;
}

/* Remove Qty Column & "× 1" quantity badges completely */
body.woocommerce-order-pay #order_review table.shop_table .product-quantity,
body.woocommerce-order-pay #order_review table.shop_table th.product-quantity,
body.woocommerce-order-pay #order_review table.shop_table td.product-quantity,
body.woocommerce-order-received .product-quantity,
body.woocommerce-order-received strong.product-quantity,
body.woocommerce-order-received .wc-block-components-order-summary-item__quantity {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* 2-Column Balanced Order Pay Table (Eliminates empty 3rd column & aligns Totals flush right) */
body.woocommerce-order-pay #order_review table.shop_table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead,
body.woocommerce-order-pay #order_review table.shop_table tbody,
body.woocommerce-order-pay #order_review table.shop_table tfoot {
    display: block !important;
    width: 100% !important;
}

body.woocommerce-order-pay #order_review table.shop_table tr {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

body.woocommerce-order-pay #order_review table.shop_table tr:last-child {
    border-bottom: none !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead tr {
    background: #f8fafc !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead th.product-name,
body.woocommerce-order-pay #order_review table.shop_table tbody td.product-name,
body.woocommerce-order-pay #order_review table.shop_table tfoot th {
    flex: 1 1 auto !important;
    text-align: left !important;
    padding: 14px 20px !important;
    border: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead th.product-total,
body.woocommerce-order-pay #order_review table.shop_table tbody td.product-subtotal,
body.woocommerce-order-pay #order_review table.shop_table tfoot td.product-total {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding: 14px 20px !important;
    border: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-pay #order_review table.shop_table thead th {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #475569 !important;
}

body.woocommerce-order-pay #order_review table.shop_table tbody td.product-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.45 !important;
}

body.woocommerce-order-pay #order_review table.shop_table tbody td.product-subtotal {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

body.woocommerce-order-pay #order_review table.shop_table tfoot th {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

body.woocommerce-order-pay #order_review table.shop_table tfoot td.product-total {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

body.woocommerce-order-pay #order_review table.shop_table tfoot tr.payment-method,
body.woocommerce-order-pay #order_review table.shop_table tfoot tr[data-total="payment_method"] {
    display: none !important;
}

body.woocommerce-order-pay #order_review table.shop_table tfoot tr.order-total,
body.woocommerce-order-pay #order_review table.shop_table tfoot tr:last-child {
    background: #f8fafc !important;
    border-top: 1.5px solid #cbd5e1 !important;
}

body.woocommerce-order-pay #order_review table.shop_table tfoot tr.order-total th,
body.woocommerce-order-pay #order_review table.shop_table tfoot tr.order-total td,
body.woocommerce-order-pay #order_review table.shop_table tfoot tr:last-child th,
body.woocommerce-order-pay #order_review table.shop_table tfoot tr:last-child td {
    background: #f8fafc !important;
    font-size: 16.5px !important;
    font-weight: 800 !important;
    color: #0284c7 !important;
    padding: 16px 20px !important;
}


/* Payment Methods Box */
body.woocommerce-order-pay #order_review #payment {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 24px 0 0 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-pay #payment ul.payment_methods {
    list-style: none !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05) !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method:has(input[type="radio"]:checked),
body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method.is-selected {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 1px #0284c7, 0 4px 14px rgba(2, 132, 199, 0.08) !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    line-height: 1.35 !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > label img {
    max-height: 22px !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
}

body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    accent-color: #0284c7 !important;
    cursor: pointer !important;
    margin: 0 10px 0 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important;
}

/* Eliminate redundant nested boxes & caret inside payment method card */
body.woocommerce-order-pay #payment div.payment_box {
    background: transparent !important;
    border: none !important;
    border-top: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    padding: 16px 0 0 0 !important;
    margin: 14px 0 0 0 !important;
    font-size: 13.5px !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

body.woocommerce-order-pay #payment div.payment_box::before,
body.woocommerce-order-pay #payment div.payment_box::after {
    display: none !important;
    content: none !important;
}

body.woocommerce-order-pay #payment div.payment_box fieldset,
body.woocommerce-order-pay #payment div.payment_box fieldset.wc-credit-card-form {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

body.woocommerce-order-pay #payment div.payment_box p {
    margin: 0 0 10px 0 !important;
    font-size: 13px !important;
    color: #475569 !important;
}

body.woocommerce-order-pay #payment div.payment_box p:last-child {
    margin-bottom: 0 !important;
}

/* Ensure Stripe Elements card container expands seamlessly with no duplicate border */
body.woocommerce-order-pay #payment div.payment_box .wc-stripe-gateway-container,
body.woocommerce-order-pay #payment div.payment_box #wc-stripe-card-element {
    width: 100% !important;
    overflow: visible !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Polished Stripe Test Mode Sandbox Banner */
body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction[style*="display: none"],
body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction[style*="display:none"] {
    display: none !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction:not([style*="display: none"]):not([style*="display:none"]),
body.woocommerce-order-pay #payment div.payment_box .wc-stripe-payment-method-instruction:not([style*="display: none"]):not([style*="display:none"]) {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    margin: 0 0 16px 0 !important;
    font-size: 13px !important;
    color: #92400e !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08) !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction strong {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #fef3c7 !important;
    border: 1px solid #fcd34d !important;
    color: #b45309 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 2.5px 8px !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction button.wc-stripe-copy-test-number {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
    vertical-align: middle !important;
    outline: none !important;
    margin: 0 2px !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction button.wc-stripe-copy-test-number:hover {
    background: #f8fafc !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.12) !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction button.wc-stripe-copy-test-number:active {
    transform: translateY(1px) !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction button.wc-stripe-copy-test-number i {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    vertical-align: middle !important;
    opacity: 0.7 !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction a {
    color: #0284c7 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    margin-left: 2px !important;
    transition: color 0.15s ease !important;
}

body.woocommerce-order-pay #payment .wc-stripe-payment-method-instruction a:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

/* Clean, modern inline "Save to account" option without heavy box nesting */
body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew,
body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew,
body.woocommerce-order-pay #payment div.payment_box p.form-row.woocommerce-SavedPaymentMethods-saveNew {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 0 2px 0 !important;
    margin: 10px 0 0 0 !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew:hover,
body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew:hover {
    background: transparent !important;
}

body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"],
body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"],
body.woocommerce-order-pay #payment div.payment_box input[type="checkbox"] {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    accent-color: #0284c7 !important;
    border-radius: 4px !important;
    vertical-align: middle !important;
    align-self: center !important;
    flex-shrink: 0 !important;
}

body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew label,
body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew label,
body.woocommerce-order-pay #payment div.payment_box label[for*="new-payment-method"] {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 1 auto !important;
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
    text-align: left !important;
}

body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew label::after,
body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew label::after {
    content: "Encrypted & Secure" !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    padding: 2.5px 8px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Privacy Terms & Pay Button Container Fix (Scoped to parent submit row only) */
body.woocommerce-order-pay #payment > .form-row,
body.woocommerce-order-pay form#order_review > #payment > .form-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 18px 0 0 0 !important;
    padding: 0 !important;
}

body.woocommerce-order-pay #payment .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-order-pay #payment .woocommerce-privacy-policy-text {
    width: 100% !important;
    display: block !important;
}

body.woocommerce-order-pay #payment .woocommerce-privacy-policy-text p {
    font-size: 12.5px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    text-align: left !important;
}

body.woocommerce-order-pay #payment .woocommerce-privacy-policy-link {
    color: #0284c7 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

/* Pay for Order Button (Fix cramped box bug) */
body.woocommerce-order-pay #order_review #place_order,
body.woocommerce-order-pay button#place_order,
.woocommerce-order-pay #payment #place_order,
body.woocommerce-order-pay .button#place_order.wp-element-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 54px !important;
    padding: 16px 28px !important;
    margin: 6px 0 0 0 !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    float: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-pay #order_review #place_order:hover,
body.woocommerce-order-pay button#place_order:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

body.woocommerce-order-pay #order_review #place_order:active,
body.woocommerce-order-pay button#place_order:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

/* --------------------------------------------------------------------------
   2. Order Received Confirmation Screen (/checkout/order-received/...)
   -------------------------------------------------------------------------- */

/* Top Success Hero Banner */
body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status {
    display: grid !important;
    grid-template-columns: 52px 1fr !important;
    column-gap: 18px !important;
    row-gap: 4px !important;
    align-items: center !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: 1.5px solid #a7f3d0 !important;
    border-radius: 16px !important;
    padding: 22px 26px !important;
    margin: 24px 0 24px 0 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.08) !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-received .woocommerce-order > p.woocommerce-notice {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: 1.5px solid #a7f3d0 !important;
    border-radius: 16px !important;
    padding: 22px 26px !important;
    margin: 24px 0 24px 0 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.08) !important;
    box-sizing: border-box !important;
}

body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status::before {
    content: "" !important;
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 14px !important;
    background-color: #10b981 !important;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-width%3D%273%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%2720%206%209%2017%204%2012%27%2F%3E%3C%2Fsvg%3E"), linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center center, center center !important;
    background-size: 26px 26px, cover !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    flex-shrink: 0 !important;
}

body.woocommerce-order-received .woocommerce-order > p.woocommerce-notice::before {
    content: "" !important;
    display: inline-block !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 14px !important;
    background-color: #10b981 !important;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-width%3D%273%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%2720%206%209%2017%204%2012%27%2F%3E%3C%2Fsvg%3E"), linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: center center, center center !important;
    background-size: 26px 26px, cover !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    flex-shrink: 0 !important;
}

body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status h1,
body.woocommerce-order-received h1.entry-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    color: #065f46 !important;
    margin: 0 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.25 !important;
}

body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status p {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 14.5px !important;
    color: #047857 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

body.woocommerce-order-received .woocommerce-order > p.woocommerce-notice {
    font-size: 15px !important;
    color: #047857 !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* --------------------------------------------------------------------------
   Remove Marked "ORDER #" Item & Build Balanced 4-Card Summary Grid
   -------------------------------------------------------------------------- */

/* Completely hide the internal WooCommerce Order # column */
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:first-child,
body.woocommerce-order-received ul.order_details > li.order,
body.woocommerce-order-received ul.order_details > li.woocommerce-order-overview__order,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.order,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.woocommerce-order-overview__order {
    display: none !important;
}

/* Suppress all pseudo-elements so clearfix hacks do NOT become grid items in CSS Grid */
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list::before,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list::after,
body.woocommerce-order-received ul.order_details::before,
body.woocommerce-order-received ul.order_details::after,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details::before,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 4-Column Balanced Metric Grid */
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list,
body.woocommerce-order-received ul.order_details,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 24px 0 32px 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li,
body.woocommerce-order-received ul.order_details > li,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    grid-column: auto !important;
    grid-row: auto !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
}

body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:hover,
body.woocommerce-order-received ul.order_details > li:hover,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(-2px) !important;
}

/* Key Label */
body.woocommerce-order-received .wc-block-order-confirmation-summary-list-item__key,
body.woocommerce-order-received ul.order_details li strong:first-child,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details li strong:first-child {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* Value */
body.woocommerce-order-received .wc-block-order-confirmation-summary-list-item__value,
body.woocommerce-order-received ul.order_details li strong:last-child,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details li strong:last-child,
body.woocommerce-order-received ul.order_details li,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details li {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

/* 1. Date Card */
body.woocommerce-order-received ul.order_details > li.date,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.date,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(2) {
    border-top: 3.5px solid #0284c7 !important;
}

/* 2. Email Card */
body.woocommerce-order-received ul.order_details > li.email,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.email,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(4) {
    border-top: 3.5px solid #64748b !important;
}

body.woocommerce-order-received ul.order_details > li.email strong,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.email strong,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(4) .wc-block-order-confirmation-summary-list-item__value {
    font-size: 13.5px !important;
    word-break: break-all !important;
}

/* 3. Total Card (Highlighted) */
body.woocommerce-order-received ul.order_details > li.total,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.total,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(3) {
    background: #f0f9ff !important;
    border: 1.5px solid #bae6fd !important;
    border-top: 3.5px solid #0284c7 !important;
}

body.woocommerce-order-received ul.order_details > li.total strong,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.total strong,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(3) .wc-block-order-confirmation-summary-list-item__value {
    color: #0284c7 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

/* 4. Payment Method Card */
body.woocommerce-order-received ul.order_details > li.method,
body.woocommerce-order-received ul.order_details > li.woocommerce-order-overview__payment-method,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.method,
body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li.woocommerce-order-overview__payment-method,
body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li:nth-child(5) {
    border-top: 3.5px solid #10b981 !important;
}

/* --------------------------------------------------------------------------
   Order Details Section Header & Table
   -------------------------------------------------------------------------- */

body.woocommerce-order-received h2.wc-block-order-confirmation-totals__title,
body.woocommerce-order-received h2.woocommerce-order-details__title,
body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-totals-wrapper > h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 36px 0 16px 0 !important;
    letter-spacing: -0.3px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.woocommerce-order-received table.wc-block-order-confirmation-totals__table,
body.woocommerce-order-received table.order_details,
body.woocommerce-order-received table.woocommerce-table--order-details {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin: 16px 0 32px 0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

body.woocommerce-order-received table th,
body.woocommerce-order-received table td {
    padding: 16px 20px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

body.woocommerce-order-received table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
}

body.woocommerce-order-received table thead th:last-child,
body.woocommerce-order-received table tbody td:last-child,
body.woocommerce-order-received table tfoot td {
    text-align: right !important;
}

body.woocommerce-order-received table tbody td:first-child {
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.45 !important;
}

body.woocommerce-order-received table tfoot th {
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
}

body.woocommerce-order-received table tfoot tr:last-child th,
body.woocommerce-order-received table tfoot tr:last-child td {
    background: #f8fafc !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #0284c7 !important;
    border-top: 2px solid #e2e8f0 !important;
    border-bottom: none !important;
    padding: 18px 20px !important;
}

/* --------------------------------------------------------------------------
   Remove Billing Address Section from Order Confirmation Screen
   -------------------------------------------------------------------------- */

body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-billing-wrapper,
body.woocommerce-order-received .wc-block-order-confirmation-billing-wrapper,
body.woocommerce-order-received [data-block-name="woocommerce/order-confirmation-billing-wrapper"],
body.woocommerce-order-received section.woocommerce-customer-details,
body.woocommerce-order-received section.woocommerce-columns--addresses,
body.woocommerce-order-received .woocommerce-customer-details {
    display: none !important;
}

/* Payment method icon styling */
body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > label img {
    max-height: 22px !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
}

/* --------------------------------------------------------------------------
   Responsive Layout Rules
   -------------------------------------------------------------------------- */

/* Desktop & Tablet: Placed Order & Pay Page Top and Bottom Spacing */
@media (min-width: 769px) {
    body.woocommerce-order-received,
    body.woocommerce-order-pay {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.woocommerce-order-received .woocommerce,
    body.woocommerce-order-received .woocommerce-order,
    body.woocommerce-order-pay .woocommerce,
    body.woocommerce-order-pay #order_review {
        margin-top: 40px !important;
        margin-bottom: 50px !important;
        max-width: 930px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .medtrack-wc-confirmation-banner {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
        border-radius: 16px !important;
        padding: 30px 32px !important;
        color: #ffffff !important;
        box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25) !important;
        border: 1px solid #334155 !important;
        margin: 28px 0 36px 0 !important;
        box-sizing: border-box !important;
        font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }

    .medtrack-banner-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 16px !important;
        margin-bottom: 22px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        padding-bottom: 20px !important;
    }

    .medtrack-banner-header-left {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .medtrack-banner-check-icon {
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
        flex-shrink: 0 !important;
    }

    .medtrack-banner-sub {
        font-size: 11.5px !important;
        font-weight: 700 !important;
        color: #38bdf8 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        display: block !important;
    }

    .medtrack-banner-title {
        margin: 0 !important;
        font-size: 21px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        line-height: 1.25 !important;
    }

    .medtrack-banner-ref {
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 10px !important;
        padding: 8px 18px !important;
        text-align: right !important;
    }

    .medtrack-banner-ref-label {
        font-size: 11px !important;
        color: #94a3b8 !important;
        display: block !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    .medtrack-banner-ref-val {
        font-size: 18px !important;
        color: #38bdf8 !important;
        letter-spacing: 0.5px !important;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
    }

    .medtrack-banner-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 14px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        padding: 18px !important;
        border-radius: 12px !important;
        margin-bottom: 22px !important;
        font-size: 13px !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .medtrack-col-label {
        color: #94a3b8 !important;
        display: block !important;
        font-size: 11px !important;
        text-transform: uppercase !important;
        margin-bottom: 2px !important;
    }

    .medtrack-col-val {
        color: #f8fafc !important;
        font-size: 13.5px !important;
        display: block !important;
    }

    .medtrack-col-priority {
        color: #38bdf8 !important;
    }

    .medtrack-col-status.is-pending {
        color: #f59e0b !important;
    }

    .medtrack-col-status.is-confirmed {
        color: #34d399 !important;
    }

    .medtrack-col-sub {
        color: #cbd5e1 !important;
        font-size: 12px !important;
    }

    .medtrack-banner-actions {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        flex-wrap: wrap !important;
    }

    .medtrack-btn-track {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 13.5px !important;
        padding: 12px 24px !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
        transition: all 0.2s ease !important;
    }

    .medtrack-btn-track:hover {
        background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
        color: #ffffff !important;
        transform: translateY(-1px) !important;
    }

    .medtrack-btn-book {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        color: #e2e8f0 !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        transition: all 0.2s ease !important;
    }

    .medtrack-btn-book:hover {
        background: rgba(255, 255, 255, 0.14) !important;
        color: #ffffff !important;
    }
}

@media (max-width: 900px) {
    body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list,
    body.woocommerce-order-received ul.order_details,
    body.woocommerce-order-received ul.woocommerce-thankyou-order-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 768px) {
    html, body.woocommerce-order-received, body.woocommerce-order-pay {
        overflow-x: hidden !important;
    }

    /* Strip theme margins/paddings on all outer wrappers so ONLY 20px is applied across any theme */
    body.woocommerce-order-received #page,
    body.woocommerce-order-received .site,
    body.woocommerce-order-received #content,
    body.woocommerce-order-received .site-content,
    body.woocommerce-order-received .ast-container,
    body.woocommerce-order-received div[class*="ast-container"],
    body.woocommerce-order-received .ast-plain-container,
    body.woocommerce-order-received .container,
    body.woocommerce-order-received .site-container,
    body.woocommerce-order-received .col-full,
    body.woocommerce-order-received .wrapper,
    body.woocommerce-order-received #primary,
    body.woocommerce-order-received .content-area,
    body.woocommerce-order-received main,
    body.woocommerce-order-received #main,
    body.woocommerce-order-received .site-main,
    body.woocommerce-order-received article,
    body.woocommerce-order-received article.page,
    body.woocommerce-order-received .entry-content,
    body.woocommerce-order-received .wp-site-blocks,
    body.woocommerce-order-received .wp-block-group,
    body.woocommerce-order-received .woocommerce,
    body.woocommerce-order-pay #page,
    body.woocommerce-order-pay .site,
    body.woocommerce-order-pay #content,
    body.woocommerce-order-pay .site-content,
    body.woocommerce-order-pay .ast-container,
    body.woocommerce-order-pay div[class*="ast-container"],
    body.woocommerce-order-pay .ast-plain-container,
    body.woocommerce-order-pay .container,
    body.woocommerce-order-pay .site-container,
    body.woocommerce-order-pay .col-full,
    body.woocommerce-order-pay .wrapper,
    body.woocommerce-order-pay #primary,
    body.woocommerce-order-pay .content-area,
    body.woocommerce-order-pay main,
    body.woocommerce-order-pay #main,
    body.woocommerce-order-pay .site-main,
    body.woocommerce-order-pay article,
    body.woocommerce-order-pay article.page,
    body.woocommerce-order-pay .entry-content,
    body.woocommerce-order-pay .wp-site-blocks,
    body.woocommerce-order-pay .wp-block-group {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Mobile: Exactly 20px Left-Right Padding on Placed Order & Pay page */
    body.woocommerce-order-received .woocommerce-order,
    body.woocommerce-order-received .woocommerce:not(:has(.woocommerce-order)),
    body.woocommerce-order-received .wc-block-order-confirmation {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 20px !important;
        padding-bottom: 48px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-order-pay .woocommerce {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 16px !important;
        padding-bottom: 40px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-order-pay #order_review {
        padding: 22px 18px !important;
        margin: 16px 0 32px 0 !important;
        border-radius: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Thank You Page Elements: Stretch 100% inside the 20px padded container */
    body.woocommerce-order-received .woocommerce-order > p.woocommerce-notice,
    body.woocommerce-order-received .woocommerce-order > p.woocommerce-thankyou-order-received,
    body.woocommerce-order-received p.woocommerce-notice--success {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 14px !important;
        margin-bottom: 14px !important;
        padding: 18px 20px !important;
        gap: 14px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list,
    body.woocommerce-order-received ul.order_details,
    body.woocommerce-order-received ul.woocommerce-thankyou-order-details,
    body.woocommerce-order-received ul.woocommerce-order-overview {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 14px !important;
        margin-bottom: 22px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list > li,
    body.woocommerce-order-received ul.order_details > li,
    body.woocommerce-order-received ul.woocommerce-thankyou-order-details > li,
    body.woocommerce-order-received ul.woocommerce-order-overview > li {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 16px 20px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
    }

    /* Placed Order Banner on Mobile */
    .medtrack-wc-confirmation-banner {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        padding: 20px 16px !important;
        margin: 16px 0 24px 0 !important;
        border-radius: 14px !important;
    }

    /* Order details table & address sections */
    body.woocommerce-order-received table.wc-block-order-confirmation-totals__table,
    body.woocommerce-order-received table.order_details,
    body.woocommerce-order-received table.woocommerce-table--order-details,
    body.woocommerce-order-received section.woocommerce-order-details {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Mobile Device Only: Stack Payment Method Row Up-Down (Vertical) instead of Side-by-Side */
    body.woocommerce-order-received table.woocommerce-table--order-details tfoot tr.medtrack-payment-method-row,
    body.woocommerce-order-received table.order_details tfoot tr.medtrack-payment-method-row,
    body.woocommerce-order-received table.wc-block-order-confirmation-totals__table tfoot tr.medtrack-payment-method-row,
    body.woocommerce-order-received table.shop_table tfoot tr.medtrack-payment-method-row,
    body.woocommerce-order-received table tfoot tr.payment-method,
    body.woocommerce-order-received table tfoot tr.payment_method,
    body.woocommerce-order-received table tfoot tr:last-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px 18px !important;
        gap: 5px !important;
    }

    body.woocommerce-order-received table.woocommerce-table--order-details tfoot tr.medtrack-payment-method-row th,
    body.woocommerce-order-received table.order_details tfoot tr.medtrack-payment-method-row th,
    body.woocommerce-order-received table.wc-block-order-confirmation-totals__table tfoot tr.medtrack-payment-method-row th,
    body.woocommerce-order-received table.shop_table tfoot tr.medtrack-payment-method-row th,
    body.woocommerce-order-received table tfoot tr.payment-method th,
    body.woocommerce-order-received table tfoot tr.payment_method th,
    body.woocommerce-order-received table tfoot tr:last-child th {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #0284c7 !important;
        line-height: 1.3 !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-order-received table.woocommerce-table--order-details tfoot tr.medtrack-payment-method-row td,
    body.woocommerce-order-received table.order_details tfoot tr.medtrack-payment-method-row td,
    body.woocommerce-order-received table.wc-block-order-confirmation-totals__table tfoot tr.medtrack-payment-method-row td,
    body.woocommerce-order-received table.shop_table tfoot tr.medtrack-payment-method-row td,
    body.woocommerce-order-received table tfoot tr.payment-method td,
    body.woocommerce-order-received table tfoot tr.payment_method td,
    body.woocommerce-order-received table tfoot tr:last-child td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #0284c7 !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    .medtrack-banner-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
        margin-bottom: 16px !important;
        padding-bottom: 16px !important;
    }

    .medtrack-banner-header-left {
        width: 100% !important;
        gap: 12px !important;
    }

    .medtrack-banner-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }

    .medtrack-banner-ref {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important;
        padding: 10px 14px !important;
    }

    .medtrack-banner-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 14px 12px !important;
        margin-bottom: 18px !important;
    }

    .medtrack-banner-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .medtrack-btn-track,
    .medtrack-btn-book {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
        padding: 14px 18px !important;
        font-size: 14px !important;
    }

    /* Mobile Payment Option Header: Checkmark & Title UP (Column 1 & 2, Row 1), Card Logos UNDER THAT */
    body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method {
        display: grid !important;
        grid-template-columns: 24px 1fr !important;
        column-gap: 10px !important;
        row-gap: 8px !important;
        align-items: start !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
    }

    body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
        grid-column: 1 !important;
        grid-row: 1 !important;
        display: block !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        margin: 3px 0 0 0 !important;
        padding: 0 !important;
        align-self: start !important;
        justify-self: start !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > label {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        line-height: 1.35 !important;
        text-align: left !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > label img {
        display: block !important;
        max-height: 20px !important;
        width: auto !important;
        margin: 2px 0 0 0 !important;
        align-self: flex-start !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.payment_methods li.wc_payment_method > div.payment_box {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }

    /* Saved Payment Methods List & Tokens on Mobile: Always Clean Inline Row */
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods,
    body.woocommerce-order-pay #payment div.payment_box ul.woocommerce-SavedPaymentMethods {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 16px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li.wc-stripe-saved-method,
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li.woocommerce-SavedPaymentMethods-token,
    body.woocommerce-order-pay #payment div.payment_box ul.woocommerce-SavedPaymentMethods li {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-height: 48px !important;
        height: auto !important;
        padding: 10px 14px !important;
        background: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        margin: 0 0 8px 0 !important;
        width: 100% !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li.selected,
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li:has(:checked) {
        border-color: #0284c7 !important;
        background: #f0f9ff !important;
        box-shadow: 0 0 0 1px #0284c7 !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label.wc-stripe-saved-method__label,
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer !important;
        line-height: normal !important;
        text-align: left !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label img.wc-stripe-saved-method__icon,
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label img {
        display: inline-block !important;
        height: 24px !important;
        max-height: 24px !important;
        width: auto !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        vertical-align: middle !important;
        align-self: center !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label span.wc-stripe-saved-method__plus {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        align-self: center !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #0284c7 !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label span.wc-stripe-saved-method__title,
    body.woocommerce-order-pay #payment ul.woocommerce-SavedPaymentMethods li label span {
        display: inline-block !important;
        font-size: 14.5px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        margin: 0 !important;
        line-height: 1.3 !important;
        align-self: center !important;
        flex: 1 1 auto !important;
        text-align: left !important;
        white-space: nowrap !important;
        float: none !important;
    }

    /* Mobile Save Checkbox: Left-aligned, up-down, strictly no centering */
    body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew,
    body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew,
    body.woocommerce-order-pay #payment div.payment_box p.form-row.woocommerce-SavedPaymentMethods-saveNew,
    body.woocommerce-order-pay #payment div.payment_box .wc-stripe-save-source {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 0 2px 0 !important;
        margin: 10px 0 0 0 !important;
        float: none !important;
        clear: both !important;
        text-align: left !important;
    }

    body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"],
    body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"],
    body.woocommerce-order-pay #payment div.payment_box input[type="checkbox"] {
        display: inline-block !important;
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        height: 18px !important;
        margin: 2px 0 0 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        align-self: flex-start !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew label,
    body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew label,
    body.woocommerce-order-pay #payment div.payment_box label[for="wc-stripe-new-payment-method"],
    body.woocommerce-order-pay #payment div.payment_box label[for*="save"]:not(.wc-stripe-saved-method__label),
    body.woocommerce-order-pay #payment div.payment_box .save-source-label {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
        flex: 1 1 auto !important;
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        font-size: 13.5px !important;
        line-height: 1.45 !important;
        color: #334155 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        float: none !important;
    }

    body.woocommerce-order-pay #payment .woocommerce-SavedPaymentMethods-saveNew label::after,
    body.woocommerce-order-pay #payment p.woocommerce-SavedPaymentMethods-saveNew label::after,
    body.woocommerce-order-pay #payment div.payment_box label[for*="new-payment-method"]::after,
    body.woocommerce-order-pay #payment div.payment_box label[for*="save"]::after,
    body.woocommerce-order-pay #payment div.payment_box .save-source-label::after {
        content: "Encrypted & Secure" !important;
        display: inline-flex !important;
        align-items: center !important;
        align-self: flex-start !important;
        width: fit-content !important;
        margin-top: 6px !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        margin-bottom: 0 !important;
        font-size: 10.5px !important;
        font-weight: 700 !important;
        color: #0284c7 !important;
        background: #f0f9ff !important;
        border: 1px solid #bae6fd !important;
        padding: 2.5px 8px !important;
        border-radius: 6px !important;
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
        float: none !important;
    }

    body.woocommerce-order-pay #order_review table.shop_table th,
    body.woocommerce-order-pay #order_review table.shop_table td {
        padding: 12px 14px !important;
    }

    body.woocommerce-order-pay #order_review #place_order {
        font-size: 15.5px !important;
        padding: 14px 20px !important;
        min-height: 50px !important;
    }

    .medtrack-wc-confirmation-banner,
    .medtrack-woocommerce-thankyou-banner {
        padding: 20px 16px !important;
        margin: 16px 0 28px 0 !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 540px) {
    body.woocommerce-order-pay,
    body.woocommerce-order-received {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.woocommerce-order-received .woocommerce,
    body.woocommerce-order-received .woocommerce-order {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    body.woocommerce-order-pay #order_review {
        padding: 20px 16px !important;
        margin: 14px 16px 28px 16px !important;
        width: calc(100% - 32px) !important;
        max-width: calc(100% - 32px) !important;
    }

    body.woocommerce-order-received ul.wc-block-order-confirmation-summary-list,
    body.woocommerce-order-received ul.order_details,
    body.woocommerce-order-received ul.woocommerce-thankyou-order-details {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status {
        grid-template-columns: 44px 1fr !important;
        column-gap: 14px !important;
        padding: 16px 18px !important;
    }

    body.woocommerce-order-received .wp-block-woocommerce-order-confirmation-status::before {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        background-size: 22px 22px, cover !important;
    }
}

/* ==========================================================================
   Customer Portal: Saved Payment Methods (Stripe / WooCommerce Cards)
   ========================================================================== */
.portal-card-full-width {
    grid-column: 1 / -1 !important;
}

#portal-card-saved-payment-methods {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    position: relative;
    box-sizing: border-box;
}

.card-header-payment-methods {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 260px;
}

.payment-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    border: 1px solid #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-text-wrap h3 {
    margin: 0 0 3px 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px;
}

.header-text-wrap p {
    margin: 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    line-height: 1.45 !important;
}

.header-badge-pci {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 9999px;
    color: #15803d;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.05);
}

.header-badge-pci svg {
    color: #16a34a;
    flex-shrink: 0;
}

.medtrack-saved-cards-wrapper {
    margin-top: 4px;
    position: relative;
}

/* Saved Cards List */
.medtrack-saved-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.medtrack-saved-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.medtrack-saved-card-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.saved-card-main-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.saved-card-brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.saved-card-brand-badge .card-logo-svg {
    display: block;
    width: 44px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.saved-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.saved-card-number-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.saved-card-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.saved-card-dots {
    font-size: 14.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.8px;
}

.saved-card-badge-default {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 9999px;
}

.saved-card-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}

.saved-card-sec-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    color: #059669;
    font-weight: 600;
}

.saved-card-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-remove-saved-card {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-saved-card:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

.btn-remove-saved-card:active {
    transform: translateY(0);
}

.btn-remove-saved-card:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-remove-saved-card svg {
    flex-shrink: 0;
}

/* Empty State Styling */
.medtrack-no-saved-cards {
    text-align: center !important;
    padding: 44px 28px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1.5px dashed #cbd5e1 !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    transition: all 0.25s ease;
}

.medtrack-no-saved-cards:hover {
    border-color: #94a3b8 !important;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%) !important;
}

.empty-cards-icon-wrap {
    position: relative;
    width: 66px;
    height: 66px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cards-icon-circle {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 1.5px solid #93c5fd;
    box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.25s ease;
}

.medtrack-no-saved-cards:hover .empty-cards-icon-circle {
    transform: translateY(-2px) scale(1.02);
}

.empty-icon-card {
    color: #0284c7;
    flex-shrink: 0;
}

.empty-icon-lock-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0284c7;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.empty-state-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 9999px;
    margin: 0 auto 10px auto;
}

.medtrack-no-saved-cards h4 {
    margin: 0 auto 8px auto !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px;
    text-align: center !important;
}

.medtrack-no-saved-cards p {
    margin: 0 auto 20px auto !important;
    font-size: 14px !important;
    color: #64748b !important;
    max-width: 480px !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

.empty-cards-trust-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 22px auto;
}

.trust-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.trust-pill-item svg {
    color: #0284c7;
    flex-shrink: 0;
}

.empty-cards-action {
    text-align: center;
    margin: 0 auto;
}

.btn-empty-book-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 9px;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.22);
    transition: all 0.2s ease;
}

.btn-empty-book-card:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-empty-book-card:active {
    transform: translateY(0);
}

/* Tablet Responsiveness (768px - 991px) */
@media (max-width: 991px) {
    #portal-card-saved-payment-methods {
        padding: 22px 22px;
    }

    .medtrack-no-saved-cards {
        padding: 36px 20px !important;
    }

    .empty-cards-trust-pills {
        gap: 8px;
    }

    .trust-pill-item {
        padding: 5px 12px;
        font-size: 11.5px;
    }
}

/* Mobile Responsiveness (< 768px) */
@media (max-width: 768px) {
    #portal-card-saved-payment-methods {
        padding: 18px 16px !important;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .card-header-payment-methods {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 14px;
        margin-bottom: 16px;
    }

    .header-title-group {
        min-width: 100%;
        gap: 12px;
    }

    .payment-header-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .header-text-wrap h3 {
        font-size: 15.5px !important;
    }

    .header-text-wrap p {
        font-size: 12.5px !important;
    }

    .header-badge-pci {
        font-size: 11px;
        padding: 3px 9px;
    }

    /* Empty state mobile */
    .medtrack-no-saved-cards {
        padding: 28px 14px !important;
        border-radius: 12px !important;
    }

    .empty-cards-icon-wrap {
        width: 58px;
        height: 58px;
        margin-bottom: 14px;
    }

    .empty-cards-icon-circle {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .empty-icon-card {
        width: 26px;
        height: 26px;
    }

    .empty-icon-lock-badge {
        width: 18px;
        height: 18px;
    }

    .empty-state-tag {
        font-size: 10.5px;
        padding: 2px 8px;
        margin-bottom: 8px;
    }

    .medtrack-no-saved-cards h4 {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    .medtrack-no-saved-cards p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    .empty-cards-trust-pills {
        flex-direction: column;
        width: 100%;
        gap: 7px;
        margin-bottom: 18px;
    }

    .trust-pill-item {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 7px 12px;
        font-size: 11.5px;
    }

    .empty-cards-action {
        width: 100%;
    }

    .btn-empty-book-card {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 12px 16px;
        font-size: 13.5px;
        min-height: 44px;
    }

    /* Saved Card Item mobile */
    .medtrack-saved-card-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 14px;
    }

    .saved-card-main-info {
        width: 100%;
        gap: 12px;
    }

    .saved-card-actions {
        width: 100%;
    }

    .btn-remove-saved-card {
        width: 100%;
        justify-content: center;
        padding: 11px 16px;
        font-size: 13.5px;
        min-height: 44px;
    }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 480px) {
    #portal-card-saved-payment-methods {
        padding: 16px 12px !important;
    }

    .medtrack-no-saved-cards {
        padding: 24px 10px !important;
    }

    .saved-card-number-row {
        gap: 6px;
    }

    .saved-card-brand-name {
        font-size: 14px;
    }

    .saved-card-dots {
        font-size: 13.5px;
    }
}

