:root {
    /* Light-dominant theme: 60% white/bright surfaces, 40% dark accents */
    --bg: #f8f9fa;
    --panel: #ffffff;
    --surface: #f1f3f5;
    --surface-2: #e9ecef;
    --surface-3: #dee2e6;
    --border: rgba(15, 23, 42, 0.08);
    --border-md: rgba(15, 23, 42, 0.14);
    --border-hover: rgba(15, 23, 42, 0.22);
    --accent: #0f172a;
    --blue: #3b82f6;
    --blue-dim: rgba(59, 130, 246, 0.12);
    --blue-border: rgba(59, 130, 246, 0.25);
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.12);
    --green-border: rgba(16, 185, 129, 0.25);
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.12);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.12);
    --purple: #8b5cf6;
    --purple-dim: rgba(139, 92, 246, 0.12);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --sidebar-w: 228px;
    --header-h: 64px;
    --font: "Geist", -apple-system, sans-serif;
    --mono: "Geist Mono", monospace;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --r: 12px;
    --r-lg: 16px;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
}
body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}
a {
    text-decoration: none;
    color: inherit;
}
button {
    cursor: pointer;
    font-family: var(--font);
}
/* Subtle scanlines – lightened for new theme */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(15, 23, 42, 0.018) 2px,
        rgba(15, 23, 42, 0.018) 4px
    );
}
/* ── Shell ── */
.shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--header-h) 1fr;
    min-height: 100vh;
}
/* ── Sidebar ── */
.sidebar {
    grid-row: 1/-1;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 1.25rem;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-logo__mark {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.sidebar-logo__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.85rem;
    border-radius: var(--r);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition:
        background 0.2s,
        color 0.2s;
    position: relative;
}
.nav-item:hover {
    background: var(--surface);
    color: var(--text-primary);
}
.nav-item.active {
    background: var(--surface-2);
    color: var(--text-primary);
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}
.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}
.nav-badge {
    margin-left: auto;
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.nav-item.active .nav-badge {
    background: rgba(15, 23, 42, 0.1);
    color: var(--text-primary);
    border-color: var(--border-md);
}
.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0.85rem;
}
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.85rem;
    border-radius: var(--r);
    transition: background 0.2s;
    cursor: pointer;
}
.sidebar-user:hover {
    background: var(--surface);
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-md);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-plan {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
/* ── Header ── */
.header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.75rem;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.header-page {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.header-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.header-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
/* Search bar in header */
.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 0.45rem 0.9rem;
    width: 240px;
    transition:
        border-color 0.2s,
        width 0.3s var(--ease);
}
.header-search:focus-within {
    border-color: var(--border-md);
    width: 280px;
}
.header-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.header-search input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 100%;
}
.header-search input::placeholder {
    color: var(--text-muted);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    transition:
        border-color 0.2s,
        color 0.2s;
    position: relative;
}
.header-toggle {
    display: none;
}
.icon-btn:hover {
    border-color: var(--border-md);
    color: var(--text-primary);
}
.notif-pip {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    border: 1.5px solid var(--panel);
}
.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-md);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}
/* ── Main ── */
.main {
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg);
}
/* ── Tab system ── */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
/* ── Section headers ── */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.sec-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}
.sec-action {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    font-weight: 500;
}
.sec-action:hover {
    color: var(--text-primary);
}
/* ── Bento grid ── */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}
/* Spans */
.c-8 {
    grid-column: span 8;
}
.c-4 {
    grid-column: span 4;
}
.c-3 {
    grid-column: span 3;
}
.c-6 {
    grid-column: span 6;
}
.c-7 {
    grid-column: span 7;
}
.c-5 {
    grid-column: span 5;
}
.c-12 {
    grid-column: span 12;
}
/* Card */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.card:hover {
    border-color: var(--border-md);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}
/* ── Welcome card ── */
.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--green-dim);
    border: 1px solid var(--green-border);
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.75rem;
}
.welcome-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pip-pulse 2s ease-in-out infinite;
}
@keyframes pip-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}
.welcome-title {
    font-size: clamp(1.85rem, 2.8vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text-primary);
}
.welcome-sub {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 420px;
}
.welcome-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.7rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition:
        transform 0.2s var(--spring),
        box-shadow 0.25s,
        background 0.15s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.25);
    background: #1e2937;
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.7rem 1.25rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-md);
    border-radius: var(--r);
    font-size: 0.9rem;
    font-weight: 500;
    transition:
        border-color 0.2s,
        color 0.2s,
        background 0.2s;
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--surface);
}
/* Current course in welcome */
.current-course {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cc-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
}
.cc-info {
    flex: 1;
    min-width: 0;
}
.cc-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-weight: 500;
}
.cc-title {
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    line-height: 1.3;
}
.cc-bar {
    height: 9px;
    background: var(--surface-3);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}
.cc-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    box-shadow: 0 0 12px -2px rgba(16, 185, 129, 0.5);
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cc-pct {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}
/* ── Streak card ── */
.streak-number {
    font-family: var(--mono);
    font-size: 3.2rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    line-height: 1;
}
.streak-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.streak-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: auto;
}
.streak-day-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}
.sdl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    font-weight: 500;
}
.sd {
    aspect-ratio: 1;
    border-radius: 6px;
    background: var(--surface-2);
}
.sd.done {
    background: #10b981;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.65rem;
}
.sd.today {
    background: var(--accent);
    color: #fff;
}
.streak-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.streak-footer span {
    color: var(--text-primary);
    font-weight: 600;
}
/* ── Stat cards ── */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
}
.stat-icon--white {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--accent);
}
.stat-icon--blue {
    background: var(--blue-dim);
    border: 1px solid var(--blue-border);
    color: var(--blue);
}
.stat-icon--green {
    background: var(--green-dim);
    border: 1px solid var(--green-border);
    color: var(--green);
}
.stat-icon--purple {
    background: var(--purple-dim);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--purple);
}
.stat-val {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
}
.stat-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.stat-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
}
.up {
    background: var(--green-dim);
    color: var(--green);
}
.neutral {
    background: var(--surface-2);
    color: var(--text-secondary);
}
/* ── Progress bars – redesigned for aesthetic strength – thicker, gradient, depth */
.cc-bar,
.prog-item-bar,
.act-track,
.prog-bar {
    height: 9px;
    background: var(--surface-3);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}
.cc-bar-fill,
.prog-item-fill,
.act-fill,
.prog-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--green), #3b82f6);
    box-shadow: 0 1px 4px -1px rgba(16, 185, 129, 0.4);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.prog-item-fill {
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}
.act-fill {
    background: linear-gradient(90deg, #10b981, #3b82f6);
}
.act-fill.today-bar {
    background: linear-gradient(90deg, #0f172a, #1e2937);
}
/* ── My Courses section ── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.course-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition:
        border-color 0.25s,
        transform 0.25s var(--ease);
    cursor: pointer;
}
.course-card:hover {
    border-color: var(--border-md);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -10px rgba(15, 23, 42, 0.12);
}
.course-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    position: relative;
}
.course-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.course-card-body {
    padding: 1.25rem;
}
.course-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.course-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.course-progress-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.prog-bar {
    flex: 1;
}
.prog-pct {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}
.course-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.course-modules {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.45rem 1rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.btn-sm:hover {
    background: var(--surface-2);
    border-color: var(--border-md);
}
/* ── Progress list ── */
.prog-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.prog-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition:
        border-color 0.2s,
        transform 0.2s;
}
.prog-item:hover {
    border-color: var(--border-md);
    transform: translateX(4px);
}
.prog-item-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--panel);
    border: 1px solid var(--border);
}
.prog-item-info {
    flex: 1;
    min-width: 0;
}
.prog-item-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.prog-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.prog-item-pct {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.prog-item-bar {
    flex: 1;
}
.prog-item-resume {
    font-size: 0.85rem;
    color: var(--blue);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    font-weight: 500;
}
.prog-item:hover .prog-item-resume {
    opacity: 1;
}
/* ── Weekly activity ── */
.activity-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.act-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.act-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 32px;
    flex-shrink: 0;
    font-family: var(--mono);
}
.act-track {
    flex: 1;
    height: 9px;
}
.act-fill {
    height: 100%;
    border-radius: 9999px;
}
.act-mins {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 36px;
    text-align: right;
}
.weekly-sum {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wsum-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.wsum-val {
    font-family: var(--mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}
/* ── Available courses / Explore ── */
.explore-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.explore-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition:
        border-color 0.2s,
        transform 0.2s;
}
.explore-item:hover {
    border-color: var(--border-md);
    transform: translateX(4px);
}
.explore-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--panel);
    border: 1px solid var(--border);
}
.explore-info {
    flex: 1;
    min-width: 0;
}
.explore-cat {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.explore-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}
.explore-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.star {
    color: var(--amber);
}
.explore-price {
    font-family: var(--mono);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.explore-buy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.6rem 1.1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background 0.2s,
        transform 0.2s;
    flex-shrink: 0;
}
.explore-buy:hover {
    background: #1e2937;
    transform: translateY(-1px);
}
/* ── Learning path ── */
.path-list {
    display: flex;
    flex-direction: column;
}
.path-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.path-item:last-child {
    border-bottom: none;
}
.path-num {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 24px;
    flex-shrink: 0;
    text-align: right;
}
.path-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
}
.path-dot--done {
    background: var(--green-dim);
    border: 2px solid var(--green-border);
    color: var(--green);
}
.path-dot--active {
    background: #fff;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.path-dot--locked {
    background: var(--surface-2);
    border: 2px solid var(--border);
    color: var(--text-muted);
}
.path-info {
    flex: 1;
    min-width: 0;
}
.path-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.path-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.path-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.pb-done {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.pb-active {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.pb-locked {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
/* ── Assignments ── */
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.assignment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
}
.asgn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.asgn-dot--due {
    background: var(--amber);
}
.asgn-dot--done {
    background: var(--green);
}
.asgn-dot--new {
    background: var(--blue);
}
.asgn-info {
    flex: 1;
    min-width: 0;
}
.asgn-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.asgn-course {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.asgn-due {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.asgn-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.ab-due {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.ab-done {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.ab-new {
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid var(--blue-border);
}
/* ── Certificates ── */
.cert-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
}
.cert-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--panel);
    border: 1px solid var(--border);
}
.cert-info {
    flex: 1;
    min-width: 0;
}
.cert-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.cert-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.cert-action {
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 8px;
    transition:
        color 0.2s,
        border-color 0.2s;
}
.cert-action:hover {
    color: var(--text-primary);
    border-color: var(--border-md);
}
/* ── Community / Forum ── */
.community-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.community-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    transition: border-color 0.2s;
}
.community-item:hover {
    border-color: var(--border-md);
}
.comm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comm-body {
    flex: 1;
    min-width: 0;
}
.comm-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.comm-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comm-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.comm-tag {
    background: var(--surface-2);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}
/* ── Leaderboard ── */
.lb-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lb-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--r);
    transition: background 0.2s;
}
.lb-item:hover {
    background: var(--surface);
}
.lb-item.me {
    background: var(--green-dim);
    border: 1px solid var(--green-border);
}
.lb-rank {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.lb-rank.top {
    color: var(--amber);
    font-weight: 600;
}
.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.lb-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}
.lb-name.me-name {
    color: var(--accent);
}
.lb-score {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
/* Animations */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.main {
    animation: fade-up 0.5s var(--ease) both;
}
.card {
    animation: fade-up 0.5s var(--ease) both;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--surface);
}
::-webkit-scrollbar-thumb {
    background: var(--border-md);
    border-radius: 6px;
}
@media (max-width: 1024px) {
    .c-8 {
        grid-column: span 12;
    }
    .c-4 {
        grid-column: span 12;
    }
    .c-7 {
        grid-column: span 12;
    }
    .c-5 {
        grid-column: span 12;
    }
    .c-3 {
        grid-column: span 6;
    }
}
@media (max-width: 768px) {
    :root {
        --sidebar-w: 0px;
    }
    .sidebar {
        display: block;
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        max-width: 85%;
        height: 100vh;
        transform: translateX(-110%);
        transition: transform 0.3s ease;
        z-index: 220;
        box-shadow: 10px 0 34px rgba(15, 23, 42, 0.15);
        background: var(--panel);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 210;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    .shell {
        grid-template-columns: 1fr;
    }
    .main {
        padding: 1.25rem;
    }
    .header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .header-toggle {
        display: inline-flex;
    }
    .header-search {
        display: none;
    }
    .header-actions .icon-btn {
        display: none;
    }
    .header-sep,
    .header-sub {
        display: none;
    }
    .c-3 {
        grid-column: span 12;
    }
    .instructors-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .search-box,
    .sort-buttons {
        width: 100%;
        max-width: none;
    }
    .sort-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .instructor-actions {
        flex-wrap: wrap;
    }
    .instructor-actions .btn-outline-sm,
    .instructor-actions .btn-primary-sm,
    .instructor-actions .btn-success-sm {
        flex: 1;
        min-width: 0;
        width: 100%;
    }
    .instructors-grid {
        grid-template-columns: 1fr;
    }
    .profile-avatar-wrapper {
        margin-left: 0;
        display: flex;
        justify-content: center;
    }
    .profile-avatar {
        margin: 0 auto;
    }
    .profile-info {
        padding: 1rem;
    }
    .profile-name-edit,
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .earnings-card {
        flex-direction: column;
        align-items: stretch;
    }
    .earnings-stats {
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }
    .course-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .course-card-footer .course-modules {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 540px) {
    .main {
        padding: 1rem;
    }
    .header {
        padding: 0.75rem 1rem;
    }
    .header-actions {
        gap: 0.5rem;
    }
    .sec-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .instructors-filters {
        gap: 0.75rem;
    }
    .search-box,
    .sort-buttons,
    .instructor-actions {
        width: 100%;
    }
    .btn-outline-sm,
    .btn-primary-sm,
    .btn-success-sm {
        width: 100%;
    }
    .instructor-card {
        padding: 1.25rem;
    }
    .instructor-avatar {
        width: 64px;
        height: 64px;
    }
    .instructor-name {
        font-size: 1.1rem;
    }
    .instructor-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-cover {
        height: 100px;
    }
    .profile-avatar-wrapper {
        margin-top: -50px;
    }
    .profile-name {
        font-size: 1.75rem;
    }
    .tabs-nav {
        gap: 0.25rem;
    }
    .tab-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    .course-card-body {
        padding: 1rem;
    }
    .course-card-footer {
        padding: 1rem;
        justify-content: flex-start;
    }
    .empty-state {
        padding: 3rem;
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--border-md);
}

.text-danger {
    color: var(--red);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.alert-success {
    background: var(--green-dim);
    border: 1px solid var(--green-border);
    color: var(--green);
    padding: 0.75rem 1rem;
    border-radius: var(--r);
    margin-bottom: 1.25rem;
}

.card-body {
    padding: 0;
}

.bento-grid-content {
    display: contents;
}

/* Add to your CSS file */
.instructors-header {
    margin-bottom: 2rem;
}

.instructor-stats {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.instructors-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box svg {
    color: #9ca3af;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
}

.sort-buttons {
    display: flex;
    gap: 0.5rem;
}

.sort-btn {
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-btn:hover {
    background: #f3f4f6;
}

.sort-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.instructor-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instructor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.instructor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.instructor-info {
    flex: 1;
}

.instructor-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.instructor-email {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.instructor-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.instructor-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.course-tag-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    color: #374151;
}

.instructor-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-outline-sm {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-sm:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-primary-sm {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-sm:hover {
    background: #2563eb;
}

.empty-state {
    text-align: center;
    padding: 4rem;
    color: #9ca3af;
}

.empty-state svg {
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* My profile css /*
/* Profile Styles */
.profile-header {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, var(--accent), var(--blue));
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -60px;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--panel);
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: white;
}

.avatar-edit-container {
    position: relative;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
}

.avatar-upload-btn input {
    display: none;
}

.profile-info {
    padding: 0 2rem 1.5rem 2rem;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.profile-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.profile-name-edit {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.profile-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* Profile Details */
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-detail-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.profile-bio {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Expertise Tags */
.expertise-list,
.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.remove-tag {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
}

.add-expertise {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-link svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.social-link-text {
    color: var(--blue);
    text-decoration: none;
}

.social-link-text:hover {
    text-decoration: underline;
}

/* Reviews */
.reviews-summary {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.rating-summary {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-stars {
    display: inline-flex;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.star-filled,
.star-half,
.star-empty {
    font-size: 1.25rem;
}

.star-filled {
    color: var(--amber);
}

.star-half {
    color: var(--amber);
    position: relative;
}

.star-empty {
    color: var(--border-md);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.25rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 600;
    color: var(--text-primary);
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-comment {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Earnings */
.earnings-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.earnings-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.earnings-total {
    text-align: left;
}

.earnings-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.earnings-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
}

.earnings-stats {
    display: flex;
    gap: 2rem;
}

.earnings-stat {
    text-align: center;
}

.earnings-table-wrapper {
    overflow-x: auto;
}

.search-wrap input,
.table-search {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 0.83rem;
    color: var(--text-primary);
    width: 100%;
}
.search-wrap input::placeholder {
    color: var(--text-muted);
}

.earnings-table {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    border-collapse: collapse;
}

.earnings-table th,
.earnings-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.earnings-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
}

.earnings-table tr:last-child td {
    border-bottom: none;
}

.text-danger {
    color: var(--red);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* tab for all courses /*
/* Tabs Container */
.tabs-container {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Tab Buttons */
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge.green {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.badge.red {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid var(--red-border);
}
.badge.amber {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}
.badge.muted {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge.blue {
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid var(--blue-border);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-pill.red {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* ── Act buttons (table row) ── */
.act-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-grid;
    place-items: center;
    color: var(--text-secondary);
    transition:
        background 0.2s,
        border-color 0.2s,
        color 0.2s;
    margin-left: 3px;
}
.act-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-md);
    color: var(--text-primary);
}
.act-btn.amber {
    color: var(--amber);
    background: var(--amber-dim);
    border-color: var(--amber-border);
}
.act-btn.green {
    color: var(--green);
    background: var(--green-dim);
    border-color: var(--green-border);
}
.act-btn.danger {
    color: var(--amber);
    background: var(--amber-dim);
    border-color: var(--amber-border);
}
.act-btn.red {
    color: var(--red);
    background: var(--red-dim);
    border-color: var(--red-border);
}
.actions-cell {
    white-space: nowrap;
}

.modal-box.wide {
    max-width: 600px;
}
@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.modal-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--red-dim);
    color: var(--red);
    display: grid;
    place-items: center;
}
.modal-icon-wrap.amber-icon {
    background: var(--amber-dim);
    color: var(--amber);
}
.modal-icon-wrap.green-icon {
    background: var(--green-dim);
    color: var(--green);
}
.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    transition: background 0.2s;
}
.modal-close:hover {
    background: var(--surface-2);
}
.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}
.modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.1rem;
}
.modal-desc strong {
    color: var(--text-primary);
}
.modal-field-wrap {
    margin-bottom: 1rem;
}
.modal-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.modal-field-wrap select,
.modal-field-wrap textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 0.7rem 0.9rem;
    font-family: var(--font);
    font-size: 0.82rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
    appearance: none;
}
.modal-field-wrap select:focus,
.modal-field-wrap textarea:focus {
    border-color: var(--border-hover);
}
.modal-field-wrap textarea::placeholder {
    color: var(--text-muted);
}
.modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.tab-btn.active .tab-badge {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Tabs Content */
.tabs-content {
    position: relative;
}

.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Course Card Enhancements */
.course-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}

.course-card:hover {
    border-color: var(--border-md);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -10px rgba(15, 23, 42, 0.12);
}

.course-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface);
    position: relative;
}

.course-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--text-muted);
}

.course-card-body {
    padding: 1.25rem;
}

.course-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green);
    font-family: var(--mono);
}

.course-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-modules {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Button Styles */
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--surface-2);
    border-color: var(--border-md);
}

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary-sm:hover {
    background: #1e2937;
    transform: translateY(-1px);
}

.btn-success-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-success-sm:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-subtitle {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Section Header */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.sec-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.instructor-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
