[data-bs-theme=light] {
    --bs-primary-light: #dbedf8!important;
}

body {
    background-color: #ffffff;
}
#kt_header {
    background-color: #ffffff;
}
div.datepicker-dropdown {
    padding: 12px;
}
div.datepicker td, div.datepicker th {
    padding: 8px;
}
.dropify-wrapper .dropify-message p {
    font-size: 12pt;
}
.dropify-wrapper {
    border: 1px dashed #E5E5E5;
    border-radius: 5px;
}
.form-select {
    padding: .775rem 1rem;
}
.border-dashed {
    border-width: 1px;
}
.amcharts-main-div a {
    display: none!important;
}
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 98%;
    }
}
@media (min-width: 1200px) {
    .modal-xl {
        --bs-modal-width: 90vw;
    }
}
.menu-item .menu-link {
    padding: .65rem .85rem;
}
.header .header-menu .menu>.menu-item>.menu-link>.menu-title {
    font-size: .9rem;
}
.table-bordered tr th, .table-bordered tr td {
    border: 1px solid #000!important;
}
.btn-group-xs>.btn:not(.btn-outline):not(.btn-dashed):not(.border-hover):not(.border-active):not(.btn-flush):not(.btn-icon), .btn:not(.btn-outline):not(.btn-dashed):not(.border-hover):not(.border-active):not(.btn-flush):not(.btn-icon).btn-xs {
    min-height: 1em;;
    padding: .30rem 1.25rem;
    font-size: .95rem;
    border-radius: .425rem;
}
.form-control-xs, .form-select-xs {
    min-height: 1em;
    padding: .30rem .75rem;
    font-size: .95rem;
    border-radius: .425rem;
}
.input-group-sm>.btn, .input-group-sm>.form-control, .input-group-sm>.form-select, .input-group-sm>.input-group-text {
    min-height: 1em;
    padding: .30rem .75rem;
    font-size: .95rem;
    border-radius: .425rem;
}
.form-control.form-control-solid {
    background-color: var(--bs-gray-300);
    border-color: var(--bs-gray-300);
}
.form-select.form-select-solid {
    background-color: var(--bs-gray-300);
    border-color: var(--bs-gray-300);
}
.bg-light {
    --bs-bg-rgb-color: var(--bs-light-rgb);
    background-color: var(--bs-gray-300) !important;
}
.card {
    border: 1px solid var(--bs-gray-300);
}
.btn.btn-secondary {
    background-color: var(--bs-gray-400);
}
.form-select-sm {
    padding: .55rem .75rem!important;
}
.shadow-theme {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.table-hover>tbody>tr:hover>* {
    --bs-table-accent-bg: #C9EEFD;
}
.table-bordered tr td.border-left-0 {
    border-left: 0!important;
}
.table-bordered tr td.border-right-0 {
    border-right: 0!important;
}
.table-xs>:not(caption)>*>* {
    padding: .25rem .25rem;
}
.menu-active-bg .menu-item .menu-link.active {
    background-color: var(--bs-primary-light);
}
#kt_aside_menu_wrapper {
    height: 85dvh!important;
}

.nav-line-tab-v .nav-item .nav-link {
    border-left: 4px solid transparent;
}
.nav-line-tab-v .nav-item .nav-link.active, .nav-line-tab-v .nav-item .nav-link:hover:not(.disabled), .nav-line-tab-v .nav-item.show .nav-link {
    background-color: var(--bs-light);
    border-left: 4px solid var(--bs-primary);
}

@media (min-width: 992px) {
    .header-fixed .header {
        height: 64px;
    }
    body.header-fixed {
        padding-top: 76px;
    }
    .menu-root-here-bg-desktop>.menu-item.here>.menu-link {
        background-color: var(--bs-primary);
    }
    .menu-state-primary .menu-item.here>.menu-link .menu-title {
        color: var(--bs-light);
    }
}
@media (max-width: 991.98px) {
    .header-tablet-and-mobile-fixed .header {
        height: 54px;
    }
    body.header-tablet-and-mobile-fixed {
        padding-top: 54px;
    }
}

@media (min-width: 576px) {
    .modal-slide-right .modal-dialog {
        margin-right: 1.25rem;
    }

    .modal.modal-slide-right .modal-dialog {
        transform: translateX(100%);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    .modal.modal-slide-right.show .modal-dialog {
        transform: translateX(0);
    }

    .modal.modal-slide-right.fade .modal-dialog {
        opacity: 0;
    }

    .modal.modal-slide-right.show .modal-dialog {
        opacity: 1;
    }
}

:root {
    --launcher-bg: #f5f8fa;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 24px rgba(0,0,0,0.07);
    --card-hover-shadow: 0 12px 40px rgba(0,0,0,0.13);
    --accent: #1a73e8;
    --accent-light: #e8f0fe;
}

body {
    background: var(--launcher-bg) !important;
}

.launcher-wrapper {
    /*min-height: 100vh;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background: var(--launcher-bg);
}

.launcher-header {
    text-align: center;
}

.launcher-header .school-logo {
    width: 72px;
    height: 72px;
    background: var(--accent);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(26,115,232,0.25);
}

.launcher-header .school-logo svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.launcher-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e2a3b;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.launcher-header p {
    font-size: 15px;
    color: #7e8299;
    margin: 0;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 960px;
    width: 100%;
}

.elearning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 80%;
    width: 100%;
}


/* Force max 4 columns on large screens */
@media (min-width: 900px) {
    .modules-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .elearning-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 640px) and (max-width: 899px) {
    .modules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .elearning-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 639px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .elearning-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.module-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    border: 1.5px solid transparent;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.22s;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent);
    text-decoration: none;
    color: inherit;
}

.module-card:hover .module-icon-wrap {
    transform: scale(1.08);
}

.module-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #f1f5fb;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-icon-wrap svg {
    width: 32px;
    height: 32px;
}

.module-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a3b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.module-card span.sub {
    font-size: 12px;
    color: #a1a5b7;
    font-weight: 400;
}

.module-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #50cd89;
}

/* === Module Color Themes === */
.mod-master    { --module-color: #5e6cf7; --module-bg: #eef0fe; }
.mod-enrollment{ --module-color: #f6a429; --module-bg: #fef5e7; }
.mod-hr        { --module-color: #17c3b2; --module-bg: #e5f9f7; }
.mod-student   { --module-color: #3dd9d6; --module-bg: #e8fafa; }
.mod-academic  { --module-color: #f1416c; --module-bg: #fee6ec; }
.mod-finance   { --module-color: #50cd89; --module-bg: #e6f9f0; }
.mod-library   { --module-color: #7239ea; --module-bg: #f0e8fd; }

.mod-master svg    { fill: #5e6cf7; }
.mod-enrollment svg{ fill: #f6a429; }
.mod-hr svg        { fill: #17c3b2; }
.mod-student svg   { fill: #3dd9d6; }
.mod-academic svg  { fill: #f1416c; }
.mod-finance svg   { fill: #50cd89; }
.mod-library svg   { fill: #7239ea; }

.launcher-footer {
    margin-top: 48px;
    text-align: center;
    font-size: 13px;
    color: #b5b5c3;
}

.module-launcher-item {
    text-decoration: none;
    background: transparent;
    border: 1.5px solid transparent;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-launcher-item:hover,
.module-launcher-item.active {
    background: #f1f5fb;
    border-color: #d0dff7;
    color: #1a73e8;
    transform: translateY(-2px);
}

.module-launcher-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-launcher-item:hover .module-launcher-icon {
    transform: scale(1.2);
}

/* ── Page wrapper ── */
.classrooms-page {
    background: #f5f8fa;
    padding-top: 95px;
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 30px!important;
}

/* ── Classroom Card ── */
.cls-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef0f8;
    transition: transform 0.22s, box-shadow 0.22s;
    height: 100%;
    display: flex; flex-direction: column;
}
.cls-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

/* Cover image */
.cls-cover {
    position: relative;
    height: 140px;
    overflow: hidden;
}
.cls-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.cls-card:hover .cls-cover img { transform: scale(1.06); }
.cls-cover-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,25,50,0.55) 0%, transparent 60%);
}

/* Subject badge on cover */
.cls-subject-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}

@keyframes livepulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}


/* Card body */
.cls-body {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; flex: 1;
}
.cls-subject-name {
    font-size: 1rem; font-weight: 700;
    color: #1e2148;
    margin-bottom: 0;
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cls-group {
    font-size: 0.78rem; color: #a1a5b7; font-weight: 500;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 4px;
}

/* Teacher row */
.cls-teacher {
    display: flex; align-items: start; gap: 9px;
    flex-direction: column;
    padding: 10px 12px;
    background: #eef1fa;
    border-radius: 10px;
    margin-bottom: 12px;
}
.cls-teacher-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e4e9f2;
    flex-shrink: 0;
}
.cls-teacher-avatar-placeholder {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700;
    color: #fff; flex-shrink: 0;
}
.cls-teacher-info { flex: 1; min-width: 0; }
.cls-teacher-name {
    font-size: 0.8rem; font-weight: 600; color: #3f4254;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cls-teacher-role {
    font-size: 0.7rem; color: #a1a5b7;
}

.cls-enter-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem; font-weight: 600;
    background: #f1f3f9;
    color: #3f4254;
    text-decoration: none;
    border: none; cursor: pointer;
    transition: all 0.2s;
}
.cls-enter-btn:hover {
    background: #009ef7;
    color: #fff;
}
.cls-enter-btn i { font-size: 0.85rem; }

.empty-state {
    text-align: center; padding: 80px 20px;
    color: #a1a5b7;
}
.empty-state i { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h5 { color: #5e6278; margin-bottom: 8px; }
