@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #7c3aed;
    --dark-bg: #0f172a;
    --white-bg: #ffffff;
    --dark-card: #1e293b;
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glassmorphism Navbar */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar-brand-custom {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Gradient Buttons */
.btn-primary-custom {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-secondary-custom {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background: #f1f5f9;
    color: var(--text-main);
    transform: translateY(-2px);
}

/* Course Cards */
.course-card {
    border: none;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.course-card .card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.course-card .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .card-img-top {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    color: white;
}

.badge-design {
    background: rgba(236, 72, 153, 0.9); /* Pink */
}

.badge-programming {
    background: rgba(59, 130, 246, 0.9); /* Blue */
}

/* Custom Forms */
.form-control-custom {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-control-custom:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Class Room Layout (Learn Page) */
.classroom-container {
    height: calc(100vh - 72px);
    overflow: hidden;
}

.classroom-sidebar {
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    background: white;
}

.classroom-content {
    height: 100%;
    overflow-y: auto;
    background: #fafafa;
}

.lesson-item-btn {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    border: none;
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    transition: var(--transition);
    color: var(--text-main);
    font-weight: 500;
}

.lesson-item-btn:hover {
    background: #f8fafc;
}

.lesson-item-btn.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: black;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.video-wrapper iframe, .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Admin Sidebar Dashboard */
.admin-sidebar {
    background: var(--dark-bg);
    color: white;
    min-height: calc(100vh - 72px);
}

.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 14px 20px;
    font-weight: 500;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin: 4px 12px;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link.active {
    background: var(--primary-color);
}

.stat-card {
    border: none;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* ===================================================
   PROFILE PAGE
   =================================================== */

/* Avatar besar di header profil */
.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
    flex-shrink: 0;
}

.profile-avatar-large span {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

/* Badge role */
.badge-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 700;
}

.badge-user {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    font-weight: 700;
}

/* Stats cards di profil */
.profile-stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon-blue   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-icon-green  { background: rgba(34, 197, 94, 0.12);  color: #22c55e; }
.stat-icon-purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

/* Profile Cards (form containers) */
.profile-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.profile-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.profile-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbff;
}

.profile-card-body {
    padding: 28px 24px;
}

.profile-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.profile-card-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.profile-card-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Role display field */
.role-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
}

/* Warning button */
.btn-warning-custom {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: white;
}

/* Password strength bar */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 90px;
    text-align: right;
}

/* Profile page background decoration */
.profile-page {
    min-height: calc(100vh - 72px);
    background: linear-gradient(180deg, #f0f4ff 0%, var(--light-bg) 300px);
}

.profile-header-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}


/* ===================================================
   REDESIGNED ADMIN LAYOUT
   Custom topbar (logo left, name+avatar right)
   Full-height sidebar
   =================================================== */

/* Admin Layout Container */
.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Admin Top Bar */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1040;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-brand i {
    font-size: 1.4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.admin-sidebar-toggle:hover {
    background: #f1f5f9;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.admin-topbar-btn:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

/* Admin User Button in Topbar */
.admin-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 4px 14px 4px 4px;
    cursor: pointer;
    transition: var(--transition);
}

.admin-user-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.admin-user-btn::after {
    display: none; /* hide default dropdown caret */
}

.admin-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.admin-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.admin-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Admin Sidebar Panel */
.admin-sidebar-panel {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--white-bg);
    overflow-y: auto;
    z-index: 1030;
    transition: transform 0.3s ease;
    padding: 20px 0;
}

.admin-sidebar-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px;
    margin-bottom: 8px;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    margin: 2px 12px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.admin-sidebar-link:hover {
    color: #5c626c;
    background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar-link.active {
    color: white;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.admin-sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Admin Main Content */
.admin-main-content {
    margin-left: 250px;
    margin-top: 64px;
    padding: 28px 32px;
    min-height: calc(100vh - 64px);
    background: var(--light-bg);
}

/* Admin Sidebar Overlay (mobile) */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1025;
}

.admin-sidebar-overlay.active {
    display: block;
}

/* Responsive Admin Layout */
@media (max-width: 991.98px) {
    .admin-sidebar-panel {
        transform: translateX(-100%);
    }
    
    .admin-sidebar-panel.open {
        transform: translateX(0);
    }
    
    .admin-main-content {
        margin-left: 0;
        padding: 20px 16px;
    }
}

/* Text Indigo utility - using explicit color for reliability */
.text-indigo {
    color: #4f46e5 !important;
}

.bg-indigo-subtle {
    background-color: rgba(79, 70, 229, 0.1) !important;
}

.bg-indigo {
    background-color: #4f46e5 !important;
}

.bg-pink-subtle {
    background-color: rgba(236, 72, 153, 0.1) !important;
}

.text-pink {
    color: #ec4899 !important;
}


/* ===================================================
   IMPROVED NAVBAR USER DROPDOWN
   =================================================== */

/* Navbar Logo Image */
.navbar-logo-img {
    border-radius: 6px;
    object-fit: contain;
}

/* User Dropdown Button (Public Navbar) */
.nav-user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 5px 14px 5px 5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
}

.nav-user-dropdown:hover,
.nav-user-dropdown:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-user-dropdown::after {
    display: none; /* hide bootstrap default caret */
}

.nav-user-dropdown .dropdown-toggle::after {
    display: none;
}

/* User Avatar Circle */
.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    line-height: 1;
}

/* User Name Text */
.nav-user-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown Item Icons */
.dropdown-menu .dropdown-item {
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 0 6px;
    padding-left: 12px;
    padding-right: 12px;
}

.dropdown-menu .dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-menu .dropdown-item i {
    font-size: 0.8rem;
}

/* Remove old navbar-user-btn styles conflict */
.navbar-user-btn {
    display: none;
}


/* ===================================================
   USER DASHBOARD SIDEBAR LAYOUT
   =================================================== */

.user-dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.user-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1030;
    transition: transform 0.3s ease;
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
}

.sidebar-brand-logo i {
    font-size: 1.3rem;
    color: #4f46e5;
}

.sidebar-brand-logo img {
    border-radius: 6px;
    object-fit: contain;
}

.sidebar-brand-logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.sidebar-close-btn:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* Sidebar User Card */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbff;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
}

.sidebar-nav-link:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.sidebar-nav-link.active {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-weight: 600;
}

.sidebar-nav-link.active .sidebar-nav-icon {
    color: #4f46e5;
}

.sidebar-nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sidebar-nav-link-danger {
    color: #ef4444;
}

.sidebar-nav-link-danger:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

.sidebar-nav-link-danger .sidebar-nav-icon {
    color: #ef4444;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 12px;
}

/* User Main Wrapper */
.user-main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* User Topbar */
.user-topbar {
    position: sticky;
    top: 0;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.topbar-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.topbar-toggle-btn:hover {
    background: #f1f5f9;
}

.topbar-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.topbar-action-btn:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
}

.topbar-user-avatar:hover {
    opacity: 0.9;
    color: white;
}

/* User Main Content */
.user-main-content {
    padding: 28px;
    flex: 1;
    background: var(--light-bg);
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1025;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive: Mobile */
@media (max-width: 991.98px) {
    .user-sidebar {
        transform: translateX(-100%);
    }

    .user-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .user-main-wrapper {
        margin-left: 0;
    }

    .topbar-toggle-btn {
        display: block;
    }

    .user-main-content {
        padding: 20px 16px;
    }

    .user-topbar {
        padding: 12px 16px;
    }
}


/* ===================================================
   USER DASHBOARD PAGES STYLING
   Dashboard, Kursus Saya, Riwayat, Profil
   =================================================== */

/* Welcome Banner */
.dash-welcome-banner {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.dash-welcome-text h2 {
    color: white;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.dash-welcome-text h2 span {
    color: #c4b5fd;
}

.dash-welcome-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.dash-welcome-banner .btn {
    white-space: nowrap;
}

/* Stat Cards */
.dash-stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    height: 100%;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dash-stat-icon-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.dash-stat-icon-green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.dash-stat-icon-purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.dash-stat-info p {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.dash-stat-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

/* Section Headers */
.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-section-header h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.dash-section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    transition: var(--transition);
}

.dash-section-link:hover {
    color: #4338ca;
}

/* Empty State */
.dash-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: white;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.dash-empty-state i {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.dash-empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Course Cards (Dashboard Mini) */
.dash-course-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.dash-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dash-course-thumb {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.dash-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-course-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    color: white;
}

.dash-course-info {
    padding: 14px 16px;
}

.dash-course-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Table Wrapper */
.dash-table-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-table-wrapper .table {
    margin: 0;
}

.dash-table-wrapper .table thead {
    background: #f8fafc;
}

.dash-table-wrapper .table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border: none;
    padding: 14px 16px;
}

.dash-table-wrapper .table tbody td {
    border-color: #f1f5f9;
    padding: 14px 16px;
    vertical-align: middle;
}

.dash-table-wrapper .table tbody tr:hover {
    background: #fafbff;
}

/* Badges */
.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.dash-badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.dash-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.dash-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.dash-badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Profile Page Additional */
.profile-page .user-main-content {
    background: linear-gradient(180deg, #f0f4ff 0%, var(--light-bg) 200px);
}
