:root {
    --auralith-blue: #1A4B8D;
    --auralith-light: #F4F8FB;
    --accent: #DE2B5D;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --sidebar-w: 260px;
    --bg: #F4F8FB;
    --surface: #FFFFFF;
    --surface-alt: #FFFFFF;
    --panel-border: #E2E8F0;
    --topnav-bg: #FFFFFF;
    --search-bg: #F1F5F9;
}

.dark-theme {
    --auralith-light: #0F172A;
    --bg: #020617;
    --surface: #111827;
    --surface-alt: #1F2937;
    --text-dark: #E2E8F0;
    --text-muted: #94A3B8;
    --panel-border: rgba(148,163,184,0.25);
    --topnav-bg: #111827;
    --search-bg: #111827;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
body { background: var(--bg); color: var(--text-dark); }

.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: var(--auralith-blue); color: white; padding: 20px; position: fixed; height: 100vh; overflow-y: auto; left: 0; top: 0; display: flex; flex-direction: column; }
nav { flex: 1; }
.logo-icon { background: var(--accent); padding: 5px 12px; border-radius: 6px; font-weight: bold; }
.nav-label { font-size: 11px; text-transform: uppercase; opacity: 0.5; margin: 20px 0 10px; }
nav a { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px; border-radius: 8px; margin-bottom: 4px; transition: 0.3s; }
nav a:hover, nav a.active { background: rgba(255,255,255,0.1); color: white; }

/* Workspace */
.workspace { flex: 1; display: flex; flex-direction: column; margin-left: var(--sidebar-w); }
.top-nav { height: 70px; background: var(--topnav-bg); display: flex; justify-content: space-between; align-items: center; padding: 0 30px; border-bottom: 1px solid var(--panel-border); }
.search-box { display: flex; align-items: center; background: var(--search-bg); padding: 8px 15px; border-radius: 8px; width: 400px; }
.search-box input { border: none; background: transparent; outline: none; margin-left: 10px; width: 100%; }
.user-profile { display: flex; align-items: center; gap: 15px; }
.avatar { background: var(--accent); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* Dashboard Content */
.content { padding: 30px; animation: contentFadeIn 0.25s ease-out; }

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--surface); padding: 20px; border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.06); }
.stat-card span { font-size: 13px; color: #64748B; }
.stat-card h3 { font-size: 24px; margin-top: 5px; }
.stat-card.primary { background: var(--auralith-blue); color: white; }
.stat-card.primary span { color: rgba(255, 255, 255, 0.8); }
.stat-card.primary h3 { color: white; }

.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.data-card { background: var(--surface); border-radius: 12px; padding: 20px; animation: cardFadeIn 0.35s ease-out both; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.card-header { display: flex; justify-content: space-between; margin-bottom: 20px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; font-size: 12px; color: #64748B; border-bottom: 1px solid #F1F5F9; }
td { padding: 15px 12px; font-size: 14px; border-bottom: 1px solid #F1F5F9; }
tbody tr { animation: rowFadeIn 0.3s ease-out both; }
tbody tr:nth-child(1) { animation-delay: 0.02s; }
tbody tr:nth-child(2) { animation-delay: 0.04s; }
tbody tr:nth-child(3) { animation-delay: 0.06s; }
tbody tr:nth-child(4) { animation-delay: 0.08s; }
tbody tr:nth-child(5) { animation-delay: 0.10s; }
tbody tr:nth-child(6) { animation-delay: 0.12s; }
tbody tr:nth-child(7) { animation-delay: 0.14s; }
tbody tr:nth-child(8) { animation-delay: 0.16s; }
tbody tr:nth-child(9) { animation-delay: 0.18s; }
tbody tr:nth-child(10) { animation-delay: 0.20s; }
tbody tr:nth-child(11) { animation-delay: 0.22s; }
tbody tr:nth-child(12) { animation-delay: 0.24s; }
tbody tr:nth-child(13) { animation-delay: 0.26s; }
tbody tr:nth-child(14) { animation-delay: 0.28s; }
tbody tr:nth-child(15) { animation-delay: 0.30s; }

@keyframes rowFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.tag { padding: 4px 8px; border-radius: 4px; font-size: 11px; background: #F1F5F9; }
.tag.live { background: #DCFCE7; color: #166534; }

.qr-preview { margin-top: 30px; text-align: center; border: 2px dashed #E2E8F0; padding: 20px; border-radius: 12px; }
.qr-preview i { font-size: 50px; color: var(--auralith-blue); }

/* Course Page Specifics */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.course-card {
    background: var(--surface);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Color coding by category */
.course-header.dev { background: #eef2ff; color: #4338ca; }
.course-header.design { background: #fff1f2; color: #be123c; }
.course-header.qa { background: #f0fdf4; color: #15803d; }
.course-header.marketing { background: #fff7ed; color: #c2410c; }

.category-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-body {
    padding: 25px;
    background: var(--surface);
}

.course-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--auralith-blue);
}

.mentor {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.course-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #94a3b8;
}

.course-stats i { margin-right: 5px; }

.progress-group label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
}

.progress-bar div {
    height: 100%;
    background: var(--auralith-blue);
    border-radius: 10px;
}

.course-footer {
    padding: 20px;
    border-top: 1px solid var(--panel-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
}

.btn-outline:hover { background: #f8fafc; }

.btn-filled {
    background: var(--auralith-blue);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.btn-primary {
    background: var(--accent); /* Pink/Red from Auralith Bit logo */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Sidebar Nav Labels */
.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.6;
    margin: 25px 0 10px 12px;
    letter-spacing: 1px;
}

/* Dropdown Menu Styles */
.dropdown {
    width: 100%;
}

.dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px; /* Adjust based on your current font */
    transition: 0.3s;
}

.dropdown-btn span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.dropdown-content {
    display: none; /* Hidden by default */
    background: rgba(0, 0, 0, 0.15); /* Slightly darker to show depth */
    margin: 5px 0;
    border-radius: 8px;
    padding-left: 15px; /* Indent the sub-items */
}

/* Show dropdown on hover or via JS */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    font-size: 13px;
    padding: 10px;
    opacity: 0.9;
}

.dropdown-content a i {
    font-size: 16px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 20px 28px;
    background: rgba(255,255,255,0.93);
    border-radius: 12px;
    text-align: center;
}

.sidebar-logo {
    width: 56px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.brand h2 {
    font-size: 18px;
    color: var(--auralith-blue);
    letter-spacing: 2px;
    white-space: nowrap;
}

.btn-text {
    background: none;
    border: none;
    color: var(--auralith-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.btn-text:hover { text-decoration: underline; }

.header-info h1 { font-size: 22px; margin: 0; }
.header-info p { font-size: 13px; color: #64748B; margin: 2px 0 0; }

.logout-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    margin-left: 5px;
    transition: 0.2s;
}
.logout-link:hover { color: var(--accent); }

.messages { margin-bottom: 20px; }
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.form-group select, .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    background: white;
}
.form-group select:focus, .form-group input:focus { border-color: var(--auralith-blue); box-shadow: 0 0 0 3px rgba(26,75,141,0.1); }

.tag.upcoming { background: #FEF3C7; color: #92400E; }
.tag.enrollment { background: #DBEAFE; color: #1E40AF; }
.tag.completed { background: #DCFCE7; color: #166534; }
.tag.in_progress { background: #DBEAFE; color: #1E40AF; }
.tag.on_hold { background: #FEF3C7; color: #92400E; }
.tag.cancelled { background: #FEF2F2; color: #991B1B; }
.tag.dropped { background: #FEF2F2; color: #991B1B; }
.tag.active { background: #DCFCE7; color: #166534; }

.dark-theme .tag { background: #334155; color: #E2E8F0; }
.dark-theme .tag.upcoming { background: #78350F; color: #FDE68A; }
.dark-theme .tag.enrollment { background: #1E3A5F; color: #93C5FD; }
.dark-theme .tag.completed { background: #064E3B; color: #6EE7B7; }
.dark-theme .tag.in_progress { background: #1E3A5F; color: #93C5FD; }
.dark-theme .tag.on_hold { background: #78350F; color: #FDE68A; }
.dark-theme .tag.cancelled { background: #7F1D1D; color: #FCA5A5; }
.dark-theme .tag.dropped { background: #7F1D1D; color: #FCA5A5; }
.dark-theme .tag.active { background: #064E3B; color: #6EE7B7; }

.project-item { margin-bottom: 15px; }
.project-item p { font-size: 14px; margin-bottom: 6px; font-weight: 500; }
.project-item small { font-size: 11px; }

.data-card h3 { font-size: 16px; margin-bottom: 15px; }
.data-card.side h3 { margin-bottom: 20px; }

/* Responsive */
.table-controls .search-box {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    padding: 8px 15px;
    border-radius: 8px;
    width: 280px;
}
.table-controls .search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
}

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { width: 60px; padding: 15px 10px; }
    .sidebar .brand h2, .sidebar .nav-label, .sidebar nav a span { display: none; }
    .sidebar nav a { justify-content: center; padding: 12px 0; }
    .top-nav { padding: 0 15px; }
    .search-box { width: 200px; }
    .content { padding: 20px 15px; }
    .stats-grid { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .search-box { width: 140px; }
    .user-profile span { display: none; }
}