body {
    background-color: #f8f9fa;
}

.page-header-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
}

.page-header-title p {
    color: #666;
    margin-top: 0.5rem;
}

/* Search Box Styles */
.search-container-box {
    background: #fff;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto 3rem auto;
    border: 1px solid #eee;
}

@media screen and (max-width: 768px) {
    .search-container-box {
        display: block;
    }

    .search-group {
        border: none !important;
    }

    .base-container {
        width: 100%;
        padding: 0 !important;
    }
}


.search-group {
    flex: 1;
    padding: 0 1rem;
    position: relative;
}

.search-group:not(:last-child) {
    border-right: 1px solid #ddd;
}

.search-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.search-group .form-control,
.search-group .form-select {
    border: none;
    padding-left: 0;
    font-size: 1rem;
    color: #555;
    box-shadow: none;
}

.search-group .form-control::placeholder {
    color: #aaa;
}

.btn-search-custom {
    background-color: #4753bf;
    color: #fff;
    border-radius: 10px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}

.btn-search-custom:hover {
    background-color: #3a44a0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 83, 191, 0.4);
}

/* Card Result Styles */
.dataTables_wrapper .row {
    margin: 0;
}

table.dataTable {
    border-collapse: separate;
    margin-bottom: 16px !important;
}

#cosokcbTable thead,
#cosokddTable thead {
    display: none;
}

#cosokcbTable tbody tr,
#cosokddTable tbody tr {
    background-color: transparent !important;
    box-shadow: none !important;
}

#cosokcbTable tbody td,
#cosokddTable tbody td {
    border: none !important;
    padding: 0 0 1rem 0 !important;
    background: transparent !important;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.result-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header-info h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-address {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.card-address i {
    margin-top: 0.2rem;
    margin-right: 0.5rem;
}

.tag-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    background-color: #f1f3f5;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    width: 180px;
    margin-bottom: 6px;
}

.info-col-label {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.info-box {
    background-color: #e6fcf5;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: inline-block;
    font-size: 0.9rem;
    color: #0ca678;
}

.info-box-secondary {
    background-color: #4753bf;
    color: #fff;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4753bf;
}

.btn-view-detail {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #444;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-view-detail:hover {
    background: #4753bf;
    color: #fff;
    border-color: #4753bf;
}

/* Modals style from original file */
.modal-body p {
    margin-bottom: 10px;
    font-size: 16px;
}

.modal-body p strong {
    display: inline-block;
    width: 200px;
    font-weight: bold;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-lg {
    max-width: 1000px;
}

.modal-header {
    background-color: #4753bf;
    color: white;
    border-bottom: none;
}

.modal-title {
    color: white;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(100%);
}

.chuyen-khoa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 0;
    margin: 10px 0 0 40px;
}

.chuyen-khoa-grid li {
    font-size: 16px;
    line-height: 1.5;
    padding: 5px 5px 5px 10px;
    word-break: break-word;
    list-style-type: disc;
    display: list-item;
}

/* Modal Table Header Style */
.modal-body table thead th {
    background-color: #4753bf !important;
    color: #fff !important;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
}

/* Fix DataTables Length Menu Alignment in Modal */

.mobile-contact-icon {
    width: 35px;
    height: 35px;
    background-color: #eef2ff;
    color: #4753bf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.divider {
    background-color: #929090;
    height: auto;
    width: 1px;
    margin: 0 4px;
}

.divider-right {
    border-right: 1px solid #dadbe0;
    height: auto;
}

/* Grid View for KDD (Kinh doanh dược) Only */
#cosokddTable tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0;
}

#cosokddTable tbody tr {
    width: 100%;
    margin-bottom: 0;
    display: flex;
}

#cosokddTable tbody td {
    display: flex;
    width: 100%;
    flex: 1;
    padding: 0 !important;
    border: none;
    background: transparent !important;
}

/* Responsive adjustment for tablet and mobile */
@media (max-width: 991px) {
    #cosokddTable tbody {
        grid-template-columns: 1fr;
    }
}

/* List View for KCB (Khám chữa bệnh) and Others */
#cosokcbTable tbody {
    display: block;
    margin: 0;
}

#cosokcbTable tbody tr {
    width: 100%;
    display: block;
    padding: 0;
    margin-bottom: 20px;
}

#cosokcbTable tbody td {
    display: block;
    width: 100%;
    padding: 0 !important;
    border: none;
}

/* License Box Style */
.license-box {
    background-color: #4753bf;
    color: #fff;
    border-radius: 6px;
    padding: 4px 12px;
    display: inline-block;
    min-width: 140px;
}

.license-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0px;
    display: block;
}

.license-value {
    font-size: 0.95rem;
    font-weight: 700;
}

/* New Clean Card Styles */
.clean-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    margin-bottom: 20px;
    position: relative;
}

.clean-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.clean-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4753bf;
    /* Brand blue */
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.clean-card-body {
    font-size: 0.95rem;
    color: #333;
}

.clean-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.clean-icon-box {
    width: 32px;
    height: 32px;
    background-color: #eef2ff;
    color: #4753bf;
    border-radius: 50%;
    /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.clean-info-content {
    padding-top: 4px;
    /* Align with icon center visually */
}

.clean-label {
    font-weight: 600;
    margin-right: 5px;
}

.clean-value {
    color: #212529;
}

.clean-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Updated Clean Card for Grid */

.clean-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 15px;
}


.btn-clean-detail {
    background-color: #4753bf;
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    /* Rounded pill/rect */
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-clean-detail:hover {
    background-color: #3a44a0;
    color: #fff;
}

/* KDD Specific Styles Refined */
.kdd-legal-group,
.kdd-contact-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    height: 100%;
}

.kdd-legal-row,
.kdd-contact-row {
    display: flex;
    align-items: center;
}

.kdd-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.kdd-icon-blue {
    background-color: #eef2ff;
    color: #4753bf;
}

.kdd-icon-red {
    background-color: #fff1f2;
    color: #e11d48;
}

.kdd-icon-green {
    background-color: #f0fdf4;
    color: #16a34a;
}

.kdd-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kdd-value {
    font-size: 14px;
    color: #64748b;
    line-height: 1.3;
}

.kdd-badge {
    padding: 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    display: inline-block;
    text-align: center;
    width: fit-content;
    margin-top: auto;
}

.kdd-badge-danger {
    background-color: #eb9c9c;
}

.kdd-badge-success {
    background-color: #58926f;
}

.btn-info-circle {
    width: 30px;
    height: 30px;
    border: 1.5px solid #4753bf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4753bf;
    font-size: 0.8rem;
    text-decoration: none !important;
    transition: all 0.2s;
    flex: 0 0 auto;
}

.btn-info-circle:hover {
    background: #4753bf;
    color: #fff;
}


.info-col-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 10px;
}