/* ============================================================
   Necudah V3 — Design System
   Plus Jakarta Sans · Glassmorphism · Sidebar Layout
   ============================================================ */

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

/* ── Light theme tokens ───────────────────────────────────── */
body.necudah-v3-active {
    --v3-fg:            #1e1b4b;
    --v3-fg-2:          #312e81;
    --v3-muted:         #6b7280;
    --v3-accent:        #6366f1;
    --v3-accent-2:      #a855f7;
    --v3-surface:       #ffffff;
    --v3-glass:         rgba(255,255,255,0.55);
    --v3-glass-strong:  rgba(255,255,255,0.70);
    --v3-border:        rgba(99,102,241,0.14);
    --v3-icon-tint:     rgba(99,102,241,0.10);
    --v3-input-bg:      rgba(255,255,255,0.55);
    --v3-nav-active-bg: rgba(255,255,255,0.85);
    --v3-nav-active-fg: #1e1b4b;
    --v3-bg-grad:       linear-gradient(135deg, #eef2ff 0%, #f5f3ff 35%, #fdf2f8 70%, #fff7ed 100%);
    --v3-blob1:         #c7d2fe;
    --v3-blob2:         #e9d5ff;
    --v3-blob3:         #fbcfe8;
    --v3-shadow-card:   0 1px 0 rgba(255,255,255,0.6) inset,
                        0 12px 32px -16px rgba(99,102,241,0.18),
                        0 4px 14px -8px rgba(99,102,241,0.10);
    --v3-blur:          14px;
    --v3-font:          "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --v3-sidebar-w:     256px;
    --v3-topbar-h:      64px;
    --v3-radius-card:   16px;
    --v3-radius-btn:    11px;
    --v3-radius-icon:   9px;
}

/* ── Dark theme tokens ────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active {
    --v3-fg:            #e8eaed;
    --v3-fg-2:          #bdc1c6;
    --v3-muted:         #9aa0a6;
    --v3-accent:        #a5b4fc;
    --v3-accent-2:      #c7d2fe;
    --v3-surface:       #1e1e20;
    --v3-glass:         rgba(255,255,255,0.05);
    --v3-glass-strong:  rgba(30,30,32,0.94);
    --v3-border:        rgba(165,180,252,0.18);
    --v3-icon-tint:     rgba(165,180,252,0.14);
    --v3-input-bg:      rgba(0,0,0,0.30);
    --v3-nav-active-bg: rgba(99,102,241,0.28);
    --v3-nav-active-fg: #e8eaff;
    --v3-bg-grad:       linear-gradient(160deg, #0d0d0f 0%, #141416 60%, #111113 100%);
    --v3-blob1:         #4f46e5;
    --v3-blob2:         #4338ca;
    --v3-blob3:         #3730a3;
    --v3-shadow-card:   0 1px 0 rgba(255,255,255,0.04) inset,
                        0 16px 36px -16px rgba(0,0,0,0.70);
}

/* ── Base reset for V3 pages ──────────────────────────────── */
body.necudah-v3-active {
    font-family: var(--v3-font);
    font-size: var(--necudah-font-size, 14px);
    color: var(--v3-fg);
    background: var(--v3-bg-grad);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11","ss01";
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

body.necudah-v3-active h1,
body.necudah-v3-active h2,
body.necudah-v3-active h3,
body.necudah-v3-active h4,
body.necudah-v3-active h5,
body.necudah-v3-active h6 {
    font-family: var(--v3-heading-font, var(--v3-font));
}

/* ── Background blobs ─────────────────────────────────────── */
.necudah-v3-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.necudah-v3-bg::before {
    content: none;
}
.necudah-v3-bg::after {
    content: none;
}
.necudah-v3-blob3 {
    display: none;
}

/* ── App shell ────────────────────────────────────────────── */
.necudah-v3-app {
    display: flex;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.necudah-v3-sidebar {
    width: var(--v3-sidebar-w);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 100vh;
    padding: 20px 14px 16px;
    background: var(--v3-glass-strong);
    backdrop-filter: blur(var(--v3-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--v3-blur)) saturate(140%);
    border-inline-end: 1px solid var(--v3-border);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Logo ─────────────────────────────────────────────────── */
.necudah-v3-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 0;
    text-decoration: none;
    flex-shrink: 0;
}
.necudah-v3-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px -6px rgba(99,102,241,0.6),
                inset 0 1px 0 rgba(255,255,255,0.4);
}
.necudah-v3-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    align-items: var(--v3-logo-align-flex, flex-start);
}
.necudah-v3-logo-name {
    font-size: var(--v3-logo-name-size, 17px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--v3-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: var(--v3-logo-align, left);
    width: 100%;
}
.necudah-v3-logo-tagline {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--v3-muted);
    margin-top: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
    width: 100%;
    text-align: var(--v3-tagline-align, left);
}
.necudah-v3-logo-image {
    height: var(--v3-logo-h, 44px);
    width: auto;
    max-width: 100%;
    display: block;
}
.necudah-v3-logo-collapsed-icon {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--v3-accent, #6366f1), var(--v3-accent-2, #a855f7));
    box-shadow: 0 4px 12px -4px rgba(99,102,241,0.5);
}
.necudah-v3-logo-collapsed-icon.has-image {
    background: transparent;
    box-shadow: none;
}
.necudah-v3-logo-collapsed-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.necudah-v3-logo-collapsed-icon span {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    font-family: var(--v3-font);
}
body.necudah-v3-sidebar-collapsed .necudah-v3-logo {
    justify-content: center;
    padding-inline: 0;
    gap: 0;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-logo-collapsed-icon {
    display: flex;
}

/* ── Nav ──────────────────────────────────────────────────── */
.necudah-v3-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── Compact sidebar ──────────────────────────────────────── */
.necudah-v3-sidebar.necudah-v3-compact {
    gap: 10px;
}
.necudah-v3-compact .necudah-v3-nav {
    gap: 6px;
}
.necudah-v3-compact .necudah-v3-nav-group {
    gap: 1px;
}
.necudah-v3-compact .necudah-v3-nav-group-label {
    padding: 3px 10px 2px;
    font-size: 9.5px;
}
.necudah-v3-compact .necudah-v3-nav-item {
    padding: 5px 10px;
}
.necudah-v3-compact .necudah-v3-logo {
    padding-bottom: 0;
}
.necudah-v3-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.necudah-v3-nav-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--v3-muted);
    padding: 6px 10px 4px;
}
.necudah-v3-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 11px;
    border: 0;
    background: transparent;
    color: var(--v3-fg-2);
    cursor: pointer;
    text-align: start;
    font-family: var(--v3-font);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    position: relative;
    box-sizing: border-box;
}
.necudah-v3-nav-item:hover {
    background: var(--v3-glass);
    color: var(--v3-fg);
    text-decoration: none;
}
.necudah-v3-nav-item.active {
    background: var(--v3-nav-active-bg);
    color: var(--v3-nav-active-fg);
    font-weight: 600;
}
.necudah-v3-nav-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--v3-radius-icon);
    background: var(--v3-icon-tint);
    color: var(--v3-accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background 0.18s, box-shadow 0.18s, color 0.18s;
}
.necudah-v3-nav-item.active .necudah-v3-nav-icon {
    background: var(--v3-btn-bg, linear-gradient(135deg, #6366f1, #a855f7));
    color: #fff;
    box-shadow: 0 4px 10px -3px rgba(0,0,0,0.22);
}
.necudah-v3-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-nav-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--v3-accent);
    color: #fff;
    line-height: 1.2;
    flex-shrink: 0;
}
.necudah-v3-nav-item.active .necudah-v3-nav-badge {
    background: rgba(255,255,255,0.85);
    color: var(--v3-accent);
}

/* ── User card ────────────────────────────────────────────── */
.necudah-v3-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 14px;
    background: var(--v3-glass);
    border: 1px solid var(--v3-border);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    flex-shrink: 0;
}
.necudah-v3-user-card:hover {
    background: var(--v3-glass-strong);
    text-decoration: none;
}
.necudah-v3-user-avatar {
    width: var(--v3-avatar-sz, 36px);
    height: var(--v3-avatar-sz, 36px);
    border-radius: 11px;
    flex-shrink: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
    color: #4338ca;
    font-weight: 700;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.necudah-v3-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
}
.necudah-v3-user-info {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.necudah-v3-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--v3-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-user-role {
    font-size: 11px;
    color: var(--v3-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.necudah-v3-online-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #10b981;
    flex-shrink: 0;
}

/* ── Sidebar brand logo (bottom) ─────────────────────────── */
.necudah-v3-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 6px;
    flex-shrink: 0;
}
.necudah-v3-sidebar-brand-full {
    max-height: 32px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    opacity: 0.7;
}
.necudah-v3-sidebar-brand-icon {
    display: none;
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.7;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-brand-full {
    display: none;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-brand-icon {
    display: block;
}

/* ── Sidebar collapse toggle ──────────────────────────────── */
.necudah-v3-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--v3-border);
    border-radius: 11px;
    background: transparent;
    color: var(--v3-muted);
    cursor: pointer;
    font-family: var(--v3-font);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    box-sizing: border-box;
}
.necudah-v3-sidebar-toggle:hover {
    background: var(--v3-glass);
    color: var(--v3-fg);
}
.necudah-v3-sidebar-toggle-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--v3-radius-icon);
    background: var(--v3-icon-tint);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.necudah-v3-sidebar-toggle-icon svg {
    transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
/* RTL: flip chevron direction for collapsed/expanded states */
[dir="rtl"] .necudah-v3-sidebar-toggle-icon svg {
    transform: rotate(180deg);
}
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-toggle-icon svg {
    transform: rotate(180deg);
}
[dir="rtl"] body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-toggle-icon svg {
    transform: rotate(0deg);
}

/* ── Collapsed state ──────────────────────────────────────── */
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar {
    width: 68px;
    padding-inline: 8px;
    align-items: center;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-main {
    margin-inline-start: 68px;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-logo-text,
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-group-label,
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-label,
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-badge,
body.necudah-v3-sidebar-collapsed .necudah-v3-user-info,
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-toggle-label {
    display: none;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-item {
    justify-content: center;
    padding: 9px;
    gap: 0;
    width: 100%;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-user-card {
    justify-content: center;
    padding: 9px;
    gap: 0;
    width: 100%;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar-toggle {
    justify-content: center;
    padding: 9px;
    gap: 0;
}

/* ── Tooltip for collapsed nav items ─────────────────────── */
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-item[data-label] {
    position: relative;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-item[data-label]::after {
    content: attr(data-label);
    position: absolute;
    inset-inline-start: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--v3-fg);
    color: var(--v3-surface);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 200;
}
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-item[data-label]:hover::after {
    opacity: 1;
}

/* ── Main area ────────────────────────────────────────────── */
.necudah-v3-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-inline-start: var(--v3-sidebar-w);
    position: relative;
    z-index: 1;
    transition: margin-inline-start 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Top bar ──────────────────────────────────────────────── */
.necudah-v3-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    height: var(--v3-topbar-h);
    background: var(--v3-glass);
    backdrop-filter: blur(var(--v3-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--v3-blur)) saturate(140%);
    border-bottom: 1px solid var(--v3-border);
    flex-shrink: 0;
}
.necudah-v3-topbar-spacer { flex: 1; }
.necudah-v3-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--v3-radius-btn);
    border: 1px solid var(--v3-border);
    background: var(--v3-glass);
    color: var(--v3-fg-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--v3-font);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
}
.necudah-v3-icon-btn:hover {
    background: var(--v3-glass-strong);
    color: var(--v3-fg);
    text-decoration: none;
}
.necudah-v3-notif-dot {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f43f5e;
    border: 2px solid var(--v3-surface);
}
.necudah-v3-topbar-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: 999px;
    background: var(--v3-glass-strong);
    border: 1px solid var(--v3-border);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    flex-shrink: 0;
}
.necudah-v3-topbar-avatar:hover {
    background: var(--v3-surface);
    text-decoration: none;
}
.necudah-v3-topbar-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
    color: #4338ca;
    font-weight: 700;
    font-size: 11.5px;
    flex-shrink: 0;
}
.necudah-v3-topbar-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}
.necudah-v3-topbar-avatar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--v3-fg);
}

/* ── Avatar dropdown wrapper ─────────────────────────────── */
.necudah-v3-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.necudah-v3-topbar-avatar {
    /* keep existing styles — just make it a button */
    background: var(--v3-glass-strong);
    border: 1px solid var(--v3-border);
}

/* ── Avatar dropdown panel ───────────────────────────────── */
.necudah-v3-avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: 240px;
    background: var(--v3-glass-strong, rgba(255,255,255,0.92));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    border-radius: 14px;
    box-shadow: 0 8px 32px -8px rgba(99,102,241,0.18), 0 2px 8px -2px rgba(0,0,0,0.08);
    z-index: 200;
    overflow: hidden;
    animation: necudah-dd-in 0.15s ease;
}
@keyframes necudah-dd-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dropdown user header */
.necudah-v3-dd-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}
.necudah-v3-dd-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
    color: #4338ca;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.necudah-v3-dd-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.necudah-v3-dd-userinfo {
    min-width: 0;
    flex: 1;
}
.necudah-v3-dd-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--v3-fg, #1e1b4b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-dd-role {
    display: inline-block;
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.necudah-v3-dd-role--master,
.necudah-v3-dd-role--admin   { background: rgba(99,102,241,0.12); color: #4f46e5; }
.necudah-v3-dd-role--teacher { background: rgba(16,185,129,0.12); color: #059669; }
.necudah-v3-dd-role--student { background: rgba(168,85,247,0.12); color: #7c3aed; }
.necudah-v3-dd-role--member  { background: rgba(100,116,139,0.12); color: #475569; }

/* Separator */
.necudah-v3-dd-sep {
    height: 1px;
    background: var(--v3-border, rgba(99,102,241,0.10));
    margin: 4px 0;
}

/* Dropdown items */
.necudah-v3-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--v3-fg-2, #374151);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}
.necudah-v3-dd-item:hover {
    background: var(--v3-glass, rgba(255,255,255,0.55));
    color: var(--v3-fg, #1e1b4b);
    text-decoration: none;
}
.necudah-v3-dd-item svg { flex-shrink: 0; opacity: 0.7; }
.necudah-v3-dd-item--danger       { color: #dc2626; }
.necudah-v3-dd-item--danger:hover { color: #b91c1c; background: rgba(239,68,68,0.06); }

/* Language section */
.necudah-v3-dd-lang-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--v3-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.necudah-v3-dd-lang-label svg { opacity: 0.5; }
.necudah-v3-dd-lang-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 4px;
}
.necudah-v3-dd-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--v3-fg-2, #374151);
    font-family: var(--v3-font);
    transition: background 0.12s;
    width: 100%;
    text-align: start;
}
.necudah-v3-dd-lang-btn:hover  { background: var(--v3-glass, rgba(255,255,255,0.55)); color: var(--v3-fg, #1e1b4b); }
.necudah-v3-dd-lang-btn.active { background: rgba(99,102,241,0.10); color: #4f46e5; font-weight: 700; }
.necudah-v3-dd-lang-flag { font-size: 16px; line-height: 1; }

/* ── Search overlay ───────────────────────────────────────── */
.necudah-v3-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
}
.necudah-v3-search-overlay:not([hidden]) {
    display: flex;
    flex-direction: column;
}
.necudah-v3-search-overlay-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--v3-glass-strong, rgba(255,255,255,0.96));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    box-shadow: 0 4px 24px -8px rgba(99,102,241,0.14);
    color: var(--v3-muted, #6b7280);
    flex-shrink: 0;
    margin-top: var(--v3-topbar-h, 60px);
}
.necudah-v3-search-overlay-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 17px;
    font-family: var(--v3-font);
    color: var(--v3-fg, #1e1b4b);
    padding: 0;
    min-width: 0;
}
.necudah-v3-search-overlay-input::placeholder { color: var(--v3-muted, #9ca3af); }
.necudah-v3-search-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--v3-muted, #6b7280);
    flex-shrink: 0;
    transition: background 0.12s;
}
.necudah-v3-search-close:hover { background: var(--v3-glass, rgba(255,255,255,0.55)); color: var(--v3-fg, #1e1b4b); }
.necudah-v3-search-backdrop {
    flex: 1;
    background: rgba(15,23,42,0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ── Page content area ────────────────────────────────────── */
.necudah-v3-content {
    flex: 1;
    padding: 28px 32px 48px;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Card overrides for V3 ────────────────────────────────── */
body.necudah-v3-active .necudah-card,
body.necudah-v3-active .necudah-home__card,
body.necudah-v3-active .necudah-group-card,
body.necudah-v3-active .necudah-event-card,
body.necudah-v3-active .necudah-post-card {
    background: var(--v3-glass) !important;
    border: 1px solid var(--v3-border) !important;
    border-radius: var(--v3-radius-card) !important;
    backdrop-filter: blur(var(--v3-blur)) saturate(150%) !important;
    -webkit-backdrop-filter: blur(var(--v3-blur)) saturate(150%) !important;
    box-shadow: var(--v3-shadow-card) !important;
}

/* ── Theme: hide default theme header/footer in V3 ────────── */
body.necudah-v3-active .site-header,
body.necudah-v3-active .site-footer,
body.necudah-v3-active #masthead,
body.necudah-v3-active #colophon,
body.necudah-v3-active .necudah-bottom-bar,
body.necudah-v3-active .necudah-frontend-header,
body.necudah-v3-active .necudah-header {
    display: none !important;
}

/* ── Theme + plugin: remove ALL width constraints in V3 ─────── */
body.necudah-v3-active .site-main {
    padding: 0 !important;
    min-height: 0 !important;
}
body.necudah-v3-active .container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.necudah-v3-active .entry-content {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
body.necudah-v3-active .site-main > .container > article {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* teacher-dashboard.css and frontend-v2.css both cap the wrapper — override */
body.necudah-v3-active .necudah-dashboard-wrapper {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Topbar panel wrap (positions preview below icon btn) ─── */
.necudah-v3-topbar-panel-wrap {
    position: relative;
    flex-shrink: 0;
}

/* ── Preview panel ────────────────────────────────────────── */
.necudah-v3-preview-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
}
.necudah-v3-preview-panel {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 460px;
    overflow: hidden;
    z-index: 200;
    background: var(--v3-glass-strong);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--v3-shadow-card), 0 20px 48px -16px rgba(99,102,241,0.18);
}

/* ── Panel header ─────────────────────────────────────────── */
.necudah-v3-preview-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--v3-border);
    flex-shrink: 0;
}
.necudah-v3-preview-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--v3-fg);
    flex: 1;
}
.necudah-v3-preview-mark-all {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--v3-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--v3-font);
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.necudah-v3-preview-mark-all:hover {
    background: var(--v3-glass);
    color: var(--v3-fg);
}
.necudah-v3-preview-see-all {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--v3-accent);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    transition: background 0.12s;
    white-space: nowrap;
}
.necudah-v3-preview-see-all:hover {
    background: var(--v3-icon-tint);
    text-decoration: none;
}

/* ── Preview list (scrollable) ────────────────────────────── */
.necudah-v3-preview-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ── Preview item ─────────────────────────────────────────── */
.necudah-v3-preview-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--v3-border);
    text-decoration: none;
    color: var(--v3-fg);
    transition: background 0.12s;
}
.necudah-v3-preview-item:last-child { border-bottom: none; }
.necudah-v3-preview-item:hover {
    background: var(--v3-glass);
    text-decoration: none;
}
.necudah-v3-preview-item.unread { background: rgba(99,102,241,0.04); }
.necudah-v3-preview-item.unread:hover { background: rgba(99,102,241,0.08); }

/* ── Avatar area ──────────────────────────────────────────── */
.necudah-v3-preview-av {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.necudah-v3-preview-av img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.necudah-v3-preview-av-initials,
.necudah-v3-preview-type-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
    color: #4338ca;
    font-weight: 700;
    font-size: 14px;
}
.necudah-v3-preview-type-icon { background: var(--v3-icon-tint); }
.necudah-v3-preview-type-icon.ntype-group   { background: rgba(59,130,246,0.12); }
.necudah-v3-preview-type-icon.ntype-event   { background: rgba(249,115,22,0.12); }
.necudah-v3-preview-type-icon.ntype-grade   { background: rgba(16,185,129,0.12); }
.necudah-v3-preview-type-icon.ntype-badge   { background: rgba(168,85,247,0.12); }
.necudah-v3-preview-badge {
    position: absolute;
    bottom: 0;
    inset-inline-end: 0;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #f43f5e;
    border: 2px solid var(--v3-glass-strong, #fff);
}

/* ── Item body ────────────────────────────────────────────── */
.necudah-v3-preview-body {
    flex: 1;
    min-width: 0;
}
.necudah-v3-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--v3-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.necudah-v3-preview-text {
    font-size: 12px;
    color: var(--v3-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}
.necudah-v3-preview-item.unread .necudah-v3-preview-text { color: var(--v3-fg-2); }
.necudah-v3-preview-time {
    font-size: 11px;
    color: var(--v3-muted);
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 2px;
    align-self: flex-start;
}

/* ── Loading state ────────────────────────────────────────── */
.necudah-v3-preview-loading {
    display: flex;
    justify-content: center;
    padding: 28px;
}
.necudah-v3-preview-spinner {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--v3-border);
    border-top-color: var(--v3-accent);
    border-radius: 50%;
    animation: necudah-v3-spin 0.7s linear infinite;
}
@keyframes necudah-v3-spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────── */
.necudah-v3-preview-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--v3-muted);
    font-size: 13px;
}

/* ── Mobile: full-width panel below topbar ────────────────── */
@media (max-width: 768px) {
    .necudah-v3-preview-panel {
        position: fixed;
        top: var(--v3-topbar-h, 64px);
        inset-inline-start: 0;
        inset-inline-end: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 16px 16px;
        max-height: 60vh;
    }
}

/* ── Hamburger (hidden on desktop) ───────────────────────── */
.necudah-v3-hamburger { display: none; }

/* ── Sidebar overlay (hidden on desktop) ─────────────────── */
.necudah-v3-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.necudah-v3-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile (≤768px) ──────────────────────────────────────── */
@media (max-width: 768px) {
    .necudah-v3-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    [dir="rtl"] .necudah-v3-sidebar {
        transform: translateX(100%);
    }
    .necudah-v3-sidebar.open {
        transform: translateX(0);
    }
    .necudah-v3-main {
        margin-inline-start: 0 !important;
        transition: none;
    }
    .necudah-v3-topbar {
        padding: 0 16px;
        gap: 8px;
    }
    .necudah-v3-content {
        padding: 16px 16px 80px;
    }
    .necudah-v3-hamburger {
        display: inline-flex;
    }
    .necudah-v3-overlay {
        display: block;
    }
    .necudah-v3-topbar-avatar-name {
        display: none;
    }
    .necudah-v3-sidebar-toggle {
        display: none;
    }
    /* Disable width transition on mobile — only transform matters */
    body.necudah-v3-sidebar-collapsed .necudah-v3-sidebar {
        width: var(--v3-sidebar-w);
        padding-inline: 14px;
        align-items: stretch;
    }
}

/* ── Tablet (769px – 1024px) ──────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .necudah-v3-content {
        padding: 20px 20px 48px;
    }
}

/* ── Instructor Dashboard: Hero Header ────────────────────── */
.necudah-v3-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    background: var(--v3-glass-strong, rgba(255,255,255,0.72));
    backdrop-filter: blur(var(--v3-blur, 14px));
    -webkit-backdrop-filter: blur(var(--v3-blur, 14px));
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    border-radius: var(--v3-radius-card, 16px);
    box-shadow: var(--v3-shadow-card);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.necudah-v3-hero-left {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
    min-width: 0;
}
.necudah-v3-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(79,70,229,0.38);
}
.necudah-v3-hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.necudah-v3-hero-icon .dashicons {
    color: #fff;
    font-size: 26px;
    width: 26px;
    height: 26px;
}
.necudah-v3-hero-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.necudah-v3-hero-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--v3-accent, #6366f1);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    line-height: 1;
}
.necudah-v3-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1.1;
    margin: 2px 0 0;
    letter-spacing: -0.025em;
    font-family: var(--v3-font);
}
.necudah-v3-hero-sub {
    font-size: 0.875rem;
    color: var(--v3-muted, #6b7280);
    margin: 6px 0 0;
    line-height: 1.55;
    max-width: 520px;
}
.necudah-v3-hero-sub strong {
    color: var(--v3-fg, #1e1b4b);
    font-weight: 700;
}
.necudah-v3-hero-next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 6px;
}
.necudah-v3-hero-next .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--v3-accent, #6366f1);
}
.necudah-v3-hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Instructor Dashboard: Stats Row ─────────────────────── */
.necudah-v3-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.necudah-v3-stat-card {
    background: var(--v3-glass, rgba(255,255,255,0.55));
    backdrop-filter: blur(var(--v3-blur, 14px));
    -webkit-backdrop-filter: blur(var(--v3-blur, 14px));
    border: 1px solid rgba(99,102,241,0.16);
    border-radius: var(--v3-radius-card, 16px);
    box-shadow: 0 8px 24px -12px rgba(99,102,241,0.16),
                0 2px 8px -4px rgba(0,0,0,0.06);
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.necudah-v3-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -16px rgba(99,102,241,0.22),
                0 4px 12px -6px rgba(0,0,0,0.08);
}
.necudah-v3-stat-card--alert {
    border-color: rgba(239,68,68,0.28);
}
.necudah-v3-stat-card--alert .necudah-v3-stat-value {
    color: #dc2626;
}
.necudah-v3-stat-top {
    margin-bottom: 12px;
}
.necudah-v3-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--v3-radius-icon, 9px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.necudah-v3-stat-icon .dashicons {
    font-size: 19px;
    width: 19px;
    height: 19px;
}
.necudah-v3-stat-icon--students  { background: rgba(99,102,241,0.12); color: #6366f1; }
.necudah-v3-stat-icon--courses   { background: rgba(168,85,247,0.12); color: #a855f7; }
.necudah-v3-stat-icon--reviews   { background: rgba(239,68,68,0.10);  color: #ef4444; }
.necudah-v3-stat-icon--quizzes   { background: rgba(245,158,11,0.12); color: #f59e0b; }
.necudah-v3-stat-icon--completion{ background: rgba(16,185,129,0.12); color: #10b981; }
.necudah-v3-stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--v3-muted, #6b7280);
    line-height: 1.2;
    margin-bottom: 4px;
}
.necudah-v3-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.necudah-v3-stat-sub {
    font-size: 0.72rem;
    color: var(--v3-muted, #6b7280);
    line-height: 1.3;
}
.necudah-v3-stat-action {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--v3-accent, #6366f1);
    text-decoration: none;
    margin-top: 10px;
}
.necudah-v3-stat-action:hover { text-decoration: underline; }

/* ── Stats Row + Hero — responsive ───────────────────────── */
@media (max-width: 1024px) {
    .necudah-v3-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 640px) {
    .necudah-v3-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .necudah-v3-hero-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    .necudah-v3-hero-title {
        font-size: 1.6rem;
    }
    .necudah-v3-hero-actions {
        width: 100%;
    }
    .necudah-v3-hero-actions .necudah-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ── Small phone (≤480px) ─────────────────────────────────── */
@media (max-width: 480px) {
    /* Content area — tighter padding */
    .necudah-v3-content {
        padding: 12px 10px 80px;
    }

    /* Topbar — compact */
    .necudah-v3-topbar {
        padding: 0 10px;
        gap: 6px;
    }

    /* Hamburger — easier to tap */
    .necudah-v3-hamburger {
        min-width: 44px;
        min-height: 44px;
    }

    /* Stats — single column */
    .necudah-v3-stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Hero header — tighter */
    .necudah-v3-hero-header {
        padding: 16px;
        gap: 12px;
    }

    .necudah-v3-hero-icon,
    .necudah-v3-hero-avatar {
        width: 44px;
        height: 44px;
    }

    .necudah-v3-hero-title {
        font-size: 1.35rem;
    }

    .necudah-v3-hero-sub {
        font-size: 0.8rem;
    }

    /* Action buttons — full-width, touch-friendly */
    .necudah-v3-hero-actions .necudah-btn {
        min-height: 44px;
    }

    /* Two-col gap */
    .necudah-dashboard-two-col {
        gap: 12px;
    }
}

/* ── Two-column layout ────────────────────────────────────── */
.necudah-dashboard-two-col {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.necudah-dashboard-main {
    flex: 1;
    min-width: 0;
}
.necudah-dashboard-aside {
    width: 288px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--v3-topbar-h, 64px) + 20px);
    max-height: calc(100vh - var(--v3-topbar-h, 64px) - 48px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--v3-border, rgba(99,102,241,0.14)) transparent;
}
.necudah-dashboard-aside::-webkit-scrollbar {
    width: 4px;
}
.necudah-dashboard-aside::-webkit-scrollbar-track {
    background: transparent;
}
.necudah-dashboard-aside::-webkit-scrollbar-thumb {
    background: var(--v3-border, rgba(99,102,241,0.18));
    border-radius: 4px;
}

/* ── Aside panel (glass card) ─────────────────────────────── */
.necudah-aside-panel {
    background: var(--v3-glass, rgba(255,255,255,0.55));
    backdrop-filter: blur(var(--v3-blur, 14px));
    -webkit-backdrop-filter: blur(var(--v3-blur, 14px));
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    border-radius: var(--v3-radius-card, 16px);
    box-shadow: var(--v3-shadow-card);
    padding: 16px;
}
.necudah-aside-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.necudah-aside-panel-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--v3-radius-icon, 9px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.necudah-aside-panel-icon .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}
.necudah-aside-panel-icon--tasks  { background: rgba(99,102,241,0.12);  color: #6366f1; }
.necudah-aside-panel-icon--chart  { background: rgba(16,185,129,0.12);  color: #10b981; }
.necudah-aside-panel-icon--events { background: rgba(168,85,247,0.12);  color: #a855f7; }
.necudah-aside-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1.2;
}
.necudah-aside-panel-sub {
    font-size: 0.72rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 1px;
}
.necudah-aside-view-all {
    margin-inline-start: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--v3-accent, #6366f1);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.necudah-aside-view-all:hover { text-decoration: underline; }

/* ── Task list ────────────────────────────────────────────── */
.necudah-aside-task-list {
    display: flex;
    flex-direction: column;
}
.necudah-aside-task-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.09));
}
.necudah-aside-task-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.necudah-aside-task-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.necudah-aside-task-icon .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}
.necudah-aside-task-icon--essay { background: rgba(239,68,68,0.10);  color: #ef4444; }
.necudah-aside-task-icon--draft { background: rgba(245,158,11,0.10); color: #f59e0b; }
.necudah-aside-task-body {
    flex: 1;
    min-width: 0;
}
.necudah-aside-task-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-aside-task-sub {
    font-size: 0.68rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 1px;
}
.necudah-aside-task-action {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--v3-accent, #6366f1);
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
.necudah-aside-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--v3-muted, #6b7280);
    padding: 4px 0;
}
.necudah-aside-empty .dashicons { color: #10b981; font-size: 16px; width: 16px; height: 16px; }

/* ── Activity bar chart ───────────────────────────────────── */
.necudah-aside-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 72px;
}
.necudah-aside-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}
.necudah-aside-chart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}
.necudah-aside-chart-bar {
    width: 100%;
    background: rgba(99,102,241,0.20);
    border-radius: 4px 4px 0 0;
    transition: background 0.2s;
}
.necudah-aside-chart-bar--today {
    background: var(--v3-accent, #6366f1);
}
.necudah-aside-chart-label {
    font-size: 0.6rem;
    color: var(--v3-muted, #6b7280);
    text-align: center;
    line-height: 1;
}

/* ── Upcoming events ──────────────────────────────────────── */
.necudah-aside-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.necudah-aside-event-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}
.necudah-aside-event-date {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--v3-icon-tint, rgba(99,102,241,0.10));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1.1;
}
.necudah-aside-event-date--today {
    background: var(--v3-accent, #6366f1);
}
.necudah-aside-event-day {
    font-size: 1rem;
    font-weight: 800;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1;
}
.necudah-aside-event-date--today .necudah-aside-event-day,
.necudah-aside-event-date--today .necudah-aside-event-month {
    color: #fff;
}
.necudah-aside-event-month {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--v3-muted, #6b7280);
}
.necudah-aside-event-body { flex: 1; min-width: 0; }
.necudah-aside-event-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-aside-event-meta {
    font-size: 0.68rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 2px;
}

/* ── Course card: gradient thumbnail ─────────────────────── */
.necudah-card-thumb-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}
.necudah-card-thumb-gradient .dashicons {
    font-size: 44px;
    width: 44px;
    height: 44px;
    color: rgba(255,255,255,0.65);
}

/* ── Two-col responsive ───────────────────────────────────── */
@media (max-width: 1200px) {
    .necudah-dashboard-two-col { gap: 18px; }
    .necudah-dashboard-aside   { width: 256px; }
}
@media (max-width: 960px) {
    .necudah-dashboard-two-col {
        flex-direction: column;
    }
    .necudah-dashboard-aside {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .necudah-aside-panel {
        flex: 1 1 240px;
    }
}

/* On phones, aside panels go full-width */
@media (max-width: 640px) {
    .necudah-aside-panel {
        flex: 1 1 100%;
    }
}

/* ── Recent Submissions section ───────────────────────────── */
.necudah-v3-submissions {
    margin-top: 28px;
    background: var(--v3-glass, rgba(255,255,255,0.55));
    backdrop-filter: blur(var(--v3-blur, 14px));
    -webkit-backdrop-filter: blur(var(--v3-blur, 14px));
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    border-radius: var(--v3-radius-card, 16px);
    box-shadow: var(--v3-shadow-card);
    overflow: hidden;
}
.necudah-v3-submissions-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.10));
}
.necudah-v3-submissions-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--v3-radius-icon, 9px);
    background: rgba(99,102,241,0.12);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.necudah-v3-submissions-icon .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}
.necudah-v3-submissions-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--v3-fg, #1e1b4b);
}
.necudah-v3-submissions-sub {
    font-size: 0.75rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 1px;
}
.necudah-v3-submissions-all {
    margin-inline-start: auto;
}
.necudah-v3-submissions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.necudah-v3-submissions-table thead th {
    padding: 9px 20px;
    text-align: start;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--v3-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.10));
    white-space: nowrap;
}
.necudah-v3-sub-row td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.08));
    vertical-align: middle;
    color: var(--v3-fg, #1e1b4b);
}
.necudah-v3-sub-row:last-child td {
    border-bottom: none;
}
.necudah-v3-sub-row:hover td {
    background: rgba(99,102,241,0.03);
}
.necudah-v3-sub-student {
    display: flex !important;
    align-items: center;
    gap: 10px;
}
.necudah-v3-sub-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--v3-accent, #6366f1) 0%, var(--v3-accent-2, #a855f7) 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.necudah-v3-sub-name {
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    white-space: nowrap;
}
.necudah-v3-sub-course {
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
}
.necudah-v3-sub-quiz {
    font-size: 0.72rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 1px;
}
.necudah-v3-sub-time {
    color: var(--v3-muted, #6b7280);
    white-space: nowrap;
}
.necudah-v3-sub-action {
    text-align: end;
}
.necudah-v3-sub-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--v3-accent, #6366f1);
    text-decoration: none;
    white-space: nowrap;
}
.necudah-v3-sub-btn--open {
    color: var(--v3-muted, #6b7280);
}
.necudah-v3-sub-btn:hover { text-decoration: underline; }

/* Status badges */
.necudah-v3-sub-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.necudah-v3-sub-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.necudah-v3-sub-status--pending  { background: rgba(245,158,11,0.12); color: #d97706; }
.necudah-v3-sub-status--graded   { background: rgba(16,185,129,0.12); color: #059669; }
.necudah-v3-sub-status--approved { background: rgba(16,185,129,0.12); color: #059669; }
.necudah-v3-sub-status--rejected { background: rgba(239,68,68,0.10);  color: #dc2626; }

/* Mobile: hide columns on small screens */
@media (max-width: 640px) {
    .necudah-v3-submissions-table thead th:nth-child(3),
    .necudah-v3-sub-row td:nth-child(3) {
        display: none;
    }
    .necudah-v3-sub-row td {
        padding: 10px 14px;
    }
    .necudah-v3-submissions-header {
        flex-wrap: wrap;
        padding: 14px;
    }
}

/* ================================================================
   Dark mode — component-level overrides
   ================================================================ */

/* ── Sidebar ──────────────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-sidebar {
    background: linear-gradient(
        180deg,
        rgba(22,22,24,0.94) 0%,
        rgba(16,16,18,0.97) 100%
    );
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-inline-end-color: rgba(165,180,252,0.18);
    box-shadow: 1px 0 0 rgba(255,255,255,0.04) inset,
                4px 0 24px -4px rgba(0,0,0,0.50);
}

/* ── Sidebar nav items ────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: #f1f5f9;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-nav-item.active {
    background: rgba(99,102,241,0.28);
    color: #f5f3ff;
    box-shadow: inset 0 0 0 1px rgba(165,180,252,0.18);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-nav-icon {
    background: rgba(255,255,255,0.10);
    color: #c7d2fe;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-nav-item.active .necudah-v3-nav-icon {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(99,102,241,0.55);
}

/* ── Sidebar nav group labels ─────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-nav-group-label {
    color: #b0b4b8;
}

/* ── Sidebar user card ────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-user-card {
    background: rgba(28,28,30,0.70);
    border-color: rgba(165,180,252,0.18);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-user-card:hover {
    background: rgba(36,36,40,0.80);
}

/* ── Sidebar collapse toggle ──────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-sidebar-toggle {
    color: #94a3b8;
    border-top-color: rgba(165,180,252,0.16);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-sidebar-toggle:hover {
    background: rgba(165,180,252,0.10);
    color: #a5b4fc;
}

/* ── Topbar ───────────────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-topbar {
    background: rgba(16,16,18,0.90);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom-color: rgba(165,180,252,0.16);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04),
                0 4px 16px -4px rgba(0,0,0,0.50);
}

/* ── Topbar icon buttons ──────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-icon-btn {
    background: rgba(165,180,252,0.10);
    border-color: rgba(165,180,252,0.22);
    color: #cbd5e1;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-icon-btn:hover {
    background: rgba(165,180,252,0.20);
    border-color: rgba(165,180,252,0.35);
    color: #f1f5f9;
}

/* ── Topbar avatar button ─────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-topbar-avatar {
    background: rgba(165,180,252,0.10);
    border-color: rgba(165,180,252,0.22);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-topbar-avatar:hover {
    background: rgba(165,180,252,0.18);
    border-color: rgba(165,180,252,0.35);
}

/* ── Avatar dropdown ──────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-avatar-dropdown {
    background: rgba(22,22,24,0.97);
    border-color: rgba(165,180,252,0.18);
    box-shadow: 0 12px 40px -8px rgba(0,0,0,0.70),
                0 2px 8px -2px rgba(0,0,0,0.30),
                inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-header {
    border-bottom-color: rgba(165,180,252,0.16);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-item {
    color: #cbd5e1;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-item:hover {
    background: rgba(165,180,252,0.12);
    color: #f1f5f9;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-sep {
    background: rgba(165,180,252,0.14);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-item--danger {
    color: #f87171;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-dd-item--danger:hover {
    background: rgba(248,113,113,0.12);
    color: #fca5a5;
}

/* ── Preview panels (messages / bell) ────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-panel {
    background: rgba(20,16,62,0.95);
    border-color: rgba(165,180,252,0.22);
    box-shadow: 0 12px 40px -8px rgba(0,0,0,0.60),
                0 2px 8px -2px rgba(0,0,0,0.30),
                inset 0 1px 0 rgba(165,180,252,0.08);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-head {
    border-bottom-color: rgba(165,180,252,0.16);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-head h4 {
    color: #e2e8f0;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-item {
    border-bottom-color: rgba(165,180,252,0.10);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-item:hover {
    background: rgba(165,180,252,0.10);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-item.unread {
    background: rgba(99,102,241,0.14);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-item.unread:hover {
    background: rgba(99,102,241,0.22);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-name {
    color: #e2e8f0;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-text {
    color: #94a3b8;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-time {
    color: #64748b;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-see-all {
    color: #a5b4fc;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-see-all:hover {
    color: #c7d2fe;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-empty {
    color: #64748b;
}

/* ── Notif dot — visible border on dark bg ────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-notif-dot {
    border-color: rgba(18,15,58,0.90);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-preview-badge {
    border-color: rgba(20,16,62,0.95);
}

/* ── Search overlay ───────────────────────────────────────────── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-search-overlay {
    background: rgba(8,6,28,0.85);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-search-overlay-box {
    background: rgba(30,24,80,0.92);
    border-color: rgba(165,180,252,0.28);
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.70),
                inset 0 1px 0 rgba(165,180,252,0.10);
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-search-overlay-input {
    color: #f1f5f9;
    background: transparent;
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-search-overlay-input::placeholder {
    color: #64748b;
}

/* ── Site Settings panel: role badges ────────────────────── */
.necudah-ss-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.necudah-ss-role-badge--master,
.necudah-ss-role-badge--admin   { background: rgba(99,102,241,0.12); color: #4f46e5; }
.necudah-ss-role-badge--teacher { background: rgba(16,185,129,0.12); color: #059669; }
.necudah-ss-role-badge--student { background: rgba(168,85,247,0.12); color: #7c3aed; }
.necudah-ss-role-badge--member  { background: rgba(100,116,139,0.12); color: #475569; }

[data-theme="dark"] body.necudah-v3-active .necudah-ss-role-badge--master,
[data-theme="dark"] body.necudah-v3-active .necudah-ss-role-badge--admin   { background: rgba(165,180,252,0.18); color: #a5b4fc; }
[data-theme="dark"] body.necudah-v3-active .necudah-ss-role-badge--teacher { background: rgba(52,211,153,0.18);  color: #6ee7b7; }
[data-theme="dark"] body.necudah-v3-active .necudah-ss-role-badge--student { background: rgba(216,180,254,0.18); color: #d8b4fe; }
[data-theme="dark"] body.necudah-v3-active .necudah-ss-role-badge--member  { background: rgba(148,163,184,0.18); color: #94a3b8; }

/* ── Stat cards: dark-mode depth shadow (no white inset) ───── */
[data-theme="dark"] body.necudah-v3-active .necudah-v3-stat-card {
    box-shadow: var(--v3-shadow-card);
    border-color: var(--v3-border, rgba(165,180,252,0.22));
}
[data-theme="dark"] body.necudah-v3-active .necudah-v3-stat-card:hover {
    box-shadow: var(--v3-shadow-card),
                0 16px 40px -16px rgba(99,102,241,0.3);
}

/* ── Home pages: remove max-width so they fill V3 content area */
body.necudah-v3-active .necudah-home {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Site Settings panel: font preview block in V3 ──────── */
body.necudah-v3-active #font-preview {
    background: var(--v3-glass);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-card);
}

/* ── WordPress admin bar: push sidebar + topbar down ─────── */
body.admin-bar .necudah-v3-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}
body.admin-bar .necudah-v3-topbar {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .necudah-v3-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
    body.admin-bar .necudah-v3-topbar {
        top: 46px;
    }
}

/* ── LMS quiz timer position in V3 layout ────────────────── */
body.necudah-v3-active .lms-timer-sticky {
    top: calc(var(--v3-topbar-h, 64px) + 12px);
}
body.admin-bar.necudah-v3-active .lms-timer-sticky {
    top: calc(var(--v3-topbar-h, 64px) + 32px + 12px);
}

/* ── LMS course curriculum in V3 sidebar ─────────────────── */

.necudah-lms-course-nav {
    gap: 4px;
}

.necudah-lms-course-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 11px;
    border: 1px solid var(--v3-border);
    background: var(--v3-glass);
    color: var(--v3-fg-2);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 6px;
    flex-shrink: 0;
    min-width: 0;
}
.necudah-lms-course-back:hover {
    color: var(--v3-fg);
    background: var(--v3-glass-strong);
    text-decoration: none;
}
.necudah-lms-course-back-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--v3-icon-tint);
    color: var(--v3-accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.necudah-lms-course-back-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.necudah-lms-course-progress {
    padding: 0 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.necudah-lms-course-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--v3-muted);
    margin-bottom: 5px;
}
.necudah-lms-course-progress-track {
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
}
[data-theme="dark"] .necudah-lms-course-progress-track {
    background: rgba(255,255,255,0.1);
}
.necudah-lms-course-progress-fill {
    height: 100%;
    background: var(--v3-accent, #6366f1);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.necudah-lms-curriculum {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
    overflow-x: hidden;
}

.necudah-lms-section-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--v3-muted);
    padding: 10px 10px 4px;
    flex-shrink: 0;
}

.necudah-lms-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--v3-fg-2);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    min-width: 0;
}
.necudah-lms-nav-item:hover {
    background: var(--v3-glass);
    color: var(--v3-fg);
    text-decoration: none;
}
.necudah-lms-nav-item.current {
    background: var(--v3-nav-active-bg);
    color: var(--v3-nav-active-fg);
    font-weight: 600;
}
.necudah-lms-nav-item.lms-locked {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.necudah-lms-nav-num {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--v3-icon-tint);
    color: var(--v3-accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}
.necudah-lms-nav-item.current .necudah-lms-nav-num {
    background: linear-gradient(135deg, var(--v3-accent, #6366f1), var(--v3-accent-2, #a855f7));
    color: #fff;
    box-shadow: 0 3px 8px -3px rgba(99,102,241,0.55);
}
.necudah-lms-nav-item.completed .necudah-lms-nav-num {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

.necudah-lms-nav-title {
    flex: 1;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Topic & quiz items — indented */
.necudah-lms-nav-item.is-topic,
.necudah-lms-nav-item.is-quiz {
    padding-inline-start: 22px;
    font-size: 12px;
    border-radius: 9px;
}
.necudah-lms-nav-item.is-topic .necudah-lms-nav-num,
.necudah-lms-nav-item.is-quiz  .necudah-lms-nav-num {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 9px;
}

/* Collapsed sidebar — keep only the back arrow */
body.necudah-v3-sidebar-collapsed .necudah-lms-course-progress,
body.necudah-v3-sidebar-collapsed .necudah-lms-curriculum,
body.necudah-v3-sidebar-collapsed .necudah-v3-nav-group-label,
body.necudah-v3-sidebar-collapsed .necudah-lms-course-back-text {
    display: none;
}
body.necudah-v3-sidebar-collapsed .necudah-lms-course-back {
    justify-content: center;
    padding: 9px 0;
    border: 0;
    background: transparent;
    margin-bottom: 0;
}
body.necudah-v3-sidebar-collapsed .necudah-lms-course-back:hover {
    background: var(--v3-glass);
}
body.necudah-v3-sidebar-collapsed .necudah-lms-course-back-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

/* ── Hide the inner lesson panel sidebar when V3 is active ── */
body.necudah-v3-active .lms-lesson-sidebar {
    display: none !important;
}
body.necudah-v3-active .lms-lesson-layout .lms-lesson-content {
    max-width: 860px;
    margin-inline: auto;
}
/* Hide the mobile drawer toggle — curriculum is in the V3 sidebar */
body.necudah-v3-active .necudah-sidebar-toggle,
body.necudah-v3-active .necudah-drawer-backdrop {
    display: none !important;
}
