* {
    font-family: 'Noto Sans Thai', sans-serif;
}

body {
    background-color: #f4f7fc;
    color: #1e2a3e;
    scroll-behavior: smooth;
}

.text-main {
    color: #1e4663;
}

.text-heading {
    color: #1e3a5f;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: -0.3px;
}

.navbar-brand i {
    margin-right: 8px;
    font-size: 1.7rem;
    vertical-align: middle;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background-color: #2c7da0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2rem;
}

.welcome-section {
    background: #ffffff;
    border-radius: 36px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.02), 0 4px 8px rgba(0, 0, 0, 0.03);
    padding: 1.2rem 1.8rem;
    margin-bottom: 2rem;
}

.quick-stat {
    background: #ffffff;
    border-radius: 28px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.03);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e4663;
    line-height: 1.2;
}

.subject-card {
    border: none;
    border-radius: 28px;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

.card-img-top-icon {
    background: linear-gradient(135deg, #eef5ff 0%, #e0eefc 100%);
    padding: 1.8rem 0;
    text-align: center;
    font-size: 3.2rem;
    color: #1f6392;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.teacher-name {
    font-size: 0.85rem;
    color: #5b6e8c;
    font-weight: 500;
}

.teacher-name i {
    width: 22px;
    color: #2c7da0;
}

.badge-subject {
    background-color: #e9ecef;
    color: #2c3e50;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
}

.btn-outline-subject {
    border-radius: 40px;
    border: 1px solid #cbdbe0;
    color: #2c7da0;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-outline-subject:hover {
    background-color: #2c7da0;
    border-color: #2c7da0;
    color: #ffffff;
}

.empty-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 3rem 1rem;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.03);
}

.footer-note {
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    color: #5a6e8a;
    background: #ffffff;
}

@media (max-width: 768px) {
    .welcome-section {
        flex-direction: column;
        text-align: center;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }
}
.login-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #071525;
    font-family: 'Noto Sans Thai', sans-serif;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, rgba(45, 156, 219, 0.35), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(111, 66, 193, 0.28), transparent 32%),
        linear-gradient(135deg, #071525 0%, #0d2740 50%, #071525 100%);
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.75;
    animation: floatOrb 8s ease-in-out infinite alternate;
}

.orb-1 {
    width: 240px;
    height: 240px;
    left: 8%;
    top: 16%;
    background: rgba(29, 155, 240, 0.35);
}

.orb-2 {
    width: 320px;
    height: 320px;
    right: 6%;
    bottom: 10%;
    background: rgba(112, 72, 232, 0.30);
    animation-delay: 1.5s;
}

.orb-3 {
    width: 180px;
    height: 180px;
    left: 48%;
    bottom: 18%;
    background: rgba(20, 184, 166, 0.25);
    animation-delay: 0.8s;
}

.grid-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 80%, transparent);
    animation: gridMove 18s linear infinite;
}

.login-wrapper {
    position: relative;
    z-index: 2;
}

.login-hero {
    color: #ffffff;
    animation: fadeSlideLeft 0.9s ease both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    margin-bottom: 22px;
    font-weight: 600;
}

.login-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.login-hero p {
    max-width: 560px;
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-feature {
    display: grid;
    gap: 14px;
    max-width: 420px;
    margin-top: 28px;
}

.hero-feature div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px;
    padding: 14px 16px;
    backdrop-filter: blur(12px);
}

.hero-feature i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.16);
    border-radius: 14px;
}

.login-card {
    position: relative;
    padding: 34px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 30px 80px rgba(0,0,0,0.28);
    backdrop-filter: blur(24px);
    animation: fadeSlideUp 0.9s ease both;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    top: -70px;
    right: -55px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(29,155,240,0.45), rgba(111,66,193,0.35));
}

.login-logo {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
}

.logo-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f4c81, #1d9bf0);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    box-shadow: 0 14px 28px rgba(29,155,240,0.32);
}

.login-logo h2 {
    margin: 0;
    font-weight: 800;
    color: #102a43;
}

.login-logo p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.role-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #edf4fb;
    padding: 6px;
    border-radius: 22px;
    gap: 6px;
}

.role-switch input {
    display: none;
}

.role-switch label {
    cursor: pointer;
    border-radius: 17px;
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    color: #64748b;
    transition: all 0.25s ease;
}

.role-switch label i {
    margin-right: 6px;
}

.role-switch input:checked + label {
    background: #ffffff;
    color: #0f4c81;
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.12);
}

.custom-input .form-control {
    min-height: 58px;
    border-radius: 20px;
    border: 1px solid #dbe6ef;
    background: #f8fbff;
    padding-right: 48px;
}

.custom-input .form-control:focus {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 0.22rem rgba(29,155,240,0.14);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    z-index: 5;
}

.forgot-link {
    text-decoration: none;
    color: #0f4c81;
    font-weight: 600;
}

.btn-login {
    position: relative;
    min-height: 56px;
    border: none;
    border-radius: 22px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #062b52, #0f4c81, #1d9bf0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    box-shadow: 0 18px 32px rgba(29,155,240,0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: transform 0.65s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px rgba(29,155,240,0.35);
}

.btn-login:hover::before {
    transform: translateX(100%);
}

.btn-login span,
.btn-login i {
    position: relative;
    z-index: 1;
}

.login-demo {
    margin-top: 22px;
    padding: 14px;
    border-radius: 22px;
    background: #f4f8fc;
    border: 1px dashed #c8d8e8;
    color: #475569;
    font-size: 0.85rem;
}

.login-demo div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.login-demo small {
    display: block;
    margin-top: 8px;
    color: #0f4c81;
    font-weight: 700;
}

@keyframes floatOrb {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(35px, -28px, 0) scale(1.08);
    }
}

@keyframes gridMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 96px 96px;
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(34px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-34px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 26px 20px;
        border-radius: 30px;
    }

    .login-wrapper {
        padding: 24px 0;
    }

    .login-demo div {
        display: block;
        margin-bottom: 6px;
    }
}
/* ===== Navbar สำหรับหน้า Login ===== */
.navbar-login {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px);
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ตัวหนังสือ */
.navbar-login .navbar-brand {
    color: #ffffff !important;
}

.navbar-login .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
}

/* hover */
.navbar-login .nav-link:hover {
    color: #ffffff !important;
}

/* dropdown */
.navbar-login .dropdown-menu {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* hamburger menu */
.navbar-login .navbar-toggler {
    border: none;
}

.navbar-login .navbar-toggler-icon {
    filter: invert(1);
}
/* ===== Navbar สำหรับหน้า student ===== */
.navbar-main {
    background: linear-gradient(135deg, #062b52, #0f4c81, #1d9bf0) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* โลโก้ */
.navbar-main .navbar-brand {
    color: #ffffff !important;
}

/* เมนู */
.navbar-main .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

/* hover */
.navbar-main .nav-link:hover {
    color: #ffffff !important;
}

/* active */
.navbar-main .nav-link.active {
    color: #ffffff !important;
    font-weight: 700;
}

/* avatar */
.navbar-main .avatar-circle {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
}

/* hamburger */
.navbar-main .navbar-toggler-icon {
    filter: invert(1);
}
.navbar-main {
    border-radius: 0 0 20px 20px;
}
/* ===== Navbar โค้งมน 4 ด้าน แบบระบบชุมนุม ===== */
.navbar-main {
    background: transparent !important;
    padding: 12px 16px;
    z-index: 1050;
}

.navbar-main .navbar-box {
    background: linear-gradient(135deg, #062b52, #0f4c81, #1d9bf0);
    border-radius: 28px;
    padding: 10px 18px;
    box-shadow: 0 12px 30px rgba(6, 43, 82, 0.25);
    position: relative;
    z-index: 1051;
}

/* Brand */
.navbar-main .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
}

.navbar-main .navbar-brand .text-dark {
    color: #ffffff !important;
}

/* Menu */
.navbar-main .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600;
    border-radius: 18px;
    padding: 8px 14px !important;
    transition: all 0.25s ease;
}

/* on hover */
.navbar-main .nav-link:hover,
.navbar-main .nav-link:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

/* active menu */
.navbar-main .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.22);
}

/* avatar */
.navbar-main .avatar-circle {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* dropdown */
.navbar-main .dropdown-menu {
    border: none;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    z-index: 2000;
}

.navbar-main .dropdown-item {
    border-radius: 14px;
    padding: 9px 12px;
    transition: all 0.2s ease;
}

.navbar-main .dropdown-item:hover {
    background: #eaf4ff;
    color: #0f4c81;
    transform: translateX(3px);
}

/* hamburger */
.navbar-main .navbar-toggler {
    border: 0;
    box-shadow: none;
}

.navbar-main .navbar-toggler-icon {
    filter: invert(1);
}

/* mobile */
@media (max-width: 991px) {
    .navbar-main .navbar-box {
        border-radius: 24px;
    }

    .navbar-main .navbar-collapse {
        margin-top: 12px;
    }

    .navbar-main .nav-link {
        margin-bottom: 4px;
    }
}
.lesson-hero {
    background: #ffffff;
    border-radius: 32px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.lesson-badge {
    display: inline-flex;
    align-items: center;
    background: #eaf4ff;
    color: #0f4c81;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 700;
}

.lesson-info-box {
    min-width: 240px;
    background: #f6f9fd;
    border-radius: 24px;
    padding: 14px 18px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.9;
}

.lesson-card {
    position: relative;
    display: flex;
    gap: 18px;
    background: #ffffff;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    overflow: hidden;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 76, 129, 0.14);
}

.lesson-number {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: linear-gradient(135deg, #062b52, #0f4c81, #1d9bf0);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.22);
}

.lesson-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 575px) {
    .lesson-card {
        flex-direction: column;
    }

    .lesson-info-box {
        width: 100%;
    }
}
.lesson-view-hero,
.content-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.lesson-body {
    color: #334155;
    line-height: 1.9;
    font-size: 1rem;
}

.video-box {
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 18px;
    background: #f6f9fd;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.22s ease;
}

.file-item:hover {
    background: #eaf4ff;
    color: #0f4c81;
    transform: translateX(4px);
}

.empty-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    background: #f6f9fd;
    border-radius: 18px;
    padding: 14px;
}

.empty-mini i {
    color: #94a3b8;
}

.submitted-box {
    background: #f6f9fd;
    border-radius: 22px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.btn-submit-work {
    border: none;
    border-radius: 999px;
    padding: 11px 24px;
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, #062b52, #0f4c81, #1d9bf0);
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.22);
}

.btn-submit-work:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.lesson-meta {
    display: grid;
    gap: 12px;
}

.lesson-meta div {
    background: #f6f9fd;
    border-radius: 18px;
    padding: 12px 14px;
}

.lesson-meta span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
}

.lesson-meta strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
}
