﻿/* ================= ROOT ================= */
:root {
    --accent: #637CF8;
    --accent-strong: #0B1FF4;
    --surface: rgba(255, 255, 255, 0.96);
    --text: #0f172a;
    --text-strong: #020617;
    --muted: #475569;
    --border: #dbe7f5;
    --border-strong: #9dbef0;
    --shadow: 0 18px 40px rgba(37, 99, 235, 0.08);
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
    --radius-xl: 14px;
    --radius-lg: 14px;
    --radius-md: 14px;
    --radius-sm: 14px;
    --gap: 14px;
    --panel-padding: 8px;
    width: 100%;
    margin: 0 auto;
    padding: 6px;
    display: grid;
    gap: var(--gap);
    position: relative;
    line-height: 1.4;
    color: var(--text);
    background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
    border: 1px solid #e2ecf8;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    font-family: "Be Vietnam Pro", "Segoe UI Variable Text", "Segoe UI", sans-serif;
}

.tkb-xep {
    min-height: 100vh;
    background: linear-gradient(rgba(233, 247, 240, 0.85), rgba(241, 245, 241, 0.85));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

    /* Container riêng của trang TKB */

    .tkb-xep.container-fluid {
        padding-top: 0 !important;
        padding-left: clamp(12px, 5vw, 5rem);
        padding-right: clamp(12px, 5vw, 5rem);
        background-color: #DCE7F7 !important;
    }
/* ================= HERO GRID ================= */
.tkb-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

/* ================= CARD ================= */
.hero-card {
    --card-accent: #2563eb;
    --card-accent-alt: #60a5fa;
    --card-accent-soft: rgba(37, 99, 235, 0.12);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 120px; /* 🔥 tăng nhẹ cho dễ nhìn */
    padding: 6px 8px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

    /* Glow */
    .hero-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top right, var(--card-accent-soft), transparent 55%);
    }

    /* Thanh màu */
    .hero-card::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 0;
        height: 3px;
        border-radius: 999px 999px 0 0;
        background: linear-gradient(90deg, var(--card-accent), var(--card-accent-alt));
    }

/* ================= HEADER ================= */
.hero-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hero-card__eyebrow {
    padding: 3px 8px;
    border-radius: 14px;
    background: var(--card-accent-soft);
    color: var(--card-accent);
    font-size: 0.6rem;
    font-weight: 700;
}

/* Icon */
.hero-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-accent-soft), #fff);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

    .hero-card__icon svg {
        width: 20px;
        height: 20px;
    }

/* ================= CONTENT ================= */
.hero-card__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.hero-card__value-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.hero-card__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.hero-card__unit {
    font-size: 0.65rem;
    color: #64748b;
}

/* Ẩn meta */
.hero-card__meta {
    display: none;
}

/* Progress */
.hero-card__progress {
    margin-top: 6px;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.hero-card__progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--card-accent), var(--card-accent-alt));
}

/* ================= MÀU ================= */
.hero-card--plan {
    --card-accent: #2563eb;
    --card-accent-alt: #60a5fa;
}

.hero-card--scheduled {
    --card-accent: #0f766e;
    --card-accent-alt: #2dd4bf;
}

.hero-card--class-load {
    --card-accent: #c2410c;
    --card-accent-alt: #fb923c;
}

.hero-card--teachers {
    --card-accent: #0284c7;
    --card-accent-alt: #38bdf8;
}

.hero-card--classes {
    --card-accent: #475569;
    --card-accent-alt: #94a3b8;
}

/* ================= SIDEBAR (col-lg-2) ================= */
.col-lg-2 .tkb-hero-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    margin-bottom: 0;
}

/* Card trong sidebar (cao hơn chút) */
.col-lg-2 .hero-card {
    min-height: 85px; /* 🔥 tăng nhẹ cho dễ đọc */
    padding: 6px;
    border-radius: 12px;
}

/* Icon nhỏ lại */
.col-lg-2 .hero-card__icon {
    width: 36px;
    height: 36px;
}

    .col-lg-2 .hero-card__icon svg {
        width: 20px;
        height: 20px;
    }

/* Text */
.col-lg-2 .hero-card__label {
    font-size: 0.7rem;
}

.col-lg-2 .hero-card__value {
    font-size: 1.1rem;
}

.col-lg-2 .hero-card__unit {
    font-size: 0.55rem;
}

/* Progress */
.col-lg-2 .hero-card__progress {
    height: 4px;
}

/* Sticky sidebar */
.col-lg-2 {
    position: sticky;
    top: 10px;
    height: fit-content;
}

/* ================= HIGHLIGHT ================= */

.tkb-xep .tkb-highlight {
    background: #f0fdf4 !important;
    outline: 1px dashed #86efac;
}

    .tkb-xep .tkb-highlight div {
        background: #dcfce7 !important;
        border: 1px solid #bbf7d0 !important;
        color: #166534 !important;
        box-shadow: none;
    }

.tkb-xep .tkb-drop-highlight {
    background-color: #c8f7c5 !important;
    border: none;
}

.tkb-xep .tkb-gv-highlight {
    background: #9EEAE8 !important;
    color: #0420BD !important;
    font-weight: 600;
}

    .tkb-xep .tkb-gv-highlight div {
        background: #dcfce7 !important;
        border: 1px solid #bbf7d0 !important;
        color: #166534 !important;
        box-shadow: none;
    }



/* ================= TRẠNG THÁI TIẾT ================= */

/* NỀN Ô TIẾT NGHỈ */
.tkb-xep .tiet-nghi {
    background: #8FD3FA !important; /* xanh nhẹ */
    color: #0B2EF4;
    font-weight: 700;
}

    /* CARD BÊN TRONG */
    .tkb-xep .tiet-nghi div {
        background: linear-gradient(135deg, #BBE4FC, #E7F5FE) !important;
        border: 1px solid #c3d8fb !important;
        color: #0B2EF4 !important;
        box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
    }

    /* Giữ đồng bộ màu chữ */
    .tkb-xep .tiet-nghi * {
        color: inherit !important;
    }

.tkb-xep .tiet-codinh {
    background: #bbf7d0 !important;
}

    .tkb-xep .tiet-codinh div {
        background: linear-gradient(135deg, #93F5BA, #BEF9D5) !important;
        border: 1px solid #E96A16 !important;
        color: #0F5202 !important;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    }


/* ================= TOOLBAR OVERRIDE ================= */
.tkb-xep .tkb-action-bar {
    margin: 6px 0 6px;
}

.tkb-xep .tkb-toolbar {
    display: grid;
    gap: 10px;
}

.tkb-xep .tkb-toolbar__panel {
    position: relative;
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08), 0 6px 14px rgba(15, 23, 42, 0.05);
    overflow: visible;
}

    .tkb-xep .tkb-toolbar__panel::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 38%);
        pointer-events: none;
    }

.tkb-xep .tkb-toolbar__panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.tkb-xep .tkb-toolbar__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tkb-xep .tkb-toolbar__status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 118, 110, 0.12));
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

    .tkb-xep .tkb-toolbar__status .spinner-border {
        width: 0.8rem;
        height: 0.85rem;
        margin: 0 !important;
        color: currentColor !important;
        border-width: 0.15em;
    }

.tkb-xep .tkb-toolbar__row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.tkb-xep .tkb-filter-actions {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tkb-xep .tkb-toolbar__item {
    position: relative;
    min-width: 0;
}

.tkb-xep .tkb-toolbar .tkb-action-btn,
.tkb-xep .tkb-toolbar .tkb-dd-toggle,
.tkb-xep .tkb-toolbar .action-btn {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    line-height: 1.2;
    text-decoration: none !important;
    overflow: hidden;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn {
    --btn-start: #2563eb;
    --btn-end: #0ea5e9;
    --btn-shadow: rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, var(--btn-start), var(--btn-end)) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 14px 24px var(--btn-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn::before {
        content: "";
        position: absolute;
        inset: 1px;
        border-radius: inherit;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 48%);
        pointer-events: none;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn:hover:not(:disabled),
    .tkb-xep .tkb-toolbar .tkb-toolbar-btn:focus-visible {
        transform: translateY(-2px);
        filter: saturate(1.05);
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), 0 16px 30px rgba(15, 23, 42, 0.16) !important;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn:active:not(:disabled) {
        transform: translateY(1px);
        box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.18) !important;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn:disabled {
        background: linear-gradient(180deg, #cbd5e1, #94a3b8) !important;
        color: #f8fafc !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        box-shadow: none !important;
        opacity: 0.8;
        cursor: not-allowed;
        transform: none;
    }

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__icon,
.tkb-xep .tkb-toolbar .tkb-toolbar-btn__text,
.tkb-xep .tkb-toolbar .tkb-toolbar-btn__content {
    position: relative;
    z-index: 1;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__icon {
    flex: 0 0 30px;
    width: 22px;
    height: 22px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn__icon svg {
        width: 20px;
        height: 20px;
    }

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn__value {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn.dropdown-toggle::after {
    position: relative;
    z-index: 1;
    margin-left: auto !important;
    margin-right: 2px;
    border-top-color: currentColor;
    opacity: 0.88;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--brand {
    --btn-start: #2563eb;
    --btn-end: #0ea5e9;
    --btn-shadow: rgba(37, 99, 235, 0.24);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--teal {
    --btn-start: #0f766e;
    --btn-end: #14b8a6;
    --btn-shadow: rgba(15, 118, 110, 0.24);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--indigo {
    --btn-start: #1d4ed8;
    --btn-end: #1e3a8a;
    --btn-shadow: rgba(29, 78, 216, 0.22);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--slate {
    --btn-start: #475569;
    --btn-end: #0f172a;
    --btn-shadow: rgba(15, 23, 42, 0.2);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--danger {
    --btn-start: #dc2626;
    --btn-end: #b91c1c;
    --btn-shadow: rgba(220, 38, 38, 0.22);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter {
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    color: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter:hover:not(:disabled),
    .tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter:focus-visible {
        border-color: rgba(37, 99, 235, 0.22) !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08), 0 14px 26px rgba(15, 23, 42, 0.1) !important;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter .tkb-toolbar-btn__icon {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.1));
        border-color: rgba(37, 99, 235, 0.14);
        color: #1d4ed8;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter .tkb-toolbar-btn__label {
        color: #0369a1;
        opacity: 1;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-btn--filter.dropdown-toggle::after {
        border-top-color: #a9c2e4;
    }

.tkb-xep .tkb-toolbar .tkb-toolbar-menu {
    margin-top: 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(6px);
}

.tkb-xep .tkb-toolbar .tkb-toolbar__item .tkb-toolbar-menu {
    min-width: 150px;
    width: min(340px, 92vw);
}

.tkb-xep .tkb-toolbar .tkb-toolbar__item--wide .tkb-toolbar-menu {
    width: 100%;
    min-width: 100%;
    max-height: 340px;
    overflow-y: auto;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-header {
    padding: 4px 4px 4px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
}

    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item:hover,
    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item:focus {
        background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.1));
        color: #1d4ed8;
        transform: translateX(1px);
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item.active,
    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item:active {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        color: #ffffff;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item:disabled,
    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item.disabled {
        color: #94a3b8;
        background: rgba(148, 163, 184, 0.08);
        opacity: 1;
        cursor: not-allowed;
        transform: none;
    }

    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-item.text-muted {
        color: #94a3b8 !important;
    }

.tkb-xep .tkb-toolbar .tkb-toolbar-menu .dropdown-divider {
    margin: 8px 0;
    border-top-color: rgba(148, 163, 184, 0.22);
}

.tkb-xep .tkb-toolbar .tkb-toolbar-menu .tkb-menu-item--primary {
    color: #1d4ed8;
}

.tkb-xep .tkb-toolbar .tkb-toolbar-menu .tkb-menu-item--danger {
    color: #b91c1c;
}

    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .tkb-menu-item--danger:hover,
    .tkb-xep .tkb-toolbar .tkb-toolbar-menu .tkb-menu-item--danger:focus {
        background: linear-gradient(180deg, rgba(220, 38, 38, 0.08), rgba(248, 113, 113, 0.12));
        color: #b91c1c;
    }

/* FIX STACKING CONTEXT CHUẨN */
.tkb-xep .tkb-toolbar__panel {
    position: relative;
    z-index: 1;
}

/* Panel trên luôn nổi hơn */
.tkb-xep .tkb-toolbar__panel--primary {
    z-index: 20;
}

/* Panel filter nằm dưới */
.tkb-xep .tkb-toolbar__panel--filters {
    z-index: 1;
}

/* Dropdown luôn nổi */
.tkb-xep .tkb-toolbar-menu {
    z-index: 9999 !important;
}


/* ================= BẢNG TKB ================= */
.tkb-xep .tiet-hoc {
    font-size: 0.78rem;
}

.tkb-xep .tkb-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Times New Roman", serif;
    -webkit-font-smoothing: antialiased !important;
    font-size: 0.8rem;
    background: #fff;
    table-layout: fixed;
    border-collapse: collapse;
    --col-count: 6;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

    /* ============================================
               CELL CHUNG
            ============================================ */
    .tkb-xep .tkb-table th,
    .tkb-xep .tkb-table td {
        padding: 2px 4px;
        height: 26px;
        text-align: center;
        vertical-align: middle;
        box-sizing: border-box;
    }

        /* ============================================
               CỘT ĐẦU (TIẾT) - CỐ ĐỊNH
            ============================================ */
        .tkb-xep .tkb-table th:first-child,
        .tkb-xep .tkb-table td:first-child {
            width: 36px;
            min-width: 36px;
            max-width: 36px;
            font-weight: 600;
        }

        /* ============================================
               CÁC CỘT CÒN LẠI - CHIA ĐỀU
            ============================================ */
        .tkb-xep .tkb-table th:not(:first-child),
        .tkb-xep .tkb-table td:not(:first-child) {
            width: calc((100% - 26px) / var(--col-count));
        }

    /* ============================================
               HEADER
            ============================================ */
    .tkb-xep .tkb-table th {
        position: sticky;
        top: 0;
        z-index: 0;
        background: linear-gradient(180deg, #eef5ff 0%, #dceafe 100%);
        color: var(--text-strong);
        font-weight: 600;
        font-size: 0.75rem;
    }

    .tkb-xep .tkb-table tbody tr:nth-child(even) td:not(.row-label) {
        background: #fbfdff;
    }

    .tkb-xep .tkb-table tbody tr:hover td:not(.row-label) {
        background: #f4f8ff;
    }

    .tkb-xep .tkb-table th:not(:first-child),
    .tkb-xep .tkb-table td:not(:first-child) {
        min-width: 100px;
    }

    /* Header */
    .tkb-xep .tkb-table th:first-child {
        border-top-left-radius: 14px;
    }

    .tkb-xep .tkb-table th:last-child {
        border-top-right-radius: 14px;
    }

    .tkb-xep .tkb-table th {
        background: linear-gradient(180deg, #027074, #027074);
        height: 32px;
        font-weight: bold;
        color: #fff;
        font-size: 0.8rem;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    /* ============================================
               MÀU BUỔI
            ============================================ */
    .tkb-xep .tkb-table td.buoi-sang {
        background: #E7F3FE !important;
    }

    .tkb-xep .tkb-table td.buoi-chieu {
        background: #FEF0E7 !important;
    }

    /* ============================================
               NGĂN CÁCH SÁNG / CHIỀU
            ============================================ */
    .tkb-xep .tkb-table tr:nth-child(6) td {
        border-top: 2px solid #CA5207 !important
    }

    /* ============================================
               HOVER
            ============================================ */
    .tkb-xep .tkb-table td:hover {
        background: #b0f7f5;
    }

    .tkb-xep .tkb-table tr td.buoi-chieu:hover {
        background: #F5C6AB;
    }

    /* ============================================
               NỘI DUNG TRONG Ô
            ============================================ */
    .tkb-xep .tkb-table td div {
        padding: 2px 4px;
        font-size: 0.75rem;
        line-height: 1.3;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 12px;
        background: linear-gradient(180deg, #fbfdff 0%, #eaf3ff 100%);
        border: 1px solid #c3d8fb;
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
    }

/* ================= MOBILE ================= */
@media (min-width: 768px) {
    .tkb-xep .tkb-action-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
    }

    .tkb-xep .tkb-action-btn,
    .tkb-xep .tkb-dd-toggle,
    .tkb-xep .tkb-btn-group-btn,
    .tkb-xep .action-btn,
    .tkb-xep .btn-group .btn,
    .tkb-xep .dropdown-toggle {
        width: auto !important;
        min-width: 120px;
        max-width: none;
        margin-bottom: 0;
        font-size: 0.9rem;
        min-height: 32px;
    }

    .tkb-xep .dropdown-menu {
        width: auto !important;
        min-width: 150px;
        text-align: left;
    }

    /* ===== BUTTON ===== */
    .tkb-xep .tkb-action-btn, .tkb-xep .tkb-dd-toggle, .tkb-xep .tkb-btn-group-btn {
        min-width: 96px;
        height: 34px;
        padding: 0 12px;
        font-size: 0.8rem;
        border-radius: 9px !important;
    }
    /* ===== TABLE ===== */
    .tkb-xep .tkb-table {
        table-layout: fixed;
        width: 100%;
        font-size: 0.7rem;
    }
        /* ===== CỘT TIẾT (cột đầu tiên) ===== */
        .tkb-xep .tkb-table th:first-child,
        .tkb-xep .tkb-table td:first-child {
            width: 36px;
            min-width: 36px;
            max-width: 36px;
            font-weight: 600;
        }
        /* ===== CÁC CỘT THỨ ===== */
        .tkb-xep .tkb-table th:not(:first-child),
        .tkb-xep .tkb-table td:not(:first-child) {
            width: calc((100% - 36px) / 6); /* đổi 6 nếu số ngày khác */
        }
        /* ===== TEXT TRONG Ô ===== */
        .tkb-xep .tkb-table td div {
            padding: 1px;
            font-size: 0.68rem;
            line-height: 1.1;
            white-space: normal;
            word-break: break-word;
        }
        /* ===== TRÁNH TRÀN ===== */
        .tkb-xep .tkb-table td {
            overflow: hidden;
            text-overflow: ellipsis;
        }
    /* ===== KHÔNG SCROLL NGANG ===== */
    .tkb-xep .table-responsive {
        overflow-x: hidden !important;
    }
}

/* =========================================================
               MOBILE ACTIONS / DROPDOWN FULL WIDTH
            ========================================================= */
@media (max-width: 768px) {
    /* ===== Container gọn lại ===== */
    .tkb-xep.container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    /* ===== Hai cụm nút chính ===== */
    .tkb-xep .tkb-top-actions,
    .tkb-xep .tkb-filter-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
    }
        /* ===== Mỗi dropdown / nút chiếm full hàng ===== */
        .tkb-xep .tkb-top-actions > *,
        .tkb-xep .tkb-filter-actions > * {
            width: 100% !important;
            max-width: 100% !important;
            flex: 0 0 100% !important;
        }

    .tkb-xep .dropdown,
    .tkb-xep .btn-group,
    .tkb-xep .dropup {
        width: 100% !important;
        display: block !important;
        position: relative !important;
    }
        /* ===== Nút chính full width ===== */
        .tkb-xep .tkb-action-btn,
        .tkb-xep .tkb-dd-toggle,
        .tkb-xep .tkb-btn-group-btn,
        .tkb-xep .action-btn,
        .tkb-xep .dropdown > .btn {
            width: 100% !important;
            min-width: 100% !important;
            max-width: 100% !important;
            height: 44px !important;
            padding: 0 14px !important;
            font-size: 0.92rem !important;
            border-radius: 12px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
        }
    /* ===== Dropdown menu xổ full width ===== */
    .tkb-xep .dropdown-menu {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        inset: auto auto auto auto !important;
        margin-top: 8px !important;
        border-radius: 14px !important;
        padding: 8px !important;
        box-sizing: border-box !important;
    }
        /* Bootstrap hay gắn inline style khi show */
        .tkb-xep .dropdown-menu.show {
            display: block !important;
            width: 100% !important;
            left: 0 !important;
            right: 0 !important;
            top: 100% !important;
        }
    /* ===== Item trong dropdown ===== */
    .tkb-xep .dropdown-item {
        width: 100% !important;
        min-height: 42px !important;
        padding: 10px 12px !important;
        font-size: 0.92rem !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: left !important;
    }

    .tkb-xep .dropdown-divider {
        margin: 6px 0 !important;
    }
    /* ===== Spinner không chen ngang nút ===== */
    .tkb-xep .spinner-border,
    .tkb-xep .spinner-border-sm {
        align-self: center !important;
        margin-left: 0 !important;
        margin-top: 4px !important;
    }
    /* ===== Tiêu đề gọn hơn ===== */
    .tkb-xep .text-title {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .tkb-xep .selected-text {
        display: inline-block;
        margin-top: 4px;
    }

    .tkb-xep .badge {
        display: inline-block;
        margin-top: 6px;
        white-space: normal;
    }
    /* ===== TABLE ===== */
    .tkb-xep .tkb-table {
        table-layout: fixed;
        width: 100%;
        font-size: 0.7rem;
    }

        .tkb-xep .tkb-table th:first-child,
        .tkb-xep .tkb-table td:first-child {
            width: 36px;
            min-width: 36px;
            max-width: 36px;
            font-weight: 600;
        }

        .tkb-xep .tkb-table th:not(:first-child),
        .tkb-xep .tkb-table td:not(:first-child) {
            width: calc((100% - 36px) / 6);
        }

        .tkb-xep .tkb-table td div {
            padding: 1px;
            font-size: 0.68rem;
            line-height: 1.1;
            white-space: normal;
            word-break: break-word;
        }

        .tkb-xep .tkb-table td {
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .tkb-xep .table-responsive {
        overflow-x: hidden !important;
    }
}

