/* ============================================
   EduLearn LMS - Modern CSS Framework v3.0
   Responsive & Mobile Friendly
   ============================================ */

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;400;500;600;700;800&display=swap');

/* ========== PAGE HEADER (DENGAN BACKGROUND BIRU) ========== */
.page-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8, #3b82f6);
    padding: 120px 0 60px;
    color: white;
    margin-top: 76px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.page-header h1 {
    color: white !important;
    font-size: 48px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 18px;
}
/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #0f172a;
}

.text-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== BUTTON PRIMARY CUSTOM ========== */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79,70,229,0.3);
    color: white;
}

/* ========== SECTION TITLE ========== */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0f172a, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 48px;
    font-size: 18px;
}

/* ========== SIDEBAR MODERN ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #1e293b;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e293b;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 10px;
}

/* Sidebar Collapsed */
body.sidebar-collapsed .sidebar {
    width: 80px;
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

body.sidebar-collapsed .logo span,
body.sidebar-collapsed .logo-sub,
body.sidebar-collapsed .nav-link-custom span,
body.sidebar-collapsed .user-info .user-name,
body.sidebar-collapsed .user-info .user-role,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .toggle-text {
    display: none;
}

body.sidebar-collapsed .nav-link-custom {
    justify-content: center;
    padding: 12px;
}

body.sidebar-collapsed .nav-link-custom i {
    margin: 0;
    font-size: 22px;
}

body.sidebar-collapsed .avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    transition: all 0.3s ease;
}

body.sidebar-collapsed .sidebar-header {
    padding: 20px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 10px;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.user-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    font-size: 26px;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(99,102,241,0.4);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.user-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 24px 16px;
}

.nav-item {
    margin-bottom: 6px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link-custom i {
    font-size: 20px;
    width: 24px;
    transition: transform 0.2s;
}

.nav-link-custom:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(6px);
}

.nav-link-custom:hover i {
    transform: scale(1.1);
}

.nav-link-custom.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.nav-link-custom.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: white;
    border-radius: 0 3px 3px 0;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: #f0f4f8;
    transition: all 0.3s ease;
}

/* Top Bar */
.top-bar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #475569;
    display: none;
    transition: color 0.2s;
}

.toggle-sidebar:hover {
    color: #6366f1;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #0f172a, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dark-mode-toggle {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dark-mode-toggle i {
    font-size: 20px;
    color: #64748b;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 40px;
    background: #f1f5f9;
    transition: all 0.3s;
}

.user-dropdown:hover {
    background: #e2e8f0;
}

.avatar-small {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

/* Content Wrapper */
.content-wrapper {
    padding: 32px;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== STAT CARD ========== */
.stat-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
}

/* ========== MODERN CARD ========== */
.modern-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.card-header-custom {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.card-header-custom h5 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== TABLE RESPONSIVE ========== */
.table-wrapper {
    overflow-x: auto;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th {
    padding: 14px 20px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.table-custom td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toggle-sidebar {
        display: block;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .top-bar {
        padding: 12px 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }
}

/* Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .table-custom th,
    .table-custom td {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .card-header-custom {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-dropdown span {
        display: none;
    }
    
    .user-menu {
        gap: 10px;
    }
    
    .dark-mode-toggle {
        width: 38px;
        height: 38px;
    }
    
    .avatar-small {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .btn-primary-custom {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* Mobile Portrait (max-width: 576px) */
@media (max-width: 576px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .top-bar {
        padding: 10px 16px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .table-custom th,
    .table-custom td {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .btn-primary-custom {
        padding: 6px 16px;
        font-size: 12px;
    }
    
    .user-dropdown {
        padding: 4px 12px;
    }
}

/* Sidebar Collapsed on Mobile */
@media (max-width: 992px) {
    body.sidebar-collapsed .sidebar {
        width: 280px;
        transform: translateX(-100%);
    }
    
    body.sidebar-collapsed .sidebar.show {
        transform: translateX(0);
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

/* ========== DARK MODE ========== */
body.dark-mode {
    background: #0f172a;
}

body.dark-mode .main-content {
    background: #0f172a;
}

body.dark-mode .stat-card,
body.dark-mode .modern-card,
body.dark-mode .card-header-custom {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .stat-value {
    color: #f1f5f9;
}

body.dark-mode .table-custom th {
    background: #1e293b;
    color: #94a3b8;
}

body.dark-mode .table-custom td {
    border-bottom-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .top-bar {
    background: rgba(30,41,59,0.85);
    border-bottom-color: #334155;
}

body.dark-mode .page-title {
    background: linear-gradient(135deg, #f1f5f9, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dark-mode .dark-mode-toggle,
body.dark-mode .user-dropdown {
    background: #334155;
}

body.dark-mode .dark-mode-toggle i,
body.dark-mode .user-dropdown span {
    color: #f1f5f9;
}

/* ========== NAVBAR PROFESSIONAL ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 10px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 6px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.logo-slogan {
    font-size: 8px;
    color: #64748b;
    letter-spacing: 0.5px;
}

.navbar-nav {
    gap: 4px;
}

.nav-link {
    font-weight: 500;
    color: #334155;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.nav-link i {
    font-size: 16px;
    color: #6366f1;
}

.nav-link:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
}

.nav-link:hover i {
    color: #4f46e5;
}

.btn-login-nav {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-login-nav i {
    color: white;
    font-size: 14px;
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    color: white;
}

.navbar-toggler {
    border: none;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 12px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar-nav {
        padding: 16px 0;
    }
    
    .nav-link {
        justify-content: center;
    }
    
    .btn-login-nav {
        margin: 8px 0;
        justify-content: center;
    }
    
    .logo-text {
        font-size: 18px;
    }
}

/* ========== TOMBOL LOGIN PREMIUM ========== */
.btn-login-nav {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    transition: all 0.3s ease;
    text-decoration: none !important; /* HILANGKAN GARIS BAWAH */
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-login-nav i {
    color: white;
    font-size: 14px;
}

.btn-login-nav:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    color: white;
    text-decoration: none !important;
}

.btn-login-nav:active {
    transform: translateY(0);
}

/* Hapus garis bawah untuk semua link di navbar */
.navbar-nav a {
    text-decoration: none !important;
}

/* ========== NAVBAR PREMIUM ========== */
#premiumNavbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(15px);
    padding: 12px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

#premiumNavbar.scrolled {
    padding: 6px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Brand */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-icon {
    position: relative;
}

.logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.2));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.logo-slogan {
    font-size: 9px;
    color: #64748b;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Nav Items */
.navbar-nav {
    gap: 6px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 14px;
    color: #334155;
    border-radius: 40px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-icon i {
    font-size: 16px;
    color: #6366f1;
    transition: all 0.3s ease;
}

.nav-text {
    transition: transform 0.2s ease;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    transform: translateY(-2px);
}

.nav-link:hover .nav-icon i {
    transform: scale(1.1);
    color: #4f46e5;
}

.nav-link:hover .nav-indicator {
    width: 40px;
}

/* Active Link (opsional, bisa ditambahkan class active di PHP) */
.nav-link.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(139, 92, 246, 0.08));
    color: #4f46e5;
}

.nav-link.active .nav-icon i {
    color: #4f46e5;
}

.nav-link.active .nav-indicator {
    width: 40px;
}

/* Tombol Login Premium */
.btn-login-premium {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-login-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-login-premium:hover::before {
    left: 100%;
}

.btn-login-premium i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-login-premium:hover i {
    transform: translateX(3px);
}

/* Toggle Button Premium */
.navbar-toggler {
    border: none;
    background: #f1f5f9;
    padding: 10px 12px;
    border-radius: 12px;
    transition: all 0.3s;
}

.navbar-toggler:hover {
    background: #e2e8f0;
}

.toggle-icon {
    width: 24px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #4f46e5;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar-collapse {
        background: white;
        border-radius: 20px;
        padding: 20px;
        margin-top: 15px;
        box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        gap: 8px;
    }
    
    .nav-link {
        justify-content: center;
        padding: 12px 20px;
    }
    
    .btn-login-premium {
        margin: 10px 0 0;
        justify-content: center;
        width: 100%;
    }
    
    .nav-indicator {
        display: none;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 18px;
    }
    
    .logo-slogan {
        font-size: 7px;
    }
    
    .logo-img {
        width: 36px;
        height: 36px;
    }
}

/* Scroll Effect */
#premiumNavbar.scrolled .logo-text {
    font-size: 20px;
}

#premiumNavbar.scrolled .logo-img {
    width: 38px;
    height: 38px;
}