/* ===== Service Package Page - Blue Theme ===== */
.service-package-page {
    background: #f5f5f5;
    min-height: 100vh;
}

/* Hero Section */
.package-hero {
    background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

    .package-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
        background-size: cover;
    }

/* Main Content */
.package-content {
    padding: 20px 0 60px;
    background: #f5f5f5;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.filter-item {
    margin-bottom: 10px;
}

    .filter-item label {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
        display: block;
    }

        .filter-item label i {
            color: #0051a5;
            margin-right: 6px;
        }

    .filter-item .form-control {
        border: 1px solid #d1d5db;
        border-radius: 8px;
        padding: 10px 15px;
        font-size: 14px;
    }

        .filter-item .form-control:focus {
            border-color: #0051a5;
            box-shadow: 0 0 0 3px rgba(0, 81, 165, 0.1);
            outline: none;
        }

.btn-refresh {
    background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-refresh:hover {
        background: linear-gradient(135deg, #003d7a 0%, #002d5c 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 81, 165, 0.3);
        color: white;
    }

    .btn-refresh i {
        margin-right: 6px;
    }

/* Results Section */
.results-section {
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.results-header {
    background: #0051a5;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

    .results-title i {
        margin-right: 10px;
    }

.results-count {
    font-size: 15px;
    opacity: 0.95;
}

    .results-count strong {
        font-size: 18px;
        font-weight: 700;
    }

/* Table Container - Fixed height + scroll giống trang tra cứu dịch vụ */
.table-container {
    height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

    .table-container::-webkit-scrollbar {
        width: 10px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: #0051a5;
        border-radius: 5px;
    }

        .table-container::-webkit-scrollbar-thumb:hover {
            background: #003d7a;
        }

/* Package List Table */
.table-package-list {
    margin-bottom: 0;
    width: 100%;
}

/* Thead sticky */
.thead-package {
    position: sticky;
    top: 0;
    background: #ffffff;
    color: #333333;
    z-index: 10;
    border-bottom: 2px solid #0051a5;
}

    .thead-package th {
        border-bottom: 2px solid #0051a5;
        border-top: none;
        padding: 10px 20px;
        font-weight: 700;
        font-size: 14px;
        color: #1f2937;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

/* Package Row */
.package-row {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
    background: white;
    cursor: pointer;
}

    .package-row:hover {
        background-color: #eff6ff;
    }

    .package-row td {
        padding: 11px 20px;
        vertical-align: middle;
        font-size: 15px;
        color: #333;
    }

        .package-row td:first-child {
            font-weight: 600;
            color: #666;
        }

        .package-row td:last-child {
            font-weight: 700;
            color: #003d7a;
        }

/* Loading cell */
.loading-cell {
    padding: 80px 20px !important;
    color: #666;
}

    .loading-cell .spinner-border {
        width: 3rem;
        height: 3rem;
    }

/* Floating Contact Buttons */
.floating-contact-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
    color: white;
    border-bottom: none;
}

    .modal-header .close {
        color: white;
        background: #003d7a;
        border: none;
        font-size: 17px;
        /* opacity: 0.8; */
    }

        .modal-header .close:hover {
            opacity: 1;
        }

/* Services Table in Modal */
#tblPackageServices thead {
    background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
    color: white;
}

    #tblPackageServices thead th {
        border: none;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 13px;
        letter-spacing: 0.5px;
        padding: 14px 16px;
    }

#tblPackageServices tbody tr {
    transition: background 0.2s;
    cursor: pointer;
}

    #tblPackageServices tbody tr:hover {
        background: #e0f2fe;
    }

    #tblPackageServices tbody tr.active-service {
        background-color: #dbeafe;
        border-left: 4px solid #0051a5;
    }

#tblPackageServices tbody td {
    padding: 12px 16px;
    vertical-align: middle;
}

#tblPackageServices tfoot tr {
    background: #dbeafe;
    font-size: 16px;
}

    #tblPackageServices tfoot tr td {
        font-weight: 700;
        color: #1e40af;
        padding: 14px 16px;
    }

/* Loading / Empty / Error State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

    .loading-state i {
        color: #0051a5;
        font-size: 48px;
        margin-bottom: 20px;
    }

    .loading-state p {
        color: #6b7280;
        margin-top: 16px;
        font-size: 16px;
    }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    background: white;
}

    .empty-state i {
        color: #d1d5db;
        font-size: 64px;
        margin-bottom: 20px;
    }

    .empty-state h3,
    .empty-state h4 {
        font-size: 24px;
        color: #374151;
        margin-bottom: 12px;
    }

    .empty-state p {
        font-size: 16px;
        color: #6b7280;
    }

/* Service Description Panel */
.service-description-panel {
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    height: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.description-header {
    background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px 10px 0 0;
}

    .description-header i {
        font-size: 20px;
    }

    .description-header h6 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

.description-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: white;
}

.description-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: #9ca3af;
    text-align: center;
}

    .description-placeholder i {
        font-size: 64px;
        margin-bottom: 20px;
        color: #d1d5db;
    }

    .description-placeholder p {
        font-size: 15px;
        max-width: 250px;
    }

.service-description-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-description-content h5 {
    color: #1e40af;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e40af;
}

.service-description-content .description-text {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

.service-description-content .no-description {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

    .service-description-content .no-description i {
        font-size: 48px;
        margin-bottom: 15px;
        color: #d1d5db;
    }

/* Services Table Container in Modal */
.services-table-container {
    max-height: 500px;
    overflow-y: auto;
}

.table-services {
    margin-bottom: 0;
}

    .table-services thead {
        position: sticky;
        top: 0;
        background: #0051a5;
        color: white;
        z-index: 10;
    }

        .table-services thead th {
            border: none;
            font-weight: 600;
            padding: 14px 12px;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

    .table-services tbody tr {
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .table-services tbody tr:hover {
            background-color: #eff6ff;
        }

        .table-services tbody tr.active-service {
            background-color: #dbeafe;
            border-left: 4px solid #0051a5;
        }

    .table-services tbody td {
        padding: 12px;
        vertical-align: middle;
        font-size: 14px;
    }

    .table-services .table-total {
        background: #f8f9fa;
        font-weight: 700;
    }

        .table-services .table-total td {
            padding: 14px 12px;
            font-size: 15px;
        }

/* Scrollbar */
.description-body::-webkit-scrollbar,
.services-table-container::-webkit-scrollbar {
    width: 8px;
}

.description-body::-webkit-scrollbar-track,
.services-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.description-body::-webkit-scrollbar-thumb,
.services-table-container::-webkit-scrollbar-thumb {
    background: #0051a5;
    border-radius: 4px;
}

    .description-body::-webkit-scrollbar-thumb:hover,
    .services-table-container::-webkit-scrollbar-thumb:hover {
        background: #003d7a;
    }

/* Responsive */
@media (max-width: 992px) {
    .results-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .table-container {
        height: 400px;
    }
}

@media (max-width: 767px) {
    .filter-bar .text-right {
        text-align: left !important;
        margin-top: 10px;
    }

    .btn-refresh {
        width: 100%;
    }

    .package-row td {
        font-size: 13px;
        padding: 12px 10px;
    }

    .thead-package th {
        font-size: 12px;
        padding: 12px 10px;
    }

    .results-header {
        padding: 15px 20px;
    }
}

@media (max-width: 576px) {
    .table-container {
        height: 500px;
    }

    .results-title {
        font-size: 18px;
    }
}
