﻿
.tkb-highlight {
    background-color: #9DEDA1 !important;
    outline: 2px solid #f39919;
    box-shadow: none;
    border: none;
}

.tkb-drop-highlight {
    background-color: #c8f7c5 !important;
    border: none;
    transition: background-color 0.3s ease;
}
/* Nền cho app xếp TKB */
.tkb-bg {
    min-height: 100vh;
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url("/images/bg-tkb.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.tiet-nghi {
    color: #0416B5;
    font-weight: 700;
}

    .tiet-nghi * {
        color: inherit !important;
    }

/* Tiết cố định */
.tiet-codinh {
    background: #a1efa1 !important;
    color: #F70B06 !important;
    font-weight: 700;
    font-weight: bold;
    border-radius: 6px;
}

/* ====== BODY & CONTAINER ====== */
.container-fluid {
    padding-top: 0 !important;
    padding-left: 5rem;
    padding-right: 5rem;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #DCE7F7 !important;
}

/*Hiệu ứng đổi màu khi chỉ chuột vào nút*/
.tkb-glow-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    /* Viền chạy */
    .tkb-glow-btn::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient( 120deg, #F086A8, #00ffff, #00ff00, #ffff00, #ff6600, #70F863 );
        background-size: 300% 300%;
        opacity: 0;
        transition: opacity 0.3s ease;
        animation: tkbGlowMove 4s linear infinite;
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
    }

    .tkb-glow-btn:hover::before {
        opacity: 1;
    }

/* Animation màu chạy quanh */
@keyframes tkbGlowMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ====== NÚT & DROPDOWN ====== */
.tkb-action-btn,
.tkb-dd-toggle,
.tkb-btn-group-btn {
    min-width: 110px;
    height: 26px;
    padding: 3px 6px;
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: 6px !important;
    border: 0.5px solid #c7d2fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #8DA1F2, #BFCAF8);
    color: #0025BA;
    box-shadow: 0 2px 6px #636466;
    transition: all 0.2s ease;
}

    /* Hover */
    .tkb-action-btn:hover:not(:disabled),
    .tkb-dd-toggle:hover {
        background: linear-gradient(180deg, #dbeafe, #bfdbfe);
        color: #1d4ed8;
        box-shadow: 0 2px 4px rgba(0,0,0,0.12);
        transform: translateY(-1px);
    }

    /* Active */
    .tkb-action-btn:active,
    .tkb-dd-toggle:active {
        transform: scale(0.97);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
    }

    /* Disabled */
    .tkb-action-btn:disabled,
    .tkb-dd-toggle:disabled {
        background: #f1f5f9;
        color: #94a3b8;
        border-color: #e2e8f0;
        box-shadow: none;
    }

/* Nút xóa TKB */
.tkb-btn-danger {
    background: linear-gradient(180deg, #fee2e2, #fecaca);
    color: #8b0404;
    border: 1px solid #fca5a5;
}

    /* Hover */
    .tkb-btn-danger:hover:not(:disabled) {
        background: linear-gradient(180deg, #fecaca, #fca5a5);
        color: #7f1d1d;
        box-shadow: 0 3px 6px rgba(239, 68, 68, 0.25);
        transform: translateY(-1px);
    }

    /* Active */
    .tkb-btn-danger:active {
        transform: scale(0.97);
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
    }

    /* Disabled */
    .tkb-btn-danger:disabled {
        background: #fef2f2;
        color: #fca5a5;
        border-color: #fee2e2;
        box-shadow: none;
    }

/* ====== TIÊU ĐỀ & TỔNG TIẾT ====== */
.text-title {
    font-weight: 600;
    color: #1e3a8a;
    text-align: center;
}

.selected-text {
    color: #2563eb;
    font-weight: 700;
}

.tong-tiet {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}


/* ====== BẢNG THỜI KHÓA BIỂU ====== */
.tkb-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.68rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

    .tkb-table th,
    .tkb-table td {
        padding: 2px 4px;
        height: 20px;
        line-height: 1.2;
        border: 0.5px solid #BBC7FB;
        vertical-align: middle;
        text-align: center;
        transition: background-color 0.25s ease;
    }
    /* Tiêu đề bảng tkb */
    .tkb-table th {
        background: linear-gradient(180deg, #8DA1F2, #BFCAF8);
        height: 26px;
        font-weight: bold;
        color: #030133;
        font-size: 0.9rem;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

/* Cột buổi & tiết */
.col-buoi {
    background-color: #dbeafe;
    color: #1e3a8a;
    font-weight: bold;
}

.col-tiet {
    background-color: #fef3c7;
    color: #f49e69;
    font-weight: bold;
}

/* Buổi sáng / chiều */
.tkb-table td.buoi-sang {
    background-color: #edf4ff;
}

.tkb-table td.buoi-chieu {
    background-color: #fff8ef;
}

.tkb-table tr:nth-child(6) td {
    border-top: 2px solid #fa7106;
}

/* Hiệu ứng hover */
.tkb-table td:hover {
    background-color: #b0f7f5;
}

.tkb-table tr td.buoi-chieu:hover {
    background-color: #F5C6AB;
}

.tkb-table td div {
    border-radius: 1px;
    padding: 1px 2px;
    font-weight: 500;
}

/* ====== RESPONSIVE MOBILE ====== */
@media (max-width: 768px) {
    /* ===== Nhóm nút ===== */
    .action-bar .d-flex, .btn-group, .dropdown {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
    }

        .tkb-action-btn,
        .tkb-dd-toggle,
        .tkb-btn-group-btn,
        .action-btn,
        .btn-group .btn,
        .dropdown-toggle {
            width: 100% !important;
            min-width: 100% !important;
            max-width: 100% !important;
            height: auto;
            min-height: 40px;
            line-height: 1.2;
            padding: 8px 12px;
            font-size: 0.85rem;
            margin-bottom: 6px; /* tạo khoảng cách giữa các nút */
        }

    .dropdown-menu {
        width: 100% !important;
        text-align: center;
    }
    /* ===== Bảng TKB ===== */
    .tkb-table {
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
        font-size: 0.6rem;
    }

        .tkb-table th,
        .tkb-table td {
            padding: 2px 2px;
            line-height: 1.1;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: break-word;
        }

            .tkb-table td div {
                font-size: 0.6rem;
                padding: 1px;
                white-space: normal;
                word-break: break-word;
            }
            /* ÉP CỘT BUỔI */
            .tkb-table th:nth-child(1),
            .tkb-table td:nth-child(1) {
                width: 26px !important;
                min-width: 26px !important;
                max-width: 26px !important;
                padding: 2px !important;
            }
            /* ÉP CỘT TIẾT */
            .tkb-table th:nth-child(2),
            .tkb-table td:nth-child(2) {
                width: 28px !important;
                min-width: 28px !important;
                max-width: 28px !important;
                padding: 2px !important;
            }
    /* Không cho tràn ngang */
    body {
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}


.card-header.giao-vien {
    background: linear-gradient(135deg, #a8dadc, #81b29a);
    color: #1d3557;
    font-weight: 600;
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #bde0fe;
}

/* sTYLE CHỌN TIẾT THỦ CÔNG*/
/* ===== MODAL GÁN TIẾT THỦ CÔNG ===== */
.tkb-manual-modal .modal-dialog {
    max-width: 300px;
}

.tkb-manual-modal .modal-content {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* Header */
.tkb-manual-modal .modal-header {
    background: linear-gradient(135deg, #4f9ef8, #7db8fa);
    color: #1B5C01;
    padding: 8px 12px;
}

    .tkb-manual-modal .modal-header h5 {
        font-size: 1rem;
        font-weight: 700;
        margin: 0;
    }

/* Body */
.tkb-manual-modal .modal-body {
    padding: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

    /* Nút chọn tiết */
    .tkb-manual-modal .modal-body button {
        border-radius: 8px;
        font-size: 0.9rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.15s ease;
    }

        .tkb-manual-modal .modal-body button:hover {
            background-color: #2563eb; /* xanh đậm hơn */
            color: #ffffff !important; /* chữ trắng */
            font-weight: 700; /* chữ đậm */
            transform: translateX(3px);
        }

            .tkb-manual-modal .modal-body button:hover * {
                color: #ffffff !important;
            }

/* Footer */
.tkb-manual-modal .modal-footer {
    background: #f8fafc;
    padding: 4px 8px;
}

    /* Nút hủy */
    .tkb-manual-modal .modal-footer .btn-secondary {
        border-radius: 20px;
        padding: 4px 14px;
    }

.tkb-gv-highlight {
    background: #9EEAE8 !important;
    color: #0420BD !important;
    font-weight: 600;
}