﻿/* ==================== Danh sách đợt khám dạng thẻ ==================== */
.kcb-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 4px 20px;
}

.kcb-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.kcb-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.kcb-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex: 0 0 auto;
    border: 2px solid var(--primary);
}

.kcb-card-main {
    flex: 1 1 auto;
    min-width: 0;
}

.kcb-code {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: .3px;
    word-break: break-word;
}

.kcb-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    margin-top: 2px;
}

.kcb-daterange {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
}

.kcb-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

    .badge-status.status-done {
        background: var(--primary-light);
        color: var(--primary-dark);
    }

    .badge-status.status-pending {
        background: #fff4e0;
        color: var(--warning);
    }

.badge-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.badge-barcode {
    background: #e7f1ff;
    color: #2563eb;
}

.badge-share {
    background: #fff8e0;
    color: #b8860b;
}

.kcb-info-row {
    font-size: 13.5px;
    color: var(--ink-soft);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    .kcb-info-row strong {
        color: var(--ink);
        font-weight: 700;
    }

.kcb-info-sep {
    width: 1px;
    height: 12px;
    background: var(--line);
    margin: 0 4px;
}

.kcb-diagnosis strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kcb-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.kcb-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--primary);
    background: #fff;
    color: var(--primary-dark);
    border-radius: 20px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
    white-space: nowrap;
}

    .kcb-btn:hover {
        background: var(--primary);
        color: #fff;
    }

.kcb-empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-size: 14.5px;
}

@media (max-width: 420px) {
    .kcb-code {
        font-size: 15px;
    }

    .kcb-actions {
        gap: 6px;
    }

    .kcb-btn {
        font-size: 11.5px;
        padding: 7px 4px;
        gap: 4px;
    }

        .kcb-btn i {
            font-size: 13px;
        }
}

@media (max-width: 340px) {
    .kcb-btn span {
        display: none;
    }
}

.dot-dieu-tri-bar {
    padding: 10px 14px 0;
}

.dot-dieu-tri-info {
    font-size: 14px;
}

.form-content {
    padding: 0 10px;
}

.table-scroll {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(16, 40, 80, 0.07);
    padding: 4px;
    overflow: hidden;
}

    .table-scroll table {
        width: 100%;
        margin: 0 !important;
    }

    .table-scroll th {
        white-space: nowrap;
    }

    .table-scroll .table {
        margin: 0 !important;
    }

@media (max-width: 767px) {
    .table-scroll {
        overflow-x: auto;
    }
}

/* "Xem" action link */
.table-scroll a[onclick] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e6f7ea;
    color: #146c34 !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    transition: background-color .15s ease;
}

    .table-scroll a[onclick]:hover {
        background-color: #1e9c4a;
        color: #fff !important;
    }

.table-scroll tr td[colspan] {
    color: #5b6472;
    background: #f9fbfd;
    font-size: 13.5px;
    padding-top: 6px !important;
    padding-bottom: 10px !important;
}

.dot-kham-item {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

    .dot-kham-item.active {
        background-color: #e6f7ea;
        border-left: 3px solid #1e9c4a;
        font-weight: bold;
    }

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.divider {
    width: 2px;
    background-color: #e6eaf0;
}

.table {
    margin-left: auto;
    margin-right: auto;
}

.table_Head {
    text-align: center !important;
}

.mb-4 {
    margin-bottom: 0.5rem !important;
}

/* Soft attention-grabber instead of hard blinking colors */
@keyframes blinkColor {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .6;
    }
}

.blink-text {
    animation: blinkColor 1.6s ease-in-out infinite;
}

/* Bảng phong cách bệnh viện (dùng trong popup chi tiết) */
.hospital-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fefefe;
    border: 1px solid #e6eaf0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

    .hospital-table thead {
        background-color: #1e9c4a;
        color: white;
        text-align: center;
    }

        .hospital-table thead th {
            padding: 10px 12px;
            font-weight: 600;
            border-right: 1px solid rgba(255, 255, 255, 0.15);
        }

    .hospital-table tbody td {
        padding: 10px 12px;
        color: #333;
        border-top: 1px solid #eaeaea;
        text-align: left;
    }

    .hospital-table tbody tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    .hospital-table tbody tr:hover {
        background-color: #e2f0ff;
        cursor: pointer;
    }

.chisoThap, .chisoCao {
    font-size: 13px;
    margin-top: 4px;
}

#popupContent .card {
    border-radius: 14px;
    overflow: hidden;
}

#popupContent .card-header.bg-primary {
    background: linear-gradient(90deg, #1e9c4a, #146c34) !important;
}
