/* ============================================================
   Necudah V3 — Home Pages (student / teacher / master)
   ============================================================ */

/* ── Home wrapper ─────────────────────────────────────────── */
body.necudah-v3-active .necudah-v3-home {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Home pages show 4 stats — override the default 5-column dashboard grid */
.necudah-v3-home .necudah-v3-stats-row {
    grid-template-columns: repeat(4, 1fr);
}

/* ── Glass panel ──────────────────────────────────────────── */
.necudah-v3-glass-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);
    overflow: hidden;
}
.necudah-v3-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.10));
}
.necudah-v3-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--v3-fg, #1e1b4b);
}
.necudah-v3-panel-title .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--v3-accent, #6366f1);
}
.necudah-v3-panel-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--v3-accent, #6366f1);
    text-decoration: none;
    white-space: nowrap;
}
.necudah-v3-panel-link:hover { text-decoration: underline; }

/* ── Stat icon variants for home ─────────────────────────── */
.necudah-v3-stat-icon--enrolled  { background: rgba(99,102,241,0.12);  color: #6366f1; }
.necudah-v3-stat-icon--progress  { background: rgba(245,158,11,0.12);  color: #f59e0b; }
.necudah-v3-stat-icon--completed { background: rgba(16,185,129,0.12);  color: #10b981; }
.necudah-v3-stat-icon--events    { background: rgba(168,85,247,0.12);  color: #a855f7; }
.necudah-v3-stat-icon--users     { background: rgba(99,102,241,0.12);  color: #6366f1; }
.necudah-v3-stat-icon--published { background: rgba(16,185,129,0.12);  color: #10b981; }
.necudah-v3-stat-icon--new       { background: rgba(245,158,11,0.12);  color: #f59e0b; }

/* ── Continue learning banner (student) ───────────────────── */
.necudah-v3-continue-card {
    background: linear-gradient(135deg, var(--v3-accent, #6366f1) 0%, var(--v3-accent-2, #a855f7) 100%);
    border-radius: var(--v3-radius-card, 16px);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px -8px rgba(99,102,241,0.40);
}
.necudah-v3-continue-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.necudah-v3-continue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.necudah-v3-continue-thumb .dashicons { color: rgba(255,255,255,0.8); font-size: 28px; width: 28px; height: 28px; }
.necudah-v3-continue-info { flex: 1; min-width: 0; }
.necudah-v3-continue-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.necudah-v3-continue-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-continue-next {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-continue-prog {
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.necudah-v3-continue-prog-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
}
.necudah-v3-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 9px;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.necudah-v3-continue-btn .dashicons { font-size: 14px; width: 14px; height: 14px; }
.necudah-v3-continue-btn:hover { opacity: 0.9; }

/* ── Course progress list (student) ───────────────────────── */
.necudah-v3-course-list {
    display: flex;
    flex-direction: column;
}
.necudah-v3-course-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.08));
    transition: background 0.15s;
}
.necudah-v3-course-row:last-child { border-bottom: none; }
.necudah-v3-course-row:hover { background: rgba(99,102,241,0.04); }

/* ── Student list (Private Teacher home) ─────────────────── */
.necudah-v3-student-list { padding: 4px 0; }
.necudah-v3-student-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.08));
    transition: background 0.15s;
}
.necudah-v3-student-row:last-child { border-bottom: none; }
.necudah-v3-student-row:hover { background: rgba(99,102,241,0.04); }
.necudah-v3-student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.necudah-v3-student-info { flex: 1; min-width: 0; }
.necudah-v3-student-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.necudah-v3-student-meta {
    font-size: 0.75rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 1px;
}
.necudah-v3-student-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99,102,241,0.08);
    color: var(--v3-accent, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
}
.necudah-v3-student-action:hover { background: rgba(99,102,241,0.16); }
.necudah-v3-course-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}
.necudah-v3-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.necudah-v3-course-info { flex: 1; min-width: 0; }
.necudah-v3-course-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
}
.necudah-v3-course-title:hover { color: var(--v3-accent, #6366f1); }
.necudah-v3-course-prog-bar {
    height: 4px;
    background: var(--v3-border, rgba(99,102,241,0.14));
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}
.necudah-v3-course-prog-fill {
    height: 100%;
    background: var(--v3-accent, #6366f1);
    border-radius: 4px;
}
.necudah-v3-course-meta {
    font-size: 0.7rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 3px;
}
.necudah-v3-course-pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--v3-accent, #6366f1);
    flex-shrink: 0;
}
.necudah-v3-course-pct--done { color: #10b981; }

/* ── Teacher course list ──────────────────────────────────── */
.necudah-v3-teacher-course-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.08));
    transition: background 0.15s;
}
.necudah-v3-teacher-course-row:last-child { border-bottom: none; }
.necudah-v3-teacher-course-row:hover { background: rgba(99,102,241,0.04); }
.necudah-v3-teacher-course-info { flex: 1; min-width: 0; }
.necudah-v3-teacher-course-info a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.necudah-v3-teacher-course-info a:hover { color: var(--v3-accent, #6366f1); }
.necudah-v3-teacher-course-meta {
    font-size: 0.7rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 2px;
}
.necudah-v3-status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.necudah-v3-status-badge--published { background: rgba(16,185,129,0.12);  color: #10b981; }
.necudah-v3-status-badge--draft     { background: rgba(245,158,11,0.12);   color: #f59e0b; }
.necudah-v3-status-badge--archived  { background: rgba(100,116,139,0.10);  color: #64748b; }
.necudah-v3-btn-sm {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.necudah-v3-btn-sm:hover { opacity: 0.8; }
.necudah-v3-btn-sm--outline {
    background: transparent;
    color: var(--v3-accent, #6366f1);
    border: 1px solid var(--v3-border, rgba(99,102,241,0.25));
}

/* ── Alert / success banners ─────────────────────────────── */
.necudah-v3-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(239,68,68,0.07);
    border: 1px solid rgba(239,68,68,0.18);
    border-radius: var(--v3-radius-card, 16px);
}
.necudah-v3-alert-banner .dashicons { font-size: 20px; width: 20px; height: 20px; color: #ef4444; flex-shrink: 0; }
.necudah-v3-alert-text { font-size: 0.85rem; color: var(--v3-fg, #1e1b4b); }
.necudah-v3-alert-text a { color: #ef4444; font-weight: 600; text-decoration: none; }
.necudah-v3-alert-text a:hover { text-decoration: underline; }
.necudah-v3-success-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: var(--v3-radius-card, 16px);
}
.necudah-v3-success-banner .dashicons { font-size: 20px; width: 20px; height: 20px; color: #10b981; flex-shrink: 0; }
.necudah-v3-success-text { font-size: 0.85rem; color: var(--v3-fg, #1e1b4b); }

/* ── Notification list (aside) ────────────────────────────── */
.necudah-v3-notif-list { display: flex; flex-direction: column; }
.necudah-v3-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--v3-border, rgba(99,102,241,0.08));
}
.necudah-v3-notif-item:last-child { border-bottom: none; }
.necudah-v3-notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v3-border, rgba(99,102,241,0.18));
    margin-top: 5px;
    flex-shrink: 0;
}
.necudah-v3-notif-item--unread .necudah-v3-notif-dot { background: var(--v3-accent, #6366f1); }
.necudah-v3-notif-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1.4;
}
.necudah-v3-notif-title a { color: inherit; text-decoration: none; }
.necudah-v3-notif-title a:hover { color: var(--v3-accent, #6366f1); }
.necudah-v3-notif-time {
    font-size: 0.68rem;
    color: var(--v3-muted, #6b7280);
    margin-top: 2px;
}

/* ── Quick links grid ────────────────────────────────────── */
.necudah-v3-ql {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}
.necudah-v3-ql-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    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);
    text-decoration: none;
    color: var(--v3-fg, #1e1b4b);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}
.necudah-v3-ql-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(99,102,241,0.22);
}
.necudah-v3-ql-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--v3-icon-tint, rgba(99,102,241,0.10));
    color: var(--v3-accent, #6366f1);
}
.necudah-v3-ql-icon .dashicons { font-size: 20px; width: 20px; height: 20px; }

/* ── Admin stat tiles ─────────────────────────────────────── */
.necudah-v3-admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 20px;
}
.necudah-v3-admin-tile {
    background: var(--v3-glass, rgba(255,255,255,0.55));
    border: 1px solid var(--v3-border, rgba(99,102,241,0.14));
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 2px 8px -4px rgba(99,102,241,0.12);
}
.necudah-v3-admin-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--v3-radius-icon, 9px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.necudah-v3-admin-tile-icon .dashicons { font-size: 18px; width: 18px; height: 18px; }
.necudah-v3-admin-tile-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--v3-fg, #1e1b4b);
    line-height: 1;
}
.necudah-v3-admin-tile-label {
    font-size: 0.78rem;
    color: var(--v3-muted, #6b7280);
    font-weight: 500;
}

/* ── Empty state ─────────────────────────────────────────── */
.necudah-v3-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 16px;
    text-align: center;
    color: var(--v3-muted, #6b7280);
    font-size: 0.8rem;
}
.necudah-v3-empty .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--v3-border, rgba(99,102,241,0.25));
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .necudah-v3-continue-card {
        flex-wrap: wrap;
    }
    .necudah-v3-continue-btn {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 640px) {
    .necudah-v3-ql {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    }
    .necudah-v3-admin-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
    .necudah-v3-teacher-course-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}
