/* Giao diện lúc đang xử lý trên điện thoại */
.print-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media print {
    body * {
        visibility: hidden;
    }
}

#vung-in-cuc-bo {
    display: none;
}

@media print {

    html,
    body {
        overflow: hidden !important;
        height: 100vh !important;
    }

    body>*:not(#vung-in-cuc-bo) {
        display: none !important;
    }

    #vung-in-cuc-bo {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: white !important;
        z-index: 9999999 !important;
    }

    .ticket-img {
        width: 100mm !important;
        height: 70mm !important;
        display: block !important;
        margin: 0 auto !important;
        page-break-after: always !important;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}

footer {
    margin-top: auto;
}

.nav-link {
    font-weight: 500;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.form-control,
.form-select {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

.custom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000000;
    justify-content: center;
    align-items: center;
}

.custom-popup {
    background: white;
    width: 95%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    animation: popupIn 0.2s ease-out;
}

@keyframes popupIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.text-success-custom {
    color: #28a745 !important;
}

.text-danger-custom {
    color: #dc3545 !important;
}

.order-card,
.customer-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-address {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-code {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 10px;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #0d6efd;
    margin: 15px 0;
}

#quick-order-overlay {
    display: none;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999999 !important;

    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
}

#custom-popup-overlay {
    display: none;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999999 !important;

    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
}

.custom-popup-content {
    background: white;
    width: 95%;
    max-width: 500px;
    margin: 40px auto !important;
    border-radius: 20px;
    padding-bottom: 20px;
    position: relative;
    display: block !important;
}

@keyframes popupShow {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 767.98px) {
    .desktop-view {
        display: none !important;
    }

    .mobile-view {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .desktop-view {
        display: block !important;
    }

    .mobile-view {
        display: none !important;
    }
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 5px solid #0d6efd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.order-card.viettel-border {
    border-left-color: #dc3545;
}

.card-label {
    font-size: 0.7rem;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
    display: block;
}

.table-address {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

#notice-popup-overlay {
    z-index: 1000000000 !important;
}

.custom-overlay {
    z-index: 1050 !important;
}


.jt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.jt-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    position: relative;
    animation: zoomIn 0.2s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.jt-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
    border-radius: 16px 16px 0 0;
}

.jt-modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.modal-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.tracking-timeline {
    padding: 0 0 0 20px;
    border-left: 2px solid #e9ecef;
    margin-left: 20px;
    position: relative;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
    padding-left: 20px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #adb5bd;
}

.timeline-item:first-child::before {
    background: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.timeline-date {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 3px;
}

.status-title {
    font-weight: bold;
    margin-bottom: 2px;
    color: #343a40;
}

.status-desc {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 0;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eeeeee;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    text-align: center;
    color: #666;
    text-decoration: none;
    flex: 1;
    transition: 0.3s;
}
.nav-item i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 2px;
}
.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}
.nav-item.active {
    color: #007bff;
}

@media (max-width: 576px) {
    .bottom-sheet .modal-dialog {
        margin: 0;
        position: fixed;
        bottom: 0;
        width: 100%;
    }
    .bottom-sheet .modal-content {
        border-radius: 20px 20px 0 0;
        border: none;
    }
}

.filter-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 1050;
    transition: bottom 0.3s ease-out;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.filter-drawer.show {
    bottom: 0;
    padding-bottom: 60px;
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.filter-overlay.show {
    display: block;
}