nav.cs-nav li a {
    padding: 10px 20px;
    background: #ffb600;
    color: #fff;
    border-radius: 5px;
    display: block;
}

nav.cs-nav li {
    list-style-type: none;
    margin: 0px;
    margin-bottom: 10px;
}

.cs-logo {
    font-size: 30px;
    font-weight: 800;
    color: #ffb600;
    text-transform: uppercase;
    text-align: center;
}

.cs-sub {
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-style: italic;
    color: #959595;
}

header.cs-panel-head h2 {
    font-size: 20px;
    font-weight: 400;
    color: #ffb600;
}

#crm-student-dashboard {
    padding-top: 20px;
    padding-bottom: 30px;
}

button#btnFilterReset {
    width: 100%;
    border-radius: 5px;
    padding: 5px;
    font-weight: 500;
}

button#btnExport {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    font-weight: 400;
}

.csr-btn {
    background: #0066cc;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 200px;
}

.csr-field .select2-dropdown {
    background-color: white;
    border: 1px solid #eedbdb;
    border-radius: 4px;
    box-sizing: border-box;
    display: block;
    position: absolute;
    left: -100000px;
    width: 100%;
    z-index: 1051;
}

.csr-field .select2-dropdown {
    top: 15px;
}

.crm-dangkyhoc .csr-row input {
    padding: 5px !important;
    box-shadow: unset !important;
    border-radius: 5px !important;
    height: 45px !important;
    text-indent: 5px;
    border: solid 1px #ccc;
}

input#trialStart {
    margin-right: 10px;
    width: 150px;
}
input#trialEnd {
    width:150px;
}

.crm-dangkyhoc .csr-row select {

    box-shadow: unset !important;
    border-radius: 5px !important;
    height: 45px !important;
    text-indent: 5px;
}

.csr-field.flex.gap-px {
    width: 100%;
}

.span_title {
    width: 150px;
    flex-shrink: 0;
}

input[readonly] {
    background: #ffe9e9 !important;
}


#crm-student-dashboard .section-title {
    font-weight: 500;
    color: #ffb600;
    text-transform: uppercase;
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
}

.csr-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.csr-row .span_title {
    width: 150px;
    flex-shrink: 0;
}

.csr-row span {
    width: 150px;
    flex-shrink: 0;
}



.csr-btn {
    background: #0066cc;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.csr-btn:hover {
    background: #004c99;
}

.crm-dangkyhoc h3.section-title {
    padding: 10px 0px;
    border-bottom: solid 1px #eee;
    color: #ffb600;
    margin-bottom: 30px;
}


.crm-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 10px;
    max-width: 100%
}

.crm-row {
    display: contents
}

.crm-row>label {
    font-weight: 600;
    padding: 6px 0
}

.crm-row>div {
    padding: 4px 0
}

.crm-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.crm-btn {
    background: #ffb600;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0px 14px;
    cursor: pointer;
}

.crm-btn:hover {
    background: #333;
}

.crm-select,
.crm-input {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #eef1f5;
    min-width: 140px
}

.crm-title {
    color: #1143ff;
    margin: 14px 0 8px;
    font-weight: 800
}

/* Bọc bảng để tạo responsive */
.crm-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Bảng chính */
.crm-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
    color: #333;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Header */
.crm-table thead {
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    color: #fff;
}

.crm-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    background: #404040;
}

/* Body */
.crm-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}

/* Hàng chẵn khác màu nhẹ */
.crm-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Hover */
.crm-table tbody tr:hover {
    background: #eef2ff;
    transition: background 0.2s ease;
}

/* Cột đặc biệt */
.crm-table td.td-branch {
    font-weight: 500;
    color: #1e3a8a;
}

/* Thông tin nhỏ */
.crm-table small.capinfo {
    font-size: 14px;
    color: #6b7280;
}

.crm-table small.cap-ok {
    color: #ffb600
}

#crm-data-table tbody tr:nth-child(even) {
    background: #f9fafb;
}


.pair {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 6px 0;
    flex-wrap: nowrap;
}

.pair small {
    color: #888
}

.pair .del {
    font-size: 20px;
    padding: 0px;
}

.cap-ok {
    color: #16a34a;
    font-weight: 600
}

.cap-warn {
    color: #dc2626;
    font-weight: 700
}

.is-full {
    background: #fff7f7
}

form#crm-filter-form input,
form#crm-filter-form select {
    box-shadow: unset;
    border-radius: 5px;
    background: #f4f4f4;
}

form#crm-filter-form button {
    padding: 1px;
}

/* Bảng chính */
#crm-data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
    color: #333;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Header */
#crm-data-table thead {
    background: linear-gradient(90deg, #ffb600, #979797);
    color: #fff;
}

#crm-data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

/* Body */
#crm-data-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

/* Dòng chẵn nền nhạt */
#crm-data-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Hover hiệu ứng nhẹ */
#crm-data-table tbody tr:hover {
    background-color: #e0f2fe;
    transition: background 0.2s ease;
}

/* Cột đặc biệt */
#crm-data-table td.td-branch {
    font-weight: 500;
    color: #1d4ed8;
}

/* Thông tin nhỏ */
#crm-data-table small.capinfo {
    font-size: 12px;
    color: #6b7280;
}

#crm-data-table small.cap-ok {
    color: #16a34a;
}

tr.is-locked {
    opacity: 0.5;
    background: #f9faeb !important;
    cursor: no-drop;
}

.crm-filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.crm-filters button#crmBtnReload {
    width: 200px;
    margin: 0px;
    padding: 0px !important;
}

.crm-filters select,
.crm-filters input {
    border-radius: 5px !important;
    border: solid 1px #eee !important;
}

tr.is-locked a[data-action="edit"] {
    color: #999;
    pointer-events: none;
}

form#crm-filter-form button {
    margin-top: 22px;
}

nav.cs-nav ul {
    display: flex;
    gap: 10px;
    justify-content: center;
}

form#crm-filter-form label {
    font-size: 12px;
    font-weight: 400;
}

header.cs-panel-head h2 {
    padding-bottom: 30px;
    font-size: 30px;
    color: #000000;
}

nav.cs-nav ul li a.active {
    background: #424140 !important;
}

span.text-red-600 {
    color: red;
    font-weight: 700;
}

.button.btn-custom {
    background: #ffb600;
    border-radius: 5px;
    font-weight: 400;
}

/* checkin */

/* --- Tùy chỉnh Checkbox --- */

/* Ẩn checkbox mặc định của trình duyệt */
input.js-checkin {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    /* Bắt buộc để định vị dấu check */

    /* Kích thước mới của checkbox */
    width: 28px;
    height: 28px;

    /* Kiểu dáng của checkbox mới */
    border: 2px solid #adb5bd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;

    /* Căn chỉnh theo chiều dọc cho đẹp hơn */
    vertical-align: middle;
}

/* Kiểu dáng khi checkbox được CHỌN */
input.js-checkin:checked {
    background-color: #0d6efd;
    /* Màu xanh khi được chọn */
    border-color: #0d6efd;
}

/* Vẽ dấu check (✓) bằng pseudo-element ::before */
input.js-checkin:checked::before {
    content: '';
    display: block;
    position: absolute;

    /* Kích thước và vị trí của dấu check */
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Căn giữa dấu check */

    /* Dùng SVG để có dấu check sắc nét trên mọi màn hình */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
}

/* Kiểu dáng khi checkbox bị VÔ HIỆU HÓA (disabled) */
input.js-checkin:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    cursor: not-allowed;
}

/* Kiểu dáng khi checkbox VỪA ĐƯỢC CHỌN VỪA BỊ VÔ HIỆU HÓA
  (Giống với trường hợp của bạn: checked="" disabled="") 
*/
input.js-checkin:checked:disabled {
    background-color: #a0c3ff;
    /* Một màu xanh nhạt hơn */
    border-color: #a0c3ff;
}

div#crm-student-dashboard {
    background: linear-gradient(3deg, #ffffff, #fafff2);
}


div#crm-table-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-top: 30px;
    margin-bottom: 30px;
}

div#crm-table-pagination button {
    background: #0a0a0a;
    border-radius: 5px;
    color: #fff;
    margin: 0px 15px;
}

.is-error {
    outline: 2px solid #ef4444;
    background: #fff7f7;
}

tr.row-locked {
    background: #fafafa;
    opacity: .85;
}

tr.row-locked select,
tr.row-locked input {
    cursor: not-allowed;
}

.art-view img {
    height: 50px;
    width: 50px;
    border-radius: 5px;
}




/* Bọc ngoài bảng */
.overflow-x-auto {
    width: 100%;
    overflow-x: auto;
    /* Cho phép cuộn ngang */
    -webkit-overflow-scrolling: touch;
    /* Mượt trên mobile */
}

/* Bảng chính */
.crm-table-schedule {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    /* Giới hạn nhỏ nhất để có thể cuộn */
    background: white;
}

/* Header */
.crm-table-schedule th {
    background-color: #f6f8fa;
    text-align: left;
    padding: 10px;
    white-space: nowrap;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Ô dữ liệu */
.crm-table-schedule td {
    border-bottom: 1px solid #eee;
    padding: 8px;
    white-space: nowrap;
    /* Không xuống dòng */
}

/* Hiệu ứng hover hàng */
.crm-table-schedule tr:hover {
    background: linear-gradient(90deg, #f0f9ff 0%, #e0f7ff 100%);
    transition: background 0.3s ease;
}

/* Input và select trong ô */
.crm-table-schedule input,
.crm-table-schedule select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
}

/* Hiệu ứng focus */
.crm-table-schedule select:focus,
.crm-table-schedule input:focus {
    border-color: #00aaff;
    outline: none;
    box-shadow: 0 0 3px rgba(0, 170, 255, 0.5);
}

.link_out {
    text-decoration: underline;
    color: #f50;
    font-weight: 500;
}

.btn_action_x button {
    border-radius: 5px;
    font-weight: 400;
    padding: 0px 20px;
}

.csr-row .custom-row {
    display: flex;
    gap: 10px;
    flex: 1;
}

.csr-row select {
    height: 40px;
    line-height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
}

button#btnSaveTrial {
    width: 1000%;
    text-align: center;
    background: #ffb600;
    padding: 5px 5px;
    color: #fff;
    border-radius: 5px;
}

header.cs-panel-head h2 {
    color: #ffb600;
}

.span_title {
    width: 220px;
}

.span_title {
    font-weight: 600;
    font-size: 13px;
    color: #7f7f7f;
}

/* modal */
.crm-teacher {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 4px 0 0;
    border-radius: 999px;
    background: #ffffe0;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    line-height: 18px;
    white-space: nowrap;
    font-weight: 400;
}

button.btn_more_info {
    font-size: 16px;
    color: #ffb600;
}

.crm-teacher[title] {
    cursor: help;
}

button.btn_more_info {
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #d1a843;
    border-radius: 5px;
    color: #fff;
    font-weight: 400;
}

/* end modal */

/* ========== Badge base ========== */
.badges {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .2px;
    border: 1px solid transparent;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
    user-select: none;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    will-change: transform;
}

.badges:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .07);
}

.badges.badge--truncate {
    max-width: 110px;
    /* tuỳ chỉnh */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

i.fa-solid.fa-circle.fa-beat {
    color: #ef0707;
}

/* ======= Color tokens (có thể chỉnh theo brand) ======= */
:root {
    --badge-green-bg: #e8fff3;
    --badge-green-bd: #86efac;
    --badge-green-tx: #065f46;

    --badge-amber-bg: #fff7e6;
    --badge-amber-bd: #fcd34d;
    --badge-amber-tx: #92400e;

    --badge-gray-bg: #f1f5f9;
    --badge-gray-bd: #cbd5e1;
    --badge-gray-tx: #334155;

    --badge-red-bg: #ffecec;
    --badge-red-bd: #fda4af;
    --badge-red-tx: #7f1d1d;
}

/* ========== Variants ========== */
.badge--green {
    color: var(--badge-green-tx);
    background: linear-gradient(180deg, var(--badge-green-bg), #dcfce7);
    border-color: var(--badge-green-bd);
}

.badge--amber {
    color: var(--badge-amber-tx);
    background: linear-gradient(180deg, var(--badge-amber-bg), #ffedd5);
    border-color: var(--badge-amber-bd);
}

.badge--gray {
    color: var(--badge-gray-tx);
    background: linear-gradient(180deg, var(--badge-gray-bg), #e2e8f0);
    border-color: var(--badge-gray-bd);
}

.badge--red {
    color: var(--badge-red-tx);
    background: linear-gradient(180deg, var(--badge-red-bg), #ffe4e6);
    border-color: var(--badge-red-bd);
}

/* ========== Icon & live effect ========== */
/* Font Awesome icon size can be a bit larger for readability */
.badges i {
    font-size: .7rem;
    line-height: 1;
}

/* Tăng “nhịp tim + glow” cho trạng thái LIVE */
.badge--green .fa-beat-fade {
    /* FA đã có animation, thêm glow nhẹ */
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, .7));
    animation: badgeGlow 1.6s ease-in-out infinite;
}

form#crm-editrow-form input:disabled {
    background: #eee;
    color: #ccc;
}

#crm-data-table tr.just-updated {
    background: #fff7d1 !important;
    animation: crmPulse 1.2s ease;
}
#crm-art-edit[disabled],
#crm-art-delete[disabled] {
    opacity: .6;
    cursor: not-allowed;
}
@keyframes crmPulse {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 182, 0, .45);
    }

    50% {
        box-shadow: inset 0 0 0 12px rgba(255, 182, 0, .15);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(255, 182, 0, .0);
    }
}

@keyframes crmRowPulse {
    0% {
        background: #fff7cc;
    }

    60% {
        background: #fffbe6;
    }

    100% {
        background: transparent;
    }
}

@keyframes badgeGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(52, 211, 153, .5));
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(52, 211, 153, .9));
    }
}

/* Nháy viền rất nhẹ cho LIVE (pulse border) */
.badge--green {
    position: relative;
}

.badge--green::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(52, 211, 153, .25);
    opacity: .6;
    animation: borderPulse 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes borderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: .45;
    }

    50% {
        transform: scale(1.03);
        opacity: .9;
    }
}

/* ========== Subtle skeleton shimmer khi cần (optional) ========== */
/* Thêm class .is-loading vào badge để hiện shimmer */
.badges.is-loading {
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

.badges.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, .55) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-120%);
    animation: shimmer 1.4s infinite;
    mix-blend-mode: screen;
}

div#dangkytrial span.select2.select2-container.select2-container--default {
    width: 600px !important;
}

@keyframes shimmer {
    100% {
        transform: translateX(120%);
    }
}

div#crm-table-wrap {
    overflow: auto;
}

/* ========== Respect reduced-motion ========== */
@media (prefers-reduced-motion: reduce) {

    .badges,
    .badges:hover {
        transition: none;
        transform: none;
        box-shadow: none;
    }

    .badge--green::after,
    .badge--green .fa-beat-fade,
    .badge.is-loading::before {
        animation: none;
    }

    .badge--green .fa-beat-fade {
        filter: none;
    }
}

/* Responsive: hiển thị dạng block trên di động */
@media (max-width: 600px) {
    #crm-data-table thead {
        display: none;
    }

    #crm-data-table,
    #crm-data-table tbody,
    #crm-data-table tr,
    #crm-data-table td {
        display: block;
        width: 100%;
    }

    #crm-data-table tr {
        margin-bottom: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }

    #crm-data-table td {
        text-align: left;
        padding: 8px 12px;
        position: relative;
    }

    #crm-data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        top: 8px;
        font-weight: 600;
        color: #555;
        text-align: left;
    }
}

/* Responsive nhỏ hơn 600px */
@media (max-width: 600px) {
    .crm-table thead {
        display: none;
    }

    .crm-table,
    .crm-table tbody,
    .crm-table tr,
    .crm-table td {
        display: block;
        width: 100%;
    }

    .crm-table tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 8px;
    }

    .crm-table td {
        text-align: right;
        padding: 6px 10px;
        position: relative;
    }

    .crm-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 50%;
        font-weight: bold;
        text-align: left;
        color: #555;
    }

    nav.cs-nav ul {
        width: max-content;
    }

    nav.cs-nav {
        overflow: auto;
    }

    header.cs-panel-head h2 {
        padding-bottom: 30px;
        font-size: 20px;
        color: #000001;
    }

    form#crm-filter-form button {
        margin-top: 0px;
        margin-bottom: 0px;
    }

    .crm-filters {
        overflow: auto;
    }

    .crm-filters {
        display: flex;
        gap: 15px;
        justify-content: flex-start;
        align-items: center;
        flex-direction: row;
    }

    div#pairsWrap {
        overflow: auto;
    }

    .csr-row .span_title {
        width: 100px;
        flex-shrink: 0;
    }

    div#dangkytrial span.select2.select2-container.select2-container--default {
        width: 300px !important;
    }
}