﻿/* =============== BASE ===============*/

:root {
    /* font size */
    --fz-heading: 2rem; /* sogan, tên thương hiệu*/
    --fz-primary: 1.6rem; /* nội dung chính */
    --fz-header: 1.2rem;
    --fz-icon: 1.2rem;
    --fz-normal: 1rem;
    --fz-sub: 0.7rem; /* description cho nội dung */
    --fz-nav: 0.8rem; /* navbar */
    /* text color */
    --text-primary: #c70401;
    --text-secondary: #737373;
    /* background color */
    --bg-primary: #c70401;
    --bg-secondary: white;
    /* border color card */
    --color-border-card: #eaeaea;
    /* border button */
    --btn-border: 30px;
    /* size avatar card */
    --width-img: 50px;
    --height-img: 50px;
}

.font-primary {
    color: var(--text-secondary) !important;
    font-size: calc(var(--fz-normal) - 2px) !important;
}

.btn-full-w {
    width: 100%;
}

.btn-half-w {
    width: 40%;
}

.btn-full-w, .btn-half-w {
    background-color: var(--bg-primary);
    border-radius: var(--btn-border);
    color: white;
}

.label-form, form label {
    color: var(--text-secondary);
    font-size: var(--fz-normal);
    font-weight: 400;
}


.text-normal, label {
    font-size: var(--fz-secondary);
    color: var(--text-secondary);
}

.text-header {
    font-size: var(--fz-header);
    color: var(--text-primary);
}

.icon-header {
    color: var(--text-secondary);
    font-size: var(--fz-primary);
}

.container.app {
    height: 100%;
    padding: 0 8px;
}

    .container.app header {
        box-shadow: 0 4px 15px rgba(209, 207, 207, 0.6); /* Hiệu ứng bóng */
        min-height: 60px !important;
    }

.app footer {
    left: 0;
    right: 0;
    padding: 0;
}

    .app footer i {
        font-size: var(--fz-icon);
    }

.main {
    margin: 76px 0;
}

    .main .card {
        border-color: var(--color-border-card) !important;
        width: 100%;
        box-shadow: 0 1px 14px rgba(70, 70, 70, 0.2);
        border-radius: 8px !important;
    }

        .main .card:hover {
            transition: all 0.3s ease;
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }

        .main .card p {
            margin: 0;
        }

        .main .card p,
        .main .card span {
            color: var(--text-secondary);
        }

        .main .card .avatar {
            width: var(--width-img);
            height: var(--height-img);
            background: #ccc;
            border-radius: 50%;
            overflow: hidden;
        }

        .main .card img {
            width: 100%;
            object-fit: cover;
            object-position: center;
        }

.tab-container .tabs button {
    font-size: calc(var(--fz-normal) - 2px);
}

.form-group input {
    border-radius: 20px !important;
}

.main a:hover{
    text-decoration: none;
}

.text-wrap {
    word-break: break-word;
    white-space: normal !important;
}
.text-nowrap {
    white-space: nowrap !important;
}
.text-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
.lh-1 {
    line-height: 1 !important;
}

.lh-sm {
    line-height: 1.25 !important;
}

.lh-base {
    line-height: 1.5 !important; /* mặc định */
}

.lh-lg {
    line-height: 2 !important;
}
/* =============== LOIGN PAGE ===============*/
.login {
    max-width: 660px;
    height: 90vh;
    padding: 0;
}

    .login .header {
        position: relative;
        width: 100%;
        height: 30vh;
    }

    .login .login-background {
        width: 100%;
        height: 100%;
        clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
    }

        .login .login-background img {
            width: 100%;
            background-size: cover;
        }

    .login .logo {
        position: absolute;
        width: 130px;
        height: 130px;
        background-color: rgb(243, 235, 235);
        border-radius: 50%;
        left: 50%;
        bottom: 0;
        transform: translate(-50%, 18%);
        box-shadow: 0 4px 15px rgba(73, 67, 67, 0.6); /* Hiệu ứng bóng */
    }

        .login .logo img {
            width: 100%;
            border-radius: 50%;
            padding: 2px;
        }

.login-background img {
    width: 100%;
    height: 100%;
}

.login .header .trademark {
    position: absolute;
    color: var(--text-primary);
    margin: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 240%);
    font-weight: 700;
}

.login .login-form {
    margin-top: 110px;
    margin-bottom: 30px;
}

    .login .login-form .btn-submit:active {
        background-color: #afafaf !important;
    }

.login .notify {
    margin: 100px 0 30px 0 !important;
}

.login .notify-instuct {
    width: 70%;
    margin: auto;
}

@media (max-width: 768px) {
    .login {
        margin: 0 !important;
        height: 100vh;
    }
}

/* =============== BEHIND LOGIN ===============*/
/* =============== LAOUT ===============*/
/* =============== HEADER ===============*/
/* =============== FOOTER ===============*/
.app .footer {
    width: 100%;
    bottom: 0;
    height: 60px;
    border-top: 1px solid transparent;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--bg-primary);
}

    .app .footer .navbar {
        border-top: 1px solid transparent;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    }

.group-container {
    padding: 0;
    height: 100%;
}

.selectors, .block {
    height: 100%;
    width: 100%;
}

    .selectors button {
        border: 0;
        border-radius: 0;
        background-color: var(--bg-primary);
        width: 25%;
        margin-left: 0;
        padding: 6px 8px;
    }

        .selectors button:active {
            border: 0;
        }

        .selectors button:focus {
            border: 0;
            outline: 0;
            box-shadow: 0 0 0 0px;
        }

.active, .selector-holder {
    display: flex;
    flex-direction: column;
}

.inactive {
    display: none;
}

.selector-holder span {
    font-size: 0.8rem;
}

.app footer a {
    color: white;
    font-size: var(--fz-nav);
    text-decoration: none;
}

.button-active {
    background-color: #7d2f2f !important;
}

.button-inactive {
    background-color: var(--bg-primary) !important;
}

/* =============== trang chủ ===============*/

.infor-account .avatar {
    width: 50px;
    height: 50px;
    background-color: var(--bg-primary);
    border-radius: 50%;
    margin-right: 6px;
    overflow: hidden;
}

    .infor-account .avatar img {
        width: 100%;
        height: 100%; /* Đặt chiều cao của ảnh bằng 100% của div */
        object-fit: cover; /* Đảm bảo ảnh chiếm toàn bộ box */
        object-position: center; /* Canh giữa ảnh */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

.infor .fullname {
    color: var(--text-primary);
    font-size: var(--fz-secondary);
}

.infor .username {
    font-size: var(--fz-sub);
}

.notify {
    position: relative;
    margin-right: 10px;
}

    .notify .icon-header {
        color: var(--text-primary);
    }

.notify-quantity {
    position: absolute;
    top: -7px;
    right: -5px;
    font-weight: bold;
    font-size: var(--fz-sub);
    color: var(--text-primary);
}


.main .title {
    color: #13ab25 !important;
    font-size: var(--fz-secondary) !important;
}



.main .schedule {
    width: 36px;
    height: 36px;
}

.main li {
    list-style: none;
    padding: 0;
}

.content {
    flex: 1;
}

.time {
    font-size: 1.3rem;
    color: var(--text-primary) !important;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.6rem;
}

.date {
    font-size: var(--fz-sub);
    font-weight: normal;
}


.item-homnay .timeline .icon_clock {
    font-size: 2rem !important;
    color: var(--text-secondary);
}

.card .lesson .name,
.card .lesson .description,
.card .address .name,
.card .address .description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}


.lesson .name {
    color: var(--text-primary);
}

.address .name {
    color: var(--text-secondary);
}

.lesson .description, .address .description, .card .teacher {
    font-size: var(--fz-sub);
    color: var(--text-secondary);
}

.roll-call p {
    font-size: calc(var(--fz-sub) - 2px);
}

.roll-call i {
    font-size: 1.6rem;
    font-weight: 200;
    color: #777777;
}

/* ================ page: lịch học ================*/

.header .title {
    color: var(--text-primary);
}

.header .filter {
    color: #777777;
    font-size: 1.3rem;
}

.teach-time .date-timeline {
    color: var(--text-primary);
}

.teach-time .week-timeline {
    font-size: var(--fz-secondary);
    color: var(--text-secondary);
}

.schedules-list .time,
.schedules-list .name {
    letter-spacing: normal;
    color: var(--text-secondary);
}

.schedules-list .lesson .name {
    font-size: calc(var(--fz-sub) + 3px);
}

.schedules-list .address .name {
    font-size: calc(var(--fz-sub) + 1px);
}

/* ================ page: Thông tin tài khoản ================*/
.account-infor {
    margin-top: 100px !important;
}

    .account-infor .avatar {
        width: 100px;
        height: 100px;
        background-color: var(--bg-primary);
        margin: auto;
        position: relative;
    }

        .account-infor .avatar img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

.avatar .upload {
    color: white;
    margin: auto;
    position: absolute;
    bottom: 40%;
    left: 35%;
    font-size: var(--fz-primary);
}

.account-infor .infor .name {
    color: var(--text-primary);
}

.account-infor .infor .account {
    color: var(--text-secondary);
    font-size: calc(var(--fz-sub) + 1px);
}

.account-action button {
    background-color: var(--text-secondary);
    color: white;
    border-radius: 30px;
}

button a {
    color: white !important;
    font-size: var(--fz-normal);
    text-decoration: none !important;
}

/* ================ page: Cập nhật tài khoản ================*/

.update-form {
    margin-top: 60px;
}

.account-action.update button {
    width: 160px;
    padding: 4px 0;
}

.btn-update {
    background: rgb(1, 187, 1) !important;
}


/* =============== page: lịch học chi tiết ==================== */
/* Định dạng cho container của tabs */
.tab-container {
    width: 100%;
}
/* Định dạng cho các tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #ccc;
    margin-bottom: 10px;
}

.tab-btn {
    /*flex: 1;*/
    color: var(--text-secondary);
    padding: 10px 20px 10px 0px;
    margin-right: 10px;
    text-align: center;
    background-color: transparent;
    border: none;
    outline: none !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease, color 0.3s ease;
}

    /* Định dạng tab được chọn (active) */
    .tab-btn.active {
        align-items: flex-start;
        color: red;
        /*transform: translateY(-5px);*/ 
    }

        /* Định dạng cho đường gạch dưới đỏ */
        .tab-btn.active::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 2px;
            background-color: red;
            width: 100%;
            transition: width 0.3s ease;
        }

    .tab-btn::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background-color: transparent;
        width: 0;
        transition: width 0.3s ease;
    }

    .tab-btn.active::after {
        background-color: red;
        width: 100%;
    }

/* Định dạng cho nội dung của các tab */
.tab-content-item {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

    .tab-content-item.active {
        display: block;
        opacity: 1;
    }

.tab-content label {
    font-size: var(--fz-normal);
    color: var(--text-secondary);
}

.tab-content #thongtin span {
    font-size: var(--fz-normal);
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.tab-content .tab-1,
.tab-content .tab-2,
.tab-content .tab-3,
.tab-content .tab-4 {
    margin-top: 112px !important;
    padding: 0;
}

#diemdanh.tab-2 {
    margin-top: 160px !important;
}

/* Tabs con (nested tabs) */
.sub-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-top: 10px;
    margin-bottom: 10px;
}

.sub-tab-btn {
    color: var(--text-secondary);
    padding: 6px 12px;
    margin-right: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

    .sub-tab-btn.active {
        color: blue;
        font-weight: bold;
    }

    .sub-tab-btn::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background-color: transparent;
        width: 0;
        transition: width 0.3s ease;
    }

    .sub-tab-btn.active::after {
        background-color: blue;
        width: 100%;
    }

.sub-tab-content-item {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .sub-tab-content-item.active {
        display: block;
        opacity: 1;
    }

/* ===================== tab: thông tin ===================== */

.content__infor span:first-child {
    font-weight: bold;
}

/* ===================== tab: điểm danh ===================== */

.diemdanh__infor p {
    color: var(--text-primary);
    font-size: calc( var(--fz-normal) - 2px);
}

.infor-student p {
    margin: 0;
}

.infor-student .fullname {
    color: var(--text-primary) !important;
    font-weight: bold;
    font-size: var(--fz-normal);
}

.infor-student {
    flex: 1;
}

    .infor-student .phonenumber,
    .infor-student .email,
    .infor-student label {
        color: var(--text-secondary);
        font-size: var(--fz-sub);
    }

    .infor-student label {
        font-weight: bold;
    }

.go-to-school .title,
.go-to-school .time,
.leave-school .title,
.leave-school .time {
    font-size: var(--fz-sub) !important;
}

.go-to-school i,
.leave-school i {
    font-size: var(--fz-icon);
}

.tab-container .tabs,
.diemdanh__infor {
    z-index: 1;
    top: 0;
    right: 0;
    left: 0;
}

.diemdanh__infor {
    margin-top: 124px;
    padding: 0 12px;
    z-index: 1;
}

.btn-goback, .btn-readnotify {
    background-color: white;
}

    .btn-goback:hover {
        cursor: pointer;
    }

    .btn-goback:focus,
    .btn-diemdanh:focus {
        box-shadow: none !important;
        outline: none !important;
    }

/* ============ tab: bài tập ============ */

#baitap p,
#kiemtra p {
    margin: 0;
}

#baitap .title,
#kiemtra .title {
    font-size: var(--fz-normal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

#baitap .description .content-left,
#baitap .description .content-right,
#kiemtra .description .content-left,
#kiemtra .description .content-right {
    color: var(--text-secondary);
    font-size: calc(var(--fz-sub));
}


/* ============== page: danh sách lớp ================= */

/* ============== tab: đang dạy ================= */

.lophoc__header-item {
    width: 100%;
    color: var(--text-primary);
}

.list.dangday p,
.list.hoanthanh p,
.list.choday p,
.list.lichTest p,
.list.lopDemo p
{
    margin: 0;
    font-size: calc(var(--fz-sub) + 1px);
}

.list.dangday .tenkhoahoc,
.list.hoanthanh .tenkhoahoc,
.list.choday .tenkhoahoc,
.list.lichTest .ten,
.list.lopDemo .ten {
    font-size: var(--fz-sub);
}

.list.dangday .lophoc,
.list.hoanthanh .lophoc,
.list.choday .lophoc,
.list.lichTest .lophoc,
.list.lopDemo .lophoc {
    font-size: calc(var(--fz-sub) + 2px);
    font-weight: bold;
    letter-spacing: 0px;
    color: var(--text-primary);
    text-decoration: none;
}

.list.dangday .tinhtranghocvien,
.list.dangday .tinhtranggiang
.list.hoanthanh .tinhtranghocvien,
.list.hoanthanh .tinhtranggiang
.list.choday .tinhtranghocvien,
.list.choday .tinhtranggiang, {
    font-size: calc(var(--fz-sub) - 1px);
}

.list.dangday .content-right p,
.list.hoanthanh .content-right p,
.list.choday .content-right p,
.list.lichTest .content-right p,
.list.lopDemo .content-right p {
    font-size: calc(var(--fz-sub) - 1px);
}

.list.dangday .lophoc,
.list.hoanthanh .lophoc,
.list.choday .lophoc,
.list.lichTest .lophoc,
.list.lopDemo .lophoc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.list.lichTest .lophoc {
    font-size: calc(var(--fz-sub) + 2px);
    font-weight: bold;
    letter-spacing: 0px;
    color: var(--text-primary);
    text-decoration: none;
}


/* ============== page: lớp ================= */

.tab-container .tabs {
    margin-top: 60px;
    background-color: white;
    overflow: scroll;
    overflow-x: auto;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap; 
}
/* ============== tab: lịch học ================= */
.lichday__header-item {
    width: 100%;
    color: var(--text-primary);
}

.lichhoc__item p,
.lichhoc__item span {
    font-size: var(--fz-sub);
}

.lichhoc__item .block-3 span {
    font-size: calc(var(--fz-sub) - 3px);
}

.lichhoc__item .time {
    font-size: calc(var(--fz-normal) + 2px);
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--text-primary) !important;
}

.lichhoc__item .date,
.lichhoc__item .day {
    font-size: var(--fz-sub);
}

.lichhoc__item .lesson_name {
    color: var(--text-primary) !important;
    font-weight: bold;
    font-size: calc(var(--fz-normal) - 3px);
    display: -webkit-box !important; /* For older versions of Safari */
    -webkit-box-orient: vertical; /* Specify the orientation */
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    overflow: hidden; /* Hide the overflow text */
    text-overflow: ellipsis; /* Show ellipsis for overflow text */
    max-height: 3em; /* Limit max height (2 lines * line height) */
    text-decoration: none;
}

/* ============== tab: học viên ================= */
.student_item .fullname {
    color: var(--text-primary) !important;
}

.student_item .status p {
    font-size: var(--fz-sub);
    font-weight: bold;
}

#hocvien {
    margin-top: 130px;
}

#baitap .baitap_item .title,
#kiemtra .kiemtra_item .title {
    color: var(--text-primary);
}

/* ============== page: bài tập ================= */
/* ============== tab: kết quả ================= */

#ketqua .sortting .option {
    font-weight: bold;
    font-size: var(--fz-sub);
}

.student_item .status .lambai,
.student_item .status .dung {
    color: var(--text-secondary);
    font-size: var(--fz-sub);
    font-weight: bold;
}

.student_item .infor-student .fullname {
    color: rgb(7, 170, 7) !important;
}

.point-result .point,
.point-result .point span {
    font-size: calc(var(--fz-secondary) + 4px);
    font-weight: bold;
    color: var(--text-primary) !important;
}

.point-result .trangthaicham {
    font-size: calc(var(--fz-sub) + 1px);
    font-weight: bold;
    color: rgb(7, 170, 7) !important;
}

.point-result .time {
    font-weight: bold;
    font-size: calc(var(--fz-sub) - 1px);
}

/* ============== tab: chưa làm ================= */

#chualam {
    margin-top: 130px !important;
}

.time_result p,
.time_result span {
    font-size: var(--fz-sub);
}

#chochamdiem span {
    font-size: var(--fz-sub) !important;
}

/* ============== loading ================= */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6); /* tùy chỉnh mờ nền */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-spinner {
    width: 5rem;
    height: 5rem;
    background-color: #28a745;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 1s linear infinite;
}

@keyframes spinner-grow {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* ============== page notify ================= */
.notification-list {
    max-width: 600px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

.notification-item {
    display: flex;
    padding: 15px;
    margin-bottom: 12px;
    background: #f9f9f9;
    border-left: 5px solid #ccc;
    border-radius: 8px;
    transition: background 0.3s;
}

    .notification-item.unread {
        background: #e8f0fe;
        border-left-color: #1a73e8;
    }

    .notification-item:hover {
        background: #eef3fc;
    }

.icon {
    font-size: 24px;
    color: #1a73e8;
    margin-right: 15px;
    margin-top: 5px;
}

.content h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.content p {
    margin: 4px 0 6px;
    color: #666;
    font-size: 14px;
}

.content .time {
    font-size: 12px;
    color: #999;
}


.notify_item {
    border-top: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
    text-decoration: none;
    color: inherit;
    width: 100%;        
}



/* ============== confirm box ================= */
.jconfirm .jconfirm-box.jconfirm-type-animated {
    background-color: #c6a6a6;
}

/* ============== modal filter ================= */

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
