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

:root {
    --brand: #728164;
    --brand-dark: #58664c;
    --brand-light: #7d8c6f;
    --brand-soft: rgba(114, 129, 100, 0.12);
    --ink: #141b2d;
    --ink-muted: #5c6478;
    --ink-soft: #8b93a7;
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --surface-elevated: #ffffff;
    --border: #e6eaf2;
    --border-strong: #d4dae6;
    --success: #728164;
    --success-bg: #e6ebe3;
    --danger: #8d775f;
    --danger-bg: #f6eee0;
    --info: #8d775f;
    --info-bg: #faf6ee;
    --warning: #784a0f;
    --warning-bg: #f6eee0;
    --table-head: #f8f9fd;
    --table-row-hover: #fafbfe;
    --shadow-sm: 0 4px 16px rgba(20, 27, 45, 0.05);
    --shadow-md: 0 12px 40px rgba(20, 27, 45, 0.08);
    --shadow-lg: 0 24px 60px rgba(20, 27, 45, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --sidebar-width: 220px;
    --overlay: rgba(15, 23, 42, 0.55);
    --topnav-bg: rgba(255, 255, 255, 0.92);
}

/* Dark mode for Student + Admin authenticated panels */
html[data-theme="dark"] {
    --brand: #7d8c6f;
    --brand-dark: #657358;
    --brand-light: #92a382;
    --brand-soft: rgba(125, 140, 111, 0.22);
    --ink: #eef2ff;
    --ink-muted: #b6c0d4;
    --ink-soft: #8b97ad;
    --surface: #151b2b;
    --surface-muted: #0f1420;
    --surface-elevated: #1c2438;
    --border: #2a3348;
    --border-strong: #3a455d;
    --success: #7d8c6f;
    --success-bg: rgba(125, 140, 111, 0.22);
    --danger: #c8b9a8;
    --danger-bg: rgba(141, 119, 95, 0.25);
    --info: #d4b87b;
    --info-bg: rgba(212, 184, 123, 0.22);
    --warning: #d4b87b;
    --warning-bg: rgba(212, 184, 123, 0.22);
    --table-head: #1a2234;
    --table-row-hover: #1b2438;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.42);
    --overlay: rgba(2, 6, 16, 0.72);
    --topnav-bg: rgba(18, 24, 38, 0.94);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--surface-muted);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: -0.02em;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-dark);
}

img {
    max-width: 100%;
    display: block;
}

/* â”€â”€ Auth shell: background matches auth-reference.png â”€â”€ */
.auth-body {
    min-height: 100vh;
    height: auto !important;
    background: #64755e;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto !important;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-favicon-watermark,
.auth-bg-motif,
.auth-bg-rings,
.auth-bg-dots,
.auth-corner {
    display: none !important;
}

.auth-wrap {
    min-height: 100vh;
    height: auto;
    display: grid;
    place-items: center;
    padding: 16px 20px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.auth-wrap-split,
.auth-wrap:has(.student-login-split),
.auth-wrap:has(.sfd-login-page-wrap) {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    height: auto !important;
    display: block !important;
    overflow-y: visible !important;
}

.auth-body:has(.student-login-split),
.auth-body:has(.sfd-login-page-wrap) {
    overflow-x: clip !important;
    background: #edf2f7 !important;
}

.auth-card {
    width: min(100%, 420px);
    max-height: calc(100vh - 32px);
    background: #faf8f5;
    border-radius: 22px;
    padding: 28px 32px 18px;
    box-shadow: 0 20px 60px rgba(25, 35, 20, 0.28);
    overflow-y: auto;
    box-sizing: border-box;
}

.auth-head {
    margin-bottom: 16px;
    text-align: left;
}

.auth-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.auth-logo {
    width: 175px;
    height: auto;
    display: block;
    object-fit: contain;
}

.auth-head h1 {
    margin: 0 0 4px;
    font-family: Inter, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    text-align: left;
    letter-spacing: -0.02em;
}

.auth-head p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.35;
    text-align: left;
    font-weight: 400;
}

.auth-card label.field-label {
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    color: #111827;
    margin-bottom: 5px;
}

.input-icon-wrap {
    position: relative;
    margin-bottom: 12px;
}

.input-icon-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #5c6c54;
    pointer-events: none;
}

.input-icon-wrap input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 42px;
    border: 1px solid #e3e0d6;
    border-radius: 10px;
    font: inherit;
    font-size: 0.88rem;
    color: #1f2937;
    background: #f3f2ed;
    margin: 0;
}

.input-icon-wrap input::placeholder {
    color: #9ca3af;
}

.input-icon-wrap input:focus {
    outline: none;
    border-color: #5c6c54;
    box-shadow: 0 0 0 3px rgba(92, 108, 84, 0.16);
    background: #ffffff;
}

.input-icon-wrap .password-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    display: grid;
    place-items: center;
}

.input-icon-wrap .password-eye:hover {
    color: #374151;
}

.input-icon-wrap .password-eye svg {
    width: 18px;
    height: 18px;
}

.show-pass-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
}

.show-pass-row input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #5c6c54;
}

.auth-submit {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5c6c54;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    height: 46px;
    padding: 0 20px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(35, 45, 30, 0.22);
}

.auth-submit:hover {
    background: #4e5d47;
}

.auth-submit-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
}

.auth-submit-icon svg {
    width: 14px;
    height: 14px;
    stroke: #ffffff;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 12px;
    color: #9ca3af;
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3e0d6;
}

.auth-links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.auth-link-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5c6c54;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.auth-link-item:hover {
    color: #44513d;
}

.auth-links-sep {
    color: #d1cfc7;
    font-weight: 300;
}

.auth-link-center {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e6e3da;
    color: #788272;
    font-size: 0.72rem;
}

.auth-footer-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #788272;
}

.auth-card .alert {
    margin-bottom: 12px;
    font-size: 0.84rem;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 18px;
        width: min(100%, 100%);
    }

    .auth-corner {
        width: 44px;
        height: 44px;
        border-width: 4px;
        opacity: 0.65;
    }

    .auth-corner--tl,
    .auth-corner--tr {
        top: 14px;
    }

    .auth-corner--bl,
    .auth-corner--br {
        bottom: 14px;
    }

    .auth-corner--tl,
    .auth-corner--bl {
        left: 14px;
    }

    .auth-corner--tr,
    .auth-corner--br {
        right: 14px;
    }

    .auth-links-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* =====================================================================
   NEW STUDENT LOGIN PAGE (MATCHING READWISE FIGMA MOCKUP)
   ===================================================================== */
.sfd-login-page-wrap {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9eff5;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    padding: 32px 24px;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sfd-login-card-container {
    width: 100%;
    max-width: 1160px;
    min-height: 660px;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 25px 70px -12px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(0, 0, 0, 0.04);
    display: flex;
    overflow: hidden;
    padding: 16px;
    gap: 20px;
    box-sizing: border-box;
}

/* Left Hero Panel */
.sfd-login-hero-panel {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 620px;
    border-radius: 32px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    display: flex;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Frosted Glass Card */
.sfd-login-glass-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 40%, rgba(240, 246, 252, 0.75) 75%, rgba(240, 246, 252, 0.90) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.10), inset 0 1px 2px 0 rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sfd-login-glass-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.sfd-login-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 34px 38px;
    box-sizing: border-box;
}

/* Top Bar in Hero */
.sfd-login-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sfd-login-brand-logo {
    display: inline-flex;
    align-items: center;
}

.sfd-login-brand-logo-img {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
}

.sfd-login-by-mentors {
    font-size: 0.84rem;
    color: #475569;
    font-weight: 500;
}

.sfd-login-by-mentors strong {
    font-weight: 800;
    color: #0f172a;
}

/* Bottom Copy in Hero */
.sfd-login-hero-bottom {
    max-width: 460px;
}

.sfd-login-hero-title {
    font-size: clamp(2.3rem, 2.9vw, 3.3rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0 0 18px 0;
}

.sfd-login-highlight {
    font-style: italic;
    color: #06b6d4;
    font-weight: 800;
}

.sfd-login-hero-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #475569;
    margin: 0;
    font-weight: 500;
}

/* Right Form Panel */
.sfd-login-form-panel {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    box-sizing: border-box;
}

.sfd-login-form-container {
    width: 100%;
    max-width: 440px;
}

.sfd-login-header {
    margin-bottom: 28px;
}

.sfd-login-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0 0 8px 0;
}

.sfd-login-subtitle {
    font-size: 0.96rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Form Groups */
.sfd-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sfd-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sfd-input-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.sfd-password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sfd-forgot-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sfd-forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

.sfd-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 14px;
    transition: all 0.2s ease;
}

.sfd-input-wrapper:focus-within {
    border-color: #38bdf8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.sfd-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-right: 10px;
    flex-shrink: 0;
}

.sfd-input-icon svg {
    width: 20px;
    height: 20px;
}

.sfd-login-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 13px 0;
    font-size: 0.95rem;
    color: #0f172a;
    font-family: inherit;
}

.sfd-login-input::placeholder {
    color: #94a3b8;
}

.sfd-password-toggle {
    background: none;
    border: none;
    padding: 4px;
    margin-left: 8px;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.sfd-password-toggle:hover {
    color: #475569;
}

.sfd-password-toggle svg {
    width: 20px;
    height: 20px;
}

.sfd-input-hint {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
    margin-top: 1px;
}

/* Checkbox */
.sfd-form-check-group {
    margin-top: -4px;
}

.sfd-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sfd-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0284c7;
    border-radius: 4px;
    cursor: pointer;
}

.sfd-checkbox-text {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Submit Button */
.sfd-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 28px;
    border-radius: 9999px;
    border: none;
    background: #38d6f8;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px -4px rgba(56, 214, 248, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 6px;
}

.sfd-login-btn:hover {
    background: #22c5ee;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -4px rgba(34, 197, 238, 0.55);
}

.sfd-login-btn:active {
    transform: translateY(0);
}

.sfd-login-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.sfd-login-btn:hover svg {
    transform: translateX(3px);
}

/* Responsive Scaling */
@media (max-width: 960px) {
    .sfd-login-card-container {
        flex-direction: column;
        max-width: 560px;
        padding: 12px;
        min-height: auto;
    }

    .sfd-login-hero-panel {
        min-height: 420px;
        border-radius: 28px;
    }

    .sfd-login-hero-inner {
        padding: 28px 24px;
    }

    .sfd-login-form-panel {
        padding: 28px 20px 36px;
    }
}

@media (max-width: 480px) {
    .sfd-login-page-wrap {
        padding: 12px;
    }

    .sfd-login-card-container {
        border-radius: 28px;
        padding: 8px;
    }

    .sfd-login-hero-panel {
        min-height: 340px;
        border-radius: 22px;
    }

    .sfd-login-hero-title {
        font-size: 1.85rem;
    }

    .sfd-login-form-panel {
        padding: 20px 12px 28px;
    }

    .sfd-login-title {
        font-size: 1.95rem;
    }
}

/* â”€â”€ Forms â”€â”€ */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

input::placeholder {
    color: var(--ink-soft);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 88px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--border);
    color: var(--ink);
}

.form-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* â”€â”€ Buttons â”€â”€ */
.btn,
button.btn,
input[type=submit].btn,
.admin-cta,
.btn-cta,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%) !important;
    color: #ffffff !important;
    border: 1px solid #58664c !important;
    border-radius: var(--radius-sm);
    padding: 11px 20px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.28) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover,
button.btn:hover,
input[type=submit].btn:hover,
.admin-cta:hover,
.btn-cta:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #657358 0%, #4a573f 100%) !important;
    box-shadow: 0 8px 22px rgba(114, 129, 100, 0.38) !important;
    color: #ffffff !important;
}

.btn:active {
    transform: translateY(0);
}

.btn--block {
    width: 100%;
}

.btn.secondary {
    background: linear-gradient(135deg, #8d775f 0%, #6e5b47 100%) !important;
    color: #ffffff !important;
    border: 1px solid #6e5b47 !important;
    box-shadow: 0 4px 14px rgba(141, 119, 95, 0.22) !important;
}

.btn.ghost {
    background: var(--surface-muted) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
}

.btn.ghost:hover {
    background: var(--surface-elevated) !important;
    color: var(--ink) !important;
    box-shadow: var(--shadow-sm) !important;
}

button.btn.ghost,
form button.btn.ghost {
    box-shadow: none !important;
}

/* legacy submit without .btn class */
input[type=submit]:not(.btn) {
    width: 100%;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%) !important;
    color: #ffffff !important;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.28) !important;
}

/* â”€â”€ Alerts â”€â”€ */
.alert {
    background: var(--success-bg);
    border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
    color: var(--success);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert.danger {
    background: var(--danger-bg);
    border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
    color: var(--danger);
}

/* â”€â”€ Toast notifications â”€â”€ */
.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999999 !important;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 640px) {
    .toast-stack {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

.app-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    background: var(--surface-elevated, #ffffff);
    color: var(--ink, #0f172a);
    box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.15), 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.app-toast.is-hiding {
    animation: toast-out 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
}

/* Base Toast Types */
.app-toast--success {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.app-toast--danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.app-toast--info {
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

/* Premium Favorite Toasts (Added & Removed) */
.app-toast--favorite {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    box-shadow: 0 20px 45px -10px rgba(217, 119, 6, 0.22), 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-toast--favorite-removed {
    border-color: rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Toast Dark Mode Variants */
html[data-theme="dark"] .app-toast,
body.dark-mode .app-toast {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(24, 34, 53, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .app-toast--success,
body.dark-mode .app-toast--success {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.92) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.15);
}

html[data-theme="dark"] .app-toast--danger,
body.dark-mode .app-toast--danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.92) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(239, 68, 68, 0.15);
}

html[data-theme="dark"] .app-toast--info,
body.dark-mode .app-toast--info {
    border-color: rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.92) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.15);
}

html[data-theme="dark"] .app-toast--favorite,
body.dark-mode .app-toast--favorite {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 27, 75, 0.96) 50%, rgba(24, 34, 53, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.85), 0 0 28px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .app-toast--favorite-removed,
body.dark-mode .app-toast--favorite-removed {
    border-color: rgba(148, 163, 184, 0.25);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(24, 34, 53, 0.98) 100%);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Icon Badges */
.app-toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.app-toast-icon svg {
    width: 22px;
    height: 22px;
}

.app-toast--success .app-toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.app-toast--danger .app-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.app-toast--info .app-toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.app-toast--favorite .app-toast-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.12) 100%);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.app-toast--favorite .app-toast-icon svg {
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.5));
    animation: toast-star-pulse 2.2s ease-in-out infinite;
}

@keyframes toast-star-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12) rotate(4deg);
    }
}

.app-toast--favorite-removed .app-toast-icon {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Eyebrow Tag Pill */
.app-toast-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.app-toast-tag--favorite {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

html[data-theme="dark"] .app-toast-tag--favorite,
body.dark-mode .app-toast-tag--favorite {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

.app-toast-tag--removed {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .app-toast-tag--removed,
body.dark-mode .app-toast-tag--removed {
    background: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.app-toast-tag-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}

.app-toast-tag--favorite .app-toast-tag-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.app-toast-tag--removed .app-toast-tag-dot {
    background: #94a3b8;
}

/* Body, Typography & Word Highlight */
.app-toast-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.app-toast-body strong {
    display: block;
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: inherit;
    line-height: 1.3;
}

.app-toast-body p {
    margin: 4px 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(100, 116, 139, 0.95);
}

html[data-theme="dark"] .app-toast-body p,
body.dark-mode .app-toast-body p {
    color: rgba(203, 213, 225, 0.85);
}

.app-toast-word {
    font-weight: 700;
    color: #0284c7;
    letter-spacing: -0.01em;
}

html[data-theme="dark"] .app-toast-word,
body.dark-mode .app-toast-word {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

/* Close Button */
.app-toast-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.app-toast-close:hover {
    background: rgba(148, 163, 184, 0.15);
    color: currentColor;
}

.app-toast-close svg {
    width: 16px;
    height: 16px;
}

/* Progress Bar */
.app-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    transform-origin: left center;
    animation: toast-progress 4.5s linear forwards;
}

.app-toast--success .app-toast-progress {
    background: #10b981;
}

.app-toast--danger .app-toast-progress {
    background: #ef4444;
}

.app-toast--info .app-toast-progress {
    background: #3b82f6;
}

.app-toast--favorite .app-toast-progress {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.app-toast--favorite-removed .app-toast-progress {
    background: #94a3b8;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* â”€â”€ Icon action buttons â”€â”€ */
.action-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    box-shadow: none;
}

.action-btn svg {
    width: 17px;
    height: 17px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.action-btn--edit:hover {
    border-color: #c7d7fe;
    background: #f5f8ff;
    color: #3558d4;
}

.action-btn--delete:hover {
    border-color: #f3c6c2;
    background: var(--danger-bg);
    color: var(--danger);
}

.action-delete-form {
    margin: 0;
    display: inline-flex;
    flex-shrink: 0;
}

.admin-table td.row-actions,
.admin-table th:last-child {
    width: 1%;
    white-space: nowrap;
}

/* â”€â”€ Confirm delete modal â”€â”€ */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 20px;
}

.confirm-modal[hidden] {
    display: none !important;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 24, 0.55);
    backdrop-filter: blur(4px);
}

.confirm-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 28px 26px 24px;
    border-radius: 22px;
    background: var(--surface-elevated);
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    text-align: center;
    animation: toast-in 0.28s ease both;
}

.confirm-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--danger-bg);
    color: var(--danger);
}

.confirm-modal-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-modal-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.confirm-modal-dialog p {
    margin: 0;
    color: var(--ink-muted);
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.confirm-modal-danger {
    background: linear-gradient(135deg, #d92d20, #b42318);
    box-shadow: 0 10px 24px rgba(180, 35, 24, 0.28);
}

.confirm-modal-danger:hover {
    box-shadow: 0 14px 28px rgba(180, 35, 24, 0.34);
}

/* â”€â”€ Version history title + body diff modal â”€â”€ */
.admin-table .version-history-title {
    min-width: 160px;
    max-width: 280px;
    vertical-align: middle;
}

.admin-table .version-history-title-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.35;
}

.admin-table .version-history-title-note {
    display: block;
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.version-changes-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand, #6b7f63) 28%, var(--border));
    background: color-mix(in srgb, var(--brand, #6b7f63) 8%, var(--surface-elevated));
    color: var(--brand, #6b7f63);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.version-changes-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.version-changes-btn:hover {
    background: color-mix(in srgb, var(--brand, #6b7f63) 14%, var(--surface-elevated));
    border-color: color-mix(in srgb, var(--brand, #6b7f63) 45%, var(--border));
    box-shadow: 0 8px 18px rgba(229, 41, 46, 0.14);
    transform: translateY(-1px);
}

.version-changes-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand, #6b7f63) 55%, transparent);
    outline-offset: 2px;
}

.version-diff-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.version-diff-modal.is-open,
.version-diff-modal:not([hidden]) {
    display: flex;
}

.version-diff-modal[hidden] {
    display: none !important;
}

.version-diff-modal[hidden].is-open {
    display: flex !important;
}

html.version-diff-open,
body.version-diff-open {
    overflow: hidden;
}

.version-diff-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 22, 0.62);
    backdrop-filter: blur(6px);
}

.version-diff-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    max-height: min(90vh, 920px);
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    background:
        radial-gradient(1200px 280px at 0% 0%, color-mix(in srgb, var(--brand, #6b7f63) 10%, transparent), transparent 55%),
        var(--surface-elevated);
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    text-align: left;
    overflow: hidden;
    animation: toast-in 0.28s ease both;
}

.version-diff-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
}

.version-diff-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.version-diff-modal-heading h3 {
    margin: 0 0 6px;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
}

.version-diff-modal-meta {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.version-diff-modal-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.version-diff-modal-close svg {
    width: 16px;
    height: 16px;
}

.version-diff-modal-close:hover {
    color: var(--ink);
    background: var(--table-row-hover, var(--surface));
}

.version-diff-modal-body {
    overflow: hidden;
    min-height: 180px;
    max-height: calc(90vh - 110px);
    padding: 16px 18px 18px;
}

.version-diff-modal-status {
    margin: 28px 0;
    text-align: center;
    color: var(--ink-muted);
}

.version-diff-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    height: min(62vh, 640px);
}

.version-diff-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
}

.version-diff-column--old {
    box-shadow: inset 3px 0 0 rgba(217, 45, 32, 0.55);
}

.version-diff-column--new {
    box-shadow: inset 3px 0 0 rgba(18, 183, 106, 0.55);
}

.version-diff-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-elevated) 70%, transparent);
}

.version-diff-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.version-diff-pill--old {
    color: #b42318;
    background: rgba(217, 45, 32, 0.12);
}

.version-diff-pill--new {
    color: #067647;
    background: rgba(18, 183, 106, 0.14);
}

.version-diff-legend {
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.version-diff-pane {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 16px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: auto;
    font-size: 0.96rem;
}

.version-diff-pane .diff-del,
.version-diff-pane del.diff-del {
    background: rgba(217, 45, 32, 0.16);
    color: #b42318;
    text-decoration: line-through;
    border-radius: 4px;
    padding: 0 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.version-diff-pane .diff-ins,
.version-diff-pane ins.diff-ins {
    background: rgba(18, 183, 106, 0.18);
    color: #067647;
    text-decoration: none;
    border-radius: 4px;
    padding: 0 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.version-diff-blank {
    color: var(--ink-muted);
}

.version-diff-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 220px;
    text-align: center;
    color: var(--ink-muted);
    padding: 28px;
}

.version-diff-empty-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand, #6b7f63) 10%, transparent);
    color: var(--brand, #6b7f63);
}

.version-diff-empty-icon svg {
    width: 26px;
    height: 26px;
}

.version-diff-empty p {
    margin: 0;
    font-size: 1.02rem;
}

.version-diff-error {
    color: var(--danger, #b42318);
}

html[data-theme="dark"] .version-changes-btn {
    box-shadow: none;
}

html[data-theme="dark"] .version-diff-pane .diff-del,
html[data-theme="dark"] .version-diff-pane del.diff-del {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

html[data-theme="dark"] .version-diff-pane .diff-ins,
html[data-theme="dark"] .version-diff-pane ins.diff-ins {
    background: rgba(74, 222, 128, 0.2);
    color: #86efac;
}

html[data-theme="dark"] .version-diff-pill--old {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.16);
}

html[data-theme="dark"] .version-diff-pill--new {
    color: #86efac;
    background: rgba(74, 222, 128, 0.16);
}

/* â”€â”€ App layout â”€â”€ */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    color: #f7edd4;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #3d3428;
    z-index: 40;
}

.sidebar-brand {
    background: #728164 !important;
    padding: 16px 20px !important;
    margin: -16px -12px 16px -12px !important;
    border-bottom: 1.5px solid #5d6d50 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sidebar-brand img {
    height: 42px !important;
    width: auto !important;
    max-width: 100% !important;
    display: block !important;
    object-fit: contain !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar-brand-fallback {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid #d4b87b;
    color: #ffffff;
}

.sidebar-user-meta strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.3;
    color: #f7edd4;
}

.sidebar-user-meta span {
    display: block;
    font-size: 0.78rem;
    color: #d4b87b;
    margin-top: 2px;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar a,
.sidebar button.nav-link,
.sidebar .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(247, 237, 212, 0.78);
    font-weight: 600;
    font-size: 0.86rem;
    border: 1px solid transparent;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.sidebar a:hover,
.sidebar button.nav-link:hover,
.sidebar .nav-link:hover {
    background: rgba(212, 184, 123, 0.12);
    color: #f7edd4;
    border-color: rgba(212, 184, 123, 0.25);
}

.sidebar a.active {
    background: linear-gradient(135deg, #728164 0%, #58664c 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #7d8c6f !important;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.35) !important;
}

.sidebar-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    letter-spacing: -0.01em;
    color: #3b2918;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border: 1px solid #c8a872;
    padding: 2px 7.5px;
    border-radius: 9999px;
    line-height: 1.1;
    box-shadow: 0 2px 7px rgba(118, 85, 47, 0.22);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.sidebar a:hover .sidebar-nav-badge {
    transform: scale(1.05);
}

.sidebar a.active .sidebar-nav-badge,
.sidebar-nav-group-toggle.is-active .sidebar-nav-badge {
    color: #3b2918;
    background: #f6eee0;
    border-color: #d8c296;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sidebar .nav-link-disabled {
    opacity: 0.7;
    cursor: default;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    font-size: 0.86rem;
    font-family: inherit;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav-group-toggle:hover,
.sidebar-nav-group-toggle.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav-group-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.18s ease;
}

.sidebar-nav-group.is-open .sidebar-nav-group-chevron {
    transform: rotate(180deg);
}

.sidebar-nav-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0 4px 10px;
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-nav-group.is-open .sidebar-nav-submenu {
    display: flex;
}

.sidebar-nav-submenu a,
.sidebar-nav-submenu .nav-link {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .btn-logout {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    font-weight: 600;
}

.sidebar .btn-logout:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: none;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px 40px;
}

.admin-layout {
    align-items: stretch;
}

.admin-content-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topnav {
    --admin-nav-cream: #728164;
    --admin-nav-ink: #ffffff;
    --admin-nav-accent: #e2ebd8;
    --admin-nav-chip: rgba(255, 255, 255, 0.18);
    --admin-nav-search: rgba(255, 255, 255, 0.22);
    --admin-nav-theme: #58664c;
    position: sticky;
    top: 12px;
    z-index: 45;
    margin: 12px 16px 0;
    border: 1.5px solid #58664c !important;
    border-radius: 18px !important;
    background: #728164 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 8px 24px rgba(45, 55, 38, 0.22);
}

html[data-theme="dark"] .admin-topnav {
    --admin-nav-cream: #728164;
    --admin-nav-ink: #ffffff;
    --admin-nav-accent: #e2ebd8;
    --admin-nav-chip: rgba(255, 255, 255, 0.18);
    --admin-nav-search: rgba(255, 255, 255, 0.22);
    --admin-nav-theme: #58664c;
    border-color: #58664c !important;
    border-radius: 18px !important;
    background: #728164 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 10px 28px rgba(0, 0, 0, 0.35);
}

.admin-topnav-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 8px 18px 8px 16px;
}

.admin-topnav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}

.admin-topnav-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: 12px;
    background: var(--admin-nav-chip, rgba(255, 255, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--admin-nav-ink, #ffffff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-topnav-menu-btn:hover,
.admin-topnav-menu-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: scale(1.04);
}

.admin-topnav-title {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding-left: 12px;
    border-left: 3px solid var(--admin-nav-accent);
}

.admin-topnav-title strong {
    font-family: Fraunces, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--admin-nav-ink);
}

.admin-topnav-title span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--admin-nav-ink) 78%, transparent);
}

.admin-topnav-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    min-width: 180px;
    margin: 0 auto;
}

.admin-topnav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.admin-topnav-search-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.admin-topnav-search input {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 0 16px 0 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: var(--admin-nav-search);
    color: #ffffff;
    font-size: 0.88rem;
    box-shadow: 0 1px 2px rgba(27, 36, 55, 0.04);
}

.admin-topnav-search input::placeholder {
    color: rgba(255, 255, 255, 0.88) !important;
}

.admin-topnav-search input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    outline: none;
}

.admin-topnav-search-wrap {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 180px;
    margin: 0 auto;
}

.admin-topnav-search-wrap .admin-topnav-search {
    width: 100%;
    max-width: none;
    margin: 0;
}

.admin-sidebar-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    box-sizing: border-box;
}

.admin-sidebar-search-results[hidden] {
    display: none !important;
}

.admin-sidebar-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    transition: background 0.16s ease;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.admin-sidebar-search-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.admin-sidebar-search-copy small {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.admin-sidebar-search-item strong {
    font-size: 0.9rem;
    font-weight: 750;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.admin-sidebar-search-copy em {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-search-item span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.admin-sidebar-search-item:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.admin-sidebar-search-item--disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-sidebar-search-empty {
    padding: 12px;
    color: var(--ink-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

html[data-theme="dark"] .admin-sidebar-search-results {
    background: var(--surface-elevated);
    border-color: var(--border);
}

html[data-theme="dark"] .admin-sidebar-search-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-topnav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.admin-topnav-date {
    position: relative;
}

.admin-topnav-date-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: var(--admin-nav-chip);
    color: var(--admin-nav-ink);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.admin-topnav-date-chip:hover,
.admin-topnav-date-chip[aria-expanded="true"] {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-nav-accent) 14%, transparent);
}

.admin-topnav .theme-toggle-btn {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: var(--admin-nav-theme);
    color: #fff;
    box-shadow: 0 6px 14px rgba(27, 36, 55, 0.18);
}

.admin-topnav .theme-toggle-btn:hover {
    border: 0;
    background: color-mix(in srgb, var(--admin-nav-theme) 88%, #fff);
    box-shadow: 0 8px 18px rgba(27, 36, 55, 0.22);
}

.admin-topnav .theme-toggle-label {
    display: none;
}

.admin-topnav .theme-toggle-icon,
.admin-topnav .theme-toggle-icon svg {
    width: 16px;
    height: 16px;
}

.admin-topnav-user {
    position: relative;
}

.admin-topnav-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--admin-nav-ink);
    cursor: pointer;
    font: inherit;
}

.admin-topnav-user-toggle:hover,
.admin-topnav-user.is-open .admin-topnav-user-toggle {
    border: 0;
    box-shadow: none;
}

.admin-topnav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    border: 1.5px solid #d4b87b;
    box-shadow: 0 6px 14px rgba(114, 129, 100, 0.22);
}

html[data-theme="dark"] .admin-topnav-avatar {
    background: linear-gradient(135deg, #7d8c6f 0%, #657358 100%);
    border-color: #d4b87b;
}

.admin-topnav-user-text {
    display: grid;
    gap: 1px;
    text-align: left;
}

.admin-topnav-user-text strong {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--admin-nav-ink);
}

.admin-topnav-user-text span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--admin-nav-accent);
}

.admin-topnav-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 168px;
    padding: 7px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-md);
    z-index: 60;
}

.admin-topnav-user-menu[hidden] {
    display: none !important;
}

.admin-topnav-user-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.admin-topnav-user-item:hover {
    background: var(--surface-muted);
}

.admin-topnav-user-item--danger {
    color: var(--danger);
}

.admin-topnav-user-item--danger:hover {
    background: var(--danger-bg);
}

.admin-topnav-user-menu form {
    margin: 0;
}

.admin-main {
    padding: 18px 20px 0;
}

.admin-topnav .dashboard-calendar-popover {
    right: 0;
    left: auto;
}

/* â”€â”€ Student top navigation shell â”€â”€ */
.student-shell {
    background:
        radial-gradient(circle at top right, rgba(229, 41, 46, 0.05), transparent 28%),
        var(--surface-muted);
}

.student-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.student-topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #728164 !important;
    border-bottom: 1.5px solid #58664c !important;
    box-shadow: 0 4px 20px rgba(50, 60, 42, 0.22) !important;
}

.student-topnav-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.student-topnav-brand {
    flex-shrink: 0;
}

.student-topnav-logo-link {
    display: inline-flex;
    align-items: center;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.student-topnav-logo-link img,
.sidebar-brand img {
    width: 135px !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    filter: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Decrease logo size on Article Details page */
.student-topnav-logo-link--compact img {
    width: 115px !important;
}

@media (max-width: 991px) {

    .student-topnav-logo-link img,
    .sidebar-brand img {
        width: 105px !important;
    }

    .student-topnav-logo-link--compact img {
        width: 95px !important;
    }
}

.student-topnav-logo-text {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff !important;
    text-decoration: none;
}

.student-topnav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.student-topnav-links::-webkit-scrollbar {
    display: none;
}

.student-topnav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: #e2ebd8 !important;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.student-topnav-links a:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/*   Active Nav Item: Luxury Champagne Gold Badge */
.student-topnav-links a.active {
    background: linear-gradient(135deg, #fff6e0 0%, #ebd39b 100%) !important;
    color: #2c1e0b !important;
    font-weight: 800 !important;
    border: 1.5px solid #d4b472 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    letter-spacing: -0.01em;
}

.student-topnav-streak-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border: 1px solid #c8a872;
    color: #3b2918;
    font-weight: 800;
    font-size: 0.8rem;
    text-decoration: none;
    transition: transform 0.18s ease;
}

.student-topnav-streak-link:hover {
    transform: scale(1.04);
}

.student-topnav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.student-topnav-actions--has-settings {
    gap: 6px !important;
}

/* On Article Details page, hide streak link ONLY on mobile view (<= 991px) so profile button fits cleanly */
@media (max-width: 991px) {

    .student-topnav-streak-link--hide-on-mobile,
    .student-topnav-actions--has-settings .student-topnav-streak-link {
        display: none !important;
    }
}

@media (max-width: 1200px) {

    .student-topnav-actions--has-settings .student-topnav-user-text,
    .student-topnav-actions--has-settings .student-topnav-caret {
        display: none !important;
    }

    .student-topnav-actions--has-settings .student-topnav-user-toggle {
        padding: 0 !important;
        min-height: 38px !important;
        width: 38px !important;
        height: 38px !important;
        justify-content: center !important;
        border-radius: 10px !important;
    }

    .student-topnav-actions--has-settings .top-nav-settings-btn {
        min-height: 38px !important;
        height: 38px !important;
        padding: 0 8px !important;
    }
}

.student-topnav-user {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theme-toggle-btn:hover {
    border-color: #c8a872;
    box-shadow: 0 4px 12px rgba(118, 85, 47, 0.12);
}

.theme-toggle-icon {
    width: 18px;
    height: 18px;
    display: none;
}

.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

html[data-theme="light"] .theme-toggle-icon--moon,
html[data-theme="dark"] .theme-toggle-icon--sun {
    display: block;
}

.sidebar-footer .theme-toggle-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.sidebar-footer .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.mobile-topbar .theme-toggle-btn {
    min-height: 38px;
    padding: 0 10px;
}

.mobile-topbar .theme-toggle-label {
    display: none;
}

.admin-sidebar .sidebar-footer {
    display: none;
}

.student-topnav-user-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16) !important;
    cursor: pointer;
    font: inherit;
    color: #ffffff !important;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.student-topnav-user-toggle:hover,
.student-topnav-user.is-open .student-topnav-user-toggle {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .student-topnav-user-toggle {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #f7edd4 !important;
}

html[data-theme="dark"] .student-topnav-user-toggle:hover,
html[data-theme="dark"] .student-topnav-user.is-open .student-topnav-user-toggle {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: #e7d2a3 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.student-topnav-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    color: #fdf8ef !important;
    font-weight: 800;
    font-size: 0.85rem;
    border: none !important;
}

html[data-theme="dark"] .student-topnav-avatar {
    background: linear-gradient(135deg, #e7d2a3 0%, #d4b882 100%) !important;
    color: #251a10 !important;
    border-color: #ffffff !important;
}

.student-notif-bell-btn-modern {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    backdrop-filter: blur(4px);
}

.student-notif-bell-btn-modern:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

/* Top Nav Action Button (Settings Gear) */
.student-topnav-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    backdrop-filter: blur(4px);
    text-decoration: none;
}

.student-topnav-action-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .student-topnav-action-btn {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #f7edd4 !important;
}

html[data-theme="dark"] .student-topnav-action-btn:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: #e7d2a3 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* Avatar Wrap & Online Status Badge */
.student-avatar-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.student-avatar-status-badge {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

html[data-theme="dark"] .student-avatar-status-badge {
    border-color: #1e293b;
}

html[data-theme="dark"] .student-notif-bell-btn-modern {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #f7edd4 !important;
}

html[data-theme="dark"] .student-notif-bell-btn-modern:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: #e7d2a3 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.student-notif-badge-pill {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 999px;
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 0 0 2px #3b522a;
    line-height: 1;
}

html[data-theme="dark"] .student-notif-badge-pill {
    box-shadow: 0 0 0 2px #1c2817;
}

.student-topnav-user-text {
    display: grid;
    gap: 1px;
    text-align: left;
    max-width: 120px;
    overflow: hidden;
}

.student-topnav-user-text strong {
    color: var(--ink) !important;
    font-weight: 800;
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.student-topnav-user-text span {
    color: var(--ink-soft) !important;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

html[data-theme="dark"] .student-topnav-user-text strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-topnav-user-text span {
    color: #dbe4d2 !important;
}

.student-topnav-caret {
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-right: 2px solid var(--ink-soft);
    border-bottom: 2px solid var(--ink-soft);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.student-topnav-user.is-open .student-topnav-caret {
    transform: rotate(-135deg) translateY(-1px);
}

.student-topnav-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 180px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-md);
    z-index: 60;
}

.student-topnav-user-menu[hidden] {
    display: none !important;
}

.student-topnav-user-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.student-topnav-user-item:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.student-topnav-user-item--danger {
    color: var(--danger);
}

.student-topnav-user-item--danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.student-topnav-user-menu form {
    margin: 0;
}

.student-notif-dropdown-menu {
    position: absolute;
    right: 0;
    top: 44px;
    width: 330px;
    max-width: calc(100vw - 32px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    padding: 14px;
    animation: fadeIn 0.18s ease-out;
}

.student-topnav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.student-topnav-toggle:hover {
    border-color: rgba(255, 77, 87, 0.4);
    box-shadow: var(--shadow-sm);
}

.student-topnav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform-origin: center;
}

html.student-nav-locked,
body.student-nav-locked {
    overflow: visible;
}

html.employee-nav-locked,
body.employee-nav-locked {
    overflow: hidden;
}

.student-main {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 0;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2rem);
}

.page-header p {
    margin: 6px 0 0;
    color: var(--ink-muted);
}

.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.mobile-menu-btn {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 24, 0.55);
    z-index: 30;
}

/* â”€â”€ Cards & dashboard â”€â”€ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.hero-card {
    background: linear-gradient(135deg, #121a2c 0%, #2a1218 100%);
    color: #fff;
    border: 0;
    padding: 28px 30px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 30, 42, 0.35), transparent 70%);
    top: -80px;
    right: -40px;
}

.hero-card h2 {
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
}

.hero-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card .label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat {
    margin-top: 8px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
}

.stat-card .hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-topbar {
    margin-bottom: 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background:
        radial-gradient(circle at top right, rgba(107, 127, 99, 0.08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
}

.dashboard-topbar--dark {
    gap: 0;
    padding: 10px 12px 10px 10px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dashboard-topbar--dark .dashboard-search {
    min-height: 46px;
    flex: 1 1 auto;
    max-width: none;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.72);
    color: #94a3b8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-topbar--dark .dashboard-search input {
    color: #f8fafc;
}

.dashboard-topbar--dark .dashboard-search input::placeholder {
    color: #7c8aa0;
}

.dashboard-topbar--dark .dashboard-search-icon {
    color: #8ba0b8;
}

.dashboard-topbar-divider {
    width: 1px;
    align-self: stretch;
    margin: 8px 10px;
    background: rgba(148, 163, 184, 0.18);
    flex-shrink: 0;
}

.dashboard-topbar--dark .dashboard-topbar-actions {
    gap: 0;
    flex-shrink: 0;
}

.dashboard-topbar--dark .dashboard-date-chip {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: #f8fafc;
    font-weight: 700;
    padding: 0 8px;
    white-space: nowrap;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dashboard-topbar--dark .dashboard-date-chip:hover,
.dashboard-topbar--dark .dashboard-date-chip[aria-expanded="true"] {
    background: rgba(52, 211, 153, 0.1);
}

.dashboard-date-menu {
    position: relative;
}

.dashboard-calendar-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    width: 235px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.dashboard-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.dashboard-calendar-head strong {
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 800;
}

.dashboard-calendar-nav {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink);
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dashboard-calendar-nav:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.dashboard-calendar-weekdays,
.dashboard-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.dashboard-calendar-weekdays {
    margin-bottom: 6px;
}

.dashboard-calendar-weekdays span {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 750;
    padding: 2px 0;
}

.dashboard-calendar-day {
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dashboard-calendar-day.is-empty {
    pointer-events: none;
}

.dashboard-calendar-day:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.dashboard-calendar-day.is-today {
    box-shadow: inset 0 0 0 1.5px #ef4444;
    color: #dc2626;
    font-weight: 800;
}

.dashboard-calendar-day.is-selected {
    background: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 800;
}

.dashboard-calendar-today {
    width: 100%;
    margin-top: 10px;
    min-height: 30px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dashboard-calendar-today:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* Dark Mode Overrides */
html[data-theme="dark"] .dashboard-calendar-popover {
    background: var(--surface-elevated);
    border-color: var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .dashboard-calendar-head strong {
    color: #f8fafc;
}

html[data-theme="dark"] .dashboard-calendar-nav {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

html[data-theme="dark"] .dashboard-calendar-day {
    color: #e2e8f0;
}

html[data-theme="dark"] .dashboard-calendar-today {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.dashboard-topbar--dark .dashboard-date-chip svg {
    color: #34d399;
}

.dashboard-topbar--dark .dashboard-user-toggle {
    min-height: 46px;
    padding: 4px 10px 4px 6px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
    color: #fff;
}

.dashboard-topbar--dark .dashboard-user-toggle:hover {
    background: rgba(52, 211, 153, 0.08);
}

.dashboard-topbar--dark .dashboard-user-toggle svg {
    color: #94a3b8;
}

.dashboard-topbar--dark .dashboard-user-avatar {
    background: linear-gradient(135deg, #187750, #22c55e);
    color: #fff;
}

.dashboard-topbar--dark .dashboard-user-meta strong {
    color: #f8fafc;
}

.dashboard-topbar--dark .dashboard-user-meta small {
    color: #94a3b8;
}

.dashboard-topbar--dark .dashboard-user-dropdown {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.14);
}

.dashboard-topbar--dark .dashboard-user-logout {
    background: rgba(255, 255, 255, 0.04);
    color: #fca5a5;
}

.dashboard-topbar--dark .dashboard-user-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

.dashboard-search {
    min-height: 52px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(20, 27, 45, 0.08);
    background: rgba(255, 255, 255, 0.96);
    color: #98a1b2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-search input {
    flex: 1;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
}

.dashboard-search input::placeholder {
    color: #98a1b2;
}

.dashboard-search-icon,
.dashboard-icon-chip,
.premium-stat-icon,
.quick-action-icon {
    display: inline-grid;
    place-items: center;
}

.dashboard-search-icon svg,
.dashboard-icon-chip svg,
.premium-stat-icon svg {
    width: 18px;
    height: 18px;
}

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

.dashboard-icon-chip,
.dashboard-date-chip {
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(20, 27, 45, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.dashboard-icon-chip {
    width: 52px;
    color: var(--ink-muted);
}

.dashboard-date-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    color: var(--ink);
    font-weight: 600;
}

.dashboard-date-chip svg {
    width: 18px;
    height: 18px;
    color: var(--ink-muted);
}

.dashboard-user-menu {
    position: relative;
}

.dashboard-user-toggle {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 10px;
    border-radius: 18px;
    border: 1px solid rgba(20, 27, 45, 0.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    color: var(--ink);
    font: inherit;
}

.dashboard-user-toggle svg {
    width: 16px;
    height: 16px;
    color: var(--ink-soft);
}

.dashboard-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #187750, #1f8d5e);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}

.dashboard-user-meta strong,
.dashboard-user-meta small {
    display: block;
    text-align: left;
}

.dashboard-user-meta strong {
    font-size: 0.9rem;
}

.dashboard-user-meta small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.74rem;
}

.dashboard-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(20, 27, 45, 0.08);
    background: #fff;
    box-shadow: 0 18px 40px rgba(20, 27, 45, 0.12);
    z-index: 20;
}

.dashboard-user-logout {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--danger);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.dashboard-user-logout:hover {
    background: #fef2f2;
}

.dashboard-header {
    margin-bottom: 0;
}

.dashboard-hero {
    margin-bottom: 0;
    padding: 26px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(24, 119, 80, 0.14), transparent 32%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
    color: var(--ink);
}

.dashboard-hero--welcome {
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(24, 119, 80, 0.12), transparent 36%),
        linear-gradient(105deg, var(--surface-elevated) 0%, var(--surface) 55%, color-mix(in srgb, var(--success-bg) 55%, var(--surface)) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-width: 720px;
}

.dashboard-hero-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero--welcome .dashboard-hero-kicker {
    margin-bottom: 8px;
    color: var(--ink-muted);
    letter-spacing: 0.14em;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    color: var(--ink);
}

.dashboard-hero--welcome h1 {
    color: var(--ink);
    font-size: clamp(1.7rem, 2.6vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dashboard-hero p {
    margin: 10px 0 0;
    max-width: 620px;
    color: var(--ink-muted);
}

.dashboard-hero--welcome p {
    margin: 10px 0 0;
    color: var(--ink-muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.dashboard-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border));
    color: var(--success);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.dashboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
    flex-shrink: 0;
}

.dashboard-search-empty {
    margin-bottom: 0;
    padding: 18px 22px;
    color: var(--ink-muted);
    font-weight: 600;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-stats-grid--gradient {
    gap: 16px;
}

.dash-metric-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: 18px;
    padding: 18px 18px 16px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.dash-metric-card--orange {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 55%, #fb923c 100%);
}

.dash-metric-card--blue {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
}

.dash-metric-card--cyan {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 55%, #67e8f9 100%);
}

.dash-metric-card--green {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #4ade80 100%);
}

.dash-metric-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dash-metric-label {
    font-size: 0.92rem;
    font-weight: 650;
    opacity: 0.95;
}

.dash-metric-gear {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    opacity: 0.9;
}

.dash-metric-gear svg {
    width: 15px;
    height: 15px;
}

.dash-metric-value {
    margin-top: 10px;
    font-size: clamp(1.8rem, 2.4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.dash-metric-percent {
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.92;
}

.dash-metric-spark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 92px;
    height: 36px;
    opacity: 0.95;
}

.dash-spark-line {
    width: 100%;
    height: 100%;
}

.dash-spark-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100%;
}

.dash-spark-bars span {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: rgba(255, 255, 255, 0.9);
    min-height: 18%;
}

.dash-spark-ring {
    width: 36px;
    height: 36px;
    margin-left: auto;
    display: block;
}

.premium-stat-card {
    border-radius: 24px;
    border: 1px solid rgba(20, 27, 45, 0.06);
    background:
        radial-gradient(circle at top left, rgba(107, 127, 99, 0.06), transparent 42%),
        var(--surface-elevated);
    padding: 18px;
    box-shadow: 0 20px 48px rgba(20, 27, 45, 0.08);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--ink);
}

.premium-stat-card:hover {
    background: linear-gradient(135deg, #187750 0%, #1f8d5e 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(24, 119, 80, 0.22);
}

.premium-stat-card:hover .premium-stat-label,
.premium-stat-card:hover .premium-stat-meta,
.premium-stat-card:hover .premium-stat-value {
    color: #fff;
}

.premium-stat-card:hover .premium-stat-pill {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.premium-stat-card:hover .premium-stat-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.premium-stat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.premium-stat-label {
    font-size: 0.92rem;
    color: var(--ink-muted);
    font-weight: 500;
}

.premium-stat-value {
    margin-top: 8px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand);
}

.premium-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
}

.premium-stat-icon--article {
    color: #dc2626;
    background: #fff1f2;
}

.premium-stat-icon--published {
    color: #d97706;
    background: #fff7ed;
}

.premium-stat-icon--vocabulary {
    color: #7c3aed;
    background: #f5f3ff;
}

.premium-stat-icon--students {
    color: #16a34a;
    background: #f0fdf4;
}

.premium-stat-meta {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.premium-stat-pill {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.premium-stat-pill--up {
    color: #0f7a45;
    background: #e9f9f0;
}

.premium-stat-pill--down {
    color: #b42318;
    background: #fef2f2;
}

.premium-stat-pill--neutral {
    color: var(--ink-muted);
    background: #f3f4f6;
}

.dashboard-showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.dashboard-panel {
    padding: 24px;
    margin-bottom: 0;
    border-radius: 24px;
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(107, 127, 99, 0.05), transparent 32%),
        var(--surface-elevated);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-panel-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--ink);
}

.dashboard-panel-head p {
    margin: 6px 0 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.dashboard-range-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.growth-period-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.growth-period-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.growth-period-tab {
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.growth-period-tab:hover {
    color: var(--ink);
}

.growth-period-tab.is-active {
    background: #187750;
    color: #fff;
}

.dashboard-analytics-card {
    width: 100%;
}

.dashboard-line-card {
    padding-bottom: 12px;
}

.dashboard-panel-head--line h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.2;
}

.growth-date-block {
    min-width: 0;
}

.growth-date-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.growth-year-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border));
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dashboard-panel-head--line p {
    margin: 6px 0 0;
    color: var(--ink-muted);
    font-size: 0.92rem;
}

.line-chart-wrap {
    position: relative;
    width: 100%;
    margin-top: 8px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    overflow: hidden;
}

.growth-line-chart {
    width: 100%;
    height: auto;
    min-height: 280px;
    display: block;
}

.growth-chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 104px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 14px));
}

.growth-chart-tooltip small {
    display: block;
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 650;
}

.growth-chart-tooltip strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.05rem;
}

.analytics-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 18px;
    align-items: end;
}

.growth-bars {
    height: 248px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.growth-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.growth-bar {
    width: 100%;
    min-height: 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(24, 119, 80, 0.18), rgba(24, 119, 80, 0.9)),
        #187750;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    position: relative;
    overflow: hidden;
}

.growth-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 6px, transparent 6px, transparent 12px);
    opacity: 0.5;
}

.growth-bar i,
.growth-bar-group strong {
    position: relative;
    z-index: 1;
    font-style: normal;
}

.growth-bar i {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.growth-bar-group strong {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.analytics-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-insight {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7faf8;
    border: 1px solid rgba(20, 27, 45, 0.06);
}

.analytics-insight span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.analytics-insight strong {
    display: block;
    margin-top: 6px;
    font-size: 1.15rem;
}

.focus-activity {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f7fbf8 0%, #ffffff 100%);
    border: 1px solid rgba(20, 27, 45, 0.06);
}

.focus-activity-icon {
    margin-bottom: 16px;
    display: inline-block;
}

.focus-activity strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.45;
}

.focus-activity p {
    margin: 10px 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.focus-stats {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.focus-stats div {
    padding: 14px;
    border-radius: 18px;
    background: #fbfcff;
    border: 1px solid rgba(20, 27, 45, 0.06);
}

.focus-stats span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.focus-stats strong {
    display: block;
    margin-top: 8px;
    font-size: 1.1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fbfcff;
    border: 1px solid rgba(20, 27, 45, 0.06);
}

.activity-icon {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    opacity: 0.12;
}

.activity-icon--vocabulary {
    background: #7c3aed;
}

.activity-icon--vocabulary::after {
    background: #7c3aed;
}

.activity-icon--article {
    background: #dc2626;
}

.activity-icon--article::after {
    background: #dc2626;
}

.activity-icon--test {
    background: #f59e0b;
}

.activity-icon--test::after {
    background: #f59e0b;
}

.activity-icon--student {
    background: #22c55e;
}

.activity-icon--student::after {
    background: #22c55e;
}

.activity-icon--badge {
    background: #ec4899;
}

.activity-icon--badge::after {
    background: #ec4899;
}

.activity-copy {
    min-width: 0;
}

.activity-copy strong {
    display: block;
    font-size: 0.95rem;
}

.activity-copy span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    margin-top: 6px;
}

.progress-ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.progress-ring {
    --progress: 0;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #fff 0 58%, transparent 59%),
        conic-gradient(#187750 calc(var(--progress) * 1%), #dfe7e3 0);
    display: grid;
    place-items: center;
}

.progress-ring div {
    text-align: center;
}

.progress-ring strong {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
}

.progress-ring span,
.pipeline-item span,
.dashboard-clock-display span,
.dashboard-empty {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.progress-legend {
    width: 100%;
    display: grid;
    gap: 10px;
}

.progress-legend div {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot--solid {
    background: #187750;
}

.dot--muted {
    background: #dfe7e3;
}

.pipeline-list {
    display: grid;
    gap: 12px;
}

.pipeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fbfcff;
    border: 1px solid rgba(20, 27, 45, 0.06);
}

.pipeline-item strong,
.pipeline-item b {
    display: block;
}

.pipeline-item b {
    font-size: 1.15rem;
    color: #187750;
}

.dashboard-clock-display {
    padding: 26px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.dashboard-clock-display strong {
    display: block;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.dashboard-clock-display span {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.76);
}

/* â”€â”€ Legacy / shared components â”€â”€ */
.login {
    max-width: 460px;
    margin: 0 auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

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

th {
    background: var(--table-head);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
}

.word-hi {
    font-weight: inherit;
    color: var(--brand);
    cursor: pointer;
}

.word-vocab {
    border-bottom: 2px dotted var(--brand);
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal .box {
    background: var(--surface);
    max-width: 520px;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}

.badge {
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--surface-muted);
    color: var(--ink);
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
}

.row-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.row-actions form,
.row-actions .action-delete-form {
    margin: 0;
    display: inline-flex;
    flex-shrink: 0;
}

/* â”€â”€ Admin modules (CRUD pages) â”€â”€ */
.admin-module {
    display: grid;
    gap: 18px;
    animation: admin-fade-up 0.45s ease both;
}

@keyframes admin-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(107, 127, 99, 0.18), transparent 34%),
        radial-gradient(circle at 12% 120%, rgba(96, 165, 250, 0.08), transparent 42%),
        linear-gradient(145deg, var(--surface-elevated) 0%, var(--surface) 58%, #1a2030 100%);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}

.admin-hero::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107, 127, 99, 0.16), transparent 70%);
    pointer-events: none;
}

.admin-hero--compact {
    padding: 22px 26px;
    align-items: center;
}

.admin-hero-copy,
.admin-hero-actions {
    position: relative;
    z-index: 1;
}

.admin-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-kicker::before {
    content: "";
    width: 18px;
    height: 3px;
    border-radius: 99px;
    background: var(--brand);
}

.admin-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 2.4vw, 2.25rem);
    letter-spacing: -0.03em;
}

.admin-hero p {
    margin: 8px 0 0;
    max-width: 560px;
    color: var(--ink-muted);
}

.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.admin-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.admin-meta-chip strong {
    color: var(--ink);
    font-weight: 800;
}

.admin-cta {
    min-height: 46px;
    padding-inline: 18px;
}

.admin-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    color: var(--ink);
}

.admin-panel+.admin-panel {
    margin-top: 0;
}

.admin-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface) 100%);
}

.admin-panel-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-panel-head p {
    margin: 4px 0 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.admin-panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-search {
    position: relative;
    min-width: min(280px, 100%);
}

.admin-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--ink-soft);
    pointer-events: none;
}

.admin-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 38px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    box-shadow: none;
}

.admin-search input::placeholder {
    color: var(--ink-soft);
}

.admin-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.admin-table-wrap {
    overflow: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.admin-table-wrap--vocabulary {
    max-height: min(70vh, 760px);
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.admin-table--wide {
    width: max-content;
    min-width: 100%;
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: var(--table-head);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: var(--table-row-hover);
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table .cell-primary {
    font-weight: 700;
    color: var(--ink);
}

.admin-table .cell-muted {
    color: var(--ink-muted);
    font-size: 0.92rem;
}

.admin-table .cell-clamp {
    max-width: 280px;
    overflow: hidden;
}

.admin-table .cell-clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.admin-table .cell-full {
    min-width: 220px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.admin-table .col-word {
    min-width: 140px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--surface-elevated);
}

.admin-table th.col-word {
    z-index: 3;
    background: var(--table-head);
}

.admin-table .col-pos {
    min-width: 120px;
    white-space: nowrap;
}

.admin-table .col-action {
    min-width: 104px;
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--surface-elevated);
    box-shadow: -8px 0 12px rgba(20, 27, 45, 0.04);
}

.admin-table th.col-action {
    z-index: 3;
    background: var(--table-head);
}

.admin-table tbody tr:hover .col-word,
.admin-table tbody tr:hover .col-action {
    background: var(--table-row-hover);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
}

.status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill--published,
.status-pill--active {
    background: var(--success-bg);
    color: var(--success);
    border-color: transparent;
}

.status-pill--draft,
.status-pill--inactive {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: transparent;
}

.status-pill--approved {
    background: var(--info-bg);
    color: var(--info);
    border-color: transparent;
}

.status-pill--rejected {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: transparent;
}

.status-pill--review {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: transparent;
}

.article-index-wrap {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: visible;
}

.article-index-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    table-layout: fixed;
}

.article-index-table thead th {
    background: var(--table-head);
    white-space: nowrap;
}

.article-index-table th,
.article-index-table td {
    padding: 8px 10px;
}

.article-index-col-title {
    width: 34%;
}

.article-index-col-level {
    width: 112px;
}

.article-index-col-status {
    width: 16%;
}

.article-index-col-assigned {
    width: 20%;
}

.article-index-col-action,
.article-index-table th.col-action,
.article-index-table td.col-action {
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    padding-left: 6px;
    padding-right: 6px;
}

.article-assignee-name,
.article-assignee-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-index-table tbody tr.article-index-row td {
    vertical-align: middle;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    padding-top: 10px;
    padding-bottom: 10px;
}

.article-index-table tbody tr.article-index-row--start td {
    border-top: 1px solid var(--border);
}

.article-index-table tbody tr:first-child.article-index-row--start td {
    border-top: 0;
}

.article-index-table tbody tr.article-index-row--end td {
    border-bottom: 1px solid var(--border);
}

.article-index-table tbody tr.article-index-row:not(.article-index-row--start):not(.article-index-row--end) td {
    background: color-mix(in srgb, var(--surface-muted) 55%, transparent);
}

.article-index-table tbody tr.article-index-row--start:not(.article-index-row--end) td:not(.article-index-title):not(.col-action),
.article-index-table tbody tr.article-index-row--end:not(.article-index-row--start) td:not(.article-index-title):not(.col-action) {
    background: color-mix(in srgb, var(--surface-muted) 35%, transparent);
}

.article-index-table tbody tr.is-mine td:not(.article-index-title):not(.col-action) {
    background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface));
}

.article-index-table tbody tr.is-mine td[data-label="Level"] {
    box-shadow: inset 3px 0 0 var(--brand);
}

.article-index-table tbody tr:hover td:not(.article-index-title):not(.col-action) {
    background: var(--table-row-hover);
}

.article-index-title {
    background: var(--surface) !important;
    border-right: 1px solid var(--border);
}

.article-index-table td.col-action {
    background: var(--surface) !important;
    border-left: 1px solid var(--border);
    vertical-align: middle;
    overflow: visible;
    position: sticky;
    right: 0;
    z-index: 2;
}

.article-index-table th.col-action {
    position: sticky;
    right: 0;
    z-index: 3;
}

.article-index-table td.col-action .row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: auto;
}

.article-index-table td.col-action .action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex: 0 0 auto;
}

.article-index-table td.col-action .action-btn svg {
    width: 14px;
    height: 14px;
}

.article-index-title,
.article-index-table td[data-label="Status"],
.article-index-table td[data-label="Assigned to"],
.article-index-table td[data-label="Level"] {
    overflow: hidden;
}

.article-index-title-main {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    font-weight: 700;
    line-height: 1.3;
    font-size: 0.9rem;
}

.article-index-title-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--ink-muted);
    font-size: 0.74rem;
    font-weight: 500;
}

.article-index-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-muted);
    opacity: 0.55;
}

.article-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.article-level-seq-badge,
.article-level-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.article-level-seq-badge {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-muted);
}

.article-level-code {
    min-width: 36px;
    background: color-mix(in srgb, var(--brand-soft) 65%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
    color: var(--ink);
}

.article-index-table .status-pill {
    max-width: 100%;
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-assignee {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
}

.article-assignee-avatar {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.article-assignee-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.article-assignee-name {
    font-weight: 700;
    line-height: 1.25;
    font-size: 0.86rem;
}

.article-assignee-role {
    color: var(--ink-muted);
    font-size: 0.72rem;
    line-height: 1.25;
    text-transform: capitalize;
}

html[data-theme="dark"] .article-index-wrap {
    background: var(--surface-elevated);
}

html[data-theme="dark"] .article-index-title,
html[data-theme="dark"] .article-index-table td.col-action {
    background: var(--surface-elevated) !important;
}

html[data-theme="dark"] .article-level-code {
    background: color-mix(in srgb, var(--brand-soft) 28%, var(--surface-elevated));
}

@media (max-width: 900px) {
    .article-index-table tbody tr.article-index-row td[rowspan] {
        border-right: 0;
        border-left: 0;
    }

    .article-index-table tbody tr.is-mine td[data-label="Level"] {
        box-shadow: none;
    }

    .article-index-table tbody tr.is-mine {
        outline: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border));
        border-radius: 12px;
    }
}

.admin-empty {
    padding: 48px 24px;
    text-align: center;
}

.admin-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}

.admin-empty-icon svg {
    width: 24px;
    height: 24px;
}

.admin-empty h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.admin-empty p {
    margin: 0;
    color: var(--ink-muted);
}

.admin-form-shell {
    padding: 24px 26px 28px;
}

.admin-form-shell .admin-form-grid {
    margin-bottom: 8px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.admin-form-grid .full-width,
.admin-form-grid .field--full {
    grid-column: 1 / -1;
}

.admin-form-stack {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label,
.admin-form-stack>label,
.admin-form-shell>form>label {
    display: block;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.field input,
.field select,
.field textarea,
.admin-form-stack input,
.admin-form-stack select,
.admin-form-stack textarea,
.admin-form-shell input,
.admin-form-shell select,
.admin-form-shell textarea {
    margin: 0;
}

.field textarea,
.admin-form-stack textarea {
    min-height: 110px;
    resize: vertical;
}

.field-hint {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.role-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfe;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.role-check:hover {
    border-color: #d8c296;
    background: #faf6ee;
    transform: translateY(-1px);
}

.role-check:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.role-check input {
    width: auto;
    margin: 0;
    accent-color: var(--brand);
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.admin-split {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 18px;
}

.admin-stat-list {
    display: grid;
    gap: 12px;
}

.admin-student-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .admin-student-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .admin-student-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€ Admin student detail â”€â”€ */
.admin-student-detail {
    gap: 20px;
}

.admin-student-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
        radial-gradient(900px 220px at 100% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 55%),
        radial-gradient(700px 180px at 0% 100%, rgba(15, 118, 110, 0.08), transparent 50%),
        linear-gradient(145deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow-sm);
    animation: admin-fade-up 0.45s ease both;
}

.admin-student-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.admin-student-avatar {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    box-shadow: 0 12px 28px rgba(107, 127, 99, 0.22);
}

.admin-student-hero-copy {
    min-width: 0;
}

.admin-student-hero-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.admin-student-status {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.admin-student-status.is-active {
    color: #067647;
    background: none;
    border: 0;
    padding: 0;
}

.admin-student-status.is-inactive {
    color: #b42318;
    background: none;
    border: 0;
    padding: 0;
}

html[data-theme="dark"] .admin-student-status.is-active {
    color: #86efac;
}

html[data-theme="dark"] .admin-student-status.is-inactive {
    color: #fca5a5;
}

.admin-student-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.admin-student-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--ink-muted);
    font-size: 0.92rem;
}

.admin-student-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-soft);
}

.admin-student-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px;
    flex: 0 0 auto;
    align-self: stretch;
}

.admin-student-hero-side .admin-student-status {
    line-height: 1;
}

.admin-student-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.admin-student-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-student-stat {
    position: relative;
    overflow: hidden;
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.admin-student-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.admin-student-stat--reading::before {
    background: #0f766e;
}

.admin-student-stat--articles::before {
    background: #2563eb;
}

.admin-student-stat--tests::before {
    background: #b45309;
}

.admin-student-stat--badges::before {
    background: var(--brand);
}

.admin-student-stat:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.admin-student-stat-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-student-stat strong {
    display: block;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.admin-student-stat small {
    display: block;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.admin-student-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-student-jump a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink-muted);
    font-size: 0.84rem;
    font-weight: 650;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-student-jump a:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    background: color-mix(in srgb, var(--brand) 6%, var(--surface-elevated));
}

.admin-student-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 22px 22px;
}

.admin-student-account-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.admin-student-account-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-student-account-item strong {
    display: block;
    font-size: 0.98rem;
    word-break: break-word;
}

.admin-student-table-wrap {
    max-height: min(52vh, 520px);
    overflow: auto;
}

.admin-student-score {
    display: grid;
    gap: 6px;
    min-width: 110px;
}

.admin-student-score-bar {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-muted);
    overflow: hidden;
}

.admin-student-score-bar>span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.admin-student-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-elevated));
    color: var(--brand);
    font-weight: 750;
    font-size: 0.86rem;
}

.admin-student-meaning-stack {
    display: grid;
    gap: 10px;
}

.admin-student-meaning-block {
    display: grid;
    gap: 4px;
}

.admin-student-meaning-pos {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-student-meaning-stack p {
    margin: 0;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
}

.admin-student-favorites-wrap {
    max-height: min(70vh, 720px);
}

.admin-student-favorites-table td[data-label="English meaning"],
.admin-student-favorites-table td[data-label="Bangla meaning"] {
    min-width: 220px;
    max-width: none;
}

.admin-student-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-student-empty {
    text-align: center;
    padding: 28px 18px;
    color: var(--ink-muted);
}

.admin-student-empty--pad {
    padding: 36px 22px;
}

.admin-student-empty h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 1.05rem;
}

.admin-student-empty p {
    margin: 0;
    font-size: 0.92rem;
}

.admin-student-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 22px 22px;
}

.admin-student-badge-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.admin-student-badge-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.admin-student-badge-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    font-size: 1.35rem;
}

.admin-student-badge-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.admin-student-badge-copy strong {
    font-size: 0.98rem;
}

.admin-student-badge-copy span,
.admin-student-badge-copy small {
    color: var(--ink-muted);
    font-size: 0.82rem;
}

html[data-theme="dark"] .admin-student-hero {
    background:
        radial-gradient(900px 220px at 100% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
        radial-gradient(700px 180px at 0% 100%, rgba(45, 212, 191, 0.08), transparent 50%),
        linear-gradient(145deg, var(--surface-elevated), var(--surface));
}

html[data-theme="dark"] .admin-student-score-bar {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
    .admin-student-badge-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

    .admin-student-stats,
    .admin-student-account-grid,
    .admin-student-split {
        grid-template-columns: 1fr 1fr;
    }

    .admin-student-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-student-hero-side {
        width: 100%;
        align-items: flex-start;
    }

    .admin-student-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {

    .admin-student-stats,
    .admin-student-account-grid,
    .admin-student-split,
    .admin-student-badge-grid {
        grid-template-columns: 1fr;
    }

    .admin-student-hero-main {
        align-items: flex-start;
    }

    .admin-student-avatar {
        width: 60px;
        height: 60px;
        border-radius: 18px;
        font-size: 1.4rem;
    }
}

.admin-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface) 100%);
}

.admin-stat-item span {
    color: var(--ink-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-stat-item strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-note {
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid #f0d5d7;
    background: linear-gradient(135deg, #fff8f8, #fff);
    color: var(--ink-muted);
}

.admin-note strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
}

.admin-badge-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge-cell .big-badge {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-muted);
    font-size: 24px;
    line-height: 1;
}

.admin-word-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 800;
}

.btn.btn-sm {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.84rem;
    box-shadow: none;
}

.btn.ghost.btn-sm:hover {
    border-color: #f0b4b7;
    color: var(--brand-dark);
}

.btn.danger-ghost {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #f3c6c2;
}

.btn.danger-ghost:hover {
    background: #fde8e6;
    color: var(--danger);
}

.admin-panel .page-header {
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.table-responsive {
    overflow-x: auto;
}

.empty-data {
    color: var(--ink-muted);
    text-align: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 960px) {

    .admin-hero,
    .admin-panel-head,
    .admin-split,
    .admin-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .admin-hero-actions,
    .admin-panel-toolbar {
        justify-content: flex-start;
        width: 100%;
    }

    .admin-search {
        width: 100%;
        min-width: 0;
    }
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    align-items: end;
}

@media (max-width: 720px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
}

.question-box {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin: 14px 0;
    background: var(--surface-muted);
    color: var(--ink);
}

.question-box h3 {
    margin: 0 0 10px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.option {
    display: block;
    font-weight: 500;
    padding: 9px 10px;
    margin: 7px 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-elevated);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.option:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

.option input {
    width: auto;
    margin-right: 8px;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.badge-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
}

.badge-icon,
.big-badge {
    font-size: 34px;
}

/* Student - awarded badges gallery */
.awarded-badges-panel .admin-panel-head {
    background: linear-gradient(120deg, #171d2e 0%, #2a3350 55%, #1f2940 100%);
    border-bottom-color: transparent;
}

.awarded-badges-panel .admin-panel-head h2,
.awarded-badges-panel .admin-panel-head p {
    color: #fff;
}

.awarded-badges-panel .admin-panel-head p {
    color: rgba(255, 255, 255, 0.68);
}

.awarded-badges-count {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a2133;
    background: linear-gradient(135deg, #f0d59a, #e0b85c);
    white-space: nowrap;
}

.awarded-badges-panel .admin-form-shell {
    background:
        radial-gradient(700px 240px at 0% 0%, rgba(212, 168, 75, 0.08), transparent 55%),
        radial-gradient(700px 240px at 100% 0%, rgba(56, 178, 172, 0.08), transparent 55%),
        var(--surface-muted);
}

.awarded-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: 16px;
}

.awarded-badge {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 20px 18px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: badge-step-in 0.5s ease both;
}

.awarded-badge:nth-child(1) {
    animation-delay: 0.04s;
}

.awarded-badge:nth-child(2) {
    animation-delay: 0.08s;
}

.awarded-badge:nth-child(3) {
    animation-delay: 0.12s;
}

.awarded-badge:nth-child(4) {
    animation-delay: 0.16s;
}

.awarded-badge:nth-child(5) {
    animation-delay: 0.2s;
}

.awarded-badge:nth-child(6) {
    animation-delay: 0.24s;
}

.awarded-badge:hover {
    transform: translateY(-4px);
}

.awarded-badge--hours {
    color: #2b2110;
    border-color: rgba(184, 134, 40, 0.35);
    background:
        linear-gradient(165deg, #fff8e8 0%, #f6d98a 48%, #e4b84f 100%);
    box-shadow:
        0 14px 30px rgba(166, 118, 28, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.awarded-badge--days {
    color: #0f2c2b;
    border-color: rgba(36, 140, 134, 0.35);
    background:
        linear-gradient(165deg, #e9fffc 0%, #9fe8df 48%, #5fc7bc 100%);
    box-shadow:
        0 14px 30px rgba(24, 120, 114, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.awarded-badge--hours:hover {
    box-shadow: 0 18px 36px rgba(166, 118, 28, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.awarded-badge--days:hover {
    box-shadow: 0 18px 36px rgba(24, 120, 114, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.awarded-badge-shine {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 70%;
    height: 90%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), transparent 60%);
    transform: rotate(18deg);
    pointer-events: none;
}

.awarded-badge-top {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.awarded-badge-type {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.awarded-badge-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: #1a2133;
    box-shadow: 0 4px 10px rgba(20, 27, 45, 0.2);
}

.awarded-badge-medallion {
    position: relative;
    z-index: 1;
    width: 84px;
    height: 84px;
    margin: 4px 0 2px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 10px 22px rgba(20, 27, 45, 0.16),
        inset 0 -6px 14px rgba(20, 27, 45, 0.08);
}

.awarded-badge--hours .awarded-badge-medallion {
    box-shadow:
        0 10px 22px rgba(166, 118, 28, 0.28),
        0 0 0 6px rgba(255, 255, 255, 0.22),
        inset 0 -6px 14px rgba(166, 118, 28, 0.08);
}

.awarded-badge--days .awarded-badge-medallion {
    box-shadow:
        0 10px 22px rgba(24, 120, 114, 0.28),
        0 0 0 6px rgba(255, 255, 255, 0.22),
        inset 0 -6px 14px rgba(24, 120, 114, 0.08);
}

.awarded-badge-icon {
    font-size: 2.35rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(20, 27, 45, 0.15));
}

.awarded-badge-name {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.awarded-badge-target {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    opacity: 0.82;
}

.awarded-badge-foot {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 4px;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid rgba(20, 27, 45, 0.12);
    font-size: 0.74rem;
    font-weight: 600;
}

.awarded-badge-foot span {
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.66rem;
}

.awarded-badge-foot time {
    font-variant-numeric: tabular-nums;
}

.awarded-badges-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 36px 20px;
    border-radius: 18px;
    border: 1px dashed var(--border-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-muted));
    color: var(--ink);
}

.awarded-badges-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    background: linear-gradient(145deg, #fff4d8, #f0d59a);
    box-shadow: 0 10px 24px rgba(166, 118, 28, 0.18);
}

.awarded-badges-empty strong {
    font-size: 1.05rem;
    color: var(--ink);
}

.awarded-badges-empty p {
    margin: 0;
    max-width: 320px;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

/* Student badges - how awards work */
.badge-howto {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 32px 32px 28px;
    border: 1px solid rgba(212, 168, 75, 0.16);
    border-radius: 24px;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(212, 168, 75, 0.18), transparent 55%),
        radial-gradient(700px 380px at 92% 8%, rgba(56, 178, 172, 0.12), transparent 50%),
        radial-gradient(600px 300px at 50% 110%, rgba(229, 41, 46, 0.08), transparent 55%),
        linear-gradient(155deg, #fffdfa 0%, #f8fbff 48%, #fff8f0 100%);
    box-shadow:
        0 18px 42px rgba(20, 27, 45, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: badge-howto-in 0.55s ease both;
}

.badge-howto::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 75%);
    pointer-events: none;
}

.badge-howto-intro {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-bottom: 26px;
}

.badge-howto-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b45309;
    background: rgba(212, 168, 75, 0.14);
    border: 1px solid rgba(212, 168, 75, 0.28);
}

.badge-howto-intro h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    line-height: 1.15;
    color: var(--ink);
}

.badge-howto-intro p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.badge-howto-flow {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 0 22px;
    padding: 18px;
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.badge-howto-step {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.82));
    border: 1px solid rgba(148, 163, 184, 0.12);
    animation: badge-step-in 0.5s ease both;
}

.badge-howto-step:nth-child(1) {
    animation-delay: 0.05s;
}

.badge-howto-step:nth-child(3) {
    animation-delay: 0.12s;
}

.badge-howto-step:nth-child(5) {
    animation-delay: 0.19s;
}

.badge-howto-step:nth-child(7) {
    animation-delay: 0.26s;
}

.badge-howto-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1;
    color: #e0b85c;
    text-shadow: 0 0 18px rgba(224, 184, 92, 0.35);
    user-select: none;
}

.badge-howto-step strong {
    display: block;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.badge-howto-step>span {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--ink-muted);
}

.badge-howto-tracks {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.badge-track {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 22px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    animation: badge-step-in 0.55s ease both;
    animation-delay: 0.3s;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.badge-track::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.9;
    pointer-events: none;
}

.badge-track--hours {
    color: #2b2110;
    border-color: rgba(212, 168, 75, 0.35);
    background:
        linear-gradient(145deg, #fff4d8 0%, #f5d890 45%, #e8c16a 100%);
    box-shadow:
        0 14px 34px rgba(166, 118, 28, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.badge-track--days {
    color: #0f2c2b;
    border-color: rgba(56, 178, 172, 0.35);
    background:
        linear-gradient(145deg, #dcfffa 0%, #9fe8df 45%, #6fd0c6 100%);
    box-shadow:
        0 14px 34px rgba(24, 120, 114, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation-delay: 0.38s;
}

.badge-track:hover {
    transform: translateY(-3px);
}

.badge-track--hours:hover {
    box-shadow: 0 18px 40px rgba(166, 118, 28, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.badge-track--days:hover {
    box-shadow: 0 18px 40px rgba(24, 120, 114, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.badge-track-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.badge-track-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 18px rgba(20, 27, 45, 0.12);
}

.badge-track--hours .badge-track-icon {
    color: #8a5a12;
    background: rgba(255, 255, 255, 0.55);
}

.badge-track--days .badge-track-icon {
    color: #0f6b64;
    background: rgba(255, 255, 255, 0.5);
}

.badge-track-icon svg {
    width: 22px;
    height: 22px;
}

.badge-track-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

.badge-track-head h3 {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

.badge-track-lead {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.86;
}

.badge-track-lead em {
    font-style: normal;
    font-weight: 800;
    opacity: 1;
}

.badge-track ul {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 14px 0 0;
    list-style: none;
    display: grid;
    gap: 10px;
    border-top: 1px solid rgba(20, 27, 45, 0.12);
}

.badge-track li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.9;
}

.badge-track li>span {
    flex: 0 0 auto;
    margin-top: 1px;
    font-weight: 700;
    opacity: 0.75;
}

.badge-track li strong {
    font-weight: 800;
}

.badge-howto-tip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(229, 41, 46, 0.1), rgba(212, 168, 75, 0.12));
    border: 1px solid rgba(229, 41, 46, 0.12);
    color: var(--ink);
    font-size: 0.88rem;
}

.badge-howto-tip-label {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a2133;
    background: linear-gradient(135deg, #f0d59a, #e0b85c);
}

@keyframes badge-howto-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes badge-step-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 960px) {
    .badge-howto-flow {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px;
    }

    .badge-howto-step {
        flex: 1 1 calc(50% - 28px);
    }

    .badge-howto-arrow:nth-child(2) {
        display: flex;
    }

    .badge-howto-arrow:nth-child(4),
    .badge-howto-arrow:nth-child(6) {
        display: none;
    }

    .badge-howto-tracks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .badge-howto {
        padding: 22px 16px 18px;
    }

    .badge-howto-flow {
        flex-direction: column;
        gap: 6px;
    }

    .badge-howto-step {
        flex: 1 1 auto;
    }

    .badge-howto-arrow {
        padding: 2px 0;
        transform: rotate(90deg);
        font-size: 1.1rem;
    }

    .badge-howto-arrow:nth-child(4),
    .badge-howto-arrow:nth-child(6) {
        display: flex;
    }

    .badge-howto-tip {
        align-items: flex-start;
        flex-direction: column;
    }
}

.profile-cover {
    background: linear-gradient(135deg, #fff, #f7f8fb);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.profile-cover h2 {
    margin: 0 0 6px;
}

.profile-cover p {
    margin: 0;
    color: var(--ink-muted);
}

/* â”€â”€ Student profile polish â”€â”€ */
.student-profile {
    display: grid;
    gap: 10px;
}

.student-profile .admin-panel-head {
    padding: 14px 18px;
    align-items: flex-start;
}

.student-profile .admin-panel-head p {
    margin: 4px 0 0;
}

.student-profile .admin-form-shell {
    padding: 14px 18px 16px;
}

.profile-identity {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid #f0d5d7;
    background:
        radial-gradient(circle at 100% 0%, rgba(229, 41, 46, 0.16), transparent 34%),
        radial-gradient(circle at 0% 100%, rgba(20, 27, 45, 0.05), transparent 40%),
        linear-gradient(145deg, #ffffff 0%, #fff8f8 52%, #f7f8fc 100%);
    box-shadow: var(--shadow-md);
}

.profile-identity::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 41, 46, 0.12), transparent 70%);
    pointer-events: none;
}

.profile-identity-main,
.profile-identity-side {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-identity-side {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(229, 41, 46, 0.28);
}

.profile-identity-copy h1 {
    margin: 0;
    font-size: clamp(1.7rem, 2.5vw, 2.3rem);
    letter-spacing: -0.03em;
}

.profile-contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--ink-muted);
    font-size: 0.94rem;
}

.profile-dot {
    opacity: 0.5;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-stat-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px 12px;
    box-shadow: var(--shadow-sm);
}

.profile-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--brand);
}

.profile-stat-card--reading::before {
    background: #0f766e;
}

.profile-stat-card--articles::before {
    background: #2563eb;
}

.profile-stat-card--favorites::before {
    background: var(--brand);
}

.profile-stat-card--tests::before {
    background: #b45309;
}

.profile-stat-label {
    display: block;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.profile-stat-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.profile-stat-card small {
    display: block;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.profile-jump-nav {
    position: sticky;
    top: 76px;
    z-index: 99;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.profile-jump-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-jump-tab:hover {
    background: #f6eee0 !important;
    color: #784a0f !important;
}

.profile-jump-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1.5px solid #c8a872 !important;
    box-shadow: 0 6px 18px rgba(118, 85, 47, 0.22) !important;
}

.profile-jump-tab:focus-visible {
    outline: 2px solid #c8a872;
    outline-offset: 2px;
}

.profile-section,
.profile-favorites-panel {
    scroll-margin-top: 140px !important;
}

.profile-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 960px) {
    .profile-section-grid {
        grid-template-columns: 1fr;
    }
}

.profile-section-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #784a0f;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f6eee0;
    color: #784a0f;
    border: 1px solid #e8d7b7;
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.profile-count-pill--soft {
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: none;
}

.profile-favorites-panel {
    border: 1px solid #d4b87b;
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.22), transparent 40%),
        linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
    box-shadow: var(--shadow-md);
}

.profile-favorites-panel .admin-panel-head {
    align-items: flex-start;
    background: transparent;
    border-bottom-color: #e8d7b7;
}

.favorite-word-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 0 16px 16px;
}

@media (max-width: 1100px) {
    .favorite-word-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .favorite-word-grid {
        grid-template-columns: 1fr;
    }
}

.favorite-word-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #e8d7b7;
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    box-shadow: 0 10px 24px rgba(118, 85, 47, 0.08);
    animation: fav-card-in 0.45s ease both;
    animation-delay: var(--fav-delay, 0s);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-width: 0;
}

@keyframes fav-card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.favorite-word-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(118, 85, 47, 0.14);
}

.favorite-word-card.is-removing {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.favorite-word-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.favorite-word-card-top h3 {
    margin: 0 0 8px;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: break-word;
}

.favorite-word-card-copy {
    min-width: 0;
}

.favorite-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.favorite-pos-chip,
.favorite-saved-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}

.favorite-pos-chip {
    background: #f6eee0;
    color: #784a0f;
    border: 1px solid #d8c296;
    text-transform: capitalize;
}

.favorite-pos-chip--muted {
    background: var(--surface-muted);
    color: var(--ink-muted);
}

.favorite-saved-chip {
    background: #fff7ed;
    color: #c2410c;
}

.favorite-card-star {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #f59e0b;
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}

.favorite-word-snippet {
    margin: 0;
    min-height: 0;
    color: var(--ink-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-word-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.favorite-word-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding-inline: 10px;
    white-space: nowrap;
}

.favorite-word-actions .js-view-favorite-word,
.favorite-word-actions .btn:not(.ghost) {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1.5px solid #c8a872 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 6px rgba(118, 85, 47, 0.18) !important;
    transition: all 0.2s ease !important;
}

.favorite-word-actions .js-view-favorite-word:hover,
.favorite-word-actions .btn:not(.ghost):hover {
    background: #dfc790 !important;
    color: #3b2918 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(118, 85, 47, 0.3) !important;
}

.favorite-word-remove-form {
    display: contents;
}

.favorite-word-remove-form .btn {
    width: 100%;
}

.profile-empty-favorites,
.profile-empty-block {
    margin: 0 16px 16px;
    padding: 20px 16px;
    border-radius: 14px;
    border: 1px dashed #f0d5d7;
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.profile-empty-favorites h3 {
    margin: 0 0 8px;
}

.profile-empty-favorites p,
.profile-empty-block p {
    margin: 0 auto;
    max-width: 420px;
    color: var(--ink-muted);
}

.profile-empty-favorites .btn {
    margin-top: 16px;
}

.profile-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #c2410c;
    font-size: 1.45rem;
}

.profile-stack {
    column-count: 2;
    column-gap: 10px;
}

.profile-stack>.admin-panel {
    display: inline-block;
    width: 100%;
    margin: 0 0 10px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.profile-stack>.admin-panel:last-child {
    margin-bottom: 0;
}

.profile-dual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
}

.profile-dual-grid--account {
    grid-template-columns: 1fr;
}

.profile-history-panel,
.profile-reading-panel,
.profile-account-panel,
.profile-tips-panel,
.profile-tests-panel,
.profile-badges-panel {
    width: 100%;
}

.profile-history-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.word-history-list,
.reading-card-list {
    display: grid;
    gap: 10px;
    padding: 0 16px 14px;
}

.word-history-list {
    gap: 6px;
}

.word-history-list.is-collapsed .word-history-item--extra {
    display: none !important;
}

.reading-card-list {
    gap: 6px;
}

.reading-card-list.is-collapsed .reading-card-item--extra {
    display: none !important;
}

.word-history-item,
.reading-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #fafbfe 100%);
}

.word-history-item,
.reading-card-item {
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
}

.word-history-rank {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.word-history-main,
.reading-card-main,
.reading-card-item>div {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.word-history-main strong,
.reading-card-main strong,
.reading-card-item strong {
    font-size: 0.9rem;
    line-height: 1.25;
}

.word-history-main span,
.reading-card-main span,
.reading-card-item span,
.word-history-meta small {
    color: var(--ink-muted);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.word-history-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    flex-shrink: 0;
}

.word-history-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 800;
}

.reading-card-time,
.reading-card-item em {
    font-style: normal;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.profile-account-form {
    padding-top: 0;
}

.profile-account-form .admin-form-stack {
    gap: 12px;
}

.profile-account-form .admin-form-actions {
    margin-top: 14px;
    padding-top: 0;
}

.profile-tips-panel {
    border: 1px solid #d4b87b;
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.22), transparent 40%),
        linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
    box-shadow: var(--shadow-md);
}

.profile-tips-panel .admin-panel-head {
    border-bottom-color: #e8d7b7;
}

.profile-tips-body {
    display: grid;
    gap: 8px;
    padding: 0 16px 14px;
}

.profile-tip-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e8d7b7;
    background: #ffffff;
}

.profile-tip-item>span {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #f6eee0;
    color: #784a0f;
    border: 1px solid #d8c296;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-tip-item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.9rem;
    color: #302317;
}

.profile-tip-item p {
    margin: 0;
    color: #665039;
    font-size: 0.8rem;
    line-height: 1.4;
}

.profile-member-since {
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f6eee0, #faf6ee);
    border: 1px solid #e8d7b7;
    color: #665039;
    font-size: 0.84rem;
}

.profile-member-since strong {
    color: #302317;
}

.profile-test-list {
    display: grid;
    gap: 6px;
    padding: 0 16px 14px;
}

.profile-test-list.is-collapsed .profile-test-item--extra {
    display: none;
}

.profile-test-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #fafbfe 100%);
}

.profile-test-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.profile-test-main strong {
    font-size: 0.9rem;
    line-height: 1.25;
}

.profile-test-main span {
    color: var(--ink-muted);
    font-size: 0.76rem;
}

.profile-score-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.profile-badges-shell {
    padding-top: 0;
}

.profile-badge-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.profile-badge-card {
    padding: 12px 10px;
    border-radius: 14px;
}

.profile-badge-card .badge-icon {
    font-size: 1.55rem;
    line-height: 1;
    margin-bottom: 6px;
}

.profile-badge-card b {
    display: block;
    font-size: 0.88rem;
    line-height: 1.25;
}

.profile-badge-card small {
    display: block;
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 0.74rem;
}

@media (max-width: 1100px) {
    .profile-stack {
        column-count: 1;
    }

    .profile-dual-grid,
    .profile-dual-grid--account {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .profile-identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-identity-side {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .word-history-item,
    .reading-card-item,
    .profile-test-item {
        align-items: flex-start;
    }

    .word-history-meta {
        justify-items: start;
    }

    .reading-card-time,
    .profile-score-pill {
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .profile-stat-grid {
        grid-template-columns: 1fr;
    }

    .profile-identity-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-jump-nav {
        width: 100%;
        border-radius: 18px;
        padding: 8px;
        gap: 8px;
    }

    .profile-jump-tab {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 0 12px;
    }
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 1100px) {

    .student-topnav-user-text,
    .admin-topnav-user-text {
        display: none;
    }

    .admin-topnav .theme-toggle-label {
        display: none;
    }

    .admin-topnav-search,
    .admin-topnav-search-wrap {
        max-width: 280px;
        min-width: 160px;
    }
}

@media (max-width: 960px) {
    .layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        height: 100vh;
        z-index: 55;
    }

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

    .sidebar-overlay {
        z-index: 50;
    }

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

    .mobile-topbar {
        display: flex;
    }

    .admin-topnav-menu-btn {
        display: inline-flex;
    }

    .admin-topnav {
        top: 8px;
        margin: 8px 10px 0;
        border-radius: 18px;
    }

    .admin-topnav-title strong {
        font-size: 1.05rem;
    }

    .admin-topnav-title span {
        font-size: 0.7rem;
    }

    .admin-topnav-inner {
        min-height: 56px;
        padding: 8px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .admin-topnav-search,
    .admin-topnav-search-wrap {
        display: block;
        order: 5;
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    .admin-topnav-search input {
        font-size: 16px;
        min-height: 42px;
    }

    .admin-topnav-date-chip {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.72rem;
    }

    .admin-topnav-actions {
        gap: 8px;
        min-width: 0;
        margin-left: auto;
    }

    .admin-main {
        padding: 14px 12px 24px;
    }

    .main {
        padding: 20px 16px 32px;
    }

    .admin-panel-head {
        padding: 16px 16px;
        align-items: stretch;
        gap: 12px;
    }

    .admin-panel-toolbar,
    .admin-search,
    .admin-search-form {
        width: 100%;
        min-width: 0;
        display: block;
    }

    .admin-search input {
        width: 100%;
        font-size: 16px;
        min-height: 44px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-row .btn {
        width: 100%;
        justify-content: center;
    }

    .student-topnav-inner {
        width: min(100% - 24px, 1280px);
        min-height: 64px;
        flex-wrap: nowrap;
        padding: 8px 0;
        gap: 12px;
    }

    .student-topnav-logo-link img {
        width: 112px;
    }

    .student-topnav-logo-text {
        font-size: 1rem;
    }

    .student-topnav-toggle {
        display: flex;
    }

    .student-nav-open .student-topnav-toggle span:nth-child(1),
    .student-topnav.student-nav-open .student-topnav-toggle span:nth-child(1),
    body.student-nav-open .student-topnav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .student-nav-open .student-topnav-toggle span:nth-child(2),
    .student-topnav.student-nav-open .student-topnav-toggle span:nth-child(2),
    body.student-nav-open .student-topnav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .student-nav-open .student-topnav-toggle span:nth-child(3),
    .student-topnav.student-nav-open .student-topnav-toggle span:nth-child(3),
    body.student-nav-open .student-topnav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .student-nav-open .student-topnav-inner,
    .student-topnav.student-nav-open .student-topnav-inner,
    body.student-nav-open .student-topnav-inner {
        flex-wrap: wrap;
    }

    .student-topnav-links {
        display: none;
        width: 100%;
    }

    .student-nav-open .student-topnav-links,
    .student-topnav.student-nav-open .student-topnav-links,
    body.student-nav-open .student-topnav-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 14px !important;
        margin-top: 10px !important;
        overflow: visible !important;
        flex: 1 0 100% !important;
        order: 10 !important;
        background: linear-gradient(135deg, #58664c 0%, #46523d 100%) !important;
        border: 1.5px solid #3c4834 !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
    }

    .student-nav-open .student-topnav-links a,
    .student-topnav.student-nav-open .student-topnav-links a,
    body.student-nav-open .student-topnav-links a {
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: 12px !important;
        padding: 12px 16px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #f7edd4 !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(247, 237, 212, 0.18) !important;
        box-sizing: border-box !important;
    }

    .student-nav-open .student-topnav-links a.active,
    .student-topnav.student-nav-open .student-topnav-links a.active,
    body.student-nav-open .student-topnav-links a.active {
        background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
        color: #251a10 !important;
        font-weight: 900 !important;
        border-color: #c8a872 !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    }

    .student-topnav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
        min-width: 0;
    }

    @media (max-width: 1024px) {
        .theme-toggle-label {
            display: none !important;
        }

        .student-topnav-user-text,
        .student-topnav-caret {
            display: none !important;
        }

        .student-topnav-user-toggle {
            padding: 0 !important;
            min-height: 38px !important;
            width: 38px !important;
            height: 38px !important;
            justify-content: center !important;
            border-radius: 50% !important;
            flex-shrink: 0 !important;
        }

        .top-nav-settings-btn {
            min-height: 38px !important;
            height: 38px !important;
            padding: 0 10px !important;
            gap: 6px !important;
            flex-shrink: 0 !important;
        }

        .student-topnav-user-menu {
            right: 0;
            top: calc(100% + 6px);
            width: 180px;
        }
    }

    @media (max-width: 520px) {
        .streak-pill-text {
            display: none !important;
        }

        .student-topnav-streak-link {
            padding: 4px 8px !important;
        }
    }

    .student-nav-open .theme-toggle-btn,
    .student-topnav.student-nav-open .theme-toggle-btn,
    body.student-nav-open .theme-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .student-main {
        width: min(100% - 24px, 1280px);
        padding: 20px 0 32px;
    }

    .auth-card {
        padding: 28px 22px 24px;
    }

    .dashboard-topbar,
    .dashboard-panel-head,
    .dashboard-hero {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-topbar {
        padding: 16px;
    }

    .dashboard-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-topbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-topbar--dark {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .dashboard-topbar--dark .dashboard-search {
        flex: 1 1 100%;
    }

    .dashboard-topbar--dark .dashboard-topbar-divider:first-of-type {
        display: none;
    }

    .dashboard-topbar--dark .dashboard-topbar-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .dashboard-user-dropdown {
        left: 0;
        right: auto;
        width: 100%;
    }

    .analytics-card-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-links {
        flex-direction: column;
        align-items: center;
    }

    .student-topnav-inner {
        width: min(100% - 20px, 1280px);
        min-height: 58px;
        gap: 10px;
    }

    .student-topnav-logo-link img {
        width: 96px;
    }

    .student-main {
        width: min(100% - 20px, 1280px);
        padding: 16px 0 28px;
    }

    .dashboard-search,
    .dashboard-date-chip {
        min-height: 48px;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .growth-bars {
        gap: 10px;
    }

    .student-notif-dropdown-menu {
        position: fixed;
        right: 12px;
        left: 12px;
        top: 62px;
        width: auto;
        max-width: none;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    }

    .student-reading-top-main h1 {
        font-size: 1.4rem !important;
    }

    .preview-controls-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .level-highlight-filter-bar {
        width: 100%;
        justify-content: space-between;
    }

    .student-level-stepper {
        width: 100%;
        justify-content: space-between;
    }

    .student-level-grid,
    .student-level-options-grid {
        grid-template-columns: 1fr !important;
    }

    .popup-word-card {
        max-width: min(calc(100vw - 20px), 480px) !important;
        margin: 10px !important;
    }
}

/* -- Article editor / preview -- */
.action-btn--preview:hover {
    border-color: #c7d7fe;
    background: #f5f8ff;
    color: #3558d4;
}

.preview-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.preview-shell {
    margin: 0;
}

.preview-top h1 {
    margin: 12px 0 6px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.article-reader-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
}

.article-cefr-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}

.article-cefr-tab {
    border: 1px solid var(--line, #d0d5dd);
    background: var(--surface-2, #f8fafc);
    color: var(--ink, #0f172a);
    padding: 7px 12px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.article-cefr-tab.is-active {
    background: var(--brand, #2563eb);
    border-color: var(--brand, #2563eb);
    color: #fff;
}

.article-level-body {
    display: none;
}

.article-level-body.is-active {
    display: block;
}

.article-level-panel-wrap {
    display: none;
}

.article-level-panel-wrap.is-active {
    display: block;
}

.article-sequence-panel-wrap {
    display: none;
}

.article-sequence-panel-wrap.is-active {
    display: block;
}

.article-body-sequences {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.article-body-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.article-body-page-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.article-body-page-btn,
.article-body-seq-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.article-body-page-btn {
    min-width: 72px;
}

.article-body-page-btn:hover:not(:disabled),
.article-body-seq-link:hover {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
}

.article-body-seq-link.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.article-body-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.preview-body {
    margin-top: 22px;
    line-height: 1.7;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.preview-body img,
.preview-body table,
.preview-body pre,
.preview-body iframe,
.preview-body video {
    max-width: 100%;
}

.preview-body table {
    display: block;
    overflow-x: auto;
}

.preview-body pre {
    overflow-x: auto;
}

.preview-body img {
    height: auto;
}

.highlighted-word-picker {
    position: relative;
    margin-bottom: 8px;
}

.selected-vocabulary-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
    transition: max-height 0.22s ease-out;
}

.selected-vocabulary-words.is-collapsed {
    max-height: 74px;
    overflow: hidden;
}

.selected-vocabulary-words.is-expanded {
    max-height: none;
    overflow: visible;
}

.vocab-see-more-btn {
    margin-top: 4px;
    margin-bottom: 10px;
}

.selected-vocabulary-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
}

html[data-theme="dark"] .selected-vocabulary-chip {
    background: var(--info-bg);
    color: var(--info);
}

.selected-vocabulary-chip small {
    font-weight: 500;
    color: #475569;
}

html[data-theme="dark"] .selected-vocabulary-chip small {
    color: var(--ink-muted);
}

.selected-vocabulary-chip button {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    font-weight: 800;
    line-height: 20px;
}

html[data-theme="dark"] .selected-vocabulary-chip button {
    background: var(--surface-elevated);
    color: var(--danger);
}

/* Auto-assigned chips: green tones to distinguish from manually assigned (blue) */
.selected-vocabulary-chip.is-auto {
    background: #dcfce7;
    color: #14532d;
}
html[data-theme="dark"] .selected-vocabulary-chip.is-auto {
    background: #052e16;
    color: #86efac;
}
.selected-vocabulary-chip.is-auto small {
    color: #166534;
}
html[data-theme="dark"] .selected-vocabulary-chip.is-auto small {
    color: #4ade80;
}
.selected-vocabulary-chip.is-auto button {
    background: #fff;
    color: #16a34a;
}
html[data-theme="dark"] .selected-vocabulary-chip.is-auto button {
    background: var(--surface-elevated);
    color: #4ade80;
}

.highlight-help {
    font-size: 13px;
    color: var(--ink-muted);
    margin: 8px 0 6px;
    line-height: 1.45;
}

.auto-vocab-note {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    margin: 8px 0 12px;
    display: block;
}

html[data-theme="dark"] .auto-vocab-note {
    background: var(--info-bg, rgba(30, 58, 138, 0.35));
    color: var(--info, #93c5fd);
    border-color: rgba(59, 130, 246, 0.3);
}

.multi-word-empty {
    font-size: 13px;
    color: var(--ink-muted);
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    padding: 10px 14px;
    border-radius: 10px;
    margin: 8px 0;
}

html[data-theme="dark"] .multi-word-empty {
    background: var(--surface-muted);
    color: var(--ink-muted);
    border-color: var(--border);
}

.multi-word-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    color: var(--ink);
}

html[data-theme="dark"] .multi-word-card {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
}

.multi-word-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

html[data-theme="dark"] .multi-word-title {
    color: var(--ink);
}

.multi-word-sentence {
    font-size: 12px;
    color: var(--ink-muted);
    margin-bottom: 10px;
}

html[data-theme="dark"] .multi-word-sentence {
    color: var(--ink-muted);
}

.multi-word-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multi-word-actions button {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

html[data-theme="dark"] .multi-word-actions button {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border);
}

html[data-theme="dark"] .multi-word-actions button:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.vocabulary-suggestions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5000;
    max-height: 430px;
    overflow: auto;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .vocabulary-suggestions {
    background: var(--surface-elevated, #1a2234);
    border-color: var(--border, #2e3a52);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.vocabulary-suggestion-row {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

html[data-theme="dark"] .vocabulary-suggestion-row {
    border-bottom-color: var(--border, #2e3a52);
}

html[data-theme="dark"] .vocabulary-suggestion-row:hover {
    background: var(--surface-muted, #151b2b);
}

html[data-theme="dark"] .vocabulary-suggestion-word {
    color: var(--info, #60a5fa);
}

.vocabulary-suggestion-row:last-child {
    border-bottom: 0;
}

.vocabulary-suggestion-row:hover {
    background: #eff6ff;
}

.vocabulary-suggestion-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.vocabulary-suggestion-word {
    color: #1d4ed8;
    font-size: 16px;
    font-weight: 800;
}

.vocabulary-pos {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.vocabulary-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.vocabulary-empty {
    padding: 14px;
    color: #64748b;
}

.highlight-help {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.auto-vocab-note {
    margin-top: 10px;
    padding: 11px 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

#multiTableWords,
.multi-table-words {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.multi-word-card {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 10px;
    padding: 10px 12px;
}

.multi-word-title {
    font-size: 14px;
    font-weight: 800;
    color: #9a3412;
    margin-bottom: 8px;
}

.multi-word-sentence {
    margin-bottom: 9px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.multi-word-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.multi-word-actions button {
    border: 1px solid #fdba74;
    background: #fff;
    color: #9a3412;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.multi-word-actions button:hover {
    background: #ffedd5;
}

.multi-word-empty {
    padding: 10px 12px;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 9px;
}

#vocabContextMenu,
.vocab-context-menu {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100050;
    min-width: 245px;
    max-width: min(360px, calc(100vw - 16px));
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

#vocabContextMenu button,
.vocab-context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    padding: 11px 14px;
    cursor: pointer;
    color: #0f172a;
    font-weight: 700;
}

#vocabContextMenu button:hover,
.vocab-context-menu button:hover {
    background: #eff6ff;
}

#vocabContextMenu button:last-child,
.vocab-context-menu button:last-child {
    border-bottom: 0;
}

#vocabContextMenu button:disabled,
.vocab-context-menu button:disabled {
    cursor: default;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 800px) {
    .vocabulary-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Article reader / word popup -- */
.preview-body-page {
    margin: 0;
    background: var(--surface-muted);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.article-reader-card {
    margin-bottom: 0;
}

.article-body strong,
.article-body b,
.preview-body strong,
.preview-body b {
    font-weight: 700 !important;
}

.article-body em,
.article-body i,
.preview-body em,
.preview-body i {
    font-style: italic;
}

.article-body u,
.preview-body u {
    text-decoration: underline;
}

.article-body s,
.article-body strike,
.article-body del,
.preview-body s,
.preview-body strike,
.preview-body del {
    text-decoration: line-through;
}

/* Headings within article body and previews */
.article-body h1,
.preview-body h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 1.5rem 0 0.8rem;
}
.article-body h2,
.preview-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 1.35rem 0 0.7rem;
}
.article-body h3,
.preview-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 1.2rem 0 0.6rem;
}
.article-body h4,
.preview-body h4 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 1rem 0 0.5rem;
}
.article-body h5,
.preview-body h5 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0.9rem 0 0.4rem;
}
.article-body h6,
.preview-body h6 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0.8rem 0 0.4rem;
}

.article-body .word-hi {
    font-weight: inherit;
    color: var(--student-highlight-text-color-hi, #0f766e);
    background: var(--student-highlight-color-hi, #f8e9b5);
    padding: 2px 5px;
    border-radius: 6px;
    cursor: pointer;
    border-bottom: none !important;
    text-decoration: none !important;
}

.article-body .word-auto {
    font-weight: 400;
    background: var(--student-highlight-color, #eeeeee);
    color: var(--student-highlight-text-color, #0f172a);
    padding: 2px 3px;
    border-radius: 4px;
    cursor: pointer;
    border-bottom: none !important;
    text-decoration: none !important;
}

.word-popup-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(6px);
    z-index: 999998;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    animation: word-popup-bg-in 0.2s ease both;
}

@keyframes word-popup-bg-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.word-popup {
    display: none;
    position: relative;
    flex-direction: column;
    width: min(560px, calc(100vw - 20px));
    max-height: min(86vh, 620px);
    margin: auto;
    overflow: hidden;
    background: var(--surface-elevated);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.28), 0 8px 20px -4px rgba(15, 23, 42, 0.12);
    z-index: 999999;
    animation: word-popup-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.word-popup[style*="display: flex"],
.word-popup[style*="display: block"] {
    display: flex !important;
}

@keyframes word-popup-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .word-popup {
        width: min(100vw - 16px, 560px);
        max-height: min(90vh, 620px);
    }
}

.popup-head {
    flex: 0 0 auto;
    padding: 10px 13px 8px 14px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border-bottom: 1px solid #d4b87b;
    color: #302317;
    border-radius: 14px 14px 0 0;
}

.popup-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 9px 12px 12px;
    max-height: calc(86vh - 65px);
}

.popup-content::-webkit-scrollbar {
    width: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--brand) 35%, var(--border));
    border-radius: 4px;
}

.popup-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0;
}

.popup-kicker {
    margin: 0 0 1px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #76552f;
}

.popup-head-title {
    flex: 1 1 auto;
    min-width: 0;
}

.popup-word-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 4px;
    min-width: 0;
}

.popup-word-row h2,
.popup-head h2 {
    margin: 0 20px 0 0;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #302317;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    flex: 0 1 auto;
}

.popup-pronounce-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.popup-pronounce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid rgba(118, 85, 47, 0.22);
    border-radius: 7px;
    background: rgba(118, 85, 47, 0.12);
    color: #3b2918;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.popup-pronounce-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
}

.popup-pronounce-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.popup-pronounce-btn:hover {
    background: rgba(118, 85, 47, 0.22);
}

.popup-pronounce-btn:active {
    transform: scale(0.96);
}

.popup-pronounce-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.popup-head-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.popup-badge {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(118, 85, 47, 0.14);
    color: #4a331a;
    border: 1px solid rgba(118, 85, 47, 0.18);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.popup-badge:empty {
    display: none;
}

.popup-close {
    float: none;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(118, 85, 47, 0.22);
    background: rgba(118, 85, 47, 0.12);
    color: #3b2918;
    border-radius: 7px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.popup-close svg {
    width: 14px;
    height: 14px;
}

.popup-close:hover {
    background: rgba(118, 85, 47, 0.22);
}

.popup-favorite-btn {
    float: none;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(118, 85, 47, 0.28);
    background: rgba(118, 85, 47, 0.12);
    color: #3b2918;
    padding: 4px 8px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.7rem;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.popup-favorite-btn:hover {
    background: rgba(118, 85, 47, 0.22);
    transform: translateY(-1px);
}

.popup-favorite-btn.is-active {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #78350f;
    border-color: #f59e0b;
    box-shadow: 0 4px 10px rgba(120, 53, 15, 0.15);
}

.popup-favorite-btn.is-pop {
    animation: fav-pop 0.42s ease;
}

@keyframes fav-pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.popup-favorite-icon {
    position: relative;
    width: 13px;
    height: 13px;
    display: inline-grid;
    place-items: center;
}

.popup-favorite-icon .fav-star {
    width: 13px;
    height: 13px;
    display: block;
}

.popup-favorite-btn .fav-star--filled {
    display: none;
}

.popup-favorite-btn.is-active .fav-star--outline {
    display: none;
}

.popup-favorite-btn.is-active .fav-star--filled {
    display: block;
}

.popup-favorite-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.pos-block {
    margin-bottom: 8px;
    border: 1px solid #e7d6b5;
    border-radius: 9px;
    overflow: hidden;
    background: #faf6ee;
}

.pos-block:last-child {
    margin-bottom: 0;
}

.pos-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 9px;
    background: #f3e6cd;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: capitalize;
    color: #4a331a;
}

.pos-title small {
    font-size: 0.68rem;
    font-weight: 700;
    color: #785832;
    text-transform: none;
}

.form-section {
    margin-bottom: 12px;
}

.form-section h3 {
    margin: 0 0 6px;
    color: #4a331a;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.pos-block .form-grid {
    gap: 4px;
    padding: 6px;
}

.form-item {
    padding: 4px 7px;
    background: #f7efe0;
    border: 1px solid #e7d6b5;
    border-radius: 6px;
    overflow-wrap: anywhere;
    color: #3b2816;
}

.pos-block .form-item {
    border: 0;
    padding: 4px 6px;
    border-radius: 5px;
}

.form-label {
    display: block;
    color: #785832;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.5px;
}

.form-value {
    color: #3b2816;
    font-size: 0.78rem;
    font-weight: 650;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.meaning-card {
    margin: 0 0 6px;
    padding: 8px 10px;
    background: #faf6ee;
    border: 1px solid #e8d7b7;
    border-left: 4px solid #b8924b;
    border-radius: 9px;
    color: #3b2816;
}

.meaning-card:last-child {
    margin-bottom: 0;
}

.meaning-card-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #785832;
}

.meaning-card-label--highlight {
    color: #5c3c14 !important;
    background: #f3e4c4 !important;
    border: 1px solid #d8c296 !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.meaning-level-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #eedcb4;
    color: #5c3c14;
    border: 1px solid #d4be8e;
}

.meaning-card-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.38;
    font-weight: 400;
    color: #3b2816;
}

.meaning-card-meta {
    margin: 4px 0 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #785832;
}

.meaning-card-meta b {
    color: #3b2816;
    margin-right: 3px;
}

.meaning-card-tags {
    margin: 4px 0 0;
    font-size: 0.68rem;
    line-height: 1.3;
    color: #8c6a3f;
}

.meaning-card--selected {
    background: #fbf7ef !important;
    border: 1px solid #e7d6b5 !important;
    border-left: 4px solid #b8924b !important;
}

.meaning-card--sentence {
    background: #f9f4ea !important;
    border: 1px solid #e5d4b2 !important;
    border-left: 4px solid #a8813a !important;
    padding: 6px 9px;
}

.meaning-card--sentence .meaning-card-label {
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: none;
    letter-spacing: normal;
    color: #785832;
    margin-bottom: 2px;
}

.meaning-card--sentence .meaning-card-text {
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.38;
    color: #3b2816;
}

.meaning-card--usage {
    background: #faf6ee !important;
    border: 1px solid #e8d7b7 !important;
    border-left: 4px solid #9c7530 !important;
}

.word-sentence-highlight,
.meaning-card--sentence mark {
    background: #fde68a !important;
    color: #451a03 !important;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}

.meaning-card--success {
    background: color-mix(in srgb, var(--success-bg) 75%, var(--surface));
    border-color: color-mix(in srgb, var(--success) 20%, var(--border));
    border-left-color: var(--success);
}

.meaning-card--warning {
    background: color-mix(in srgb, var(--warning-bg) 80%, var(--surface));
    border-color: color-mix(in srgb, #ea580c 22%, var(--border));
    border-left-color: #ea580c;
}

.meaning-card--empty {
    background: var(--surface-muted);
    border-color: var(--border);
    border-left-color: var(--ink-soft);
}

.pos-block .meaning-card {
    margin: 0 6px 6px;
}

.meaning-card b {
    color: var(--ink);
}

.meaning-card small {
    color: var(--ink-muted);
}

.popup-empty {
    padding: 14px;
    background: var(--warning-bg);
    color: var(--warning);
    border-radius: 10px;
}

@media (max-width: 520px) {
    .word-popup {
        width: min(100vw - 20px, 420px);
        max-height: min(84vh, 620px);
        border-radius: 16px;
    }

    .popup-head {
        border-radius: 16px 16px 0 0;
        padding: 12px 12px 10px 14px;
    }

    .popup-content {
        padding: 10px 12px 12px;
        max-height: min(64vh, 460px);
    }

    .popup-favorite-btn .favorite-word-label {
        display: none;
    }

    .popup-favorite-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        border-radius: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

.article-sequence {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.article-sequence-links {
    margin-top: 14px;
}

.seq-link,
.seq-current {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 8px 8px 0;
    border-radius: 8px;
    text-decoration: none;
}

.seq-link {
    background: #f1f5f9;
    color: #222;
}

.seq-link:hover {
    background: #dbeafe;
}

.seq-current {
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.reading-timer-panel {
    position: static;
    width: min(310px, calc(100vw - 36px));
    max-width: 100%;
    margin: 18px 0 0 auto;
    padding: 13px 15px;
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(8px);
}

.reading-timer-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
}

.reading-timer-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 5px;
    font-size: 12px;
    color: #cbd5e1;
}

.reading-timer-row strong {
    color: #fff;
    font-size: 13px;
}

.reading-timer-status {
    margin-top: 8px;
    font-size: 11px;
    color: #94a3b8;
}

/* â”€â”€ Student article reading experience â”€â”€ */
.student-reading {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 8px 0 40px;
    animation: student-reading-in 0.35s ease both;
}

@keyframes student-reading-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.student-reading-top {
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 26px;
    box-shadow: 0 4px 20px rgba(20, 27, 45, 0.03);
}

.student-reading-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.student-reading-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b2918 !important;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    border: 1px solid #c8a872;
}

.student-reading-back svg {
    width: 16px;
    height: 16px;
}

.student-reading-back:hover {
    background: #dfc790 !important;
    color: #302317 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 85, 47, 0.16);
}

.student-reading-kicker {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: var(--surface-muted);
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.student-reading-title {
    margin: 0 0 10px;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.student-reading-lead {
    margin: 0 0 16px;
    max-width: 46rem;
    color: var(--ink-muted);
    font-size: 1.02rem;
    line-height: 1.55;
}

.student-reading-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-reading-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.student-reading-chip--accent {
    border-color: #d8c296 !important;
    background: #f6eee0 !important;
    color: #784a0f !important;
}

.student-reading-stage {
    position: relative;
}

.article-reader-layout,
.article-reader--student {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
}

.article-reader-layout.is-glossary-collapsed .article-reader-left-sidebar,
.article-reader-layout.glossary-disabled .article-reader-left-sidebar {
    display: none !important;
}

.article-reader-layout.is-glossary-collapsed,
.article-reader-layout.glossary-disabled {
    grid-template-columns: 1fr !important;
}

.article-reader-layout.glossary-disabled .glossary-expand-floating-btn {
    display: none !important;
}

.glossary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 14px 12px 14px;
    border-bottom: 1px solid var(--border);
}

.glossary-title-group {
    flex: 1;
    min-width: 0;
}

.glossary-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
    margin-left: 2px;
}

.glossary-collapse-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: var(--brand);
}

.glossary-expand-floating-btn {
    display: none;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 11px 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.glossary-expand-floating-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--brand-dark, #1e3a8a) 0%, #0f172a 100%);
    border-color: color-mix(in srgb, var(--brand) 50%, #ffffff);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent);
    color: #ffffff;
}

.glossary-btn-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 30%, rgba(255, 255, 255, 0.15));
    color: var(--brand-soft, #bfdbfe);
}

.glossary-btn-book-icon {
    width: 11px;
    height: 11px;
}

.glossary-btn-pulse-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 1.5px #0f172a;
}

.glossary-btn-label {
    letter-spacing: -0.01em;
}

.glossary-btn-arrow-icon {
    width: 12px;
    height: 12px;
    opacity: 0.75;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.glossary-expand-floating-btn:hover .glossary-btn-arrow-icon {
    transform: translateX(2px);
    opacity: 1;
}

.article-reader-layout.is-glossary-collapsed .glossary-expand-floating-btn {
    display: inline-flex !important;
}

.preview-top-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.preview-header-left-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
}

.preview-header-right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.preview-controls-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
}

/* â”€â”€ Gmail-Style Quick Settings Gear Button & Side Drawer â”€â”€ */
.highlight-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.highlight-settings-btn:hover {
    background: var(--surface-muted);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.highlight-settings-btn .gear-icon {
    width: 17px;
    height: 17px;
    color: var(--ink-muted);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.highlight-settings-btn:hover .gear-icon {
    transform: rotate(60deg);
    color: var(--brand);
}

.settings-btn-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Side Drawer Overlay Backdrop */
.highlight-settings-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    z-index: 999990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.highlight-settings-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Gmail-Style Side Drawer */
.highlight-settings-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    width: min(420px, 96vw) !important;
    background: var(--surface-elevated) !important;
    border-left: 1px solid var(--border) !important;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.3) !important;
    z-index: 9999999 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.36s ease;
}

.highlight-settings-drawer.is-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body.drawer-open-lock {
    overflow: hidden !important;
}

.highlight-drawer-header {
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 22px !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--surface) !important;
    box-sizing: border-box !important;
}

.highlight-drawer-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.highlight-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

.drawer-gear-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
    flex-shrink: 0;
}

.drawer-gear-icon {
    width: 18px;
    height: 18px;
    color: var(--brand);
}

.highlight-drawer-subtitle {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin: 3px 0 0 0;
}

.highlight-drawer-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.highlight-drawer-close-btn:hover {
    background: color-mix(in srgb, var(--brand) 18%, var(--surface-muted));
    color: var(--ink);
    border-color: var(--brand);
    transform: rotate(90deg) scale(1.05);
}

.highlight-drawer-close-btn svg {
    width: 18px;
    height: 18px;
}

.highlight-drawer-body {
    flex: 1 1 auto !important;
    height: calc(100vh - 136px) !important;
    height: calc(100dvh - 136px) !important;
    max-height: calc(100vh - 136px) !important;
    max-height: calc(100dvh - 136px) !important;
    padding: 18px 22px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
}

.drawer-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.drawer-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.drawer-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-section-icon {
    font-size: 1.1rem;
}

.drawer-section-label {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

.drawer-section-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
}

.drawer-section-desc {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin: 0 0 16px;
    line-height: 1.4;
}

.drawer-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.drawer-color-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
}

.drawer-color-card:hover {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.drawer-color-card.is-selected {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-elevated));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 28%, transparent);
}

.drawer-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.swatch-check {
    width: 12px;
    height: 12px;
    color: #0f172a;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-color-card.is-selected .swatch-check {
    opacity: 1;
    transform: scale(1);
}

.drawer-color-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
}

.drawer-custom-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.drawer-custom-color-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--surface-muted);
    border: 1.5px dashed var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-custom-color-btn:hover {
    border-color: var(--brand);
    background: var(--surface);
}

.drawer-custom-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(#fbbf24, #38bdf8, #4ade80, #f472b6, #c084fc, #fbbf24);
    color: #ffffff;
    flex-shrink: 0;
}

.drawer-custom-swatch svg {
    width: 14px;
    height: 14px;
}

.drawer-custom-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
}

.drawer-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 12px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-reset-btn:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.drawer-reset-btn .reset-icon {
    width: 13px;
    height: 13px;
    transition: transform 0.3s ease;
}

.drawer-reset-btn:hover .reset-icon {
    transform: rotate(-180deg);
}

.drawer-sample-card {
    padding: 14px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface-muted));
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
    margin-top: 14px;
}

.drawer-sample-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.drawer-sample-title {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
}

.drawer-sample-chip {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
}

.drawer-sample-paragraph {
    font-size: 0.88rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.5;
}

.drawer-sample-word {
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease, color 0.2s ease;
}

/* Top Nav Settings Button */
.top-nav-settings-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    color: var(--ink) !important;
    font: inherit !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
}

.top-nav-settings-btn:hover {
    border-color: var(--brand) !important;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface)) !important;
    color: var(--brand) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 20%, transparent) !important;
}

.nav-gear-icon {
    width: 18px !important;
    height: 18px !important;
    color: var(--ink) !important;
    flex-shrink: 0 !important;
    transition: transform 0.3s ease, color 0.18s ease !important;
}

.top-nav-settings-btn:hover .nav-gear-icon {
    color: var(--brand) !important;
    transform: rotate(60deg) !important;
}

.settings-btn-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(0, 0, 0, 0.2) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* Simple Premium Segmented Level Control */
.drawer-level-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.drawer-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.drawer-level-pill:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.drawer-level-pill.is-selected {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.level-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.level-pill-dot--all {
    background: var(--brand);
}

.level-pill-dot--basic {
    background: #22c55e;
}

.level-pill-dot--intermediate {
    background: #eab308;
}

.level-pill-dot--advanced {
    background: #a855f7;
}

.drawer-level-pill.is-selected .level-pill-dot {
    transform: scale(1.25);
}

.level-pill-label {
    white-space: nowrap;
}

.drawer-sample-card {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.drawer-sample-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    display: block;
    margin-bottom: 8px;
}

.drawer-sample-paragraph {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink);
    margin: 0;
}

.drawer-sample-word {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.level-highlight-filter-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px 3px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}

.level-highlight-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin: 0;
}

.level-highlight-label svg {
    width: 14px;
    height: 14px;
}

.header-level-select {
    padding: 4px 28px 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.header-level-select:hover,
.header-level-select:focus {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent);
}

.level-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--surface-elevated);
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.level-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.level-pill-btn:hover {
    color: var(--ink);
    background: var(--surface-muted);
}

.level-pill-btn.is-active {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-weight: 800;
}

.level-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.level-pill-dot--basic {
    background: #10b981;
}

.level-pill-dot--intermediate {
    background: #f59e0b;
}

.level-pill-dot--advanced {
    background: #8b5cf6;
}

.level-pill-btn--basic.is-active {
    background: #dcfce7;
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.25);
}

.level-pill-btn--intermediate.is-active {
    background: #fef3c7;
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.25);
}

.level-pill-btn--advanced.is-active {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: rgba(107, 33, 168, 0.25);
}

.student-highlight-color-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-color-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.student-color-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-muted);
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}

.header-color-options {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.header-color-chip,
.header-color-custom-wrapper {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}

.header-color-chip--default {
    border: 1px solid rgba(0, 0, 0, 0.32);
}

.header-color-custom-wrapper {
    background: conic-gradient(#fbbf24, #38bdf8, #4ade80, #f472b6, #c084fc, #fbbf24);
}

.header-color-chip:hover,
.header-color-custom-wrapper:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--brand), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.student-color-input {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 30px;
    height: 30px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    border: none;
    z-index: 2;
}

.single-word-color-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.single-word-color-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.single-word-color-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-muted);
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}

.single-word-color-options {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.word-color-chip,
.single-word-custom-wrapper {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}

.word-color-chip--default {
    border: 1px solid rgba(0, 0, 0, 0.32);
}

.single-word-custom-wrapper {
    background: conic-gradient(#fbbf24, #38bdf8, #4ade80, #f472b6, #c084fc, #fbbf24);
}

.word-color-chip:hover,
.single-word-custom-wrapper:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--brand), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.single-word-custom-input {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 30px;
    height: 30px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    border: none;
    z-index: 2;
}

.custom-color-icon {
    width: 10px;
    height: 10px;
    color: #ffffff;
    pointer-events: none;
    display: block;
    margin: auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.word-color-reset-btn,
.header-color-reset-btn,
.level-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--ink-muted);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.word-color-reset-btn .reset-icon,
.header-color-reset-btn .reset-icon,
.level-reset-btn .reset-icon {
    width: 11px;
    height: 11px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.word-color-reset-btn:hover,
.header-color-reset-btn:hover,
.level-reset-btn:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 20%, transparent);
}

.word-color-reset-btn:hover .reset-icon,
.header-color-reset-btn:hover .reset-icon,
.level-reset-btn:hover .reset-icon {
    transform: rotate(-180deg);
}

.article-reader-card--student .article-body .word-hi {
    font-weight: inherit;
    color: var(--student-highlight-text-color-hi, #0f766e);
    background: var(--student-highlight-color-hi, #f8e9b5);
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}

.article-reader-card--student .article-body .word-auto {
    font-weight: 400;
    background: var(--student-highlight-color, #eeeeee);
    color: var(--student-highlight-text-color, #0f172a);
    padding: 2px 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}

.word-hi.is-level-dimmed,
.word-auto.is-level-dimmed {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: default !important;
}

.article-reader-card--student .article-body-pagination {
    margin: 8px 24px 0;
    padding: 18px 0 22px;
    border-top: 1px solid var(--border);
}

.article-reader-card--student .article-body-page-btn,
.article-reader-card--student .article-body-seq-link {
    border-radius: 12px;
    min-height: 42px;
}

.article-reader-card--student .article-body-seq-link.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-color: transparent;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--brand) 28%, transparent);
}

.article-reader-card--student .article-sequence {
    margin: 0 24px 22px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.reading-timer-panel--student {
    position: static;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px 18px 16px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--brand) 88%, #1f2937) 0%, #111827 72%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    animation: student-timer-in 0.55s ease 0.12s both;
}

@keyframes student-timer-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reading-timer-panel--student .reading-timer-title {
    margin-bottom: 12px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.reading-timer-panel--student .reading-timer-row {
    margin-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.86rem;
}

.reading-timer-panel--student .reading-timer-row:last-of-type {
    border-bottom: 0;
}

.reading-timer-panel--student .reading-timer-row strong {
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.reading-timer-panel--student .reading-timer-status {
    margin-top: 12px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.78);
}

@media (max-width: 900px) {
    .article-reader--student {
        grid-template-columns: 1fr;
    }

    .reading-timer-panel--student {
        position: static;
        order: -1;
    }
}

@media (max-width: 640px) {
    .student-reading {
        padding-bottom: 28px;
    }

    .student-reading-title {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }

    .student-reading-lead {
        font-size: 0.96rem;
    }

    .article-reader-card--student .preview-top,
    .article-reader-card--student .article-reader-body-shell,
    .article-reader-card--student .article-body-pagination,
    .article-reader-card--student .article-sequence {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-reader-card--student .article-body-pagination {
        margin-left: 16px;
        margin-right: 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .article-reader-card--student .article-sequence {
        margin-left: 16px;
        margin-right: 16px;
    }

    .article-reader-card--student .preview-body,
    .article-reader-card--student .article-body {
        font-size: 1.02rem;
        line-height: 1.75;
    }
}

/* â”€â”€ Premium Student Reader Toolbar â”€â”€ */
.student-reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f4f6f2 0%, #faf6ee 100%) !important;
    border: 1.5px solid #d2dad0 !important;
    box-shadow: 0 4px 16px rgba(114, 129, 100, 0.08);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.student-reader-toolbar-copy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.now-reading-icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e6ebe3 !important;
    color: #728164 !important;
    border: 1px solid #b8c4b4;
    flex-shrink: 0;
}

.student-reader-eyebrow {
    color: #728164 !important;
    font-weight: 800 !important;
}

/* Up / Down Level Stepper Controls */
.student-level-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #d4b87b;
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.1);
}

.student-active-level-badge {
    font-size: 0.88rem;
    font-weight: 800;
    color: #302317;
    letter-spacing: -0.01em;
}

.level-stepper-btn-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-stepper-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #c8a872;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    color: #3b2918;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.level-stepper-btn:hover {
    transform: scale(1.08);
    background: #dfc790;
}

.level-stepper-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.now-reading-book-icon {
    width: 18px;
    height: 18px;
}

.now-reading-pulse-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px #ffffff;
    animation: nowReadingPulse 2s infinite;
}

@keyframes nowReadingPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.now-reading-copy-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.student-reader-eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    line-height: 1;
}

.student-reader-progress {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.seq-count-muted {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.article-cefr-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.article-cefr-tab {
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-cefr-tab:hover {
    color: var(--ink);
    background: rgba(0, 0, 0, 0.04);
}

.article-cefr-tab.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 35%, transparent);
    font-weight: 800;
}

html[data-theme="dark"] .student-reading-chip {
    background: var(--surface);
}

html[data-theme="dark"] .student-reading-chip--accent {
    color: var(--brand-light);
}

html[data-theme="dark"] .article-reader-card--student {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 40%, var(--surface)) 0%, var(--surface) 130px);
}

html[data-theme="dark"] .article-reader-card--student .article-body .word-hi {
    color: var(--student-highlight-text-color-hi, #0f766e);
    background: var(--student-highlight-color-hi, #f8e9b5);
}

html[data-theme="dark"] .reading-timer-panel--student {
    border-color: rgba(255, 77, 87, 0.35);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .reading-timer-panel:not(.reading-timer-panel--student) {
        margin: 14px 0 0 auto;
        width: min(280px, calc(100vw - 24px));
        padding: 10px 12px;
    }

    .reading-timer-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .reading-timer-row,
    .reading-timer-row strong {
        font-size: 11px;
    }
}

/* â”€â”€ Student test result modal â”€â”€ */
.btn.is-disabled,
span.btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.test-result-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.test-result-modal[hidden] {
    display: none !important;
}

.test-result-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.test-result-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(90vh, 920px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 24px;
    background: var(--surface-elevated);
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.test-result-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-head-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
}

.kicker-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    display: inline-block;
    box-shadow: 0 0 6px var(--brand);
}

.test-result-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
}

.test-result-meta {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin: 0;
}

.test-result-close {
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.test-result-close:hover {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--brand);
    transform: rotate(90deg);
}

.test-result-close svg {
    width: 18px;
    height: 18px;
}

/* Modal Score Hero Box */
.test-result-hero-card {
    border-radius: 18px;
    padding: 18px 20px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.result-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.result-score-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.result-score-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin-right: 4px;
}

.result-score-main {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--ink);
}

.result-score-sep {
    font-size: 1.2rem;
    color: var(--ink-muted);
}

.result-score-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.result-badge-pill {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.result-badge-pill--high {
    background: color-mix(in srgb, #10b981 15%, var(--surface));
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 30%, transparent);
}

.result-badge-pill--medium {
    background: color-mix(in srgb, #f59e0b 15%, var(--surface));
    color: #f59e0b;
    border-color: color-mix(in srgb, #f59e0b 30%, transparent);
}

.result-badge-pill--low {
    background: color-mix(in srgb, #ef4444 15%, var(--surface));
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 30%, transparent);
}

.result-score-track {
    height: 8px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.result-score-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-score-fill--high {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.result-score-fill--medium {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.result-score-fill--low {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

/* Question Cards inside Modal */
.test-result-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-result-question {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.test-result-question.is-correct {
    border-left: 4px solid #10b981;
}

.test-result-question.is-wrong {
    border-left: 4px solid #ef4444;
}

.test-result-question-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.question-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.question-num-chip {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: 2px;
}

.question-text-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
}

.test-result-status {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.test-result-question.is-correct .test-result-status {
    background: color-mix(in srgb, #10b981 12%, var(--surface));
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 30%, transparent);
}

.test-result-question.is-wrong .test-result-status {
    background: color-mix(in srgb, #ef4444 12%, var(--surface));
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 30%, transparent);
}

/* Option Choices inside Question Card */
.test-result-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-result-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.option-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.option-key-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.76rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ink);
}

.option-text {
    font-weight: 600;
}

.test-result-option.is-correct-option {
    border-color: #10b981;
    background: color-mix(in srgb, #10b981 10%, var(--surface));
}

.test-result-option.is-selected:not(.is-correct-option) {
    border-color: #ef4444;
    background: color-mix(in srgb, #ef4444 10%, var(--surface));
}

.option-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.option-tag--correct {
    background: #10b981;
    color: #ffffff;
}

.option-tag--wrong {
    background: #ef4444;
    color: #ffffff;
}

.test-result-answer-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.meta-text--correct {
    color: #10b981;
}

.meta-text--wrong {
    color: #ef4444;
}

.test-result-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.test-result-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--ink-muted);
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* -- POS lexicon admin -- */
.pos-lexicon-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.pos-lexicon-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 650;
}

.pos-lexicon-tab:hover {
    background: #e2e8f0;
}

.pos-lexicon-tab.is-active {
    background: #0f766e;
    color: #fff;
}

.pos-lexicon-note {
    margin: 0 0 18px;
    font-size: 0.92rem;
}

#pos-search-results.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.pos-lexicon-note a {
    color: #0f766e;
    font-weight: 650;
}

.admin-search-form {
    margin: 0;
    width: 100%;
    min-width: 0;
}

.admin-search-form .admin-search {
    width: 100%;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 4px 4px;
}

.admin-page-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    font-weight: 650;
    font-size: 0.9rem;
}

.admin-page-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-page-meta {
    font-size: 0.9rem;
    color: #64748b;
}

.req {
    color: #dc2626;
    font-weight: 700;
}

/* -- Student dashboard metric cards -- */
.student-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.student-metric-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 22px;
    padding: 18px;
    border: 1.5px solid #d4b87b;
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    box-shadow: 0 10px 24px rgba(118, 85, 47, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.student-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(118, 85, 47, 0.14);
}

.student-metric-card--blue {
    background: linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
    border-color: #d8c296;
}

.student-metric-card--green {
    background: linear-gradient(180deg, #faf6ee 0%, #f4f6f2 100%);
    border-color: #d2dad0;
}

.student-metric-card--rose {
    background: linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
    border-color: #d8c296;
}

.student-metric-card--amber {
    background: linear-gradient(180deg, #faf6ee 0%, #f4f6f2 100%);
    border-color: #d2dad0;
}

.student-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.student-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.student-metric-icon svg {
    width: 20px;
    height: 20px;
}

.student-metric-card--blue .student-metric-icon {
    background: #f6eee0;
    color: #8d775f;
    border: 1px solid #d8c296;
}

.student-metric-card--green .student-metric-icon {
    background: #f4f6f2;
    color: #728164;
    border: 1px solid #d2dad0;
}

.student-metric-card--rose .student-metric-icon {
    background: #f6eee0;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.student-metric-card--amber .student-metric-icon {
    background: #f4f6f2;
    color: #728164;
    border: 1px solid #d2dad0;
}

.student-metric-menu {
    color: #8d775f;
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 700;
}

.student-metric-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.student-metric-value {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    font-weight: 800;
    color: #302317;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.student-metric-label {
    margin-top: 6px;
    color: #665039;
    font-size: 0.92rem;
    font-weight: 650;
}

.student-metric-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.student-metric-ring svg {
    width: 72px;
    height: 72px;
    display: block;
}

.student-metric-ring-track {
    fill: none;
    stroke: #e7d6b5;
    stroke-width: 7;
}

.student-metric-ring-value {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
}

.student-metric-card--blue .student-metric-ring-value {
    stroke: #8d775f;
}

.student-metric-card--green .student-metric-ring-value {
    stroke: #728164;
}

.student-metric-card--rose .student-metric-ring-value {
    stroke: #5c3c14;
}

.student-metric-card--amber .student-metric-ring-value {
    stroke: #728164;
}

.student-metric-ring strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--ink);
}

@media (max-width: 1100px) {
    .student-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .student-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Student dashboard welcome -- */
.student-welcome {
    margin-bottom: 18px;
    padding: 36px 40px 38px;
    border-radius: 20px;
    background: linear-gradient(115deg, #0a3d2e 0%, #145c44 42%, #0d4a38 72%, #083528 100%);
    border: 1px solid rgba(197, 160, 89, 0.18);
    box-shadow: 0 18px 40px rgba(8, 53, 40, 0.28);
}

.student-welcome-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: #c5a059;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.student-welcome-title {
    margin: 0;
    max-width: 820px;
    color: #f8faf8;
    font-family: Fraunces, "Times New Roman", serif;
    font-size: clamp(1.85rem, 3.2vw, 2.55rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.student-welcome-name {
    color: #c5a059;
}

.student-welcome-lead {
    margin: 12px 0 0;
    max-width: 560px;
    color: rgba(209, 213, 219, 0.88);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* -- Student progress charts -- */
.student-progress {
    display: grid;
    gap: 16px;
    margin: 24px 0;
}

.student-progress-head h2 {
    margin: 0;
    font-family: Fraunces, "Times New Roman", serif;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.student-progress-head p {
    margin: 6px 0 0;
    color: var(--ink-muted);
    font-size: 0.94rem;
}

.student-progress-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.student-progress-card {
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1.5px solid #d4b87b;
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.16), transparent 34%),
        linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
    box-shadow: 0 8px 24px rgba(118, 85, 47, 0.08);
}

.student-progress-card--score {
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.2), transparent 36%),
        linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%);
}

.student-progress-card--time {
    background:
        radial-gradient(circle at top right, rgba(114, 129, 100, 0.16), transparent 36%),
        linear-gradient(180deg, #faf6ee 0%, #f4f6f2 100%);
}

.student-progress-card .dashboard-panel-head--line {
    margin-bottom: 14px;
}

.student-progress-card .dashboard-panel-head--line h2 {
    font-size: 1.2rem;
    color: #302317;
}

.student-progress-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.student-progress-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.student-progress-icon--score {
    background: #f6eee0;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.student-progress-icon--time {
    background: #f4f6f2;
    color: #728164;
    border: 1px solid #d2dad0;
}

.student-progress-range {
    margin: 4px 0 0 !important;
    font-size: 0.82rem !important;
    font-weight: 700;
    color: #665039 !important;
}

.student-progress-tabs .growth-period-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1px solid #c8a872;
    font-weight: 800;
}

.student-progress-card--score .student-progress-tabs .growth-period-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
}

.student-progress-card--time .student-progress-tabs .growth-period-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
}

.student-progress-chip {
    border: 1px solid transparent;
}

.student-progress-chip--score {
    background: #f6eee0;
    color: #5c3c14;
    border-color: #d8c296;
}

.student-progress-chip--time {
    background: #f4f6f2;
    color: #728164;
    border-color: #d2dad0;
}

.student-progress-chart-wrap {
    position: relative;
    margin-top: 4px;
    border-radius: 18px;
    border: 1px solid #e8d7b7;
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    overflow: hidden;
    min-height: 280px;
}

.student-progress-chart-wrap .growth-line-chart {
    min-height: 280px;
}

.student-progress-dot {
    cursor: pointer;
}

.student-progress-tooltip {
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #d4b87b;
    background: #faf6ee;
    box-shadow: 0 16px 36px rgba(59, 40, 22, 0.16);
}

.student-progress-card--score .student-progress-tooltip strong {
    color: #5c3c14;
}

.student-progress-card--time .student-progress-tooltip strong {
    color: #728164;
}

.student-progress-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: #665039;
    font-size: 0.92rem;
    font-weight: 650;
    pointer-events: none;
    background: rgba(250, 246, 238, 0.85);
}

.student-progress-empty[hidden] {
    display: none !important;
}

@media (min-width: 1100px) {
    .student-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .student-progress-card .dashboard-panel-head--line {
        flex-direction: column;
        align-items: stretch;
    }

    .student-progress-card .growth-period-controls {
        justify-content: flex-start;
    }
}

/* -- Student quick links -- */
.student-quicklinks {
    margin-top: 8px;
    border: 1.5px solid #d4b87b !important;
    background: linear-gradient(180deg, #faf6ee 0%, #f6eee0 100%) !important;
    box-shadow: 0 10px 28px rgba(118, 85, 47, 0.08) !important;
}

.student-quicklinks .admin-panel-head h2 {
    color: #302317;
}

.student-quicklinks .admin-panel-head p {
    color: #665039;
}

.student-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.student-quicklink {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 16px 16px 16px 14px;
    border-radius: 18px;
    border: 1px solid #e8d7b7;
    background: #ffffff;
    text-decoration: none;
    color: #302317;
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.student-quicklink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(118, 85, 47, 0.14);
    color: #302317;
}

.student-quicklink-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.student-quicklink-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.student-quicklink-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.student-quicklink-copy strong {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #302317;
}

.student-quicklink-copy small {
    color: #665039;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.student-quicklink-arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    background: #f6eee0;
    color: #784a0f;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.student-quicklink:hover .student-quicklink-arrow {
    transform: translateX(2px);
}

.student-quicklink--blue {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 1px solid #e8d7b7;
}

.student-quicklink--blue .student-quicklink-icon {
    background: #f6eee0;
    color: #8d775f;
    border: 1px solid #d8c296;
}

.student-quicklink--blue:hover {
    border-color: #c8a872;
}

.student-quicklink--blue:hover .student-quicklink-arrow {
    background: #ebd7a8;
    color: #3b2918;
}

.student-quicklink--rose {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f2 100%);
    border: 1px solid #d2dad0;
}

.student-quicklink--rose .student-quicklink-icon {
    background: #e6ebe3;
    color: #728164;
    border: 1px solid #b8c4b4;
}

.student-quicklink--rose:hover {
    border-color: #728164;
}

.student-quicklink--rose:hover .student-quicklink-arrow {
    background: #e6ebe3;
    color: #728164;
}

.student-quicklink--amber {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 1px solid #e8d7b7;
}

.student-quicklink--amber .student-quicklink-icon {
    background: #f6eee0;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.student-quicklink--amber:hover {
    border-color: #c8a872;
}

.student-quicklink--amber:hover .student-quicklink-arrow {
    background: #ebd7a8;
    color: #3b2918;
}

.student-quicklink--green {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f2 100%);
    border: 1px solid #d2dad0;
}

.student-quicklink--green .student-quicklink-icon {
    background: #e6ebe3;
    color: #728164;
    border: 1px solid #b8c4b4;
}

.student-quicklink--green:hover {
    border-color: #728164;
}

.student-quicklink--green:hover .student-quicklink-arrow {
    background: #e6ebe3;
    color: #728164;
}

.student-quicklink--green:hover {
    border-color: rgba(34, 197, 94, 0.35);
}

.student-quicklink--green:hover .student-quicklink-arrow {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

@media (max-width: 1100px) {
    .student-quicklinks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .student-quicklinks-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------
   Dark theme visibility overrides (Student + Admin panels)
   ----------------------------------------------------------- */
html[data-theme="dark"] .admin-meta-chip,
html[data-theme="dark"] .profile-stat-card,
html[data-theme="dark"] .profile-jump-nav,
html[data-theme="dark"] .favorite-word-card,
html[data-theme="dark"] .word-history-item,
html[data-theme="dark"] .reading-card-item,
html[data-theme="dark"] .profile-test-item,
html[data-theme="dark"] .profile-tip-item,
html[data-theme="dark"] .admin-stat-item,
html[data-theme="dark"] .badge-card,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .admin-search input,
html[data-theme="dark"] .admin-topnav-search input,
html[data-theme="dark"] .dashboard-search,
html[data-theme="dark"] input[type="search"] {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .admin-search input::placeholder,
html[data-theme="dark"] .admin-topnav-search input::placeholder,
html[data-theme="dark"] .dashboard-search input::placeholder,
html[data-theme="dark"] input[type="search"]::placeholder {
    color: var(--ink-soft);
}

html[data-theme="dark"] .admin-search svg,
html[data-theme="dark"] .admin-topnav-search-icon {
    color: var(--ink-soft);
}

html[data-theme="dark"] .admin-search input:-webkit-autofill,
html[data-theme="dark"] .admin-search input:-webkit-autofill:hover,
html[data-theme="dark"] .admin-search input:-webkit-autofill:focus,
html[data-theme="dark"] input[type="search"]:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px var(--surface-elevated) inset;
    transition: background-color 99999s ease-out;
}

[data-dashboard-search-target].is-search-hidden,
[data-dashboard-search-panel].is-search-hidden,
tr.is-search-hidden {
    display: none !important;
}

html[data-theme="dark"] .admin-meta-chip strong,
html[data-theme="dark"] .profile-stat-card strong,
html[data-theme="dark"] .admin-stat-item strong,
html[data-theme="dark"] .favorite-word-card-top h3,
html[data-theme="dark"] .word-history-main strong,
html[data-theme="dark"] .reading-card-item strong,
html[data-theme="dark"] .profile-test-main strong,
html[data-theme="dark"] .reading-card-item em,
html[data-theme="dark"] .cell-primary,
html[data-theme="dark"] .admin-panel-head h2,
html[data-theme="dark"] .admin-hero h1,
html[data-theme="dark"] .profile-identity-copy h1 {
    color: var(--ink);
}

html[data-theme="dark"] .admin-meta-chip,
html[data-theme="dark"] .profile-stat-card span,
html[data-theme="dark"] .profile-stat-card small,
html[data-theme="dark"] .admin-stat-item span,
html[data-theme="dark"] .cell-muted,
html[data-theme="dark"] .admin-panel-head p,
html[data-theme="dark"] .admin-hero p,
html[data-theme="dark"] .favorite-word-snippet,
html[data-theme="dark"] .word-history-main span,
html[data-theme="dark"] .reading-card-item span,
html[data-theme="dark"] .profile-test-main span,
html[data-theme="dark"] .profile-tip-item p,
html[data-theme="dark"] .empty-data {
    color: var(--ink-muted);
}

html[data-theme="dark"] .profile-score-pill {
    background: var(--info-bg);
    color: var(--info);
}

html[data-theme="dark"] .profile-score-pill strong {
    color: inherit;
}

html[data-theme="dark"] .profile-empty-favorites,
html[data-theme="dark"] .profile-empty-block {
    background: var(--surface-muted);
    border-color: var(--border);
    color: var(--ink-muted);
}

html[data-theme="dark"] .word-history-rank,
html[data-theme="dark"] .word-history-count {
    background: var(--success-bg);
    color: var(--success);
}

html[data-theme="dark"] .favorite-pos-chip {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

html[data-theme="dark"] .favorite-saved-chip,
html[data-theme="dark"] .favorite-card-star {
    background: var(--warning-bg);
    color: var(--warning);
}

html[data-theme="dark"] .profile-member-since {
    background: var(--surface-muted);
    color: var(--ink-muted);
}

html[data-theme="dark"] .profile-member-since strong {
    color: var(--ink);
}

html[data-theme="dark"] .student-shell {
    background:
        radial-gradient(circle at top right, rgba(255, 77, 87, 0.08), transparent 28%),
        var(--surface-muted);
}

html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-form-shell,
html[data-theme="dark"] .admin-table-wrap,
html[data-theme="dark"] .admin-note {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .premium-stat-card {
    background:
        radial-gradient(circle at top left, rgba(255, 77, 87, 0.12), transparent 42%),
        var(--surface-elevated);
    border-color: var(--border);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    color: var(--ink);
}

html[data-theme="dark"] .premium-stat-label {
    color: var(--ink-muted);
}

html[data-theme="dark"] .premium-stat-value {
    color: var(--brand);
}

html[data-theme="dark"] .premium-stat-meta {
    color: var(--ink-soft);
}

html[data-theme="dark"] .admin-table .col-word,
html[data-theme="dark"] .admin-table .col-action {
    background: var(--surface-elevated);
}

html[data-theme="dark"] .admin-table .col-action {
    box-shadow: -8px 0 12px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .admin-table th.col-word,
html[data-theme="dark"] .admin-table th.col-action {
    background: var(--table-head);
}

html[data-theme="dark"] .admin-table tbody tr:hover .col-word,
html[data-theme="dark"] .admin-table tbody tr:hover .col-action {
    background: var(--table-row-hover);
}

html[data-theme="dark"] .admin-word-chip {
    background: var(--brand-soft);
    color: var(--brand-light);
}

html[data-theme="dark"] .admin-panel-head {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-elevated) 100%);
    border-bottom-color: var(--border);
}

html[data-theme="dark"] .admin-hero {
    background:
        radial-gradient(circle at top right, rgba(255, 77, 87, 0.18), transparent 34%),
        radial-gradient(circle at 12% 120%, rgba(96, 165, 250, 0.1), transparent 42%),
        linear-gradient(145deg, var(--surface-elevated) 0%, var(--surface) 58%, #121826 100%);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .student-metric-card {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .student-metric-card--blue {
    background: linear-gradient(180deg, #1c2419 0%, #151b13 100%);
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-metric-card--green {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.3);
}

html[data-theme="dark"] .student-metric-card--rose {
    background: linear-gradient(180deg, #251d18 0%, #1c1511 100%);
    border-color: rgba(141, 119, 95, 0.35);
}

html[data-theme="dark"] .student-metric-card--amber {
    background: linear-gradient(180deg, #1c2419 0%, #151b13 100%);
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-metric-card--blue .student-metric-icon {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
}

html[data-theme="dark"] .student-metric-card--green .student-metric-icon {
    background: rgba(212, 184, 123, 0.2);
    color: #d4b87b;
}

html[data-theme="dark"] .student-metric-card--rose .student-metric-icon {
    background: rgba(141, 119, 95, 0.22);
    color: #a89279;
}

html[data-theme="dark"] .student-metric-card--amber .student-metric-icon {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
}

html[data-theme="dark"] .student-metric-value,
html[data-theme="dark"] .student-metric-ring strong {
    color: var(--ink);
}

html[data-theme="dark"] .student-metric-label,
html[data-theme="dark"] .student-metric-menu {
    color: var(--ink-muted);
}

html[data-theme="dark"] .student-metric-ring-track {
    stroke: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .awarded-badges-panel {
    background: var(--surface-elevated);
    border-color: var(--border);
}

html[data-theme="dark"] .awarded-badges-panel .admin-panel-head {
    background: linear-gradient(120deg, #121826 0%, #1c2438 55%, #151b2b 100%);
    border-bottom-color: var(--border);
}

html[data-theme="dark"] .awarded-badges-panel .admin-panel-head h2 {
    color: #eef2ff;
}

html[data-theme="dark"] .awarded-badges-panel .admin-panel-head p {
    color: rgba(238, 242, 255, 0.68);
}

html[data-theme="dark"] .awarded-badges-panel .admin-form-shell {
    background:
        radial-gradient(700px 240px at 0% 0%, rgba(212, 168, 75, 0.1), transparent 55%),
        radial-gradient(700px 240px at 100% 0%, rgba(56, 178, 172, 0.1), transparent 55%),
        var(--surface-muted);
}

html[data-theme="dark"] .awarded-badge--hours {
    color: #f8e7b8;
    border-color: rgba(224, 184, 92, 0.35);
    background:
        linear-gradient(165deg, #3a3018 0%, #5a4618 48%, #7a5f1e 100%);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .awarded-badge--days {
    color: #c8f5ef;
    border-color: rgba(52, 211, 153, 0.28);
    background:
        linear-gradient(165deg, #14302c 0%, #1a4a44 48%, #1f635b 100%);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .awarded-badge-type {
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.12);
    color: inherit;
}

html[data-theme="dark"] .awarded-badge-check {
    background: #0f1420;
    color: #eef2ff;
}

html[data-theme="dark"] .awarded-badge-medallion {
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 45%, rgba(0, 0, 0, 0.18) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .awarded-badge-foot {
    border-top-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .awarded-badges-empty {
    border-color: var(--border);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

html[data-theme="dark"] .awarded-badges-empty-icon {
    background: linear-gradient(145deg, #3a3018, #5a4618);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .badge-track--hours {
    color: #f8e7b8;
    border-color: rgba(224, 184, 92, 0.3);
    background:
        linear-gradient(145deg, #2f2814 0%, #4a3a16 45%, #5c4818 100%);
}

html[data-theme="dark"] .badge-track--days {
    color: #c8f5ef;
    border-color: rgba(52, 211, 153, 0.28);
    background:
        linear-gradient(145deg, #12302c 0%, #184842 45%, #1d5a52 100%);
}

html[data-theme="dark"] .badge-howto {
    border-color: rgba(255, 255, 255, 0.08);
    color: #e8ecf5;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(212, 168, 75, 0.22), transparent 55%),
        radial-gradient(700px 380px at 92% 8%, rgba(125, 140, 111, 0.18), transparent 50%),
        radial-gradient(600px 300px at 50% 110%, rgba(125, 140, 111, 0.15), transparent 55%),
        linear-gradient(155deg, #171d2e 0%, #222b42 48%, #1a2133 100%);
    box-shadow:
        0 20px 50px rgba(20, 27, 45, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .badge-howto::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

html[data-theme="dark"] .badge-howto-eyebrow {
    color: #f0d59a;
}

html[data-theme="dark"] .badge-howto-intro h2,
html[data-theme="dark"] .badge-howto-step strong {
    color: #fff;
}

html[data-theme="dark"] .badge-howto-intro p,
html[data-theme="dark"] .badge-howto-step>span {
    color: rgba(232, 236, 245, 0.72);
}

html[data-theme="dark"] .badge-howto-flow {
    background: rgba(8, 12, 22, 0.45);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .badge-howto-step {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .badge-howto-tip {
    background: linear-gradient(90deg, rgba(125, 140, 111, 0.22), rgba(212, 168, 75, 0.16));
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
}

html[data-theme="dark"] .profile-identity {
    border-color: var(--border);
    background:
        radial-gradient(circle at 100% 0%, rgba(125, 140, 111, 0.2), transparent 34%),
        radial-gradient(circle at 0% 100%, rgba(212, 184, 123, 0.12), transparent 40%),
        linear-gradient(145deg, var(--surface-elevated) 0%, var(--surface) 52%, #171e2e 100%);
}

html[data-theme="dark"] .profile-favorites-panel {
    border-color: rgba(125, 140, 111, 0.3);
    background:
        radial-gradient(circle at top right, rgba(125, 140, 111, 0.16), transparent 40%),
        linear-gradient(180deg, var(--surface) 0%, #1a2030 100%);
}

html[data-theme="dark"] .profile-favorites-panel .admin-panel-head {
    background: transparent;
    border-bottom-color: var(--border);
}

html[data-theme="dark"] .favorite-word-card {
    background: linear-gradient(180deg, var(--surface-elevated) 0%, #171e2e 100%);
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .favorite-pos-chip {
    background: rgba(125, 140, 111, 0.2);
    color: #a8b89a;
}

html[data-theme="dark"] .favorite-saved-chip,
html[data-theme="dark"] .favorite-card-star {
    background: rgba(212, 184, 123, 0.16);
    color: #d4b87b;
}

html[data-theme="dark"] .profile-empty-favorites,
html[data-theme="dark"] .profile-empty-block {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .profile-empty-icon {
    background: rgba(212, 184, 123, 0.16);
    color: #d4b87b;
}

html[data-theme="dark"] .word-history-rank,
html[data-theme="dark"] .word-history-count {
    background: rgba(125, 140, 111, 0.2);
    color: #a8b89a;
}

html[data-theme="dark"] .profile-score-pill {
    background: var(--info-bg);
    color: var(--info);
}

html[data-theme="dark"] .profile-member-since {
    background: rgba(125, 140, 111, 0.14);
    color: var(--ink-muted);
}

html[data-theme="dark"] .profile-count-pill {
    background: var(--brand-soft);
    color: #a8b89a;
}

html[data-theme="dark"] .profile-count-pill--soft {
    background: var(--surface-muted);
    color: var(--ink-muted);
}

html[data-theme="dark"] .profile-jump-tab:hover,
html[data-theme="dark"] .student-topnav-links a:hover,
html[data-theme="dark"] .student-topnav-user-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

html[data-theme="dark"] .profile-jump-tab.is-active {
    color: #fff;
}

html[data-theme="dark"] .student-topnav-logo-text {
    color: var(--ink);
}

html[data-theme="dark"] .admin-form-shell,
html[data-theme="dark"] .admin-note {
    background: transparent;
    color: var(--ink-muted);
}

html[data-theme="dark"] .admin-note {
    border-color: rgba(125, 140, 111, 0.35);
    background: rgba(125, 140, 111, 0.12);
}

html[data-theme="dark"] .pos-block {
    border-color: var(--border);
    background: var(--surface);
}

html[data-theme="dark"] .pos-title {
    background: var(--table-head);
    color: var(--ink);
}

html[data-theme="dark"] .pos-title small {
    color: var(--ink-muted);
}

html[data-theme="dark"] .form-item,
html[data-theme="dark"] .meaning-card {
    background: var(--surface-muted);
    color: var(--ink);
    border-color: var(--border);
}

html[data-theme="dark"] .meaning-card--sentence {
    background: color-mix(in srgb, var(--warning-bg) 55%, var(--surface));
}

html[data-theme="dark"] .meaning-card--success {
    background: color-mix(in srgb, var(--success-bg) 55%, var(--surface));
}

html[data-theme="dark"] .meaning-card--warning {
    background: color-mix(in srgb, var(--warning-bg) 55%, var(--surface));
}

html[data-theme="dark"] .meaning-card-text,
html[data-theme="dark"] .meaning-card-meta b {
    color: var(--ink);
}

html[data-theme="dark"] .article-body .word-hi {
    background: var(--student-highlight-color-hi, #f8e9b5);
    color: var(--student-highlight-text-color-hi, #0f766e);
}

html[data-theme="dark"] .article-body .word-auto {
    background: var(--student-highlight-color, #eeeeee);
    color: var(--student-highlight-text-color, #0f172a);
}

html[data-theme="dark"] .preview-shell,
html[data-theme="dark"] .article-reader-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .reading-timer-panel {
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    border: 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}

html[data-theme="dark"] .reading-timer-title,
html[data-theme="dark"] .reading-timer-row strong {
    color: #fff;
}

html[data-theme="dark"] .reading-timer-row {
    color: #cbd5e1;
}

html[data-theme="dark"] .reading-timer-status {
    color: #94a3b8;
}

html[data-theme="dark"] .popup-content {
    background: var(--surface-elevated);
    color: var(--ink);
}

html[data-theme="dark"] .btn.danger-ghost {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.35);
}

html[data-theme="dark"] .btn.ghost.btn-sm:hover {
    border-color: rgba(255, 77, 87, 0.45);
    color: #ffb4b8;
}

html[data-theme="dark"] .action-btn--edit:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: var(--info-bg);
    color: var(--info);
}

html[data-theme="dark"] .action-btn--delete:hover {
    border-color: rgba(251, 113, 133, 0.45);
    background: var(--danger-bg);
    color: var(--danger);
}

html[data-theme="dark"] .status-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border);
    color: var(--ink-muted);
}

html[data-theme="dark"] .status-pill--published,
html[data-theme="dark"] .status-pill--active {
    background: var(--success-bg);
    color: var(--success);
    border-color: transparent;
}

html[data-theme="dark"] .status-pill--draft,
html[data-theme="dark"] .status-pill--inactive {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: transparent;
}

html[data-theme="dark"] .dashboard-panel,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .dashboard-hero,
html[data-theme="dark"] .dashboard-hero--welcome,
html[data-theme="dark"] .dashboard-search-empty,
html[data-theme="dark"] .pipeline-item,
html[data-theme="dark"] .card {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .dashboard-hero--welcome {
    background:
        radial-gradient(circle at top right, rgba(52, 211, 153, 0.12), transparent 38%),
        linear-gradient(105deg, #1a2233 0%, #151b2b 55%, #12241d 100%);
}

html[data-theme="dark"] .dashboard-live-pill {
    background: var(--surface-muted);
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
    color: var(--success);
}

html[data-theme="dark"] .line-chart-wrap {
    background: var(--surface-muted);
    border-color: var(--border);
}

html[data-theme="dark"] .growth-period-tabs {
    background: var(--surface-muted);
    border-color: var(--border);
}

html[data-theme="dark"] .growth-period-tab {
    color: var(--ink-muted);
}

html[data-theme="dark"] .growth-period-tab:hover {
    color: var(--ink);
}

html[data-theme="dark"] .growth-period-tab.is-active {
    background: linear-gradient(135deg, #7d8c6f 0%, #728164 100%);
    color: #fff;
}

html[data-theme="dark"] .dashboard-range-chip {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

html[data-theme="dark"] .growth-year-badge {
    background: var(--success-bg);
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}

html[data-theme="dark"] .growth-chart-tooltip {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .student-progress-head h2 {
    color: var(--ink);
}

html[data-theme="dark"] .student-progress-head p,
html[data-theme="dark"] .student-progress-range {
    color: var(--ink-muted) !important;
}

html[data-theme="dark"] .student-progress-card.dashboard-panel {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .student-progress-card .dashboard-panel-head--line h2,
html[data-theme="dark"] [data-progress-title] {
    color: #eef2ff !important;
}

html[data-theme="dark"] .student-progress-card--score {
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.16), transparent 38%),
        var(--surface-elevated);
    border-color: rgba(212, 184, 123, 0.25);
}

html[data-theme="dark"] .student-progress-card--time {
    background:
        radial-gradient(circle at top right, rgba(125, 140, 111, 0.16), transparent 38%),
        var(--surface-elevated);
    border-color: rgba(125, 140, 111, 0.25);
}

html[data-theme="dark"] .student-progress-icon--score {
    background: rgba(212, 184, 123, 0.18);
    color: #d4b87b;
    border: 1px solid rgba(212, 184, 123, 0.3);
}

html[data-theme="dark"] .student-progress-icon--time {
    background: rgba(125, 140, 111, 0.18);
    color: #92a382;
    border: 1px solid rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-progress-card--score .student-progress-tabs .growth-period-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
}

html[data-theme="dark"] .student-progress-card--time .student-progress-tabs .growth-period-tab.is-active {
    background: linear-gradient(135deg, #7d8c6f 0%, #728164 100%) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .student-progress-chip--score {
    background: rgba(212, 184, 123, 0.16);
    color: #d4b87b;
    border-color: rgba(212, 184, 123, 0.3);
}

html[data-theme="dark"] .student-progress-chip--time {
    background: rgba(125, 140, 111, 0.16);
    color: #92a382;
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-progress-chart-wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), var(--surface-muted));
    border-color: var(--border);
}

html[data-theme="dark"] .student-progress-tooltip {
    background: var(--surface);
    border-color: var(--border);
}

html[data-theme="dark"] .student-progress-card--score .student-progress-tooltip strong {
    color: #d4b87b;
}

html[data-theme="dark"] .student-progress-card--time .student-progress-tooltip strong {
    color: #92a382;
}

html[data-theme="dark"] .student-quicklink {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .student-quicklink-copy small {
    color: var(--ink-muted);
}

html[data-theme="dark"] .student-quicklink-arrow {
    background: var(--surface-muted);
    color: var(--ink-soft);
}

html[data-theme="dark"] .student-quicklink--blue {
    background:
        radial-gradient(circle at top right, rgba(125, 140, 111, 0.16), transparent 42%),
        var(--surface-elevated);
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-quicklink--blue .student-quicklink-icon {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
    border: 1px solid rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .student-quicklink--blue:hover .student-quicklink-arrow {
    background: #7d8c6f;
    color: #ffffff;
}

html[data-theme="dark"] .student-quicklink--rose {
    background:
        radial-gradient(circle at top right, rgba(141, 119, 95, 0.16), transparent 42%),
        var(--surface-elevated);
    border-color: rgba(141, 119, 95, 0.35);
}

html[data-theme="dark"] .student-quicklink--rose .student-quicklink-icon {
    background: rgba(141, 119, 95, 0.22);
    color: #a89279;
    border: 1px solid rgba(141, 119, 95, 0.35);
}

html[data-theme="dark"] .student-quicklink--rose:hover .student-quicklink-arrow {
    background: #8d775f;
    color: #ffffff;
}

html[data-theme="dark"] .student-quicklink--amber {
    background:
        radial-gradient(circle at top right, rgba(212, 184, 123, 0.16), transparent 42%),
        var(--surface-elevated);
    border-color: rgba(212, 184, 123, 0.3);
}

html[data-theme="dark"] .student-quicklink--amber .student-quicklink-icon {
    background: rgba(212, 184, 123, 0.2);
    color: #d4b87b;
    border: 1px solid rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .student-quicklink--amber:hover .student-quicklink-arrow {
    background: #d4b87b;
    color: #3b2918;
}

html[data-theme="dark"] .student-quicklink--green {
    background:
        radial-gradient(circle at top right, rgba(125, 140, 111, 0.16), transparent 42%),
        var(--surface-elevated);
    border-color: rgba(125, 140, 111, 0.3);
}

html[data-theme="dark"] .student-quicklink--green .student-quicklink-icon {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
    border: 1px solid rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .student-quicklink--green:hover .student-quicklink-arrow {
    background: #7d8c6f;
    color: #ffffff;
}

html[data-theme="dark"] .dashboard-calendar-popover {
    background: var(--surface-elevated);
    border-color: var(--border);
}

html[data-theme="dark"] .pipeline-item b {
    color: var(--success);
}

html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .admin-table,
html[data-theme="dark"] table.data-table,
html[data-theme="dark"] .data-table {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border);
}

html[data-theme="dark"] .data-table th,
html[data-theme="dark"] table thead th {
    background: var(--table-head);
    color: var(--ink-muted);
    border-color: var(--border);
}

html[data-theme="dark"] .data-table td,
html[data-theme="dark"] table tbody td {
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .data-table tr:hover td,
html[data-theme="dark"] table tbody tr:hover td {
    background: var(--table-row-hover);
}

html[data-theme="dark"] select option {
    background: var(--surface-elevated);
    color: var(--ink);
}

/* â”€â”€ GLOBAL & DARK THEME DARK GRAY SCROLLBAR STYLING â”€â”€ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #262626;
    border-radius: 99px;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a #262626;
}

html[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 99px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e1e1e;
}

html[data-theme="dark"] .preview-body-page,
html[data-theme="dark"] .preview-page {
    background: var(--surface-muted);
    color: var(--ink);
}

html[data-theme="dark"] .preview-toolbar {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink);
}

html[data-theme="dark"] .preview-top h1,
html[data-theme="dark"] .preview-body,
html[data-theme="dark"] .article-sequence {
    color: var(--ink);
}

html[data-theme="dark"] .article-cefr-tab {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--ink);
}

html[data-theme="dark"] .article-cefr-tab.is-active {
    background: var(--brand, #2563eb);
    border-color: var(--brand, #2563eb);
    color: #fff;
}

html[data-theme="dark"] .article-body-page-btn,
html[data-theme="dark"] .article-body-seq-link {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--ink);
}

html[data-theme="dark"] .article-body-page-btn:hover:not(:disabled),
html[data-theme="dark"] .article-body-seq-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

html[data-theme="dark"] .article-body-seq-link.is-active {
    background: var(--brand, #2563eb);
    border-color: var(--brand, #2563eb);
    color: #fff;
}

html[data-theme="dark"] .seq-link {
    color: var(--brand);
}

html[data-theme="dark"] .seq-current {
    background: var(--brand-soft);
    color: #ffb4b8;
}

html[data-theme="dark"] .student-topnav-logo-link img {
    filter: brightness(1.15) contrast(1.05);
}

/* -----------------------------------------------------------
   Student panel responsive polish
   ----------------------------------------------------------- */

.student-shell .admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

@media (max-width: 960px) {
    .student-shell .student-welcome {
        padding: 28px 24px 30px;
    }

    .student-shell .preview-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .student-shell .admin-hero-actions {
        flex-wrap: wrap;
    }

    .student-shell .admin-hero-actions .btn {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .student-shell .student-data-table thead {
        display: none;
    }

    .student-shell .student-data-table,
    .student-shell .student-data-table tbody,
    .student-shell .student-data-table tr,
    .student-shell .student-data-table td {
        display: block;
        width: 100%;
    }

    .student-shell .student-data-table tbody {
        display: grid;
        gap: 12px;
    }

    .student-shell .student-data-table tr {
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface-elevated);
        box-shadow: var(--shadow-sm);
    }

    .student-shell .student-data-table tbody tr:hover {
        background: var(--surface-elevated);
    }

    .student-shell .student-data-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border);
        text-align: right;
    }

    .student-shell .student-data-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .student-shell .student-data-table td:first-child {
        padding-top: 0;
    }

    .student-shell .student-data-table td.empty-data {
        display: block;
        text-align: center;
        border-bottom: 0;
    }

    .student-shell .student-data-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 42%;
        text-align: left;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--ink-muted);
    }

    .student-shell .student-data-table td:not([data-label])::before,
    .student-shell .student-data-table td[data-label=""]::before {
        display: none;
    }

    .student-shell .student-data-table .row-actions,
    .student-shell .student-data-table td[data-label="Action"] {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .student-shell .student-data-table .row-actions .btn,
    .student-shell .student-data-table td[data-label="Action"] .btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        white-space: nowrap;
    }

    .student-shell .student-progress-chart-wrap,
    .student-shell .student-progress-chart-wrap .growth-line-chart {
        min-height: 220px;
    }

    .student-shell .student-progress-card .growth-period-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .student-shell .admin-form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .test-result-modal {
        padding: 12px;
        align-items: end;
    }

    .test-result-modal-dialog {
        padding: 18px 16px 16px;
        max-height: min(92vh, 900px);
        border-radius: 18px 18px 12px 12px;
    }

    .test-result-modal-head {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .student-shell .student-welcome {
        padding: 22px 18px 24px;
        border-radius: 16px;
    }

    .student-shell .student-progress-chart-wrap,
    .student-shell .student-progress-chart-wrap .growth-line-chart {
        min-height: 190px;
    }

    .student-shell .favorite-word-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .student-shell .badge-howto {
        padding-left: 16px;
        padding-right: 16px;
    }

    .student-shell .popup-favorite-btn .favorite-word-label {
        display: none;
    }
}

/* -----------------------------------------------------------
   Employee panel responsive polish
   ----------------------------------------------------------- */

.employee-shell .admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.employee-shell .ck.ck-editor,
.employee-shell .ck-editor__editable,
.employee-shell .ck.ck-editor__main,
.employee-shell .ck-content {
    max-width: 100%;
}

.employee-shell .ck-editor__editable {
    overflow-x: auto;
}

@media (max-width: 960px) {
    .employee-shell .admin-topnav {
        border-radius: 18px;
    }

    .employee-shell .admin-topnav-left {
        align-items: center;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .employee-shell .admin-topnav-title {
        padding-left: 0;
        border-left: 0;
        gap: 1px;
    }

    .employee-shell .admin-topnav-title strong {
        font-size: 1.05rem;
        line-height: 1.15;
    }

    .employee-shell .admin-panel-toolbar,
    .employee-shell .admin-search,
    .employee-shell .admin-search-form {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        display: block;
    }

    .employee-shell .admin-search input,
    .employee-shell .admin-topnav-search input {
        width: 100%;
        font-size: 16px;
        min-height: 44px;
    }

    .employee-shell .admin-topnav-search {
        display: block;
        order: 5;
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .employee-shell .admin-topnav-inner {
        flex-wrap: wrap;
    }

    .employee-shell .admin-hero-actions .btn,
    .employee-shell .admin-hero-actions .admin-cta {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .employee-shell .growth-period-controls,
    .employee-shell .growth-period-tabs {
        flex-wrap: wrap;
    }

    .employee-shell .growth-bars {
        gap: 6px;
    }

    .employee-shell .pos-lexicon-tabs {
        flex-wrap: wrap;
    }

    .employee-shell .admin-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .employee-shell .employee-data-table thead {
        display: none;
    }

    .employee-shell .employee-data-table,
    .employee-shell .employee-data-table tbody,
    .employee-shell .employee-data-table tr,
    .employee-shell .employee-data-table td {
        display: block;
        width: 100%;
    }

    .employee-shell .employee-data-table.admin-table--wide {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .employee-shell .admin-table-wrap--vocabulary {
        max-height: none;
        overflow: visible;
    }

    .employee-shell .employee-data-table tbody {
        display: grid;
        gap: 12px;
    }

    .employee-shell .employee-data-table tr[hidden],
    .employee-shell .employee-data-table tr.is-search-hidden,
    .employee-shell .employee-data-table tr[hidden] td,
    .employee-shell .employee-data-table tr.is-search-hidden td {
        display: none !important;
    }

    .employee-shell .employee-data-table tr {
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--surface-elevated);
        box-shadow: var(--shadow-sm);
    }

    .employee-shell .employee-data-table tbody tr:hover {
        background: var(--surface-elevated);
    }

    .employee-shell .employee-data-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border);
        text-align: right;
        min-width: 0;
        white-space: normal;
    }

    .employee-shell .employee-data-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .employee-shell .employee-data-table td:first-child {
        padding-top: 0;
    }

    .employee-shell .employee-data-table td.empty-data,
    .employee-shell .employee-data-table td:has(.admin-empty) {
        display: block;
        text-align: center;
        border-bottom: 0;
    }

    .employee-shell .employee-data-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 42%;
        text-align: left;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--ink-muted);
    }

    .employee-shell .employee-data-table td:not([data-label])::before,
    .employee-shell .employee-data-table td[data-label=""]::before {
        display: none;
    }

    .employee-shell .employee-data-table .row-actions,
    .employee-shell .employee-data-table td[data-label="Action"],
    .employee-shell .employee-data-table td.col-action {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
    }

    .employee-shell .employee-data-table td[data-label="Action"]>.row-actions,
    .employee-shell .employee-data-table td.col-action>.row-actions {
        display: inline-flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        justify-content: flex-end;
        max-width: 58%;
    }

    .employee-shell .employee-data-table .row-actions .btn,
    .employee-shell .employee-data-table .row-actions .action-btn,
    .employee-shell .employee-data-table td[data-label="Action"] .btn,
    .employee-shell .employee-data-table td[data-label="Action"] .action-btn,
    .employee-shell .employee-data-table td.col-action .btn,
    .employee-shell .employee-data-table td.col-action .action-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        white-space: nowrap;
    }

    .employee-shell .employee-data-table .col-word,
    .employee-shell .employee-data-table .col-pos,
    .employee-shell .employee-data-table .col-action,
    .employee-shell .employee-data-table .cell-full {
        min-width: 0;
        max-width: none;
        position: static;
        box-shadow: none;
        background: transparent;
    }

    .employee-shell .employee-data-table .cell-full,
    .employee-shell .employee-data-table .cell-clamp {
        overflow: visible;
        max-width: none;
    }

    .employee-shell .employee-data-table .cell-clamp-text {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
        text-align: right;
    }

    .employee-shell .employee-data-table td.version-history-title {
        max-width: none;
        min-width: 0;
    }

    .employee-shell .employee-data-table .version-history-title-text {
        text-align: right;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .employee-shell .employee-data-table .version-history-title-note {
        text-align: right;
    }

    .employee-shell .version-diff-side-by-side,
    .employee-shell .version-diff-compare {
        grid-template-columns: 1fr;
        height: auto;
        max-height: calc(90vh - 130px);
        overflow: auto;
    }

    .employee-shell .version-diff-column {
        min-height: 220px;
    }

    .employee-shell .version-diff-pane {
        max-height: 38vh;
    }

    .employee-shell .employee-data-table td.cell-full,
    .employee-shell .employee-data-table td.cell-clamp {
        display: flex;
    }

    .employee-shell .employee-data-table td.article-history-notes {
        display: block;
        text-align: left;
        padding-top: 10px;
    }

    .employee-shell .employee-data-table td.article-history-notes::before {
        display: none;
    }

    .employee-shell .article-history-notes-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .employee-shell .admin-form-actions .btn,
    .employee-shell .admin-form-actions .btn.ghost {
        width: 100%;
        justify-content: center;
    }

    .employee-shell .admin-pagination {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .employee-shell .confirm-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .employee-shell .confirm-modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .employee-shell .admin-topnav-date {
        display: none;
    }

    .employee-shell .admin-topnav {
        margin: 8px 8px 0;
        border-radius: 16px;
    }

    .employee-shell .admin-topnav-inner {
        min-height: 52px;
        padding: 6px 10px;
        gap: 8px;
    }

    .employee-shell .admin-topnav-left {
        gap: 6px;
    }

    .employee-shell .admin-topnav-title {
        padding-left: 0;
        border-left: 0;
    }

    .employee-shell .admin-topnav-title strong {
        font-size: 0.98rem;
    }

    .employee-shell .admin-topnav-title span {
        display: none;
    }

    .employee-shell .admin-main {
        padding: 12px 10px 22px;
    }

    .employee-shell .filter-row {
        grid-template-columns: 1fr;
    }

    .employee-shell .filter-row .field[style] {
        align-self: stretch !important;
    }

    .employee-shell .filter-row .btn,
    .employee-shell .filter-row input,
    .employee-shell .filter-row select {
        width: 100%;
        font-size: 16px;
    }

    .employee-shell .filter-row .btn {
        justify-content: center;
        min-height: 44px;
    }

    .employee-shell .growth-bars {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .employee-shell .admin-topnav-menu-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 0 !important;
    }

    .employee-shell .theme-toggle-btn {
        min-height: 36px;
        padding: 0 10px;
    }

    .employee-shell .admin-topnav-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
}

/* -----------------------------------------------------------
   Image Size Modal Form
   ----------------------------------------------------------- */
.img-size-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 14, 24, 0.62);
    backdrop-filter: blur(4px);
}

.img-size-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: min(480px, 92vw);
    padding: 22px 24px 20px;
    border-radius: 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.24s ease both;
}

.img-size-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.img-size-modal-head h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--ink);
}

.img-size-modal-close {
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.img-size-modal-close:hover {
    color: var(--ink);
}

.img-size-field-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.img-size-x {
    display: block;
    padding-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-align: center;
}

.img-size-check-row {
    margin-bottom: 16px;
}

.img-size-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
}

.img-size-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.img-size-preset-label {
    display: block;
    width: 100%;
    margin-bottom: 4px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.img-size-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* -----------------------------------------------------------
   CKEditor Native Dialog Dark Mode Theme (Image Properties, etc.)
   ----------------------------------------------------------- */
html[data-theme="dark"] .cke_dialog_background_cover {
    background: rgba(10, 14, 24, 0.75) !important;
    opacity: 0.8 !important;
}

html[data-theme="dark"] .cke_dialog {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .cke_dialog_body {
    background: var(--surface-elevated, #1a2234) !important;
    border: 1px solid var(--border, #2e3a52) !important;
    border-radius: 16px !important;
    color: var(--ink, #eef2ff) !important;
}

html[data-theme="dark"] .cke_dialog_title {
    background: var(--surface-muted, #151b2b) !important;
    color: var(--ink, #eef2ff) !important;
    border-bottom: 1px solid var(--border, #2e3a52) !important;
    font-weight: 700 !important;
    font-family: Inter, Arial, sans-serif !important;
    padding: 12px 20px !important;
}

html[data-theme="dark"] .cke_dialog_close_button {
    filter: invert(1) brightness(1.2) !important;
    top: 12px !important;
    right: 12px !important;
}

html[data-theme="dark"] .cke_dialog_tabs {
    background: var(--surface-muted, #151b2b) !important;
    border-bottom: 1px solid var(--border, #2e3a52) !important;
    padding: 6px 12px 0 !important;
}

html[data-theme="dark"] .cke_dialog_tab {
    background: transparent !important;
    color: var(--ink-muted, #94a3b8) !important;
    border: 1px solid transparent !important;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
}

html[data-theme="dark"] .cke_dialog_tab:hover {
    color: var(--ink, #eef2ff) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .cke_dialog_tab_selected {
    background: var(--surface-elevated, #1a2234) !important;
    color: var(--primary, #3b82f6) !important;
    border: 1px solid var(--border, #2e3a52) !important;
    border-bottom-color: var(--surface-elevated, #1a2234) !important;
    font-weight: 700 !important;
}

html[data-theme="dark"] .cke_dialog_contents {
    background: var(--surface-elevated, #1a2234) !important;
    border: none !important;
    padding: 16px 20px !important;
}

html[data-theme="dark"] .cke_dialog_contents label,
html[data-theme="dark"] .cke_dialog_contents span,
html[data-theme="dark"] .cke_dialog_ui_labeled_label {
    color: var(--ink-muted, #cbd5e1) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

html[data-theme="dark"] .cke_dialog_ui_input_text input,
html[data-theme="dark"] .cke_dialog_ui_input_textarea textarea,
html[data-theme="dark"] .cke_dialog_ui_input_select select {
    background: var(--surface-muted, #0f172a) !important;
    color: var(--ink, #f8fafc) !important;
    border: 1px solid var(--border, #334155) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .cke_dialog_ui_input_text input:focus,
html[data-theme="dark"] .cke_dialog_ui_input_textarea textarea:focus,
html[data-theme="dark"] .cke_dialog_ui_input_select select:focus {
    border-color: var(--primary, #3b82f6) !important;
    outline: none !important;
}

html[data-theme="dark"] .cke_dialog_footer {
    background: var(--surface-muted, #151b2b) !important;
    border-top: 1px solid var(--border, #2e3a52) !important;
    padding: 12px 20px !important;
}

html[data-theme="dark"] a.cke_dialog_ui_button {
    background: var(--surface-elevated, #1e293b) !important;
    color: var(--ink, #f8fafc) !important;
    border: 1px solid var(--border, #475569) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    padding: 6px 16px !important;
}

html[data-theme="dark"] a.cke_dialog_ui_button:hover {
    background: var(--border, #334155) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] a.cke_dialog_ui_button_ok {
    background: var(--primary, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--primary, #2563eb) !important;
}

html[data-theme="dark"] a.cke_dialog_ui_button_ok:hover {
    background: #1d4ed8 !important;
}

html[data-theme="dark"] .ImagePreviewBox {
    background: var(--surface-muted, #0f172a) !important;
    border: 1px solid var(--border, #334155) !important;
    color: var(--ink, #f8fafc) !important;
    border-radius: 8px !important;
    padding: 10px !important;
}

html[data-theme="dark"] .cke_dialog_image_url input {
    background: var(--surface-muted, #0f172a) !important;
    color: var(--ink, #f8fafc) !important;
}

/* -----------------------------------------------------------
   Yajra DataTables Theme & Dark Mode Integration
   ----------------------------------------------------------- */
.dataTables_wrapper {
    color: var(--ink);
    font-family: inherit;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: var(--surface-muted);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--ink-muted) !important;
    padding-top: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--ink-muted) !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--surface-muted) !important;
    color: var(--ink) !important;
    border-color: var(--border) !important;
}

table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    overflow: hidden;
}

table.dataTable thead th {
    background: var(--surface-muted) !important;
    color: var(--ink-muted) !important;
    border-bottom: 1px solid var(--border) !important;
    font-weight: 700;
}

table.dataTable tbody tr {
    background: var(--surface-elevated) !important;
    color: var(--ink) !important;
}

table.dataTable tbody tr:hover {
    background: var(--surface-muted) !important;
}

table.dataTable td {
    border-bottom: 1px solid var(--border) !important;
}

/* -----------------------------------------------------------
   Single-Row Article Filter Bar & Pagination
   ----------------------------------------------------------- */
.article-filter-bar {
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.article-filter-single-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.article-filter-single-row .filter-field {
    flex: 1 1 110px;
    min-width: 100px;
}

.article-filter-single-row .filter-field--search {
    flex: 1.4 1 140px;
    min-width: 130px;
}

.article-filter-single-row .filter-field--per-page {
    flex: 0 0 72px;
    min-width: 72px;
}

.article-filter-single-row .filter-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-filter-single-row input,
.article-filter-single-row select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color 0.15s ease;
}

.article-filter-single-row input:focus,
.article-filter-single-row select:focus {
    border-color: var(--primary);
    outline: none;
}

@media (max-width: 991px) {
    .article-filter-single-row {
        flex-wrap: wrap;
    }
}

.article-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--ink-muted);
}

.pagination-controls nav {
    display: flex;
    align-items: center;
}

.pagination-controls nav>div:last-child,
.pagination-controls .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-controls a,
.pagination-controls span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}

.pagination-controls a:hover {
    background: var(--surface-elevated);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-controls span[aria-current="page"] {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.pagination-controls span[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.custom-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    gap: 6px;
}

.custom-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}

.custom-pagination a.page-link:hover {
    background: var(--surface-elevated);
    border-color: var(--primary);
    color: var(--primary);
}

.custom-pagination .page-link.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.custom-pagination .page-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ===========================================================
   Spacious & Modern Article Catalog Table Styling
   =========================================================== */
.article-index-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-sm);
}

.article-index-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}

.article-index-table thead th {
    padding: 16px 20px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.article-index-table tbody tr td {
    padding: 16px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

/* Row Group Dividers for Articles */
.article-index-row--start td {
    border-top: 2px solid var(--border) !important;
}

.article-index-row:not(.article-index-row--start) td {
    border-top: 1px dashed var(--border);
}

/* Alternating 2-Color Article Row Flow (High Contrast Light & Dark Mode) */
.article-index-table tbody tr.article-row-color-1 td {
    background-color: #ffffff !important;
}

.article-index-table tbody tr.article-row-color-2 td {
    background-color: #eef2ff !important;
    /* Soft Ice Indigo Tint - distinct 2nd color */
}

html[data-theme="dark"] .article-index-table tbody tr.article-row-color-1 td {
    background-color: #1e293b !important;
    /* Dark Slate 800 */
}

html[data-theme="dark"] .article-index-table tbody tr.article-row-color-2 td {
    background-color: #0f172a !important;
    /* Dark Slate 900 */
}

.article-index-table tbody tr.article-row-color-1:hover td {
    background-color: #e0e7ff !important;
}

.article-index-table tbody tr.article-row-color-2:hover td {
    background-color: #c7d2fe !important;
}

html[data-theme="dark"] .article-index-table tbody tr.article-row-color-1:hover td {
    background-color: #334155 !important;
}

html[data-theme="dark"] .article-index-table tbody tr.article-row-color-2:hover td {
    background-color: #162036 !important;
}

.article-index-row.is-mine td {
    background-color: rgba(59, 130, 246, 0.12) !important;
}

html[data-theme="dark"] .article-index-row.is-mine td {
    background-color: rgba(59, 130, 246, 0.22) !important;
}

/* Title Column */
.article-index-title {
    vertical-align: top !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    border-right: 1px solid var(--border);
}

.article-index-title-main {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 6px;
}

.article-index-title-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.article-index-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-muted);
    opacity: 0.6;
}

/* Level Chips */
.article-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.article-level-seq-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: rgba(148, 163, 184, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
}

.article-level-code {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
}

/* Assignee Styles */
.article-assignee {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-assignee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-bg, #eff6ff);
    color: var(--primary, #2563eb);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

html[data-theme="dark"] .article-assignee-avatar {
    background: rgba(37, 99, 235, 0.25);
    color: #93c5fd;
}

.article-assignee-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.article-assignee-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
}

.article-assignee-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
}

/* Action Column */
.article-index-table td.col-action {
    vertical-align: top !important;
    padding-top: 18px !important;
    border-left: 1px solid var(--border);
}

/* ===========================================================
   Full Status Pills & Compact Table Sizing
   =========================================================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap !important;
    text-transform: capitalize;
    line-height: 1.35;
    word-break: keep-all;
}

.status-pill--published {
    background: var(--success-bg, rgba(34, 197, 94, 0.15));
    color: var(--success, #15803d);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

html[data-theme="dark"] .status-pill--published {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.status-pill--approved {
    background: var(--info-bg, rgba(59, 130, 246, 0.15));
    color: var(--info, #1d4ed8);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .status-pill--approved {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.status-pill--rejected {
    background: var(--danger-bg, rgba(239, 68, 68, 0.15));
    color: var(--danger, #b91c1c);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

html[data-theme="dark"] .status-pill--rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.status-pill--review {
    background: var(--warning-bg, rgba(245, 158, 11, 0.15));
    color: var(--warning, #b45309);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

html[data-theme="dark"] .status-pill--review {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

.status-pill--draft {
    background: var(--surface-muted, #f1f5f9);
    color: var(--ink-muted, #64748b);
    border: 1px solid var(--border, #cbd5e1);
}

html[data-theme="dark"] .status-pill--draft {
    background: var(--surface-muted, #1e293b);
    color: var(--ink-muted, #94a3b8);
    border-color: var(--border, #334155);
}

/* Compact Table Sizing for Fit & Full Visibility */
.article-index-table {
    font-size: 0.86rem;
}

.article-index-table thead th {
    padding: 12px 16px;
    font-size: 0.74rem;
}

.article-index-table tbody tr td {
    padding: 11px 16px;
}

.article-index-col-status {
    white-space: nowrap !important;
    min-width: 170px;
}

.article-index-col-level {
    white-space: nowrap !important;
    min-width: 100px;
}

.article-index-col-assigned {
    min-width: 160px;
}

.article-index-col-action {
    white-space: nowrap !important;
    width: 90px;
}

/* ===========================================================
   Stunning Live Badge Celebration Modal
   =========================================================== */
.badge-earned-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-earned-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.badge-earned-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 24px;
    padding: 36px 28px 28px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 25px 60px -15px rgba(245, 158, 11, 0.4), 0 0 40px rgba(251, 191, 36, 0.25);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.badge-earned-overlay.is-active .badge-earned-modal {
    transform: scale(1) translateY(0);
}

.badge-earned-modal::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, rgba(245, 158, 11, 0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

.badge-earned-icon-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(251, 191, 36, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    animation: badgePulseGlow 2.5s infinite ease-in-out;
}

@keyframes badgePulseGlow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 35px rgba(251, 191, 36, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 55px rgba(251, 191, 36, 0.95), inset 0 2px 4px rgba(255, 255, 255, 0.85);
    }
}

.badge-earned-icon {
    font-size: 50px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.badge-earned-kicker {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
    margin-bottom: 12px;
}

.badge-earned-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff;
    line-height: 1.25;
}

.badge-earned-badge-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 12px;
}

.badge-earned-message {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0 0 24px;
}

.badge-earned-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.5);
    transition: all 0.2s ease;
}

.badge-earned-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(245, 158, 11, 0.7);
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
}

/* ==========================================================================
   Student Articles Redesign V2 (High-End Beautiful UI)
   ========================================================================== */

.student-articles-v2-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* Hero Section */
.student-articles-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #e7d2a3 0%, #f0dfb5 35%, #e3cc99 70%, #d8bb82 100%) !important;
    border: 2px solid #9d7948 !important;
    border-radius: 20px;
    padding: 30px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(74, 50, 24, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Floating Ambient Orbs */
.hero-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: orbFloat 8s ease-in-out infinite alternate;
}

.hero-bg-orb--1 {
    top: -40px;
    right: 80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(141, 119, 95, 0.22) 0%, rgba(141, 119, 95, 0) 70%);
    animation-duration: 9s;
}

.hero-bg-orb--2 {
    bottom: -60px;
    left: 40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(118, 85, 47, 0.18) 0%, rgba(118, 85, 47, 0) 70%);
    animation-duration: 12s;
    animation-delay: -3s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(25px, 15px) scale(1.1);
    }

    100% {
        transform: translate(-15px, 25px) scale(0.95);
    }
}

/* Animated Border Light Beam */
.hero-border-beam {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(157, 121, 72, 0.8), rgba(212, 184, 123, 0.8), transparent);
    animation: beamLight 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes beamLight {
    0% {
        left: -60%;
    }

    50%,
    100% {
        left: 120%;
    }
}

.hero-content,
.hero-stats-card {
    position: relative;
    z-index: 1;
}

/* Live Radar Pulse Dot */
.eyebrow-dot-live {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    height: 8px;
}

.eyebrow-dot-core {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8d775f;
    box-shadow: 0 0 8px #8d775f;
}

.eyebrow-dot-ping {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #8d775f;
    opacity: 0.75;
    animation: pingPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    75%,
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Cascading Entrance Animation */
.hero-animate-item {
    opacity: 0;
    transform: translateY(14px);
    animation: heroItemFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--delay, 1) * 0.1s);
}

@keyframes heroItemFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f6eee0;
    border: 1.5px solid #d8c296;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #3b2918;
    text-transform: uppercase;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.12);
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8d775f;
    box-shadow: 0 0 6px #8d775f;
}

.hero-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #302317;
    margin: 0 0 6px 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: #665039;
    margin: 0;
    line-height: 1.45;
}

/* Hero Stats Card */
.hero-stats-card {
    min-width: 240px;
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(8px);
    border: 1px solid #d4b87b !important;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 6px 20px rgba(74, 50, 24, 0.1);
    flex-shrink: 0;
}

.stats-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.stats-card-numbers {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.9rem;
}

.stat-count-completed {
    font-size: 1.35rem;
    font-weight: 800;
    color: #302317;
}

.stat-count-divider {
    color: #785832;
}

.stat-count-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #302317;
}

.stat-count-label {
    font-size: 0.82rem;
    color: #665039;
    margin-left: 2px;
}

.stats-card-badge {
    background: rgba(118, 85, 47, 0.14);
    color: #4a331a;
    border: 1px solid rgba(118, 85, 47, 0.28);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

.stats-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(118, 85, 47, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.stats-progress-bar {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, #b8924b 0%, #8c6a3f 100%);
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.progress-bar-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmerMove 2.5s infinite;
}

@keyframes shimmerMove {
    0% {
        left: -100%;
    }

    60%,
    100% {
        left: 100%;
    }
}

/* Filter Bar */
.student-articles-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.student-articles-filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--ink-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-sizing: border-box;
    flex-shrink: 0;
}

.filter-tab-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-tab:hover {
    background: var(--surface-muted);
    color: var(--ink);
    border-color: var(--border-strong);
}

.filter-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border-color: #c8a872 !important;
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.22) !important;
    font-weight: 800 !important;
}

.filter-count {
    background: var(--surface-muted);
    color: var(--ink-muted);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-tab.is-active .filter-count {
    background: rgba(118, 85, 47, 0.18) !important;
    color: #3b2918 !important;
}

/* Dark mode explicit overrides for filter tabs */
html[data-theme="dark"] .filter-tab {
    background: var(--surface);
    color: #cbd5e1;
    border-color: var(--border);
}

html[data-theme="dark"] .filter-tab:hover {
    background: rgba(118, 85, 47, 0.15);
    color: #ffffff;
    border-color: rgba(118, 85, 47, 0.4);
}

html[data-theme="dark"] .filter-count {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

html[data-theme="dark"] .filter-tab.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border-color: #c8a872 !important;
    box-shadow: 0 4px 16px rgba(118, 85, 47, 0.28) !important;
}

html[data-theme="dark"] .filter-tab.is-active .filter-count {
    background: rgba(118, 85, 47, 0.18) !important;
    color: #3b2918 !important;
}

.filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.filter-dot--in-progress {
    background: #f59e0b;
}

.filter-dot--completed {
    background: #10b981;
}

.filter-dot--not-started {
    background: var(--ink-soft);
}

/* Articles Stack */
.student-articles-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Article Card V2 */
.article-card-v2 {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(20, 27, 45, 0.02);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.article-card-v2:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 27, 45, 0.07);
}

.card-v2-main-group {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.card-v2-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.card-v2-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    background: var(--surface-muted);
}

.card-v2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.card-v2-content {
    flex: 1;
    min-width: 0;
}


/* Ring Column */
.card-v2-ring-col {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-v2 {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-v2-svg {
    width: 44px;
    height: 44px;
}

.ring-v2--in-progress .ring-v2-svg {
    transform: rotate(-90deg);
}

.ring-v2--completed .ring-v2-bg-fill {
    fill: url(#emeraldRingGrad);
    filter: drop-shadow(0 3px 8px rgba(16, 185, 129, 0.4));
    transition: transform 0.3s ease;
}

.ring-v2--completed:hover .ring-v2-bg-fill {
    transform: scale(1.05);
}

.ring-v2--completed .ring-v2-check {
    stroke: #ffffff;
    fill: none;
}

.ring-v2--completed .animated-check {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: checkmarkDraw 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards 0.2s;
}

@keyframes checkmarkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.ring-v2--in-progress .ring-v2-track {
    stroke: rgba(245, 158, 11, 0.18);
    stroke-width: 3.5;
    fill: none;
}

.ring-v2--in-progress .ring-v2-fill {
    stroke-width: 3.5;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.35));
    transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ring-v2-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
}

.ring-v2--not-started .ring-v2-outline {
    stroke: var(--border-strong);
    stroke-width: 2.5;
    stroke-dasharray: 4 3;
    fill: none;
}

/* Card Body */
.card-v2-body {
    flex: 1;
    min-width: 0;
}

.card-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.card-v2-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.card-v2-title a:hover {
    color: var(--brand);
}

.sr-only-status-line {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card-v2-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-v2-meta-dot {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

/* Status Chip */
.card-v2-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.card-v2-status-chip--completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.card-v2-status-chip--in-progress {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.card-v2-status-chip--not-started {
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
}

/* CEFR Level Badges */
.card-v2-levels {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cefr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.cefr-badge--a1,
.cefr-badge--a2 {
    background: rgba(16, 185, 129, 0.12);
    color: #0f7a45;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.cefr-badge--b1,
.cefr-badge--b2 {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.cefr-badge--c1,
.cefr-badge--c2 {
    background: rgba(139, 92, 246, 0.12);
    color: #6d28d9;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Action Buttons with 3-Color Palette */
.card-v2-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.btn-card-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* âšª LEADERBOARD Button: Warm Neutral Beige Theme */
.btn-v2-leaderboard {
    background: linear-gradient(135deg, #f7f3ec 0%, #ebe2d3 100%) !important;
    color: #4a3b2c !important;
    border: 1.5px solid #d4c5b0 !important;
    box-shadow: 0 4px 14px rgba(118, 95, 60, 0.14) !important;
}

.btn-v2-leaderboard:hover {
    background: linear-gradient(135deg, #ebe2d3 0%, #dfd2be 100%) !important;
    border-color: #c4b39b !important;
    color: #3b2d1f !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(118, 95, 60, 0.25) !important;
}

/* ðŸŸ¢ START Button: Sage Green Theme */
.btn-v2-start {
    background: linear-gradient(135deg, #728164 0%, #58664c 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #58664c !important;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.28) !important;
}

.btn-v2-start:hover {
    background: linear-gradient(135deg, #657358 0%, #4a573f 100%) !important;
    border-color: #4a573f !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(114, 129, 100, 0.4) !important;
}

/* ðŸŸ¡ CONTINUE Button: Light Beige / Tan Theme */
.btn-v2-continue {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1.5px solid #c8a872 !important;
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.22) !important;
}

.btn-v2-continue:hover {
    background: linear-gradient(135deg, #dfc790 0%, #d4b87b 100%) !important;
    border-color: #b89862 !important;
    color: #3b2918 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(118, 85, 47, 0.35) !important;
}

/* ðŸŸ¤ REREAD Button: Dark Taupe Soft Brown Theme */
.btn-v2-reread {
    background: linear-gradient(135deg, #ece5dd 0%, #dfd5c8 100%) !important;
    color: #302317 !important;
    border: 1.5px solid #c8b9a8 !important;
    box-shadow: 0 4px 14px rgba(141, 119, 95, 0.18) !important;
}

.btn-v2-reread:hover {
    background: linear-gradient(135deg, #8d775f 0%, #6e5b47 100%) !important;
    border-color: #6e5b47 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(110, 91, 71, 0.32) !important;
}

.btn-v2-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.btn-card-v2:hover .btn-v2-icon {
    transform: translateX(2px);
}

.btn-v2-reread:hover .btn-v2-icon {
    transform: rotate(45deg);
}

/* Empty States */
.articles-empty-v2,
.articles-filter-empty {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: 16px;
    padding: 56px 24px;
    text-align: center;
}

.empty-v2-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background: var(--surface-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
}

.empty-v2-icon svg {
    width: 26px;
    height: 26px;
}

.empty-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px 0;
}

.empty-v2-subtitle {
    font-size: 0.92rem;
    color: var(--ink-muted);
    margin: 0;
}

/* â”€â”€ STUDENT ARTICLES CONTROLS & TILES VIEW â”€â”€ */
.student-articles-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.student-articles-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* Search Bar Pill */
.student-articles-search-wrap {
    position: relative;
    width: 290px;
    min-width: 200px;
}

.student-articles-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--ink-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.student-articles-search-input {
    width: 100%;
    height: 40px;
    padding: 0 34px 0 40px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-articles-search-input:focus {
    outline: none;
    background: var(--surface-elevated);
    border-color: #c8a872;
    box-shadow: 0 0 0 3.5px rgba(200, 168, 114, 0.22);
}

.student-articles-search-wrap:focus-within .student-articles-search-icon {
    color: #8c6d37;
}

.student-articles-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--ink-muted);
    font-size: 1.15rem;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.student-articles-search-clear:hover {
    background: rgba(0, 0, 0, 0.16);
    color: var(--ink);
}

/* View Mode Switcher Toggle */
.student-articles-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 3px;
    box-sizing: border-box;
}

.student-articles-view-toggle .view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-articles-view-toggle .view-toggle-btn:hover {
    color: var(--ink);
    background: rgba(0, 0, 0, 0.04);
}

.student-articles-view-toggle .view-toggle-btn.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1px solid #c8a872;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.22);
    font-weight: 800;
}

/* â”€â”€ STUDENT ARTICLES TILES GRID â”€â”€ */
.student-articles-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

.student-article-tile {
    background: var(--surface-elevated);
    border: 1.5px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    position: relative;
}

.student-article-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(44, 30, 11, 0.11);
    border-color: #c8a872;
}

.student-tile-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 165px;
    background: linear-gradient(135deg, #3e4937 0%, #58664c 50%, #728164 100%);
    overflow: hidden;
}

.student-tile-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    transition: transform 0.35s ease;
}

.student-article-tile:hover .student-tile-thumb-img {
    transform: scale(1.04);
}

.student-tile-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #f7edd4;
    opacity: 0.9;
}

.student-tile-thumb-fallback .fallback-icon {
    width: 40px;
    height: 40px;
    stroke: #f7edd4;
}

.student-tile-thumb-fallback .fallback-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #f7edd4;
}

.student-tile-overlay {
    position: absolute;
    inset: 0;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 60%);
    pointer-events: none;
}

.tile-progress-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tile-progress-pill svg {
    width: 12px;
    height: 12px;
}

.tile-progress-pill--completed {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.tile-progress-pill--in-progress {
    background: rgba(245, 158, 11, 0.9);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.student-tile-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-tile-title {
    margin: 0;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.015em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.student-tile-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

.student-tile-title a:hover {
    color: #728164;
}

.student-tile-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.student-tile-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}

.student-tile-btn {
    width: 100%;
    justify-content: center;
    height: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 12px;
}

/* Dark Mode Overrides for Student Articles Controls & Tiles */
html[data-theme="dark"] .student-articles-search-input {
    background: var(--surface);
    border-color: var(--border);
    color: #f1f5f9;
}

html[data-theme="dark"] .student-articles-search-input:focus {
    background: var(--surface-elevated);
    border-color: #d4b87b;
    box-shadow: 0 0 0 3.5px rgba(212, 184, 123, 0.22);
}

html[data-theme="dark"] .student-articles-search-clear {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

html[data-theme="dark"] .student-articles-view-toggle {
    background: var(--surface);
    border-color: var(--border);
}

html[data-theme="dark"] .student-articles-view-toggle .view-toggle-btn {
    color: #94a3b8;
}

html[data-theme="dark"] .student-articles-view-toggle .view-toggle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .student-articles-view-toggle .view-toggle-btn.is-active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border-color: #c8a872;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .student-article-tile {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .student-article-tile:hover {
    border-color: #d4b87b;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .student-tile-footer {
    border-top-color: var(--border);
}

/* Dark Mode Enhancements for V2 */
html[data-theme="dark"] .student-articles-hero,
html[data-theme="dark"] .student-tests-hero,
html[data-theme="dark"] .student-badges-hero,
html[data-theme="dark"] .student-reading-hero {
    background: linear-gradient(135deg, rgba(125, 140, 111, 0.12) 0%, rgba(15, 20, 32, 0.3) 100%);
    border-color: rgba(125, 140, 111, 0.25);
}

html[data-theme="dark"] .hero-eyebrow-badge {
    background: #2a2316 !important;
    border: 1.5px solid #d4b87b !important;
    color: #f7edd4 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(212, 184, 123, 0.25) !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .eyebrow-dot,
html[data-theme="dark"] .eyebrow-dot-core,
html[data-theme="dark"] .eyebrow-dot-ping {
    background: #e6c88b !important;
    box-shadow: 0 0 8px #e6c88b !important;
}

html[data-theme="dark"] .stats-card-badge {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
}

html[data-theme="dark"] .card-v2-status-chip--completed {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
}

html[data-theme="dark"] .card-v2-status-chip--in-progress {
    background: rgba(212, 184, 123, 0.2);
    color: #d4b87b;
}

html[data-theme="dark"] .cefr-badge--a1,
html[data-theme="dark"] .cefr-badge--a2 {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
    border-color: rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .cefr-badge--b1,
html[data-theme="dark"] .cefr-badge--b2 {
    background: rgba(212, 184, 123, 0.2);
    color: #d4b87b;
    border-color: rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .cefr-badge--c1,
html[data-theme="dark"] .cefr-badge--c2 {
    background: rgba(141, 119, 95, 0.22);
    color: #a89279;
    border-color: rgba(141, 119, 95, 0.35);
}

/* Mobile Responsiveness for Student Articles Page */
@media (max-width: 768px) {
    .student-articles-v2-container {
        padding: 14px 12px 36px;
    }

    .student-articles-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
        border-radius: 20px;
        gap: 16px;
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .hero-stats-card {
        min-width: 0;
        width: 100%;
        padding: 14px 16px;
        border-radius: 16px;
    }

    .student-articles-filter-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 6px !important;
        margin-bottom: 16px !important;
        gap: 8px !important;
    }

    .student-articles-filter-bar::-webkit-scrollbar {
        display: none !important;
    }

    .filter-tab {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        min-height: 38px !important;
    }

    .student-articles-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
        width: 100%;
    }

    .student-articles-controls-right {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .student-articles-search-wrap {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .student-articles-tiles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .student-articles-v2-container {
        padding: 12px 10px 32px;
    }

    /* â”€â”€ Mobile 2x2 Segmented Status Grid â”€â”€ */
    .student-articles-filter-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        overflow: visible !important;
    }

    .filter-tab {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-height: 42px !important;
        padding: 8px 12px !important;
        border-radius: 12px !important;
        font-size: 0.82rem !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
    }

    .filter-tab-text {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 0.82rem !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .filter-count {
        margin-left: 6px !important;
        padding: 2px 7px !important;
        font-size: 0.72rem !important;
        flex-shrink: 0 !important;
    }

    .student-articles-controls-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .student-articles-search-wrap {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .student-articles-search-input {
        height: 38px !important;
        font-size: 0.82rem !important;
        padding: 0 30px 0 36px !important;
    }

    .student-articles-search-icon {
        width: 15px !important;
        height: 15px !important;
        left: 12px !important;
    }

    .student-articles-view-toggle .view-toggle-btn {
        padding: 5px 10px !important;
        font-size: 0.78rem !important;
    }

    .article-card-v2 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        border-radius: 16px;
    }

    .card-v2-main-group {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .card-v2-ring-col {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .ring-v2,
    .ring-v2-svg {
        width: 38px;
        height: 38px;
    }

    .ring-v2-percent {
        font-size: 0.65rem;
    }

    .card-v2-body {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .card-v2-thumb {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 10px !important;
        flex-shrink: 0;
    }

    .card-v2-content {
        flex: 1;
        min-width: 0;
    }

    .card-v2-title {
        font-size: 0.98rem;
        line-height: 1.35;
        margin: 0 0 6px 0;
        word-break: break-word;
    }

    .card-v2-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .card-v2-status-chip {
        padding: 2px 8px;
        font-size: 0.74rem;
    }

    .cefr-badge {
        height: 20px;
        min-width: 24px;
        font-size: 0.68rem;
        padding: 0 4px;
    }

    /* ACTION BUTTON STRICTLY BELOW LEVEL BADGES AT THE BOTTOM */
    .card-v2-action {
        width: 100%;
        margin-top: 4px;
        display: flex;
    }

    .btn-card-v2 {
        width: 100%;
        min-height: 42px;
        font-size: 0.88rem;
        font-weight: 800;
        justify-content: center;
        border-radius: 999px;
    }
}

@media (max-width: 420px) {
    .student-articles-filter-bar {
        gap: 6px !important;
    }

    .filter-tab {
        padding: 6px 9px !important;
        min-height: 38px !important;
        font-size: 0.78rem !important;
        border-radius: 10px !important;
    }

    .filter-tab-text {
        font-size: 0.78rem !important;
        gap: 4px !important;
    }

    .filter-count {
        padding: 1px 6px !important;
        font-size: 0.68rem !important;
        margin-left: 4px !important;
    }

    .article-card-v2 {
        padding: 12px 10px;
        gap: 10px;
    }

    .card-v2-main-group {
        gap: 8px;
    }

    .card-v2-body {
        gap: 8px;
    }

    .card-v2-thumb {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        border-radius: 8px !important;
    }

    .card-v2-title {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .btn-card-v2 {
        min-height: 38px;
        font-size: 0.82rem;
    }
}



/* ==========================================================================
   Student Tests Redesign V2 (High-End Assessment Portal)
   ========================================================================== */

.student-tests-v2-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 48px;
}

.student-tests-hero {
    background: linear-gradient(135deg, rgba(125, 140, 111, 0.08) 0%, rgba(212, 184, 123, 0.05) 100%);
}

.student-tests-section {
    margin-bottom: 36px;
}

.section-v2-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.section-v2-subtitle {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin: 0;
}

/* Test Cards Stack */
.student-tests-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.test-card-v2 {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(20, 27, 45, 0.02);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.test-card-v2:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 27, 45, 0.07);
}

@media (max-width: 820px) {
    .test-card-v2 {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px 16px;
    }

    .card-v2-body {
        width: 100%;
    }

    .card-v2-meta {
        flex-wrap: wrap;
        gap: 6px;
    }

    .card-v2-action {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 6px;
    }

    .btn-card-v2 {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

.test-card-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.test-card-v2-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.test-card-v2-title a:hover {
    color: var(--brand);
}

.test-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-weight: 500;
}

.meta-chip-icon {
    width: 14px;
    height: 14px;
    color: var(--ink-soft);
}

.score-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 500;
}

.score-chip--has-score {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.score-chip--none {
    background: var(--surface-muted);
    color: var(--ink-soft);
}

.btn-v2-leaderboard {
    color: #8D775F !important;
    border-color: rgba(141, 119, 95, 0.35) !important;
    background: rgba(141, 119, 95, 0.1) !important;
    font-weight: 700;
}

.btn-v2-leaderboard:hover {
    color: #ffffff !important;
    border-color: #6E5B47 !important;
    background: linear-gradient(135deg, #8D775F 0%, #6E5B47 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(110, 91, 71, 0.28);
}

/* Per-test premium leaderboard (V2 Design System) */
.student-leaderboard-v2-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 48px;
}

.student-leaderboard-hero {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.hero-back-link-v2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    margin-bottom: 12px;
    transition: all 0.18s ease;
}

.hero-back-link-v2:hover {
    color: var(--ink);
    border-color: var(--border-strong);
    transform: translateX(-2px);
}

/* Surface Reference Podium Card (Clean Theme Design, No Blue) */
.ref-podium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px 0;
    color: var(--ink);
    box-shadow: 0 4px 16px rgba(20, 27, 45, 0.03);
    overflow: hidden;
    margin-bottom: 24px;
}

.ref-podium-flex {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    max-width: 540px;
    margin: 0 auto;
}

.ref-podium-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ref-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--ink);
    font-weight: 800;
    font-size: 1.1rem;
    display: grid;
    place-items: center;
    border: 2.5px solid var(--border-strong);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
}

.ref-avatar-circle--center {
    width: 72px;
    height: 72px;
    font-size: 1.3rem;
    border-color: #f59e0b;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.ref-student-name {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.ref-student-sub {
    font-size: 0.74rem;
    color: var(--ink-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.ref-you-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 15%, transparent);
    color: var(--brand);
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    vertical-align: middle;
}

/* 3D Step Blocks (1, 2, 3) */
.ref-podium-step {
    width: 100%;
    border-radius: 14px 14px 0 0;
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-bottom: 0;
}

.ref-podium-step--1 {
    height: 110px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, var(--surface-muted) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}

.ref-podium-step--2 {
    height: 80px;
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.3) 0%, var(--surface-muted) 100%);
    border-color: rgba(148, 163, 184, 0.4);
}

.ref-podium-step--3 {
    height: 60px;
    background: linear-gradient(180deg, rgba(254, 215, 170, 0.3) 0%, var(--surface-muted) 100%);
    border-color: rgba(217, 119, 6, 0.35);
}

.ref-step-num {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--ink);
    line-height: 1;
}

.ref-podium-step--1 .ref-step-num {
    color: #d97706;
}

.ref-podium-step--2 .ref-step-num {
    color: #475569;
}

.ref-podium-step--3 .ref-step-num {
    color: #c2410c;
}

@media (max-width: 600px) {
    .ref-podium-card {
        padding: 24px 12px 0;
    }

    .ref-podium-flex {
        gap: 12px;
    }

    .ref-student-name {
        font-size: 0.8rem;
        max-width: 90px;
    }

    .ref-student-sub {
        font-size: 0.65rem;
    }

    .ref-podium-step--1 {
        height: 90px;
    }

    .ref-podium-step--2 {
        height: 65px;
    }

    .ref-podium-step--3 {
        height: 50px;
    }
}

/* ==========================================================================
   Leaderboard Redesign (Matches Reference Image 100%)
   ========================================================================== */

.lb-page-wrapper {
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    color: #0f172a;
    padding: 24px 20px 60px;
}

/* Dark Charcoal Gold Hero Header (No Violet) -> Beige Theme */
.lb-hero-cosmic {
    position: relative;
    background: linear-gradient(135deg, #e7d2a3 0%, #f0dfb5 35%, #e3cc99 70%, #d8bb82 100%) !important;
    border: 2px solid #9d7948 !important;
    padding: 36px 40px 48px;
    color: #302317 !important;
    overflow: hidden;
    max-width: 1180px;
    margin: 0 auto 28px;
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(74, 50, 24, 0.16);
}

.lb-hero-bg-rays {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(141, 119, 95, 0.18) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

.lb-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.lb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #785832;
    margin-bottom: 12px;
}

.lb-breadcrumb a {
    color: #785832;
    text-decoration: none;
}

.lb-breadcrumb a:hover {
    color: #302317;
}

.lb-breadcrumb .is-current {
    color: #302317;
    font-weight: 800;
}

.lb-hero-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #302317 !important;
    letter-spacing: -0.03em;
}

.lb-hero-subtitle {
    font-size: 0.98rem;
    color: #665039 !important;
    margin: 0 0 24px;
}

.lb-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.lb-hero-btn--active {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    border: 1.5px solid #c8a872 !important;
    color: #3b2918 !important;
    box-shadow: 0 4px 16px rgba(118, 85, 47, 0.22);
}

.lb-hero-btn--ghost {
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1px solid #d4b87b !important;
    color: #3b2918 !important;
}

.lb-hero-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #302317 !important;
}

/* Top Right Competitor Stat Card */
.lb-hero-stat-card {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(12px);
    border: 1px solid #d4b87b !important;
    border-radius: 18px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 240px;
    color: #302317 !important;
}

.lb-stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(118, 85, 47, 0.14);
    color: #784a0f;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.lb-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: #302317 !important;
    line-height: 1;
}

.lb-stat-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #665039 !important;
    margin-top: 2px;
}

.lb-stat-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f6eee0;
    border: 1px solid #d8c296;
    color: #5c3c14;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
}

.lb-stat-level-chip--basic {
    background: #e6ebe3;
    border-color: #b8c4b4;
    color: #58664c;
}

.lb-stat-level-chip--intermediate {
    background: #f6eee0;
    border-color: #d8c296;
    color: #5c3c14;
}

.lb-stat-level-chip--advanced {
    background: #ece5dd;
    border-color: #c8b9a8;
    color: #3b2918;
}

html[data-theme="dark"] .lb-stat-level-chip--basic {
    background: rgba(125, 140, 111, 0.25);
    border-color: rgba(125, 140, 111, 0.45);
    color: #92a382;
}

html[data-theme="dark"] .lb-stat-level-chip--intermediate {
    background: rgba(212, 184, 123, 0.25);
    border-color: rgba(212, 184, 123, 0.45);
    color: #d4b87b;
}

html[data-theme="dark"] .lb-stat-level-chip--advanced {
    background: rgba(141, 119, 95, 0.25);
    border-color: rgba(141, 119, 95, 0.45);
    color: #c8b9a8;
}

/* Main Sheet Wrapper */
.lb-main-sheet {
    background: #ffffff;
    border-radius: 0;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 3;
    box-shadow: none;
}

.lb-section {
    margin-bottom: 40px;
}

.lb-section-head {
    margin-bottom: 20px;
}

.lb-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-crown-icon {
    font-size: 1.4rem;
}

.lb-section-head h2 {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.lb-section-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin: 4px 0 0;
}

/* 3D Pedestal Box */
.lb-podium-pedestal-box {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 40px 30px 0;
}

.lb-podium-grid {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 28px;
    max-width: 820px;
    margin: 0 auto;
}

.lb-podium-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Avatar Ring & Overlapping Number Badge */
.lb-avatar-ring-wrap {
    position: relative;
    margin-bottom: 12px;
}

.lb-floating-crown {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    filter: drop-shadow(0 4px 8px rgba(234, 179, 8, 0.4));
    animation: lbCrownFloat 2.5s ease-in-out infinite alternate;
    z-index: 5;
}

@keyframes lbCrownFloat {
    0% {
        transform: translate(-50%, 0);
    }

    100% {
        transform: translate(-50%, -6px);
    }
}

.lb-avatar-halo {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}

.lb-avatar-halo--rank1 {
    background: radial-gradient(circle, rgba(253, 224, 71, 0.5) 0%, rgba(234, 179, 8, 0) 70%);
}

.lb-avatar-halo--rank2 {
    background: radial-gradient(circle, rgba(226, 232, 240, 0.45) 0%, rgba(148, 163, 184, 0) 70%);
}

.lb-avatar-halo--rank3 {
    background: radial-gradient(circle, rgba(254, 215, 170, 0.5) 0%, rgba(217, 119, 6, 0) 70%);
}

.lb-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e2e8f0;
    display: grid;
    place-items: center;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.lb-avatar-ring--rank1 .lb-avatar-circle {
    width: 96px;
    height: 96px;
    border-color: #fef08a;
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.35);
}

.lb-avatar-ring--rank2 .lb-avatar-circle {
    border-color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(148, 163, 184, 0.25);
}

.lb-avatar-ring--rank3 .lb-avatar-circle {
    border-color: #fed7aa;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25);
}

.lb-avatar-initials {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

.lb-badge-overlap {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 0.85rem;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.lb-badge-overlap--rank1 {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.lb-badge-overlap--rank2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.lb-badge-overlap--rank3 {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.lb-podium-name {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.lb-you-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lb-accuracy-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.lb-accuracy-pill--empty {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Metallic 3D Pedestal Blocks */
.lb-pedestal-block {
    width: 100%;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.lb-pedestal-top-bevel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 16px 16px 0 0;
}

.lb-podium-column--rank1 .lb-pedestal-block {
    height: 140px;
    background: linear-gradient(180deg, #fef08a 0%, #eab308 45%, #ca8a04 100%);
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.3);
    animation: lbPedestalRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lb-podium-column--rank2 .lb-pedestal-block {
    height: 105px;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #cbd5e1 100%);
    box-shadow: 0 8px 24px rgba(148, 163, 184, 0.2);
    animation: lbPedestalRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.lb-podium-column--rank3 .lb-pedestal-block {
    height: 85px;
    background: linear-gradient(180deg, #ffedd5 0%, #f97316 45%, #c2410c 100%);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.2);
    animation: lbPedestalRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes lbPedestalRise {
    0% {
        transform: translateY(18px);
        opacity: 0.7;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.lb-pedestal-content {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: #1e1b4b;
}

.lb-pedestal-num {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.lb-pedestal-suffix {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lb-pedestal-block--rank1 .lb-pedestal-content {
    color: #78350f;
}

.lb-pedestal-block--rank2 .lb-pedestal-content {
    color: #334155;
}

.lb-pedestal-block--rank3 .lb-pedestal-content {
    color: #451a03;
}

/* SECTION 2: YOUR STANDING CHARCOAL GOLD BANNER */
.lb-your-standing-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 24px 32px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
    margin-bottom: 40px;
}

.lb-ys-left {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.lb-ys-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lb-ys-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.lb-ys-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.lb-ys-target-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.lb-ys-target-icon svg {
    width: 28px;
    height: 28px;
}

.lb-ys-label {
    display: block;
    color: #f59e0b;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lb-ys-quote {
    color: #cbd5e1;
    font-size: 0.88rem;
    margin: 2px 0 8px;
}

.lb-ys-rank-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.lb-ys-rank-big {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.lb-ys-rank-out {
    color: #94a3b8;
    font-size: 0.95rem;
}

.lb-ys-accuracy {
    display: block;
    color: #e2e8f0;
    font-size: 0.85rem;
    margin-top: 4px;
}

.lb-btn-improve {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
    transition: all 0.2s ease;
}

.lb-btn-improve:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.45);
    color: #ffffff;
}

/* SECTION 3: FULL RANKING STANDINGS TABLE */
.lb-table-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.lb-table-header-row,
.lb-table-row {
    display: grid;
    grid-template-columns: 80px minmax(220px, 1fr) 150px 140px 220px;
    align-items: center;
}

.lb-table-header-row {
    padding: 14px 28px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 900;
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lb-table-body {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lb-table-row {
    padding: 16px 28px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.lb-table-row:last-child {
    border-bottom: 0;
}

.lb-table-row:hover {
    background: #f8fafc;
}

/* Gold Highlight for Top Rank 1 Row */
.lb-table-row--top {
    background: #fffdf0;
    box-shadow: inset 4px 0 #eab308;
}

.lb-table-row.is-you {
    background: #fffdf0;
    box-shadow: inset 4px 0 #f59e0b;
}

/* Rank Medallion Badges */
.lb-rank-medallion {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.92rem;
    font-weight: 900;
    color: #475569;
    background: #f1f5f9;
}

.lb-rank-medallion--1 {
    background: linear-gradient(135deg, #fef08a, #eab308);
    color: #78350f;
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.3);
}

.lb-rank-medallion--2 {
    background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
    color: #334155;
}

.lb-rank-medallion--3 {
    background: linear-gradient(135deg, #ffedd5, #f97316);
    color: #451a03;
}

.lb-col-student {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lb-row-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #1e293b;
    overflow: hidden;
    flex-shrink: 0;
}

.lb-row-student-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-row-student-name strong {
    font-size: 0.98rem;
    color: #0f172a;
}

.lb-row-you-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.65rem;
    font-weight: 900;
}

.lb-col-score strong {
    font-size: 1.05rem;
    color: #0f172a;
}

.lb-attempt-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.lb-accuracy-meter-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-accuracy-percent {
    width: 48px;
    font-size: 0.9rem;
    font-weight: 900;
    color: #0f172a;
}

.lb-accuracy-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.lb-accuracy-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.lb-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.lb-table-footer-text {
    font-size: 0.82rem;
    color: #64748b;
}

.lb-table-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lb-page-btn,
.lb-page-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 800;
}

.lb-page-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.lb-page-num.is-active {
    background: #0f172a;
    color: #ffffff;
}

/* BOTTOM EXCELLENCE QUOTE CARD (Matches Reference Image) */
.lb-excellence-quote-card {
    background: linear-gradient(135deg, #fffbe6 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
}

.lb-quote-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lb-quote-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #b45309;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-weight: 900;
    flex-shrink: 0;
}

.lb-quote-text h3 {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #78350f;
    margin: 0 0 4px;
}

.lb-quote-text p {
    font-size: 0.86rem;
    color: #92400e;
    margin: 0;
}

.lb-quote-trophy-graphic svg {
    width: 80px;
    height: 80px;
}

.lb-empty-card {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    margin-bottom: 40px;
}

.lb-empty-trophy {
    font-size: 3rem;
    margin-bottom: 12px;
}

.lb-empty-card h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.lb-empty-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 18px;
}

/* Leaderboard Responsive Perfection Media Queries */
@media (max-width: 850px) {
    .lb-page-wrapper {
        padding: 16px 12px 48px;
    }

    .lb-hero-cosmic {
        padding: 24px 20px 32px;
        margin-bottom: 20px;
        border-radius: 20px;
    }

    .lb-hero-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .lb-hero-title {
        font-size: 1.85rem;
    }

    .lb-hero-stat-card {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        padding: 16px 20px;
    }

    .lb-podium-pedestal-box {
        padding: 30px 14px 0;
        border-radius: 20px;
    }

    .lb-podium-grid {
        gap: 10px;
    }

    .lb-avatar-circle {
        width: 60px !important;
        height: 60px !important;
    }

    .lb-avatar-ring--rank1 .lb-avatar-circle {
        width: 74px !important;
        height: 74px !important;
    }

    .lb-podium-name {
        font-size: 0.88rem;
        max-width: 100%;
        margin-bottom: 4px;
    }

    .lb-accuracy-pill {
        font-size: 0.72rem;
        padding: 3px 8px;
        margin-bottom: 10px;
    }

    .lb-pedestal-num {
        font-size: 2.2rem;
    }

    .lb-pedestal-suffix {
        font-size: 0.85rem;
    }

    .lb-podium-column--rank1 .lb-pedestal-block {
        height: 110px;
    }

    .lb-podium-column--rank2 .lb-pedestal-block {
        height: 85px;
    }

    .lb-podium-column--rank3 .lb-pedestal-block {
        height: 65px;
    }

    .lb-your-standing-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
        gap: 16px;
        text-align: center;
    }

    .lb-ys-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .lb-ys-title-block {
        align-items: center;
        text-align: center;
    }

    .lb-ys-middle {
        width: 100%;
        align-items: center;
    }

    .lb-ys-right {
        width: 100%;
    }

    .lb-btn-improve {
        width: 100%;
        justify-content: center;
    }

    .lb-table-header-row {
        display: none;
    }

    .lb-table-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px 16px;
    }

    .lb-col-attempts {
        display: none;
    }

    .lb-col-accuracy {
        grid-column: 1 / -1;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed var(--border, #e2e8f0);
        width: 100%;
    }

    .lb-accuracy-meter-wrap {
        width: 100%;
    }

    .lb-excellence-quote-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
    }

    .lb-quote-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .lb-quote-trophy-graphic {
        display: none;
    }
}

@media (max-width: 480px) {
    .lb-hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .lb-hero-btn {
        width: 100%;
        justify-content: center;
    }

    .lb-podium-grid {
        gap: 6px;
    }

    .lb-avatar-circle {
        width: 48px !important;
        height: 48px !important;
    }

    .lb-avatar-ring--rank1 .lb-avatar-circle {
        width: 62px !important;
        height: 62px !important;
    }

    .lb-floating-crown {
        font-size: 1.2rem;
        top: -18px;
    }

    .lb-podium-name {
        font-size: 0.78rem;
    }

    .lb-accuracy-pill {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .lb-pedestal-num {
        font-size: 1.75rem;
    }

    .lb-pedestal-suffix {
        font-size: 0.72rem;
    }

    .lb-table-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Leaderboard Dark Mode Overrides */
html[data-theme="dark"] .lb-page-wrapper {
    background: #090710;
    color: #f8fafc;
}

html[data-theme="dark"] .lb-main-sheet {
    background: #090710;
    color: #f8fafc;
}

html[data-theme="dark"] .lb-section-head h2 {
    color: #ffffff;
}

html[data-theme="dark"] .lb-section-subtitle {
    color: #94a3b8;
}

html[data-theme="dark"] .lb-podium-pedestal-box {
    background: linear-gradient(180deg, #16112a 0%, #1e1738 100%);
    border-color: #2d244c;
}

html[data-theme="dark"] .lb-podium-name {
    color: #ffffff;
}

html[data-theme="dark"] .lb-pedestal-block--rank2 {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
}

html[data-theme="dark"] .lb-pedestal-block--rank2 .lb-pedestal-content {
    color: #f8fafc;
}

html[data-theme="dark"] .lb-table-card {
    background: #16112a;
    border-color: #2d244c;
}

html[data-theme="dark"] .lb-table-header-row {
    background: #110c22;
    border-color: #2d244c;
    color: #94a3b8;
}

html[data-theme="dark"] .lb-table-row {
    border-color: #251d42;
}

html[data-theme="dark"] .lb-table-row:hover {
    background: #1e1738;
}

html[data-theme="dark"] .lb-table-row--top {
    background: #241d0c;
    box-shadow: inset 4px 0 #eab308;
}

html[data-theme="dark"] .lb-table-row.is-you {
    background: #21133b;
    box-shadow: inset 4px 0 #a855f7;
}

html[data-theme="dark"] .lb-row-student-name strong,
html[data-theme="dark"] .lb-col-score strong,
html[data-theme="dark"] .lb-accuracy-percent {
    color: #ffffff;
}

html[data-theme="dark"] .lb-table-footer {
    background: #16112a;
    border-color: #2d244c;
}

html[data-theme="dark"] .lb-table-footer-text {
    color: #94a3b8;
}

html[data-theme="dark"] .lb-page-btn {
    background: #1e1738;
    border-color: #2d244c;
    color: #64748b;
}

html[data-theme="dark"] .lb-excellence-quote-card {
    background: linear-gradient(135deg, #1d153b 0%, #261b4d 100%);
    border-color: #4c1d95;
}

html[data-theme="dark"] .lb-quote-text h3 {
    color: #e9d5ff;
}

html[data-theme="dark"] .lb-quote-text p {
    color: #c084fc;
}

html[data-theme="dark"] .lb-empty-card {
    background: #16112a;
    border-color: #2d244c;
}

html[data-theme="dark"] .lb-empty-card h2 {
    color: #ffffff;
}

.podium-v2-name {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px;
}

.podium-v2-score-box {
    margin-top: 8px;
}

.podium-v2-percent {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

.podium-v2-detail {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-muted);
    margin-top: 2px;
    font-weight: 600;
}

/* Your Standing Card V2 */
.your-rank-card-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    margin: 0 0 32px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(20, 27, 45, 0.03);
}

.your-rank-v2-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.your-rank-v2-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.your-rank-v2-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.your-rank-v2-sub {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-top: 2px;
}

.your-rank-v2-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.your-rank-v2-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink);
}

/* Full Ranking Standings Table V2 */
.leaderboard-table-shell-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 27, 45, 0.02);
}

.leaderboard-table-head-v2,
.leaderboard-row-v2 {
    display: grid;
    grid-template-columns: 100px minmax(200px, 1fr) 140px 120px 180px;
    align-items: center;
}

.leaderboard-table-head-v2 {
    padding: 12px 24px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.leaderboard-list-v2 {
    margin: 0;
    padding: 0;
    list-style: none;
}

.leaderboard-row-v2 {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.leaderboard-row-v2:last-child {
    border-bottom: 0;
}

.leaderboard-row-v2:hover {
    background: var(--surface-muted);
}

.leaderboard-row-v2.is-you {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    box-shadow: inset 3px 0 var(--brand);
}

.rank-chip-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--ink);
}

.rank-chip-v2--top {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #b45309;
}

.leader-avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--ink);
    flex-shrink: 0;
}

.attempt-chip-v2 {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.accuracy-flex-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accuracy-flex-v2 strong {
    width: 44px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--ink);
}

.accuracy-track-v2 {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.accuracy-track-v2 i {
    display: block;
    height: 100%;
    border-radius: 999px;
}

/* Empty State V2 */
.leaderboard-empty-v2 {
    padding: 60px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(20, 27, 45, 0.02);
}

.empty-trophy-v2 {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-title-v2 {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 6px;
}

.empty-sub-v2 {
    font-size: 0.9rem;
    color: var(--ink-muted);
    max-width: 460px;
    margin: 0 auto 20px;
}

@media (max-width: 850px) {
    .leaderboard-podium-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .podium-card-v2--center {
        transform: none;
    }

    .leaderboard-table-head-v2 {
        display: none;
    }

    .leaderboard-row-v2 {
        grid-template-columns: 60px 1fr auto;
        gap: 10px;
    }

    .attempt-cell {
        display: none;
    }

    .accuracy-cell {
        grid-column: 2 / 4;
    }
}

@media (prefers-reduced-motion:reduce) {

    .leaderboard-row,
    .podium-card,
    .leaderboard-trophy {
        transition: none;
        transform: none;
    }
}

/* Glassmorphic History Panel */
.history-count-badge {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.history-glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(20, 27, 45, 0.03);
}

.history-table-v2-head {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}

.col-head {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    text-transform: uppercase;
}

.col-date {
    width: 190px;
    flex-shrink: 0;
}

.col-test {
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.col-level {
    width: 90px;
    flex-shrink: 0;
}

.col-score {
    width: 220px;
    flex-shrink: 0;
    padding-right: 16px;
}

.col-action {
    width: 160px;
    flex-shrink: 0;
    text-align: right;
}

.history-row-v2 {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-row-v2:last-child {
    border-bottom: none;
}

.history-row-v2:hover {
    background: linear-gradient(90deg, rgba(107, 127, 99, 0.02) 0%, transparent 100%);
    border-color: var(--border-strong);
}

/* Date & Time Stack Box */
.history-datetime-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.datetime-icon-square {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f6eee0 !important;
    border: 1.5px solid #d8c296 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #784a0f !important;
}

.datetime-icon-square svg {
    width: 17px;
    height: 17px;
}

.datetime-text-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.datetime-date {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
}

.datetime-time {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.history-test-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.history-test-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.history-test-title a:hover {
    color: var(--brand);
}

.score-display-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
}

.score-badge-v2--high {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.score-badge-v2--medium {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.score-badge-v2--low {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.score-num-main {
    font-weight: 800;
}

.score-num-sep,
.score-num-total {
    opacity: 0.7;
    font-weight: 600;
}

.score-percent-pill {
    font-size: 0.75rem;
    margin-left: 4px;
    padding-left: 6px;
    border-left: 1px solid currentColor;
    opacity: 0.85;
}

.score-track-v2 {
    width: 100%;
    height: 6px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
}

.score-fill-v2 {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-fill-v2--high {
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}

.score-fill-v2--medium {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.score-fill-v2--low {
    background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
}

/* High-End Action Review Button */
.btn-history-review {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    border: 1.5px solid #c8a872 !important;
    border-radius: 999px;
    color: #3b2918 !important;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.18) !important;
}

.btn-review-eye-icon {
    width: 15px;
    height: 15px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.btn-review-arrow-icon {
    width: 15px;
    height: 15px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-history-review:hover {
    background: #dfc790 !important;
    border-color: #c8a872 !important;
    color: #3b2918 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(118, 85, 47, 0.3) !important;
}

.btn-history-review:hover .btn-review-eye-icon {
    opacity: 1;
}

.btn-history-review:hover .btn-review-arrow-icon {
    transform: translateX(3px);
}

/* Mobile Responsiveness for History Table */
@media (max-width: 840px) {
    .history-table-v2-head {
        display: none;
    }

    .history-row-v2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px;
    }

    .col-date,
    .col-test,
    .col-level,
    .col-score,
    .col-action {
        width: 100%;
        text-align: left;
    }

    .col-action {
        margin-top: 6px;
    }

    .btn-history-review {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Student Badges Redesign V2 (High-End Achievements Portal)
   ========================================================================== */

.student-badges-v2-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 48px;
}

.student-badges-hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.student-badges-section {
    margin-bottom: 36px;
}

/* How Awards Work V2 */
.badge-howto-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 36px;
    box-shadow: 0 4px 20px rgba(20, 27, 45, 0.03);
}

.badge-howto-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.howto-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 6px 0;
}

.howto-v2-subtitle {
    font-size: 0.92rem;
    color: var(--ink-muted);
    margin: 0 0 28px 0;
}

/* Pipeline Step Cards Grid */
.badge-pipeline-grid {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.pipeline-step-card {
    flex: 1;
    min-width: 0;
    position: relative;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 18px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pipeline-step-card:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 27, 45, 0.06);
}

.step-num-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-wrap {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 12px;
}

.step-card-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 4px 0;
}

.step-card-desc {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin: 0;
    line-height: 1.35;
}

.pipeline-arrow {
    font-size: 1.2rem;
    color: var(--ink-soft);
    flex-shrink: 0;
}

/* High-End Available Milestones Cards */
.available-badge-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.available-badge-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 4px 16px rgba(20, 27, 45, 0.03);
}

.available-badge-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(20, 27, 45, 0.07);
}

.available-card--hours.available-badge-card--unlocked {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.06) 0%, var(--surface) 100%);
}

.available-card--days.available-badge-card--unlocked {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--surface) 100%);
}

.available-badge-card--locked {
    opacity: 0.88;
}

.status-pill--locked {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.pill-check-icon,
.pill-lock-icon {
    width: 13px;
    height: 13px;
}

.available-emblem-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.available-halo-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(8px);
}

.available-3d-circle {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--surface) 0%, var(--surface-muted) 100%);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.available-badge-card--unlocked .available-3d-circle {
    background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #f59e0b 60%, #b45309 100%);
    border-color: #fbbf24;
}

.available-badge-card:hover .available-3d-circle {
    transform: scale(1.06);
}

.lock-overlay-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ink);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lock-overlay-badge svg {
    width: 13px;
    height: 13px;
}

.target-goal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-top: 4px;
}

.target-flag-icon {
    width: 14px;
    height: 14px;
    color: var(--brand);
}

/* Premium 3D Awarded Badges Grid & Cards */
.awarded-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.awarded-badge-card-v2 {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(20, 27, 45, 0.03);
}

/* Hours Variant Gold Metallic Border & Glow */
.badge-card-v2--hours {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.06) 0%, var(--surface) 100%);
}

.badge-card-v2--hours:hover {
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.15), 0 0 20px rgba(251, 191, 36, 0.1);
}

/* Days Variant Emerald Metallic Border & Glow */
.badge-card-v2--days {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--surface) 100%);
}

.badge-card-v2--days:hover {
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.15), 0 0 20px rgba(52, 211, 153, 0.1);
}

/* Shimmer Light Ray Flare */
.badge-v2-shine-flare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 42%, rgba(255, 255, 255, 0.25) 50%, transparent 58%);
    transform: rotate(30deg);
    pointer-events: none;
    transition: transform 0.6s ease;
}

.awarded-badge-card-v2:hover .badge-v2-shine-flare {
    animation: shineSweep 1.2s ease forwards;
}

@keyframes shineSweep {
    0% {
        transform: translate(-30%, -30%) rotate(30deg);
    }

    100% {
        transform: translate(30%, 30%) rotate(30deg);
    }
}

/* Header & Unlocked Pill */
.badge-v2-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    z-index: 1;
}

.badge-type-pill-v2 {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-card-v2--hours .badge-type-pill-v2 {
    color: #d97706;
}

.badge-card-v2--days .badge-type-pill-v2 {
    color: #059669;
}

.awarded-badge-card-v2 .awarded-badge-check,
.badge-unlocked-pill-v2 {
    width: auto !important;
    height: auto !important;
    min-height: 24px;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    background: rgba(16, 185, 129, 0.14) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #059669 !important;
    padding: 3px 12px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

.unlocked-check-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* 3D Emblem Medallion */
.badge-v2-emblem-container {
    position: relative;
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    z-index: 1;
}

.emblem-halo-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    opacity: 0.4;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

.badge-card-v2--hours .emblem-halo-pulse {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6) 0%, transparent 70%);
}

.badge-card-v2--days .emblem-halo-pulse {
    background: radial-gradient(circle, rgba(52, 211, 153, 0.6) 0%, transparent 70%);
}

.awarded-badge-card-v2:hover .emblem-halo-pulse {
    opacity: 0.8;
}

.emblem-3d-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.6), inset 0 -3px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-card-v2--hours .emblem-3d-circle {
    background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #f59e0b 60%, #b45309 100%);
    border: 2px solid #fbbf24;
}

.badge-card-v2--days .emblem-3d-circle {
    background: radial-gradient(circle at 30% 30%, #d1fae5 0%, #10b981 60%, #047857 100%);
    border: 2px solid #34d399;
}

.awarded-badge-card-v2:hover .emblem-3d-circle {
    transform: scale(1.08) rotate(4deg);
}

.badge-emoji-symbol {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

/* Badge Title & Target */
.badge-v2-body {
    z-index: 1;
    margin-bottom: 16px;
}

.badge-v2-name {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.badge-v2-target {
    font-size: 0.86rem;
    color: var(--ink-muted);
    font-weight: 500;
    margin: 0;
}

/* Footer Awarded Timestamp */
.badge-v2-footer {
    width: 100%;
    z-index: 1;
    margin-top: auto;
}

.awarded-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.awarded-clock-icon {
    width: 14px;
    height: 14px;
    color: var(--ink-soft);
}

/* Responsiveness for Badges V2 */
@media (max-width: 900px) {
    .badge-pipeline-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .pipeline-arrow {
        text-align: center;
        transform: rotate(90deg);
        margin: -4px 0;
    }
}

/* ==========================================================================
   Article Reader Layout: Article Body Primary + Top-Right Timer & Glossary Sidebar
   ========================================================================== */

.article-reader-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 1100px) {
    .article-reader-layout {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {

    .article-reader-layout,
    .article-reader--student {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.article-reader-card {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    padding: 32px 36px;
    box-shadow: 0 4px 24px rgba(20, 27, 45, 0.04);
}

.article-reader-left-sidebar,
.article-reader-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
}

/* Ensure Glossary & Sidebars are NOT sticky on mobile view so article text remains fully readable */
@media (max-width: 991px) {

    .article-reader-left-sidebar,
    .article-reader-right-sidebar,
    .glossary-sidebar-panel,
    .reading-timer-compact-card {
        position: static !important;
        top: auto !important;
    }
}

/* ==========================================================================
   Mobile Optimization: Wide Article Body & Enhanced Reading Font Size
   ========================================================================== */
@media (max-width: 768px) {
    .article-reader-card {
        padding: 20px 14px !important;
        border-radius: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .article-reader-layout,
    .article-reader--student {
        gap: 16px !important;
    }

    .article-body,
    .article-level-body,
    .preview-body,
    .article-reader-body-shell {
        font-size: 1.12rem;
        line-height: 1.8;
        color: var(--ink, #1e293b);
        letter-spacing: 0.01em;
        text-align: justify;
        text-justify: inter-word;
    }

    .article-body p,
    .article-level-body p,
    .preview-body p {
        font-size: inherit;
        line-height: inherit;
        margin-bottom: 1.35rem !important;
        text-align: justify;
        text-justify: inter-word;
    }

    .article-body h1,
    .article-level-body h1,
    .preview-body h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin: 1.5rem 0 0.85rem !important;
    }

    .article-body h2,
    .article-level-body h2,
    .preview-body h2 {
        font-size: 1.5rem !important;
        line-height: 1.35 !important;
        margin: 1.35rem 0 0.75rem !important;
    }

    .article-body h3,
    .article-level-body h3,
    .preview-body h3 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
        margin: 1.2rem 0 0.65rem !important;
    }
}

@media (max-width: 480px) {
    .article-reader-card {
        padding: 16px 10px !important;
        border-radius: 14px !important;
    }

    .student-main {
        width: min(100% - 10px, 1280px) !important;
        padding: 12px 0 24px !important;
    }

    .article-body,
    .article-level-body,
    .preview-body {
        font-size: 1.1rem;
        line-height: 1.8;
    }
}

/* Compact Mini Reading Time Card (Top Left - Sage Green Theme) */
.reading-timer-compact-card {
    background: linear-gradient(135deg, #7d8c6f 0%, #728164 50%, #657358 100%) !important;
    border: 2px solid #58664c !important;
    border-radius: 20px;
    padding: 14px 18px;
    color: #f7edd4 !important;
    box-shadow: 0 10px 24px rgba(50, 60, 42, 0.22);
}

.timer-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(247, 237, 212, 0.35);
}

.timer-compact-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f7edd4 !important;
}

.timer-clock-icon {
    width: 16px;
    height: 16px;
    color: #f7edd4 !important;
}

.timer-visit-chip {
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(247, 237, 212, 0.35);
    color: #f7edd4;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.timer-compact-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timer-stat-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(247, 237, 212, 0.25);
    border-radius: 10px;
    padding: 6px 10px;
    flex: 1;
}

.timer-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(247, 237, 212, 0.85);
}

.timer-stat-value {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.98rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* Italic-Only Glossary Idiom Highlight in Article Text (Preview & Student View) */
.article-body mark.idiom-highlight-badge,
mark.idiom-highlight-badge,
.article-body mark.idiom-highlight-badge *,
mark.idiom-highlight-badge * {
    font-style: italic !important;
    font-weight: normal !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.article-body mark.idiom-highlight-badge,
mark.idiom-highlight-badge {
    background: transparent !important;
    color: inherit !important;
    padding: 0 1px !important;
    cursor: pointer;
    display: inline;
    box-shadow: none !important;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.idiom-word {
    cursor: pointer;
    display: inline;
    border-radius: 2px;
    font-style: italic !important;
    font-weight: normal !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.idiom-word:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.article-body mark.idiom-highlight-badge:hover,
mark.idiom-highlight-badge:hover {
    background: rgba(245, 158, 11, 0.15) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    color: #b45309 !important;
}

mark.idiom-highlight-badge.is-active-pulse {
    animation: idiomPulse 1.5s ease-in-out infinite;
}

@keyframes idiomPulse {
    0% {
        background: rgba(245, 158, 11, 0.4);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }

    70% {
        background: rgba(245, 158, 11, 0.15);
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }

    100% {
        background: rgba(245, 158, 11, 0.2);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.glossary-sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 4px 20px rgba(20, 27, 45, 0.04);
    transition: all 0.3s ease;
}

.glossary-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.glossary-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.glossary-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}

.glossary-book-icon {
    width: 17px;
    height: 17px;
    color: var(--brand);
    flex-shrink: 0;
}

.glossary-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.glossary-count-pill {
    margin-left: auto;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #d97706;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.glossary-subtitle {
    font-size: 0.74rem;
    color: var(--ink-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Glossary Search & Expand-All Toolbar */
.glossary-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.glossary-search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.glossary-search-icon {
    position: absolute;
    left: 9px;
    width: 13px;
    height: 13px;
    color: var(--ink-muted);
    pointer-events: none;
}

.glossary-search-input {
    width: 100%;
    padding: 5px 10px 5px 28px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.74rem;
    color: var(--ink);
    outline: none;
    transition: all 0.2s ease;
}

.glossary-search-input:focus {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 2.5px var(--brand-soft);
}

.glossary-expand-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.glossary-expand-all-btn:hover {
    background: var(--surface);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.glossary-expand-all-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.22s ease;
}

.glossary-expand-all-btn.is-expanded .glossary-expand-all-icon {
    transform: rotate(180deg);
}

/* 3-Option Filter Tabs (All, Idioms, Collocations) */
.glossary-filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-muted);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.glossary-filter-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.glossary-filter-tab:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.4);
}

.glossary-filter-tab.is-active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.05);
}

.glossary-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
}

.glossary-filter-tab.is-active .glossary-tab-badge {
    background: var(--brand-soft);
    color: var(--brand);
}

/* High-Density Glossary Card Item List */
.glossary-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(640px, calc(100vh - 270px));
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.glossary-content::-webkit-scrollbar {
    width: 5px;
}

.glossary-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

.glossary-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-align: left;
}

.glossary-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    background: var(--surface);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.glossary-card--collocation:hover {
    border-color: rgba(2, 132, 199, 0.45);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}

.glossary-card.is-highlighted {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.12) 0%, var(--surface) 100%);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.22);
}

.glossary-card--collocation.is-highlighted {
    border-color: #0284c7;
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.12) 0%, var(--surface) 100%);
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.22);
}

/* Card Header: Badge & Chips + Action Buttons */
.glossary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    user-select: none;
}

.glossary-card-header-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    min-width: 0;
}

.glossary-card-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1.5px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    line-height: 1.3;
}

.glossary-card-badge--collocation {
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
}

.glossary-card-type-chip {
    font-size: 0.62rem;
    font-weight: 700;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.09);
    border: 1px solid rgba(2, 132, 199, 0.22);
    padding: 1px 6px;
    border-radius: 5px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.25;
}

.glossary-card-phrase {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 0.92rem;
    font-style: italic;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 5px 0;
    white-space: normal;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.glossary-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.glossary-mini-speak-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.glossary-mini-speak-btn:hover {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    transform: scale(1.06);
}

.glossary-card-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.glossary-card-toggle-btn:hover {
    color: var(--ink);
    background: var(--surface-muted);
    border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
    transform: scale(1.08);
}

.glossary-card.is-expanded .glossary-card-toggle-btn {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.glossary-mini-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glossary-card.is-expanded .glossary-mini-chevron {
    transform: rotate(180deg);
}

/* Collapsible Details (Hidden first, shown on click) */
.glossary-card-details {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
    animation: glossaryFadeIn 0.2s ease-out;
}

.glossary-card-meaning {
    font-size: 0.78rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

/* Collapsible Example Sentence Strip */
.glossary-example-strip {
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(245, 158, 11, 0.05);
    border-left: 2.5px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--ink-soft);
    font-style: italic;
}

.glossary-card--collocation .glossary-example-strip {
    background: rgba(2, 132, 199, 0.05);
    border-left-color: #0284c7;
}

.glossary-example-label {
    font-style: normal;
    font-weight: 800;
    font-size: 0.65rem;
    color: #d97706;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 4px;
}

.glossary-card--collocation .glossary-example-label {
    color: #0284c7;
}

@keyframes glossaryFadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glossary-empty-state {
    text-align: center;
    padding: 24px 12px;
    color: var(--ink-muted);
}

.glossary-empty-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 6px;
    opacity: 0.6;
}

.glossary-empty-text {
    font-size: 0.88rem;
}

/* ==========================================================================
   Reading Settings Drawer: Glossary Master Switch & 3-Option Grid
   ========================================================================== */

.drawer-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.drawer-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.drawer-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-strong, #cbd5e1);
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-switch input:checked+.drawer-switch-slider {
    background-color: var(--brand);
}

.drawer-switch input:checked+.drawer-switch-slider:before {
    transform: translateX(20px);
}

.drawer-glossary-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.drawer-glossary-grid.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.5);
}

.drawer-glossary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.drawer-glossary-card:hover {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
    transform: translateY(-1px);
}

.drawer-glossary-card.is-selected {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-soft, rgba(56, 189, 248, 0.18));
}

.drawer-glossary-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer-glossary-card.is-selected .drawer-glossary-icon {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.drawer-glossary-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.drawer-glossary-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
}

.drawer-glossary-card.is-selected .drawer-glossary-name {
    color: var(--brand);
}

.drawer-glossary-sub {
    font-size: 0.74rem;
    color: var(--ink-muted);
}

/* ==========================================================================
   Highlight Visibility Rules (Driven by Glossary Settings)
   ========================================================================== */

/* 1. When Glossary is turned OFF via Master Switch */
.article-reader-layout.glossary-disabled mark.idiom-highlight-badge,
.article-reader-layout.glossary-disabled mark.idiom-highlight-badge * {
    font-style: normal !important;
    text-decoration: none !important;
    border-bottom: none !important;
    background: transparent !important;
    color: inherit !important;
    cursor: default !important;
}

.article-reader-layout.glossary-disabled mark.idiom-highlight-badge:hover,
.article-reader-layout.glossary-disabled .idiom-word:hover {
    background: transparent !important;
    color: inherit !important;
}

/* 2. When Glossary Filter is "Idioms" only */
.article-reader-layout[data-glossary-filter="idioms"] mark.idiom-highlight-badge--collocation,
.article-reader-layout[data-glossary-filter="idioms"] mark.idiom-highlight-badge--collocation * {
    font-style: normal !important;
    text-decoration: none !important;
    border-bottom: none !important;
    background: transparent !important;
    color: inherit !important;
    cursor: default !important;
}

.article-reader-layout[data-glossary-filter="idioms"] mark.idiom-highlight-badge--collocation:hover,
.article-reader-layout[data-glossary-filter="idioms"] mark.idiom-highlight-badge--collocation .idiom-word:hover {
    background: transparent !important;
    color: inherit !important;
}

/* 3. When Glossary Filter is "Collocations" only */
.article-reader-layout[data-glossary-filter="collocations"] mark.idiom-highlight-badge:not(.idiom-highlight-badge--collocation),
.article-reader-layout[data-glossary-filter="collocations"] mark.idiom-highlight-badge:not(.idiom-highlight-badge--collocation) * {
    font-style: normal !important;
    text-decoration: none !important;
    border-bottom: none !important;
    background: transparent !important;
    color: inherit !important;
    cursor: default !important;
}

.article-reader-layout[data-glossary-filter="collocations"] mark.idiom-highlight-badge:not(.idiom-highlight-badge--collocation):hover,
.article-reader-layout[data-glossary-filter="collocations"] mark.idiom-highlight-badge:not(.idiom-highlight-badge--collocation) .idiom-word:hover {
    background: transparent !important;
    color: inherit !important;
}

/* ==========================================================================
   Student Reading Analytics Redesign V2
   ========================================================================== */

.reading-v2-container {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 12px 0 48px;
    animation: reading-v2-fade-in 0.45s ease both;
}

@keyframes reading-v2-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.reading-v2-hero {
    position: relative;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface-elevated)) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.reading-v2-hero-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 25%, transparent) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.reading-v2-hero-top {
    margin-bottom: 24px;
    max-width: 620px;
}

.reading-v2-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    color: var(--brand-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.reading-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.reading-v2-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: clamp(1.85rem, 4.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 10px 0;
}

.reading-v2-subtitle {
    font-size: 1.02rem;
    color: var(--ink-muted);
    line-height: 1.5;
    margin: 0;
}

/* 4-Card Analytics Grid */
.reading-v2-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .reading-v2-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .reading-v2-stats-grid {
        grid-template-columns: 1fr;
    }
}

.reading-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-stat-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.reading-stat-card--primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, var(--surface) 100%);
    border-color: rgba(37, 99, 235, 0.25);
}

.reading-stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reading-stat-icon-wrap--indigo {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.reading-stat-icon-wrap--amber {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.reading-stat-icon-wrap--emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.reading-stat-icon {
    width: 24px;
    height: 24px;
}

.reading-stat-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.reading-stat-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reading-stat-value {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.reading-stat-value--sm {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Datatable Panel Card */
.reading-v2-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.03);
}

.reading-v2-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.reading-v2-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-v2-card-heading {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

.reading-v2-count-chip {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Search Box */
.reading-search-box {
    position: relative;
    width: 260px;
}

.reading-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ink-soft);
    pointer-events: none;
}

.reading-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.reading-search-input:focus {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

/* Table Styling */
.reading-v2-table-wrap {
    overflow-x: auto;
}

.reading-v2-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.reading-v2-table th {
    background: var(--surface-muted);
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.reading-v2-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.reading-v2-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.reading-table-row {
    transition: background 0.2s ease;
}

.reading-table-row:hover {
    background: color-mix(in srgb, var(--brand-soft) 40%, var(--surface));
}

.reading-table-row td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.reading-table-row:last-child td {
    border-bottom: 0;
}

/* Article Cell */
.reading-article-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-book-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reading-book-badge svg {
    width: 18px;
    height: 18px;
}

.reading-article-link {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reading-article-link:hover {
    color: var(--brand);
}

/* Visit Chip */
.reading-visit-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #6366f1;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Time Cell & Progress Track */
.reading-time-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 160px;
}

.reading-time-badge {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
}

.reading-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-muted);
    overflow: hidden;
}

.reading-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand) 0%, #3b82f6 100%);
    transition: width 0.4s ease;
}

/* Date Cell */
.reading-date-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-muted);
    font-size: 0.86rem;
    font-weight: 500;
}

.reading-clock-muted {
    width: 15px;
    height: 15px;
    color: var(--ink-soft);
}

/* Action Button */
.reading-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-btn-action svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.reading-btn-action:hover {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.reading-btn-action:hover svg {
    transform: translateX(3px);
}

/* Empty State */
.reading-empty-state {
    text-align: center;
    padding: 42px 20px;
}

.reading-empty-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.reading-empty-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 6px 0;
}

.reading-empty-text {
    color: var(--ink-muted);
    font-size: 0.92rem;
    margin: 0 0 20px 0;
}

.popup-pos-pill--idiom {
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.popup-pos-pill--collocation {
    background: rgba(2, 132, 199, 0.15);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.3);
}

html[data-theme="dark"] .article-body mark.idiom-highlight-badge,
html[data-theme="dark"] mark.idiom-highlight-badge,
html[data-theme="dark"] .article-body mark.idiom-highlight-badge *,
html[data-theme="dark"] mark.idiom-highlight-badge * {
    font-style: italic !important;
    font-weight: normal !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

html[data-theme="dark"] .article-body mark.idiom-highlight-badge,
html[data-theme="dark"] mark.idiom-highlight-badge {
    background: transparent !important;
    color: inherit !important;
}

html[data-theme="dark"] .article-body mark.idiom-highlight-badge:hover,
html[data-theme="dark"] mark.idiom-highlight-badge:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .article-body mark.idiom-highlight-badge--collocation:hover,
html[data-theme="dark"] mark.idiom-highlight-badge--collocation:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    color: #38bdf8 !important;
}

html[data-theme="dark"] .glossary-filter-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

html[data-theme="dark"] .glossary-filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

html[data-theme="dark"] .glossary-filter-tab.is-active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .glossary-filter-tab.is-active .glossary-tab-badge {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
}

html[data-theme="dark"] .glossary-card-type-chip {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
}

html[data-theme="dark"] .popup-pos-pill--collocation {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

html[data-theme="dark"] .glossary-card {
    background: var(--surface);
}

html[data-theme="dark"] .glossary-meaning-box {
    background: var(--surface-muted);
}

html[data-theme="dark"] .drawer-switch-slider {
    background-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .drawer-switch input:checked+.drawer-switch-slider {
    background-color: var(--brand);
}

html[data-theme="dark"] .drawer-glossary-card {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .drawer-glossary-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .drawer-glossary-card.is-selected {
    background: var(--surface);
    border-color: var(--brand);
}

html[data-theme="dark"] .drawer-glossary-icon {
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Reading History Table V2 Perfection
   ========================================================================== */

.reading-history-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.reading-history-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.reading-history-head-title {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 2px 0;
}

.reading-history-head-sub {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin: 0;
}

.reading-history-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-history-search-input {
    width: 240px;
    padding: 8px 14px 8px 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 0.86rem;
    outline: none;
    transition: all 0.2s ease;
}

.reading-history-search-input:focus {
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

.reading-history-table-wrap {
    overflow-x: auto;
}

.reading-history-table {
    width: 100%;
    border-collapse: collapse;
}

.reading-history-table th {
    padding: 14px 24px;
    background: var(--surface-muted);
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.reading-history-table th:last-child {
    text-align: right;
}

.reading-history-tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.reading-history-tr:last-child {
    border-bottom: none;
}

.reading-history-tr:hover {
    background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface));
}

.reading-history-td {
    padding: 18px 24px;
    vertical-align: middle;
}

/* Cells */
.reading-article-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-article-icon-sq {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reading-article-icon-sq svg {
    width: 20px;
    height: 20px;
}

.reading-article-title-link {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reading-article-title-link:hover {
    color: var(--brand);
}

.reading-article-subtag {
    display: block;
    font-size: 0.76rem;
    color: var(--ink-muted);
    margin-top: 1px;
}

.reading-visit-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.reading-time-display-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 170px;
}

.reading-time-val {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
}

.reading-time-track {
    width: 100%;
    height: 6px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
}

.reading-time-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand) 0%, #3b82f6 100%);
    transition: width 0.4s ease;
}

.reading-date-badge-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reading-date-sq {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.reading-date-sq svg {
    width: 16px;
    height: 16px;
}

.reading-date-main {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
}

.reading-date-sub {
    display: block;
    font-size: 0.76rem;
    color: var(--ink-muted);
}

.reading-btn-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-btn-read svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.reading-btn-read:hover {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent);
}

.reading-btn-read:hover svg {
    transform: translateX(3px);
}

/* â”€â”€ View Toggle Pill Segmented Switch â”€â”€ */
.reading-view-toggle-pill {
    display: none;
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.reading-view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-view-toggle-btn svg {
    width: 14px;
    height: 14px;
}

.reading-view-toggle-btn.active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* â”€â”€ Student Reading Log Responsive Design â”€â”€ */
@media (max-width: 992px) {
    .student-articles-hero.student-tests-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .hero-stats-card {
        width: 100%;
        max-width: 100%;
    }

    .reading-history-card-head {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .reading-history-head-actions {
        width: 100%;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .reading-search-box {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .reading-view-toggle-pill {
        display: inline-flex;
    }

    .reading-history-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .reading-history-table {
        min-width: 720px;
    }

    .visits-modal-card {
        width: 94vw !important;
        max-width: 94vw !important;
        max-height: 90vh !important;
        padding: 18px !important;
        border-radius: 20px !important;
    }

    .visits-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }

    .visits-grid-cards {
        grid-template-columns: 1fr !important;
    }
}

/* Cards View Mode Override */
.reading-history-table-wrap.is-cards-mode .reading-history-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
}

.reading-history-table-wrap.is-cards-mode .reading-history-table thead {
    display: none;
}

.reading-history-table-wrap.is-cards-mode .reading-history-table tbody {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.reading-history-table-wrap.is-cards-mode .reading-history-tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "title action"
        "time  visits"
        "date  date";
    gap: 12px 10px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.reading-history-table-wrap.is-cards-mode .reading-td--title {
    grid-area: title;
    padding: 0 !important;
}

.reading-history-table-wrap.is-cards-mode .reading-td--action {
    grid-area: action;
    padding: 0 !important;
    text-align: right !important;
    align-self: start;
}

.reading-history-table-wrap.is-cards-mode .reading-td--visits {
    grid-area: visits;
    padding: 0 !important;
    align-self: center;
    justify-self: end;
}

.reading-history-table-wrap.is-cards-mode .reading-td--time {
    grid-area: time;
    padding: 0 !important;
}

.reading-history-table-wrap.is-cards-mode .reading-td--date {
    grid-area: date;
    padding-top: 8px !important;
    border-top: 1px dashed var(--border);
}

.reading-history-table-wrap.is-cards-mode .reading-time-display-stack {
    min-width: 0 !important;
    width: 100%;
}

@media (max-width: 640px) {
    .student-tests-v2-container {
        padding: 12px 14px;
    }

    .reading-history-card {
        border-radius: 16px;
        padding: 16px 14px;
    }

    .reading-history-head-title {
        font-size: 1.25rem;
    }

    .reading-history-head-sub {
        font-size: 0.82rem;
    }

    .reading-search-box {
        width: 100%;
    }

    .reading-history-search-input {
        width: 100%;
    }

    .history-count-badge {
        align-self: flex-start;
    }

    .visits-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .visits-log-table {
        min-width: 500px;
    }
}

/* â”€â”€ Student POS Lexicon Library Styles â”€â”€ */
.library-main-panel {
    min-width: 0;
}

.library-nav-item {
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid transparent;
}

.library-nav-item:hover {
    background: var(--surface-muted);
    color: var(--brand);
}

.library-nav-item.is-active {
    background: #f7edd4;
    color: #665039;
    border-color: #d4b472;
}

.library-word-tile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(118, 85, 47, 0.08) !important;
    border-color: #ebd39b !important;
}

.fav-star-toggle-btn svg {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.15s ease;
}

.fav-star-toggle-btn:hover svg {
    transform: scale(1.18);
}

.library-layout-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
    min-width: 0;
    width: 100%;
}

@media (max-width: 992px) {
    .library-layout-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .library-sidebar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 4px 4px 10px 4px !important;
        margin-bottom: 8px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .library-sidebar::-webkit-scrollbar {
        display: none !important;
    }

    .library-sidebar .library-nav-item {
        flex: 0 0 auto !important;
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
    }

    .library-sidebar .library-sidebar-heading,
    .library-sidebar .library-sidebar-divider {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .library-controls-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .library-controls-bar form {
        width: 100% !important;
        min-width: 0 !important;
    }

    .library-controls-bar .reading-view-toggle-pill {
        display: flex !important;
        width: 100% !important;
    }

    .library-controls-bar .reading-view-toggle-btn {
        flex: 1 !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .library-tiles-grid {
        grid-template-columns: 1fr !important;
    }
}

/* â”€â”€ Custom Pagination Styles â”€â”€ */
.custom-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.custom-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.custom-pagination .page-link:hover:not(.disabled) {
    background: var(--surface-muted);
    color: var(--brand);
    border-color: var(--border);
}

.custom-pagination .page-link.active {
    background: #f7edd4;
    color: #665039;
    border-color: #d4b472;
}

.custom-pagination .page-link.disabled {
    color: var(--ink-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .custom-pagination {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        margin-left: 0 !important;
        width: 100% !important;
        padding: 8px !important;
        gap: 4px !important;
    }

    .custom-pagination .page-link {
        min-width: 30px !important;
        height: 30px !important;
        padding: 0 4px !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
    }
}

/* â”€â”€ Student Test History KPI Cards Grid â”€â”€ */
.history-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .history-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .history-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.history-kpi-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.history-kpi-card--time {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f2 100%);
    border-color: #b8c4b4;
}

.history-kpi-card--articles {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border-color: #e8d7b7;
}

.history-kpi-card--words {
    background: linear-gradient(180deg, #ffffff 0%, #f7f4f0 100%);
    border-color: #d8c9b8;
}

.history-kpi-card--tests {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f2 100%);
    border-color: #b8c4b4;
}

html[data-theme="dark"] .history-kpi-card--time,
html[data-theme="dark"] .history-kpi-card--tests {
    background: linear-gradient(180deg, #1c2419 0%, #151b13 100%);
    border-color: rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .history-kpi-card--articles {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .history-kpi-card--words {
    background: linear-gradient(180deg, #251d18 0%, #1c1511 100%);
    border-color: rgba(141, 119, 95, 0.35);
}

.history-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.history-kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-kpi-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.history-kpi-icon-wrap--attempts {
    background: #e6ebe3;
    color: #58664c;
    border: 1px solid #b8c4b4;
}

.history-kpi-icon-wrap--best {
    background: #f6eee0;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.history-kpi-icon-wrap--avg {
    background: #ece5dd;
    color: #5c3c14;
    border: 1px solid #c8b9a8;
}

.history-kpi-icon-wrap--latest {
    background: #e6ebe3;
    color: #58664c;
    border: 1px solid #b8c4b4;
}

html[data-theme="dark"] .history-kpi-icon-wrap--attempts,
html[data-theme="dark"] .history-kpi-icon-wrap--latest {
    background: rgba(125, 140, 111, 0.2);
    color: #92a382;
    border-color: rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .history-kpi-icon-wrap--best {
    background: rgba(212, 184, 123, 0.2);
    color: #d4b87b;
    border-color: rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .history-kpi-icon-wrap--avg {
    background: rgba(141, 119, 95, 0.22);
    color: #a89279;
    border-color: rgba(141, 119, 95, 0.35);
}

.history-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.history-kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.history-kpi-sub {
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-weight: 600;
}

.history-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1.5px solid #c8a872 !important;
    font-weight: 800 !important;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.22) !important;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 85, 47, 0.35) !important;
    color: #3b2918 !important;
    background: #dfc790 !important;
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-ghost:hover {
    background: var(--surface-muted);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    color: var(--brand);
    transform: translateY(-1px);
}

/* â”€â”€ Take Test Interactive Styles â”€â”€ */
.take-test-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 100px;
}

.take-question-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.take-question-card:hover {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.take-question-card.has-answered {
    border-left: 4px solid var(--brand);
}

.take-question-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.take-question-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.take-question-num-chip {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border));
    flex-shrink: 0;
    margin-top: 2px;
}

.take-question-text {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ink);
}

.take-question-status {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink-muted);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.take-question-card.has-answered .take-question-status {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}

.take-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.take-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.take-option-card:hover {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    transform: translateY(-1px);
}

.take-option-card.is-selected {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-elevated));
    border-color: var(--brand);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 20%, transparent);
}

.take-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.take-option-radio {
    accent-color: var(--brand);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.take-option-badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ink);
    transition: all 0.2s ease;
}

.take-option-card.is-selected .take-option-badge {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.take-option-text {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--ink);
}

/* Floating Sticky Footer Action Bar */
.take-footer-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 32px));
    padding: 14px 22px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.take-footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.take-footer-counter {
    font-size: 0.9rem;
    font-weight: 700;
}

.take-footer-progress-track {
    width: 140px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

@media (max-width: 576px) {
    .take-footer-progress-track {
        display: none;
    }
}

.take-footer-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #10b981);
    transition: width 0.3s ease;
}

.btn-take-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border: 1.5px solid #c8a872 !important;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.22) !important;
}

.btn-take-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 85, 47, 0.35) !important;
    background: #dfc790 !important;
    color: #3b2918 !important;
}

@media (max-width: 480px) {
    .take-footer-bar {
        bottom: 12px;
        padding: 10px 14px;
        border-radius: 16px;
        width: calc(100vw - 20px);
        gap: 10px;
    }
    .take-footer-counter {
        font-size: 0.8rem;
    }
    .btn-take-submit {
        padding: 8px 16px;
        font-size: 0.82rem;
    }
    .take-question-card {
        padding: 16px 14px;
    }
    .take-option-card {
        padding: 12px 14px;
    }
}

.profile-hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.profile-name-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .profile-hero-layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-name-actions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .profile-name-actions-row .history-hero-actions {
        margin-left: 0 !important;
    }
}

.profile-avatar-block {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar-bubble {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand) 0%, #3b82f6 100%);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 40%, transparent);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.profile-meta-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.profile-meta-chip {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
}

.profile-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-input-group label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
}

.profile-input-field {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font: inherit;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.profile-input-field:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

/* â”€â”€ Student Dashboard Animated & Glassmorphic Enhancements â”€â”€ */
.student-dashboard .student-metric-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.student-dashboard .student-metric-card::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(212, 184, 123, 0.28) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.student-dashboard .student-metric-card:hover::before {
    opacity: 1;
}

.student-dashboard .student-metric-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.student-metric-ring-value {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes studentComingSoonFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes studentComingSoonShine {
    0% {
        transform: translateX(-140%);
    }

    30%,
    100% {
        transform: translateX(140%);
    }
}

/* â”€â”€ Enhanced Lower Dashboard Animations & Styling â”€â”€ */
.student-dashboard .student-metric-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px;
}

.student-dashboard .student-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.student-dashboard .student-metric-card:hover .student-metric-icon {
    transform: scale(1.12) rotate(4deg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-dashboard .student-metric-icon {
    transition: transform 0.3s ease;
}

.student-progress-card {
    border-radius: 22px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.student-progress-card:hover {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.student-progress-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.student-progress-card:hover .student-progress-icon {
    transform: scale(1.1) rotate(-5deg);
}

.growth-period-tab {
    transition: all 0.2s ease;
}

.growth-period-tab:hover {
    color: var(--brand);
}

.growth-period-tab.is-active {
    background: var(--brand);
    color: #ffffff !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent);
}

.student-quicklink {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 18px !important;
}

.student-quicklink:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.student-quicklink:hover .student-quicklink-arrow {
    transform: translateX(5px);
    transition: transform 0.25s ease;
}

.student-quicklink-arrow {
    transition: transform 0.25s ease;
}

.student-quicklink:hover .student-quicklink-icon {
    transform: scale(1.15);
    transition: transform 0.25s ease;
}

.student-quicklink-icon {
    transition: transform 0.25s ease;
}

.line-chart-wrap.is-tooltip-visible,
.student-progress-chart-wrap.is-tooltip-visible {
    overflow: visible !important;
}

.growth-chart-tooltip,
.student-progress-tooltip {
    z-index: 9999 !important;
    white-space: nowrap !important;
    max-width: none !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}

/* Drawer Scope Apply Option (All Articles vs Single Article) */
.drawer-scope-section {
    margin-bottom: 14px;
}

.drawer-scope-sublabel {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    margin-bottom: 8px;
}

.drawer-scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.drawer-scope-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-scope-btn:hover {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.drawer-scope-btn.is-selected {
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-elevated));
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 20%, transparent);
}

.drawer-scope-btn .scope-icon {
    font-size: 1rem;
}

/* Manual highlights - matching student panel style across all panels with no underline */
.article-body .word-hi,
.preview-body .word-hi,
.word-hi {
    font-weight: inherit;
    color: var(--student-highlight-text-color-hi, #0f766e);
    background: var(--student-highlight-color-hi, #f8e9b5);
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
    border-bottom: none !important;
    text-decoration: none !important;
}

.article-body .word-auto,
.preview-body .word-auto,
.word-auto {
    font-weight: 400;
    background: var(--student-highlight-color, #eeeeee);
    color: var(--student-highlight-text-color, #0f172a);
    padding: 2px 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
    border-bottom: none !important;
    text-decoration: none !important;
}

/* Swatch-only Quick Settings Palette */
.drawer-color-grid--swatches-only {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.drawer-color-card--swatch-only {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    background: transparent;
}

.drawer-color-card--swatch-only .drawer-color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.drawer-color-card--swatch-only:hover {
    transform: scale(1.12);
}

.drawer-color-card--swatch-only.is-selected {
    border-color: var(--brand, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #2563eb) 25%, transparent);
    transform: scale(1.08);
}

/* Student Profile Analytics & Donut Circle Graph */
.profile-section {
    scroll-margin-top: 100px;
    margin-bottom: 24px;
}

.profile-analytics-panel {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
}

/* Dual Analytics Side-by-Side Container */
.dual-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .dual-analytics-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-sub-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 1.5px solid #d8c296;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 18px rgba(118, 85, 47, 0.05);
    transition: all 0.22s ease;
}

html[data-theme="dark"] .analytics-sub-card {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.analytics-sub-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #3b2918;
    margin: 0;
}

html[data-theme="dark"] .analytics-sub-title {
    color: #f7edd4;
}

.analytics-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.analytics-graph-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

@media (min-width: 640px) {
    .analytics-graph-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

.donut-chart-box {
    position: relative;
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center-label {
    position: absolute;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .donut-center-label {
    background: #1c1813;
    border: 1.5px solid rgba(212, 184, 123, 0.3);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.donut-center-label strong {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
    color: #3b2918;
}

html[data-theme="dark"] .donut-center-label strong {
    color: #f7edd4;
}

.donut-center-label span {
    font-size: 0.68rem;
    color: #8d775f;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: 2px;
}

html[data-theme="dark"] .donut-center-label span {
    color: #d4b87b;
}

.analytics-legend-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    flex: 1;
}

.analytics-legend-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f6eee0;
    border: 1px solid #d8c296;
}

html[data-theme="dark"] .analytics-legend-item {
    background: rgba(212, 184, 123, 0.12);
    border-color: rgba(212, 184, 123, 0.28);
}

.legend-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.legend-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-weight: 700;
    color: #3b2918;
    flex: 1;
}

html[data-theme="dark"] .legend-label {
    color: #f7edd4;
}

.legend-pct {
    font-weight: 800;
    color: #784a0f;
}

html[data-theme="dark"] .legend-pct {
    color: #d4b87b;
}

.legend-progress-bg {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #ece5dd;
    overflow: hidden;
}

html[data-theme="dark"] .legend-progress-bg {
    background: rgba(255, 255, 255, 0.12);
}

.legend-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.legend-count {
    font-size: 0.76rem;
    color: var(--ink-soft, #64748b);
    font-weight: 600;
    text-align: right;
}

/* Drawer Premium Footer Actions */
.highlight-drawer-footer {
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 22px !important;
    background: var(--surface-elevated, #ffffff) !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12) !important;
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
}

.drawer-footer-reset-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.drawer-footer-reset-all svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.drawer-footer-reset-all:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.drawer-footer-reset-all:hover svg {
    transform: rotate(-180deg);
}

.drawer-footer-done-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand, #2563eb) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand, #2563eb) 35%, transparent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.drawer-footer-done-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand, #2563eb) 45%, transparent);
}

/* ==========================================================================
/* ==========================================================================
   Content Analytics Overview Panel (Compact & Rich UI)
   ========================================================================== */
.article-vocab-stats-panel {
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: all 0.2s ease;
}

.article-vocab-stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.article-vocab-stats-title-group {
    flex: 1;
    min-width: 240px;
}

.analytics-kicker-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.analytics-kicker-icon {
    width: 12px;
    height: 12px;
}

.article-vocab-stats-title {
    margin: 0 0 2px;
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.article-vocab-stats-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ink-muted);
    line-height: 1.35;
}

.article-vocab-stats-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vocab-stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #2563eb;
}

.vocab-stats-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    animation: analyticsDotPulse 2s infinite ease-in-out;
}

@keyframes analyticsDotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.75;
    }
}

.vocab-stats-aggregate-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.article-vocab-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1024px) {
    .article-vocab-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .article-vocab-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact & Rich Stat Cards */
.vocab-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 68px;
}

.vocab-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.vocab-stat-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.vocab-stat-top-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.vocab-stat-card-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.vocab-stat-card-icon-wrap svg {
    width: 12px;
    height: 12px;
}

.vocab-stat-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vocab-stat-pct-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    line-height: 1.2;
    flex-shrink: 0;
}

.vocab-stat-card-body {
    display: flex;
    align-items: baseline;
}

.vocab-stat-value {
    font-family: "Plus Jakarta Sans", Inter, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
    font-feature-settings: "tnum";
}

/* Rich Card Color Palettes */
.vocab-stat-card--total {
    background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.vocab-stat-card--total:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.vocab-stat-card--total .vocab-stat-card-icon-wrap {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.vocab-stat-card--total .vocab-stat-value {
    color: #1e3a8a;
}

.vocab-stat-card--highlight {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    border-color: rgba(16, 185, 129, 0.24);
}

.vocab-stat-card--highlight:hover {
    border-color: rgba(16, 185, 129, 0.45);
}

.vocab-stat-card--highlight .vocab-stat-card-icon-wrap {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.vocab-stat-card--highlight .vocab-stat-value {
    color: #065f46;
}

.vocab-stat-card--highlight .vocab-stat-pct-badge {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.vocab-stat-card--nohighlight {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(148, 163, 184, 0.22);
}

.vocab-stat-card--nohighlight:hover {
    border-color: rgba(148, 163, 184, 0.4);
}

.vocab-stat-card--nohighlight .vocab-stat-card-icon-wrap {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.vocab-stat-card--nohighlight .vocab-stat-value {
    color: #334155;
}

.vocab-stat-card--nohighlight .vocab-stat-pct-badge {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.vocab-stat-card--unnamed {
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    border-color: rgba(245, 158, 11, 0.24);
}

.vocab-stat-card--unnamed:hover {
    border-color: rgba(245, 158, 11, 0.45);
}

.vocab-stat-card--unnamed .vocab-stat-card-icon-wrap {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.vocab-stat-card--unnamed .vocab-stat-value {
    color: #92400e;
}

/* Dark Mode */
html[data-theme="dark"] .article-vocab-stats-panel {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .vocab-stat-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .vocab-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
}

html[data-theme="dark"] .analytics-kicker-pill {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

html[data-theme="dark"] .vocab-stats-badge {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

html[data-theme="dark"] .vocab-stats-badge-dot {
    background: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

html[data-theme="dark"] .vocab-stat-card--total .vocab-stat-value {
    color: #60a5fa;
}

html[data-theme="dark"] .vocab-stat-card--highlight .vocab-stat-value {
    color: #34d399;
}

html[data-theme="dark"] .vocab-stat-card--nohighlight .vocab-stat-value {
    color: #cbd5e1;
}

html[data-theme="dark"] .vocab-stat-card--unnamed .vocab-stat-value {
    color: #fbbf24;
}

html[data-theme="dark"] .vocab-stat-subtext {
    color: #94a3b8;
}

/* ==========================================================================
   Article Ratings & Student Feedback Section (3-Color Brand Palette Mockup UI)
   ========================================================================== */
/* ==========================================================================
   Article Ratings & Student Feedback Section (3-Color Brand Palette UI)
   - Outer Container: Sage Green
   - Overall Rating Hero Card: Dark Taupe
   - Share Your Feedback & Review Cards: Beige
   ========================================================================== */
.student-article-reviews-section {
    margin-top: 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #7d8c6f 0%, #728164 50%, #58664c 100%);
    border: 1.5px solid #58664c;
    border-radius: 20px;
    padding: 22px 26px;
    box-shadow: 0 8px 24px rgba(88, 102, 76, 0.25);
}

html[data-theme="dark"] .student-article-reviews-section {
    background: linear-gradient(135deg, #43543d 0%, #354530 100%);
    border-color: #283325;
}

.reviews-section-header {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.reviews-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-section-icon {
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    flex-shrink: 0;
}

.reviews-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.015em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.reviews-section-sub {
    font-size: 0.78rem;
    color: #e6ebe3;
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.reviews-summary-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

@media (max-width: 860px) {
    .reviews-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Overall Rating Hero Card (Dark Taupe) */
.reviews-score-card {
    background: linear-gradient(135deg, #302317 0%, #241c13 100%);
    border: 1.5px solid #4a3e2e;
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.reviews-score-hero-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reviews-trophy-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border: 2px solid #c8a872;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.reviews-trophy-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.reviews-score-info {
    display: flex;
    flex-direction: column;
}

.reviews-hero-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ebd7a8;
}

.reviews-big-score {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    display: block;
    margin: 2px 0;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reviews-score-stars {
    font-size: 1rem;
    color: #ebd7a8;
    margin-bottom: 3px;
    letter-spacing: 2px;
}

.score-star--empty {
    color: #8d775f;
    opacity: 0.5;
}

.reviews-total-text {
    font-size: 0.76rem;
    font-weight: 700;
    color: #d8c296;
}

/* Share Your Feedback Form Card (Beige) */
.reviews-form-card {
    background: #faf6ee;
    border: 1.5px solid #d8c296;
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .reviews-form-card {
    background: #242018;
    border-color: #4a3e2e;
}

.rating-form-title {
    font-size: 1rem;
    font-weight: 800;
    color: #302317;
    margin: 0 0 2px 0;
    letter-spacing: -0.015em;
}

html[data-theme="dark"] .rating-form-title {
    color: #f7edd4;
}

.rating-form-sub {
    font-size: 0.78rem;
    color: #665039;
    margin: 0 0 12px 0;
}

html[data-theme="dark"] .rating-form-sub {
    color: #c8b9a8;
}

.star-rating-interactive {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 2px 0;
}

.interactive-star {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: #d8c296;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.interactive-star:hover,
.interactive-star.is-hovered,
.interactive-star.is-selected {
    color: #d4b87b;
    transform: scale(1.2);
}

.star-rating-hint {
    margin-left: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #8d775f;
}

.rating-form-field {
    margin-bottom: 12px;
    position: relative;
}

.rating-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #302317;
    margin-bottom: 5px;
}

html[data-theme="dark"] .rating-field-label {
    color: #f7edd4;
}

.rating-textarea {
    width: 100%;
    border: 1.5px solid #d8c296;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #302317;
    background: #ffffff;
    resize: vertical;
    min-height: 64px;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

html[data-theme="dark"] .rating-textarea {
    background: #1c1813;
    border-color: #5c4a2a;
    color: #f7edd4;
}

.rating-textarea:focus {
    outline: none;
    border-color: #728164;
    box-shadow: 0 0 0 3px rgba(114, 129, 100, 0.2);
}

.rating-char-counter {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #8d775f;
    pointer-events: none;
}

.rating-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.rating-btn-submit {
    background: linear-gradient(135deg, #728164 0%, #58664c 100%) !important;
    color: #ffffff !important;
    border: 1px solid #58664c !important;
    border-radius: 12px;
    padding: 9px 22px;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.28);
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rating-btn-submit:hover {
    background: linear-gradient(135deg, #657358 0%, #4a573f 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(114, 129, 100, 0.38);
}

.rating-btn-cancel {
    background: #ffffff !important;
    color: #665039 !important;
    border: 1.5px solid #d8c296 !important;
    border-radius: 12px;
    padding: 8px 18px;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rating-btn-cancel:hover {
    background: #f6eee0 !important;
    color: #302317 !important;
    border-color: #c8a872 !important;
    transform: translateY(-1px);
}

html[data-theme="dark"] .rating-btn-cancel {
    background: #1c1813 !important;
    color: #c8b9a8 !important;
    border-color: #5c4a2a !important;
}

html[data-theme="dark"] .rating-btn-cancel:hover {
    background: #28221a !important;
    color: #ffffff !important;
    border-color: #7a6840 !important;
}

/* User Submitted Review Box (Beige) */
.student-user-review-box {
    background: #faf6ee;
    border: 1.5px solid #d8c296;
    border-radius: 14px;
    padding: 14px 16px;
}

html[data-theme="dark"] .student-user-review-box {
    background: #1f1a13;
    border-color: #5c4a2a;
}

.user-review-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.user-review-badge--approved {
    background: #e6ebe3 !important;
    color: #58664c !important;
    border: 1px solid #b8c4b4 !important;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
}

.user-review-comment {
    font-size: 0.84rem;
    color: #302317;
    font-style: italic;
    margin: 4px 0 8px 0;
    line-height: 1.4;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 10px;
    border-left: 3px solid #728164;
}

html[data-theme="dark"] .user-review-comment {
    background: #242018;
    color: #f7edd4;
}

.user-review-help-text {
    font-size: 0.76rem;
    color: #665039;
    margin: 0 0 10px 0;
}

html[data-theme="dark"] .user-review-help-text {
    color: #c8b9a8;
}

.btn-update-review {
    background: #ffffff;
    border: 1px solid #d8c296;
    color: #5c3c14;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-update-review:hover {
    border-color: #728164;
    color: #728164;
}

/* Recent Feedback Section (Beige Cards) */
.reviews-list-container {
    border-top: 1.5px solid rgba(255, 255, 255, 0.25);
    padding-top: 18px;
    margin-top: 10px;
}

.reviews-list-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.recent-feedback-quote-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
}

.reviews-list-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.reviews-list-subtitle {
    font-size: 0.76rem;
    color: #e6ebe3;
    margin: 1px 0 0 0;
}

.btn-reviews-view-all {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-reviews-view-all:hover {
    background: rgba(255, 255, 255, 0.3);
}

.approved-review-card {
    background: #faf6ee;
    border: 1.5px solid #d8c296;
    border-radius: 12px;
    padding: 12px 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] .approved-review-card {
    background: #242018;
    border-color: #4a3e2e;
}

.reviews-list-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.recent-feedback-quote-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f6eee0;
    border: 1px solid #d8c296;
    color: #5c3c14;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
}

.reviews-list-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

.reviews-count-pill {
    background: #e6ebe3;
    color: #728164;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #b8c4b4;
}

.reviews-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;
}

.approved-review-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.approved-review-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    flex-wrap: wrap;
    gap: 6px;
}

.review-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6ebe3 0%, #d4dad0 100%);
    color: #728164;
    border: 1px solid #b8c4b4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.68rem;
}

.review-author-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.review-card-date {
    font-size: 0.65rem;
    color: var(--ink-muted);
}

.review-card-stars {
    font-size: 0.85rem;
    color: #f59e0b;
    letter-spacing: 1px;
}

.review-card-stars .star--empty {
    color: var(--border-strong, #cbd5e1);
}

.review-card-body {
    font-size: 0.84rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.45;
}

.reviews-empty-box {
    text-align: center;
    padding: 24px 20px;
    background: var(--surface-muted);
    border-radius: 14px;
    border: 1px dashed var(--border);
}

.reviews-empty-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 4px;
}

.reviews-empty-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
    display: block;
    margin-bottom: 2px;
}

.reviews-empty-sub {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin: 0;
}

/* ==========================================================================
   Related Articles Grid (Course-Based) - Premium Card Design
   ========================================================================== */
.student-related-articles-section {
    margin-top: 28px;
    padding: 24px 26px;
    background: #faf6ee;
    border: 1.5px solid #d4b87b;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(118, 85, 47, 0.08);
}

html[data-theme="dark"] .student-related-articles-section {
    background: #1e1a14;
    border-color: #5c4a2a;
}

.related-section-header {
    margin-bottom: 20px;
}

.related-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-section-icon {
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8a872;
    color: #3b2918;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.12);
}

.related-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #302317;
    margin: 0;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

html[data-theme="dark"] .related-section-title {
    color: #f7edd4;
}

.related-section-sub {
    font-size: 0.8rem;
    color: #665039;
    margin: 2px 0 0 0;
    line-height: 1.4;
}

html[data-theme="dark"] .related-section-sub {
    color: #c8b9a8;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.related-article-card {
    background: #ffffff;
    border: 1.5px solid #d8c296;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .related-article-card {
    background: #242018;
    border-color: #4a3e2e;
}

.related-article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #728164, #ebd7a8);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.related-article-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow: 0 12px 28px -4px rgba(118, 85, 47, 0.16);
    border-color: #728164;
}

html[data-theme="dark"] .related-article-card:hover {
    background: #2a251d;
    border-color: #728164;
}

.related-article-card:hover::before {
    opacity: 1;
}

.related-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.related-course-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #728164;
    background: #e6ebe3;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #b8c4b4;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.related-levels-list {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.related-level-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: 6px;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
    background: var(--surface-muted);
    color: var(--ink);
    border: 1px solid var(--border);
}

/* Tier 1: A1 & A2 (Soft Emerald Green) */
.related-level-pill--a1,
.related-level-pill--a2,
.related-level-pill--basic {
    background: #e6f4ea !important;
    color: #137333 !important;
    border: 1px solid #a8dab5 !important;
}

html[data-theme="dark"] .related-level-pill--a1,
html[data-theme="dark"] .related-level-pill--a2,
html[data-theme="dark"] .related-level-pill--basic {
    background: #1c3326 !important;
    color: #81c995 !important;
    border-color: #2b573d !important;
}

/* Tier 2: B1 & B2 (Warm Honey Amber Gold) */
.related-level-pill--b1,
.related-level-pill--b2,
.related-level-pill--intermediate {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

html[data-theme="dark"] .related-level-pill--b1,
html[data-theme="dark"] .related-level-pill--b2,
html[data-theme="dark"] .related-level-pill--intermediate {
    background: #382a13 !important;
    color: #fde047 !important;
    border-color: #5c451c !important;
}

/* Tier 3: C1 & C2 (Royal Violet Purple) */
.related-level-pill--c1,
.related-level-pill--c2,
.related-level-pill--advanced {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #ddd6fe !important;
}

html[data-theme="dark"] .related-level-pill--c1,
html[data-theme="dark"] .related-level-pill--c2,
html[data-theme="dark"] .related-level-pill--advanced {
    background: #2e1b4e !important;
    color: #c084fc !important;
    border-color: #4c2885 !important;
}

.related-article-title {
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.related-article-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.related-article-card:hover .related-article-title a {
    color: #728164;
}

.related-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--ink-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.related-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.related-meta-item svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
}

.related-meta-rating {
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
}

.related-read-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.related-read-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.18s ease;
}

.related-article-card:hover .related-read-btn,
.related-read-btn:hover {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%) !important;
    color: #3b2918 !important;
    border-color: #c8a872 !important;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.2);
}

.related-article-card:hover .related-read-btn svg,
.related-read-btn:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   Back Button Rating Prompt Modal
   ========================================================================== */
.article-rating-prompt-modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.article-rating-prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    padding: 24px 22px 18px 22px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    position: relative;
    animation: scaleUp 0.2s ease;
}

.rating-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--surface-muted);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    cursor: pointer;
}

.rating-prompt-header {
    text-align: center;
    margin-bottom: 14px;
}

.rating-prompt-emoji {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.rating-prompt-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px 0;
}

.rating-prompt-sub {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin: 0;
    line-height: 1.4;
}

.rating-prompt-field {
    margin-top: 10px;
    margin-bottom: 16px;
}

.rating-prompt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-skip-rating {
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-submit-rating {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    flex: 1;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.18s ease;
}

.btn-submit-rating:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}


/* ==========================================================================
   Word Meaning Report Modal & Meaning Card Report Button (Green Hero Card UI)
   ========================================================================== */
.meaning-card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.meaning-report-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.meaning-report-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.meaning-report-btn-icon {
    width: 12px;
    height: 12px;
}

.word-meaning-report-modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 100000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.meaning-report-screen-close {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 100000001;
    transition: background 0.15s ease, transform 0.15s ease;
}

.meaning-report-screen-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.word-meaning-report-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: celebrationPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    margin: auto;
}

.meaning-report-banner {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px 20px 0 0;
}

.meaning-report-avatar-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border: 4px solid var(--surface);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -34px auto 8px auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.meaning-report-avatar-badge svg {
    width: 28px;
    height: 28px;
}

.meaning-report-card-body {
    padding: 0 20px 0 20px;
    text-align: center;
}

.meaning-report-word {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.meaning-report-snippet {
    font-size: 0.82rem;
    color: var(--ink-muted);
    font-style: italic;
    margin: 0 0 12px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 6px;
}

.meaning-report-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
}

.meaning-report-meta-col {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
}

.meaning-report-meta-col:last-child {
    border-right: none;
}

.meaning-report-meta-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
    line-height: 1;
}

.meaning-report-meta-val {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.meaning-report-divider {
    height: 1px;
    background: var(--border);
    margin: 10px -20px;
}

.meaning-report-question {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--ink);
    text-align: center;
    margin: 12px 0 10px 0;
}

.meaning-report-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
    margin-bottom: 12px;
}

.meaning-report-check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
}

.meaning-report-check-card:hover {
    border-color: #10b981;
    background: var(--surface);
    transform: translateY(-1px);
}

.meaning-report-check-card.is-checked {
    background: var(--surface);
    border-color: #10b981;
    box-shadow: 0 0 0 1.5px #10b981, 0 4px 12px -2px rgba(16, 185, 129, 0.25);
}

.report-check-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
}

.meaning-report-checkbox {
    accent-color: #10b981;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    order: 3;
    margin-left: auto;
}

.meaning-report-check-text {
    flex: 1;
}

.meaning-report-check-text strong {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--ink);
    display: block;
    line-height: 1.25;
}

.meaning-report-check-text small {
    font-size: 0.72rem;
    color: var(--ink-muted);
    display: block;
    line-height: 1.25;
}

.meaning-report-note-wrap {
    margin-bottom: 12px;
    text-align: left;
}

.meaning-report-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.83rem;
    color: var(--ink);
    background: var(--surface-muted);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.meaning-report-textarea:focus {
    outline: none;
    border-color: #10b981;
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.meaning-report-full-submit-btn {
    width: calc(100% + 40px);
    margin: 0 -20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 0 0 20px 20px;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.01em;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.meaning-report-full-submit-btn:hover {
    filter: brightness(1.06);
    opacity: 0.96;
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   Review Success Celebration Modal Popup
   ========================================================================== */
.review-success-modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.review-success-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated, var(--surface)) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 360px;
    padding: 24px 20px 20px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    text-align: center;
    animation: celebrationPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.review-success-card::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

.review-success-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--surface-muted);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.review-success-close:hover {
    background: var(--border);
    color: var(--ink);
}

.review-success-badge-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.review-success-glow {
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.55;
    animation: glowPulse 2s infinite alternate;
}

.review-success-badge {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.4);
    animation: badgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.review-success-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.review-success-title {
    font-size: 1.18rem;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.review-success-message {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin: 0 0 14px 0;
    line-height: 1.45;
}

.review-success-chip-box {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.review-success-stars {
    font-size: 1.35rem;
    color: #f59e0b;
    letter-spacing: 2px;
    margin-bottom: 2px;
    text-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.review-success-score-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-success-comment-preview {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    font-size: 0.78rem;
    color: var(--ink-muted);
    font-style: italic;
    line-height: 1.35;
}

.review-success-badge-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

html[data-theme="dark"] .review-success-badge-tag {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.review-success-empty-note {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    font-size: 0.74rem;
    color: var(--ink-muted);
    font-style: italic;
    line-height: 1.35;
}

.review-success-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--ink-muted);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.review-success-status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.review-success-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 0.74rem;
    color: #2563eb;
    line-height: 1.35;
}

html[data-theme="dark"] .review-success-notice {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.review-success-notice .notice-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.review-success-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-success-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 80%, #10b981) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px -3px color-mix(in srgb, var(--brand) 40%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-success-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -3px color-mix(in srgb, var(--brand) 50%, transparent);
    opacity: 0.95;
}

@keyframes celebrationPop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    70% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes badgeBounce {
    0% {
        transform: scale(0.3) rotate(-20deg);
    }

    60% {
        transform: scale(1.15) rotate(8deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes glowPulse {
    0% {
        opacity: 0.35;
        transform: scale(0.95);
    }

    100% {
        opacity: 0.75;
        transform: scale(1.1);
    }
}

/* ==========================================================================
   Admin Delete Confirmation Modal
   ========================================================================== */
.delete-confirm-modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.delete-confirm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    padding: 26px 22px 20px 22px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    text-align: center;
    position: relative;
    animation: celebrationPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.delete-confirm-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.2);
}

.delete-confirm-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 4px 0;
}

.delete-confirm-desc {
    font-size: 0.84rem;
    color: var(--ink-muted);
    margin: 0 0 14px 0;
    line-height: 1.45;
}

.delete-confirm-target-box {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.82rem;
    color: var(--ink);
    text-align: left;
    word-break: break-word;
}

.delete-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn-delete-cancel {
    background: var(--surface-muted);
    color: var(--ink-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-delete-cancel:hover {
    background: var(--border);
    color: var(--ink);
}

.btn-delete-confirm {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-delete-confirm:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ==========================================================================
   Word Popup Modal Redesign (Sentence, Usage, Selected Meaning & See More) - Beige Theme
   ========================================================================== */

.word-sentence-highlight {
    background: #fde68a !important;
    color: #451a03 !important;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}

.meaning-card--selected {
    background: #fbf7ef !important;
    border: 1px solid #e7d6b5 !important;
    border-left: 4px solid #b8924b !important;
    box-shadow: 0 4px 14px rgba(184, 146, 75, 0.08) !important;
}

.meaning-card--usage {
    background: #faf6ee !important;
    border: 1px solid #e8d7b7 !important;
    border-left: 4px solid #9c7530 !important;
}

.meaning-card-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meaning-card-label--highlight {
    color: #5c3c14 !important;
    background: #f3e4c4 !important;
    border: 1px solid #d8c296 !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.meaning-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 9999px;
    text-transform: uppercase;
    background: #eedcb4 !important;
    color: #5c3c14 !important;
    border: 1px solid #d4be8e !important;
}

.meaning-level-badge--basic,
.meaning-level-badge--intermediate,
.meaning-level-badge--advanced {
    background: #eedcb4 !important;
    color: #5c3c14 !important;
    border: 1px solid #d4be8e !important;
}

.popup-see-more-wrap {
    margin: 12px 0 6px;
    display: flex;
    justify-content: center;
}

.popup-see-more-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: #f6eee0;
    border: 1px dashed #d8c296;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #634725;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-see-more-toggle:hover {
    background: #f3e5cd;
    border-color: #b8924b;
    color: #3b2816;
}

.popup-see-more-toggle .see-more-chevron {
    width: 16px;
    height: 16px;
    color: #785832;
    transition: transform 0.25s ease;
}

.popup-see-more-toggle.is-active .see-more-chevron {
    transform: rotate(180deg);
}

.popup-expanded-section {
    display: none;
    margin-top: 8px;
    animation: fadeInPopupModal 0.22s ease forwards;
}

.popup-expanded-section.is-open {
    display: block;
}

@keyframes fadeInPopupModal {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-section-block {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #e7d6b5;
}

.popup-section-title {
    margin: 0 0 3px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3b2816;
}

.popup-pos-acc-help {
    font-size: 0.68rem;
    color: #785832;
    margin: 0 0 7px;
    line-height: 1.3;
}

.popup-pos-accordion {
    margin-bottom: 6px;
    border: 1px solid #e7d6b5;
    border-radius: 8px;
    background: #faf6ee;
    overflow: hidden;
    transition: all 0.15s ease;
}

.popup-pos-accordion:hover {
    border-color: #cfa869;
}

.popup-pos-accordion.is-open {
    border-color: #b8924b;
    box-shadow: 0 3px 12px rgba(184, 146, 75, 0.12);
}

.popup-pos-accordion-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 9px;
    background: #f5e8d0;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}

.popup-pos-accordion-head:hover {
    background: #eedcb4;
}

.popup-pos-accordion.is-open .popup-pos-accordion-head {
    background: #ebd7ab;
    border-bottom: 1px solid #d8c296;
}

.popup-pos-acc-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pos-count-chip {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #fbf7ef;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.pos-form-badge {
    font-size: 0.64rem;
    color: #785832;
}

.popup-pos-acc-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.popup-pos-acc-status {
    font-size: 0.65rem;
    font-weight: 800;
    color: #784a0f;
}

.pos-acc-chevron {
    width: 13px;
    height: 13px;
    color: #785832;
    transition: transform 0.2s ease;
}

.popup-pos-accordion.is-open .pos-acc-chevron {
    transform: rotate(180deg);
    color: #784a0f;
}

.popup-pos-accordion-body {
    display: none;
    padding: 6px;
    max-height: 260px;
    overflow-y: auto;
    background: #faf6ee;
    animation: fadeInModalContent 0.18s ease forwards;
}

.popup-pos-accordion.is-open .popup-pos-accordion-body {
    display: block;
}

.popup-acc-subblock {
    margin-bottom: 7px;
}

.popup-acc-subblock:last-child {
    margin-bottom: 0;
}

.popup-acc-subtitle {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #785832;
}

.pos-tag-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #f3e4c4;
    color: #5c3c14;
    border: 1px solid #d8c296;
}

.pos-mother-tag {
    font-size: 0.68rem;
    color: #785832;
}

.pos-mother-tag b {
    color: #3b2816;
}

.meaning-card--secondary {
    background: #faf6ee;
    border: 1px solid #e7d6b5;
    border-left: 3px solid #b8924b;
}

/* ==========================================================================
   Article Editor POS & Meanings Picker UI
   ========================================================================== */

/* ==========================================================================
   Article Editor POS & Meanings Picker UI (Ultra-Clean & Compact)
   ========================================================================== */

.vocab-context-menu {
    position: fixed;
    z-index: 100050;
    width: min(380px, calc(100vw - 20px));
    max-height: min(85vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--brand, #3b82f6) 24%, var(--border));
    border-radius: 12px;
    box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.22), 0 8px 18px -4px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    animation: menuPopIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menuPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.vocab-context-head {
    flex: 0 0 auto;
    padding: 8px 12px 7px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--brand, #3b82f6) 9%, var(--surface)), var(--surface));
    border-bottom: 1px solid var(--border);
}

.vocab-context-word-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vocab-context-word {
    font-size: 0.98rem;
    font-weight: 850;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.vocab-context-occ {
    font-size: 0.65rem;
    font-weight: 750;
    padding: 1.5px 7px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--brand, #3b82f6) 14%, var(--surface));
    color: var(--brand, #2563eb);
}

.vocab-context-sub {
    font-size: 0.68rem;
    color: var(--ink-soft);
    margin-top: 2px;
    line-height: 1.3;
}

.vocab-context-empty {
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-align: center;
    background: var(--surface);
}

.vocab-context-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(85vh - 65px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vocab-context-list::-webkit-scrollbar {
    width: 4px;
}

.vocab-context-list::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--brand, #3b82f6) 35%, var(--border));
    border-radius: 4px;
}

.vocab-pos-accordion {
    flex-shrink: 0;
    min-height: fit-content;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    transition: all 0.15s ease;
}

.vocab-pos-accordion:hover {
    border-color: color-mix(in srgb, var(--brand, #3b82f6) 40%, var(--border));
}

.vocab-pos-accordion.is-open {
    border-color: var(--brand, #3b82f6);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.1);
}

.vocab-pos-accordion-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 9px;
    background: color-mix(in srgb, var(--surface-muted) 85%, var(--surface));
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}

.vocab-pos-accordion-head:hover {
    background: color-mix(in srgb, var(--brand, #3b82f6) 8%, var(--surface));
}

.vocab-pos-accordion.is-open .vocab-pos-accordion-head {
    background: color-mix(in srgb, var(--brand, #3b82f6) 12%, var(--surface));
    border-bottom: 1px solid color-mix(in srgb, var(--brand, #3b82f6) 20%, var(--border));
}

.vocab-pos-head-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.vocab-pos-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.5px 6px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
    letter-spacing: 0.03em;
}

.vocab-pos-badge--verb {
    background: #dbeafe;
    color: #1e40af;
}

.vocab-pos-badge--noun {
    background: #fce7f3;
    color: #9d174d;
}

.vocab-pos-badge--adjective {
    background: #fef3c7;
    color: #92400e;
}

.vocab-pos-badge--adverb {
    background: #e0e7ff;
    color: #3730a3;
}

.vocab-pos-count-tag {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ink-soft);
    background: var(--surface);
    padding: 0.5px 5px;
    border-radius: 3.5px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.vocab-form-tag {
    font-size: 0.64rem;
    color: var(--ink-soft);
}

.vocab-pos-head-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vocab-pos-status-text {
    font-size: 0.65rem;
    font-weight: 750;
    color: var(--brand, #2563eb);
}

.vocab-pos-chevron {
    width: 13px;
    height: 13px;
    color: var(--ink-muted);
    transition: transform 0.2s ease;
}

.vocab-pos-accordion.is-open .vocab-pos-chevron {
    transform: rotate(180deg);
    color: var(--brand, #2563eb);
}

.vocab-pos-accordion-body {
    padding: 5px;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: fadeInModalContent 0.18s ease forwards;
}

.vocab-pos-accordion-body::-webkit-scrollbar {
    width: 3.5px;
}

.vocab-pos-accordion-body::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--brand, #3b82f6) 40%, var(--border));
    border-radius: 3.5px;
}

.vocab-context-meanings {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 1px;
}

.vocab-context-meaning-btn {
    width: 100%;
    text-align: left;
    padding: 5.5px 8px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.12s ease;
    margin-bottom: 1.5px;
}

.vocab-context-meaning-btn:hover {
    background: color-mix(in srgb, var(--brand, #3b82f6) 7%, var(--surface));
    border-color: color-mix(in srgb, var(--brand, #3b82f6) 35%, var(--border));
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.vocab-meaning-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5px;
}

.vocab-m-num {
    font-size: 0.65rem;
    font-weight: 750;
    color: var(--ink-muted);
}

.vocab-level-chip {
    font-size: 0.58rem;
    font-weight: 750;
    padding: 0.5px 5px;
    border-radius: 3px;
}

.vocab-level-chip--basic {
    background: #dcfce7;
    color: #15803d;
}

.vocab-level-chip--intermediate {
    background: #fef9c3;
    color: #a16207;
}

.vocab-level-chip--advanced {
    background: #f3e8ff;
    color: #7e22ce;
}

.vocab-meaning-text {
    font-size: 0.77rem;
    font-weight: 400;
    line-height: 1.33;
    color: var(--ink);
    overflow-wrap: break-word;
    word-break: break-word;
}

.vocab-meaning-bd {
    font-size: 0.7rem;
    color: var(--ink-soft);
    margin-top: 1.5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vocab-meaning-usage {
    font-size: 0.67rem;
    color: color-mix(in srgb, var(--brand, #2563eb) 85%, var(--ink));
    margin-top: 1.5px;
    line-height: 1.28;
    overflow-wrap: break-word;
    word-break: break-word;
}

.vocab-context-general-btn {
    width: 100%;
    padding: 5px 8px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 650;
    background: var(--surface);
    border: none;
    cursor: pointer;
    color: var(--ink);
}

.vocab-context-general-btn:hover {
    background: var(--surface-muted);
}

.vocab-context-remove-btn {
    margin: 3px 5px;
    padding: 4.5px 8px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.69rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.vocab-context-remove-btn:hover {
    background: #fecaca;
}

/* Multi-POS Cards in Editor (Compact & Ultra-Premium) */
.multi-word-card {
    border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--border));
    border-left: 3.5px solid #f59e0b;
    border-radius: 9px;
    padding: 8px 11px;
    margin-bottom: 8px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.multi-word-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.multi-word-head-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.multi-word-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.multi-word-occ-badge {
    font-size: 0.64rem;
    font-weight: 700;
    background: color-mix(in srgb, #f59e0b 14%, var(--surface));
    color: #b45309;
    padding: 1.5px 6px;
    border-radius: 9999px;
}

.multi-word-alert-badge {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 1.5px 6px;
    border-radius: 4px;
}

html[data-theme="dark"] .multi-word-alert-badge {
    background: #78350f;
    color: #fef3c7;
    border-color: #92400e;
}

.multi-word-sentence {
    font-size: 0.76rem;
    line-height: 1.38;
    padding: 4.5px 8px;
    background: color-mix(in srgb, var(--surface-muted) 60%, var(--surface));
    border: 1px dashed color-mix(in srgb, var(--border) 75%, transparent);
    border-radius: 6px;
    margin: 4px 0 6px;
    color: var(--ink-muted);
    font-style: normal;
}

.multi-word-pos-groups {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.multi-pos-option-group {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.multi-pos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: color-mix(in srgb, var(--surface-muted) 75%, var(--surface));
    border-bottom: 1px solid var(--border);
}

.multi-pos-head-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.multi-pos-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3.5px;
    background: #e2e8f0;
    color: #334155;
}

.multi-pos-tag--verb {
    background: #dbeafe;
    color: #1e40af;
}

.multi-pos-tag--noun {
    background: #fce7f3;
    color: #9d174d;
}

.multi-pos-tag--adjective {
    background: #fef3c7;
    color: #92400e;
}

.multi-pos-tag--adverb {
    background: #e0e7ff;
    color: #3730a3;
}

.multi-pos-form {
    font-size: 0.64rem;
    color: var(--ink-soft);
}

.multi-pos-count {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.multi-pos-meanings-list {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    padding: 4px;
}

.multi-pos-extra-meanings {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
}

.multi-meaning-pick-btn {
    width: 100%;
    text-align: left;
    padding: 4.5px 7px;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.12s ease;
}

.multi-meaning-pick-btn:hover {
    border-color: var(--brand, #3b82f6);
    background: color-mix(in srgb, var(--brand, #3b82f6) 6%, var(--surface));
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.08);
}

.multi-meaning-btn-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5px;
}

.multi-m-idx {
    font-size: 0.62rem;
    font-weight: 750;
    color: var(--ink-muted);
}

.multi-meaning-level {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.5px 4.5px;
    border-radius: 3px;
}

.multi-meaning-level--basic {
    background: #dcfce7;
    color: #15803d;
}

.multi-meaning-level--intermediate {
    background: #fef9c3;
    color: #a16207;
}

.multi-meaning-level--advanced {
    background: #f3e8ff;
    color: #7e22ce;
}

.multi-meaning-text {
    font-size: 0.74rem;
    line-height: 1.3;
    color: var(--ink);
    overflow-wrap: break-word;
    word-break: break-word;
}

.multi-meaning-bd {
    font-size: 0.68rem;
    color: var(--ink-muted);
    margin-top: 1.5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.multi-see-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 3.5px 6px;
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: 5px;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-muted);
    cursor: pointer;
    margin-top: 2px;
    transition: all 0.12s ease;
}

.multi-see-more-btn:hover {
    color: var(--brand, #3b82f6);
    border-color: var(--brand, #3b82f6);
    background: var(--surface);
}

.multi-see-more-btn svg {
    width: 11px;
    height: 11px;
    transition: transform 0.2s ease;
}

.multi-see-more-btn.is-open svg {
    transform: rotate(180deg);
}

/* Multi Word Cards Container & Red Animated See More Button */
.multi-extra-cards-wrapper {
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
}

.multi-see-more-cards-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 10px 20px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 800;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12);
    animation: seeMoreRedPulse 2.2s infinite ease-in-out;
}

.multi-see-more-cards-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.22);
}

.multi-see-more-cards-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.multi-see-more-cards-btn.is-open svg {
    transform: rotate(180deg);
}

@keyframes seeMoreRedPulse {

    0%,
    100% {
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
        border-color: #fecaca;
    }

    50% {
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
        border-color: #f87171;
        transform: scale(1.008);
    }
}

.multi-use-pos-btn {
    margin: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 5px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink);
    cursor: pointer;
}

.multi-use-pos-btn:hover {
    background: var(--surface);
    border-color: var(--brand, #3b82f6);
    color: var(--brand, #3b82f6);
}

.multi-word-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--success-bg, #dcfce7) 65%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--success, #15803d) 20%, var(--border));
}

.multi-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: #22c55e;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.multi-empty-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multi-empty-text strong {
    font-size: 0.84rem;
    color: var(--ink);
}

.multi-empty-text span {
    font-size: 0.74rem;
    color: var(--ink-muted);
}

/* Suggestion Box Meanings */
.suggestion-meanings-list {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.suggestion-meaning-item {
    font-size: 0.74rem;
    line-height: 1.3;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
}

.suggestion-meaning-item:hover {
    background: color-mix(in srgb, var(--brand, #3b82f6) 12%, var(--surface));
}

.suggestion-m-num {
    font-weight: 750;
    color: var(--ink-muted);
}

.suggestion-m-text {
    color: var(--ink);
}

.suggestion-m-bd {
    color: var(--ink-muted);
    font-size: 0.7rem;
    margin-left: 4px;
}

/* =========================================================
   ARTICLE INSPECTOR PREVIEW INLINE WORD HIGHLIGHTING STYLES
   ========================================================= */
.not-in-lib-article-preview-body {
    display: block !important;
    user-select: text;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 1.1rem !important;
    line-height: 2.3 !important;
    color: var(--ink) !important;
}

.not-in-lib-article-preview-body p {
    font-family: inherit !important;
    font-size: 1.1rem !important;
    line-height: 2.3 !important;
    margin-bottom: 1.5rem !important;
    color: inherit !important;
}

.not-in-lib-article-preview-body * {
    line-height: inherit;
}

.not-in-lib-highlight {
    position: relative;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 2px 3px;
    line-height: 1.35 !important;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.not-in-lib-highlight:hover {
    transform: translateY(-1.5px) scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Tooltip popup on hover */
.not-in-lib-highlight[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.not-in-lib-highlight[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip alignment for container/screen boundaries */
.not-in-lib-highlight.tooltip-align-left[data-tooltip]::after {
    left: 0;
    right: auto;
    transform: translateY(4px);
}

.not-in-lib-highlight.tooltip-align-left[data-tooltip]:hover::after {
    transform: translateY(0);
}

.not-in-lib-highlight.tooltip-align-right[data-tooltip]::after {
    left: auto;
    right: 0;
    transform: translateY(4px);
}

.not-in-lib-highlight.tooltip-align-right[data-tooltip]:hover::after {
    transform: translateY(0);
}

/* ðŸŸ¢ Green: In Library (POS & Meaning present) */
.not-in-lib-green {
    background: #4ade80;
    color: #0f172a;
    border: 1px solid #22c55e;
    cursor: pointer;
}

.not-in-lib-green:hover {
    background: #22c55e;
    color: #ffffff;
}

/* ðŸŸ¡ Yellow / Amber: POS without Meaning (Matches Screenshot Pill Token) */
.not-in-lib-amber {
    background: #fb923c;
    color: #0f172a;
    border: 1px solid #ea580c;
}

.not-in-lib-amber:hover {
    background: #f97316;
    color: #ffffff;
}

/* ðŸ”´ Red / Rose: Missing POS & Meaning */
.not-in-lib-rose {
    background: #f87171;
    color: #0f172a;
    border: 1px solid #dc2626;
}

.not-in-lib-rose:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Dark Mode Inspector Highlights */
html[data-theme="dark"] .not-in-lib-green {
    background: rgba(34, 197, 94, 0.22);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}

html[data-theme="dark"] .not-in-lib-amber {
    background: rgba(249, 115, 22, 0.22);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.4);
}

html[data-theme="dark"] .not-in-lib-rose {
    background: rgba(239, 68, 68, 0.22);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

/* âšª Gray / Excluded Stop Word */
.not-in-lib-excluded {
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.not-in-lib-excluded:hover {
    background: #64748b;
    color: #ffffff;
    border-style: solid;
    border-color: #475569;
}

html[data-theme="dark"] .not-in-lib-excluded {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border-color: #64748b;
}

html[data-theme="dark"] .not-in-lib-excluded:hover {
    background: #94a3b8;
    color: #0f172a;
}

/* Filtered Dimmed State */
.not-in-lib-dimmed {
    opacity: 0.2;
    filter: grayscale(80%);
    border-color: transparent !important;
}

/* Inspector KPI Cards */
.inspector-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.inspector-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

/* Legend Stat Cards - Full Colored Compact Cards */
.legend-stat-card {
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.legend-stat-card:hover {
    transform: translateY(-2px);
}

.legend-card-label {
    font-size: 0.67rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 2px;
}

.legend-card-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff !important;
    line-height: 1;
}

.legend-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.legend-stat-card--green {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.legend-stat-card--amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.legend-stat-card--rose {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.legend-stat-card--excluded {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.2);
}

/* =========================================================
   STICKY LIVE ARTICLE PREVIEW DRAWER STYLES
   ========================================================= */
.sticky-live-preview-btn {
    position: fixed;
    bottom: 24px;
    right: 28px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    height: 48px;
    width: 48px;
    padding: 0 0 0 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    transform-origin: right center;
}

.sticky-live-preview-btn .sticky-live-preview-label {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s ease 0.05s;
    pointer-events: none;
}

.sticky-live-preview-btn:hover {
    width: 145px;
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    transform: translateY(-2px);
}

.sticky-live-preview-btn:hover .sticky-live-preview-label {
    opacity: 1;
}

.sticky-live-preview-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Live Preview Backdrop */
.live-preview-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    z-index: 100050;
}

/* Live Preview Side Drawer */
.live-preview-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(680px, 92vw);
    height: 100vh;
    background: var(--surface, #ffffff);
    border-left: 1px solid var(--border);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.2);
    z-index: 100051;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-preview-head {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-elevated, #ffffff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.live-preview-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-preview-head-title h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

.live-preview-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--ink-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    transition: all 0.15s ease;
}

.live-preview-close-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.live-preview-level-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}

.live-preview-level-tab {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.live-preview-level-tab:hover {
    color: var(--ink);
    background: var(--surface);
}

.live-preview-level-tab.is-active {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.live-preview-body-wrap {
    padding: 28px 32px;
    flex: 1;
    overflow-y: auto;
    background: var(--surface, #ffffff);
    -webkit-overflow-scrolling: touch;
}

.live-preview-article-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.live-preview-body-content {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink);
}

.live-preview-body-content p {
    margin-bottom: 1.25rem;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Modern Redesign for Admin Student Details View
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.student-details-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

/* Hero Banner */
.student-hero-banner {
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 20px;
    border: 1px solid var(--border, #e2e8f0);
    background:
        radial-gradient(1000px 240px at 100% 0%, color-mix(in srgb, var(--brand, #2563eb) 14%, transparent), transparent 60%),
        radial-gradient(700px 200px at 0% 100%, rgba(16, 185, 129, 0.08), transparent 50%),
        linear-gradient(145deg, var(--surface-elevated, #ffffff), var(--surface, #f8fafc));
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
}

.student-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.student-avatar-box {
    flex-shrink: 0;
}

.student-avatar-circle {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand, #2563eb), #1d4ed8);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35);
}

.student-hero-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.student-hero-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.student-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand, #2563eb);
}

.student-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.student-status-badge.status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.student-status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.student-status-badge .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.student-status-badge.status-active .status-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.student-status-badge.status-inactive .status-dot {
    background: #ef4444;
}

.student-hero-name {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.student-contact-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--surface-muted, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft, #475569);
}

.contact-pill svg {
    width: 14px;
    height: 14px;
    color: var(--ink-muted, #64748b);
}

.student-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.btn-secondary-ghost {
    background: var(--surface, #ffffff);
    color: var(--ink, #0f172a);
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 10px;
    font-weight: 700;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-secondary-ghost:hover {
    background: var(--surface-muted, #f1f5f9);
    border-color: var(--ink-muted, #94a3b8);
}

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    font-weight: 700;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-danger-soft:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-success-soft {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    font-weight: 700;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-success-soft:hover {
    background: #10b981;
    color: #ffffff;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Vibrant, Premium & Animated Gradient KPI Summary Cards
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes kpiShimmer {
    0% {
        transform: translateX(-120%) rotate(25deg);
    }

    100% {
        transform: translateX(250%) rotate(25deg);
    }
}

.student-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.student-kpi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 16px;
    color: #ffffff !important;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.1);
}

/* Soft Moving Light / Shimmer Overlay */
.student-kpi-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: rotate(25deg);
    pointer-events: none;
    animation: kpiShimmer 7s infinite ease-in-out;
}

/* Hover Elevation & Slight Scale */
.student-kpi-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.2), 0 6px 12px -3px rgba(0, 0, 0, 0.08);
}

/* Unique Rich Gradient Themes - 3-Color Brand Palette */
.kpi-reading,
.kpi-emerald,
.kpi-blue {
    background: linear-gradient(135deg, #728164 0%, #58664c 55%, #4a573f 100%);
    border: 1.5px solid #58664c;
}

.kpi-reading:hover,
.kpi-emerald:hover,
.kpi-blue:hover {
    box-shadow: 0 14px 30px -4px rgba(114, 129, 100, 0.4);
}

.kpi-tests,
.kpi-amber {
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 55%, #d4b87b 100%);
    border: 1.5px solid #c8a872;
}

.kpi-tests:hover,
.kpi-amber:hover {
    box-shadow: 0 14px 30px -4px rgba(118, 85, 47, 0.35);
}

.kpi-tests .kpi-label,
.kpi-amber .kpi-label {
    color: #664624 !important;
}

.kpi-tests .kpi-val,
.kpi-amber .kpi-val {
    color: #302317 !important;
    text-shadow: none !important;
}

.kpi-tests .kpi-sub,
.kpi-amber .kpi-sub {
    color: #5c3c14 !important;
}

.kpi-tests .kpi-icon-wrap,
.kpi-amber .kpi-icon-wrap {
    background: rgba(92, 60, 20, 0.14) !important;
    color: #5c3c14 !important;
    border: 1px solid #c8a872 !important;
}

.kpi-tests .kpi-icon-wrap svg,
.kpi-amber .kpi-icon-wrap svg {
    stroke: #5c3c14 !important;
}

.kpi-articles,
.kpi-badges,
.kpi-purple {
    background: linear-gradient(135deg, #8d775f 0%, #6e5b47 55%, #302317 100%);
    border: 1.5px solid #6e5b47;
}

.kpi-articles:hover,
.kpi-badges:hover,
.kpi-purple:hover {
    box-shadow: 0 14px 30px -4px rgba(110, 91, 71, 0.4);
}

/* Internal Layout Elements with High Contrast Crisp Text */
.kpi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

.kpi-label {
    font-size: 0.71rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.88) !important;
}

.kpi-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.student-kpi-card:hover .kpi-icon-wrap {
    transform: scale(1.08) rotate(3deg);
}

.kpi-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
}

.kpi-card-body {
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

.kpi-val {
    font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
    font-size: 1.48rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    line-height: 1.15;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.kpi-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.kpi-trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2.5px 8px;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.kpi-sub {
    font-size: 0.71rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82) !important;
}

/* Nav Tabs */
.student-nav-container {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.student-nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.student-nav-tabs::-webkit-scrollbar {
    display: none;
}

.student-nav-tabs .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: var(--ink-soft, #64748b);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.student-nav-tabs .tab-btn svg {
    width: 17px;
    height: 17px;
    color: var(--ink-muted, #94a3b8);
    transition: color 0.18s ease;
}

.student-nav-tabs .tab-btn:hover {
    background: var(--surface-muted, #f1f5f9);
    color: var(--ink, #0f172a);
}

.student-nav-tabs .tab-btn.active {
    background: var(--brand, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.student-nav-tabs .tab-btn.active svg {
    color: #ffffff;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
}

.student-nav-tabs .tab-btn:not(.active) .tab-badge {
    background: var(--surface-muted, #e2e8f0);
    color: var(--ink-soft, #475569);
}

/* Tab Panes */
.student-tab-panes .tab-pane {
    display: none;
}

.student-tab-panes .tab-pane.active {
    display: block;
    animation: admin-fade-up 0.25s ease both;
}

.pane-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards & Tables */
.student-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #ffffff);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    font-size: 1.3rem;
}

.card-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
    margin: 0;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--ink-soft, #64748b);
    margin: 2px 0 0 0;
}

.chip-count {
    font-size: 0.82rem;
    color: var(--ink-soft, #64748b);
    background: var(--surface-muted, #f1f5f9);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid var(--border, #e2e8f0);
}

/* Account Details Grid */
.account-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
}

.info-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border, #f1f5f9);
    border-radius: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tile-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-muted, #64748b);
}

.tile-value-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tile-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink, #0f172a);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tile-sub-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand, #2563eb);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.overflow-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.highlight-id {
    font-family: monospace;
    color: var(--brand, #2563eb);
}

.text-right {
    text-align: right !important;
}

/* Modern Data Table */
.modern-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.modern-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.modern-data-table th {
    background: var(--surface-muted, #f8fafc);
    color: var(--ink-muted, #64748b);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-align: left;
}

.modern-data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border, #f1f5f9);
    color: var(--ink, #0f172a);
    vertical-align: middle;
}

.modern-data-table tr:last-child td {
    border-bottom: 0;
}

.modern-data-table tr:hover td {
    background: rgba(241, 245, 249, 0.5);
}

.cell-sub-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--ink-soft, #64748b);
    background: var(--surface-muted, #f1f5f9);
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.bundle-badge {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
}

.code-pill {
    font-family: monospace;
    font-size: 0.85rem;
    background: var(--surface-muted, #f1f5f9);
    padding: 2px 6px;
    border-radius: 4px;
}

.amount-paid {
    color: #059669;
    font-weight: 700;
    white-space: nowrap !important;
    display: inline-block !important;
}

.amount-due {
    color: #dc2626;
    font-weight: 700;
    white-space: nowrap !important;
    display: inline-block !important;
}

.amount-clear {
    color: var(--ink-muted, #94a3b8);
    font-weight: 600;
    white-space: nowrap !important;
    display: inline-block !important;
}

.due-date-sub {
    font-size: 0.72rem;
    color: #dc2626;
    margin-top: 2px;
}

.counselor-sub {
    font-size: 0.75rem;
    color: var(--ink-muted, #64748b);
}

/* Badges & Scores */
.level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
}

.visit-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    font-weight: 700;
    font-size: 0.8rem;
}

.reading-time-pill {
    font-weight: 700;
    color: var(--ink, #0f172a);
}

.score-progress-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 160px;
}

.score-text-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.score-pct {
    font-size: 0.75rem;
    color: var(--ink-muted, #64748b);
    font-weight: 600;
}

.score-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--surface-muted, #e2e8f0);
    border-radius: 9999px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 9999px;
}

.score-high {
    color: #059669;
}

.score-high.score-bar-fill {
    background: #10b981;
}

.score-mid {
    color: #d97706;
}

.score-mid.score-bar-fill {
    background: #f59e0b;
}

.score-low {
    color: #dc2626;
}

.score-low.score-bar-fill {
    background: #ef4444;
}

.word-highlight-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8e9b5;
    color: #0f766e;
    font-weight: 700;
}

.open-count-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--surface-muted, #f1f5f9);
    color: var(--ink, #0f172a);
    font-weight: 700;
    font-size: 0.8rem;
}

.fav-word-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
}

.pos-tag-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-muted, #f1f5f9);
    color: var(--ink-soft, #475569);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: lowercase;
}

.meaning-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meaning-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meaning-pos-chip {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand, #2563eb);
}

.meaning-text {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-soft, #334155);
    line-height: 1.4;
}

.bangla-font {
    font-family: 'SolaimanLipi', 'Kalpurush', Noto Sans Bengali, sans-serif;
    color: #0f766e;
}

/* Badges Grid */
.student-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
}

.badge-award-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
}

.badge-award-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.badge-award-details {
    display: flex;
    flex-direction: column;
}

.badge-award-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
}

.badge-award-type {
    font-size: 0.78rem;
    color: var(--ink-soft, #64748b);
}

.badge-award-date {
    font-size: 0.72rem;
    color: var(--ink-muted, #94a3b8);
    margin-top: 2px;
}

/* Empty State Card */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.empty-state-card h4 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
    margin: 0 0 4px 0;
}

.empty-state-card p {
    font-size: 0.82rem;
    color: var(--ink-soft, #64748b);
    margin: 0;
}

/* JSON Code Box */
.json-code-box {
    background: #0f172a;
    color: #38bdf8;
    padding: 20px;
    border-radius: 14px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 0.85rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.json-code-box pre {
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 420px;
    overflow-y: auto;
}

/* Dark Mode Overrides */
html[data-theme="dark"] .student-hero-banner {
    background:
        radial-gradient(1000px 240px at 100% 0%, rgba(37, 99, 235, 0.25), transparent 60%),
        linear-gradient(145deg, #1e293b, #0f172a);
    border-color: #334155;
}

html[data-theme="dark"] .contact-pill,
html[data-theme="dark"] .chip-count,
html[data-theme="dark"] .info-tile,
html[data-theme="dark"] .badge-award-card {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .student-card,
html[data-theme="dark"] .student-kpi-card,
html[data-theme="dark"] .student-nav-container,
html[data-theme="dark"] .card-header {
    background: #1e293b;
    border-color: #334155;
}

/* Student Table Cell Components */
.student-table-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-table-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand, #2563eb), #1d4ed8);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.student-table-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.student-table-meta {
    display: flex;
    flex-direction: column;
}

.student-table-name {
    font-weight: 800;
    color: var(--ink, #0f172a);
}

.student-name-sub {
    font-size: 0.75rem;
    color: var(--ink-muted, #64748b);
    font-weight: 600;
}

.btn-scan-sync {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--brand, #2563eb);
    color: #ffffff !important;
    border: 0;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-scan-sync:hover {
    background: #1d4ed8;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-scan-sync:active {
    transform: translateY(0) scale(0.98);
}

.btn-scan-sync:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-sync-spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

html[data-theme="dark"] .modern-data-table th {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .modern-data-table td {
    border-color: #334155;
    color: #f8fafc;
}

html[data-theme="dark"] .modern-data-table tr:hover td {
    background: rgba(51, 65, 85, 0.5);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .student-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-badges-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .student-hero-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .student-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .account-details-grid {
        grid-template-columns: 1fr;
    }

    .student-badges-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .student-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Articles Catalog Component Styling & Semantic Badges
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.article-tag-course {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--surface-muted, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--brand, #2563eb);
    font-size: 0.74rem;
    font-weight: 700;
}

.article-tag-subject {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--surface-muted, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--ink-soft, #475569);
    font-size: 0.74rem;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge--draft {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.status-badge--draft .status-dot {
    background: #64748b;
}

.status-badge--review {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.status-badge--review .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.status-badge--approved {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.status-badge--approved .status-dot {
    background: #2563eb;
}

.status-badge--published {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge--published .status-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.status-badge--rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-badge--rejected .status-dot {
    background: #ef4444;
}

.row-is-mine td {
    background: rgba(37, 99, 235, 0.03) !important;
}

html[data-theme="dark"] .article-tag-course,
html[data-theme="dark"] .article-tag-subject {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* â”€â”€ Student Reading Level Onboarding Modal & Level Cards System â”€â”€ */
.student-level-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    overflow-y: auto;
    animation: fadeIn 0.25s ease-out;
}

.student-level-modal-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 2px solid #d4b87b;
    border-radius: 18px;
    max-width: 440px;
    width: 100%;
    max-height: min(90vh, 560px);
    overflow-y: auto;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(48, 35, 23, 0.35);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] .student-level-modal-card {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.student-level-modal-card::-webkit-scrollbar {
    width: 5px;
}

.student-level-modal-card::-webkit-scrollbar-thumb {
    background: rgba(141, 119, 95, 0.4);
    border-radius: 999px;
}

.student-level-modal-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    border: 1px solid #c8a872;
    color: #3b2918;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.student-level-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #3b2918;
    margin: 0 0 3px;
    letter-spacing: -0.02em;
}

html[data-theme="dark"] .student-level-modal-header h2 {
    color: #f7edd4;
}

.student-level-modal-header p {
    font-size: 0.8rem;
    color: #8d775f;
    margin: 0 0 14px;
    line-height: 1.35;
}

html[data-theme="dark"] .student-level-modal-header p {
    color: #c8b9a8;
}

.student-level-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.student-level-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    border: 1.5px solid #d8c296;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.student-level-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(141, 119, 95, 0.12);
}

.student-level-card--basic {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f2 100%);
    border-color: #b8c4b4;
}

.student-level-card--basic.is-selected {
    background: #e6ebe3;
    border-color: #58664c;
    box-shadow: 0 4px 14px rgba(114, 129, 100, 0.2);
}

.student-level-card--intermediate {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border-color: #e8d7b7;
}

.student-level-card--intermediate.is-selected {
    background: #f6eee0;
    border-color: #c8a872;
    box-shadow: 0 4px 14px rgba(200, 168, 114, 0.2);
}

.student-level-card--advanced {
    background: linear-gradient(180deg, #ffffff 0%, #f7f4f0 100%);
    border-color: #d8c9b8;
}

.student-level-card--advanced.is-selected {
    background: #ece5dd;
    border-color: #8d775f;
    box-shadow: 0 4px 14px rgba(141, 119, 95, 0.2);
}

.student-level-card--live {
    background: linear-gradient(180deg, #ffffff 0%, #f2f5f1 100%);
    border-color: #6b7f63;
}

.student-level-card--live.is-selected {
    background: #e4ebe2;
    border-color: #586a51;
    box-shadow: 0 4px 14px rgba(107, 127, 99, 0.25);
}

html[data-theme="dark"] .student-level-card--basic {
    background: linear-gradient(180deg, #1c2419 0%, #151b13 100%);
    border-color: rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .student-level-card--basic.is-selected {
    background: rgba(125, 140, 111, 0.28);
    border-color: #7d8c6f;
}

html[data-theme="dark"] .student-level-card--intermediate {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected {
    background: rgba(212, 184, 123, 0.25);
    border-color: #d4b87b;
}

html[data-theme="dark"] .student-level-card--advanced {
    background: linear-gradient(180deg, #251d18 0%, #1c1511 100%);
    border-color: rgba(141, 119, 95, 0.35);
}

html[data-theme="dark"] .student-level-card--advanced.is-selected {
    background: rgba(141, 119, 95, 0.28);
    border-color: #a89279;
}

.level-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.student-level-card--basic .level-card-icon {
    background: #e6ebe3;
    border: 1px solid #b8c4b4;
}

.student-level-card--intermediate .level-card-icon {
    background: #f6eee0;
    border: 1px solid #d8c296;
}

.student-level-card--advanced .level-card-icon {
    background: #ece5dd;
    border: 1px solid #c8b9a8;
}

html[data-theme="dark"] .student-level-card--basic .level-card-icon {
    background: rgba(125, 140, 111, 0.2);
    border-color: rgba(125, 140, 111, 0.35);
}

html[data-theme="dark"] .student-level-card--intermediate .level-card-icon {
    background: rgba(212, 184, 123, 0.2);
    border-color: rgba(212, 184, 123, 0.35);
}

html[data-theme="dark"] .student-level-card--advanced .level-card-icon {
    background: rgba(141, 119, 95, 0.22);
    border-color: rgba(141, 119, 95, 0.35);
}

.level-card-info {
    flex: 1;
    min-width: 0;
}

.level-card-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #3b2918;
    margin: 0 0 2px;
}

html[data-theme="dark"] .level-card-info h3 {
    color: #f7edd4;
}

.level-card-info p {
    font-size: 0.82rem;
    color: #8d775f;
    margin: 0 0 4px;
    line-height: 1.35;
}

html[data-theme="dark"] .level-card-info p {
    color: #c8b9a8;
}

.level-card-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #5c3c14;
    background: #f6eee0;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #d8c296;
}

html[data-theme="dark"] .level-card-tag {
    background: rgba(212, 184, 123, 0.18);
    color: #d4b87b;
    border-color: rgba(212, 184, 123, 0.35);
}

.level-card-check {
    display: inline-block;
    font-weight: 800;
    color: #58664c;
    font-size: 0.88rem;
}

html[data-theme="dark"] .level-card-check {
    color: #d4b87b;
}

.student-level-modal-footer .btn-hero-primary {
    background: linear-gradient(135deg, #728164 0%, #58664c 100%);
    border: 1px solid #58664c;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(114, 129, 100, 0.3);
}

.student-level-modal-footer .btn-hero-primary:hover {
    background: linear-gradient(135deg, #657358 0%, #4a573f 100%);
    box-shadow: 0 10px 28px rgba(114, 129, 100, 0.4);
}

@media (max-width: 640px) {
    .student-level-modal-card {
        padding: 22px 18px;
    }

    .student-level-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

.level-success-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 10px;
    box-shadow: 0 10px 24px rgba(114, 129, 100, 0.35);
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.level-success-circle svg {
    width: 30px;
    height: 30px;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.4);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* â”€â”€ Student Profile Hero System â”€â”€ */
.profile-avatar-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f6eee0;
    color: #5c3c14;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid #d4b87b;
    box-shadow: 0 8px 24px rgba(118, 85, 47, 0.15);
}

.profile-avatar-bubble--img {
    object-fit: cover;
}

html[data-theme="dark"] .profile-avatar-bubble {
    background: #2a2316;
    color: #f7edd4;
    border-color: #d4b87b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.profile-meta-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
}

.profile-meta-chips::-webkit-scrollbar {
    display: none;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #f6eee0;
    border: 1px solid #d8c296;
    color: #5c3c14;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

html[data-theme="dark"] .profile-meta-chip {
    background: rgba(212, 184, 123, 0.15);
    border-color: rgba(212, 184, 123, 0.35);
    color: #d4b87b;
}

.profile-meta-chip--level {
    background: #e6ebe3;
    border-color: #b8c4b4;
    color: #58664c;
    font-weight: 800;
}

html[data-theme="dark"] .profile-meta-chip--level {
    background: rgba(125, 140, 111, 0.22);
    border-color: rgba(125, 140, 111, 0.4);
    color: #92a382;
}

/* Hero Action Buttons Fix */
.history-hero-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    margin-left: auto;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #728164 0%, #58664c 100%);
    border: 1.5px solid #58664c;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(114, 129, 100, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, #657358 0%, #4a573f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(114, 129, 100, 0.38);
    color: #ffffff !important;
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: #f6eee0;
    border: 1.5px solid #d8c296;
    color: #5c3c14 !important;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

html[data-theme="dark"] .btn-hero-ghost {
    background: rgba(212, 184, 123, 0.18);
    border-color: rgba(212, 184, 123, 0.4);
    color: #d4b87b !important;
}

.btn-hero-ghost:hover {
    background: #ebd7a8;
    border-color: #c8a872;
    transform: translateY(-2px);
    color: #3b2918 !important;
}

/* â”€â”€ Vocabulary Customization Section â”€â”€ */
.profile-level-panel {
    background: linear-gradient(180deg, #ffffff 0%, #faf6ee 100%);
    border: 1.5px solid #d4b87b;
    border-radius: 22px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(118, 85, 47, 0.08);
    overflow: hidden;
}

html[data-theme="dark"] .profile-level-panel {
    background: linear-gradient(180deg, #242018 0%, #1a1711 100%);
    border-color: rgba(212, 184, 123, 0.35);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.profile-level-panel-head {
    padding: 22px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(212, 184, 123, 0.25);
}

.profile-level-eyebrow {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f6eee0;
    border: 1px solid #d8c296;
    color: #5c3c14;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

html[data-theme="dark"] .profile-level-eyebrow {
    background: rgba(212, 184, 123, 0.18);
    border-color: rgba(212, 184, 123, 0.35);
    color: #d4b87b;
}

.profile-level-panel-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 2px;
    letter-spacing: -0.02em;
}

.profile-level-panel-head p {
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin: 0;
}

.profile-level-active-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #e6ebe3;
    border: 1px solid #b8c4b4;
    color: #58664c;
    font-size: 0.82rem;
    font-weight: 800;
}

html[data-theme="dark"] .profile-level-active-pill {
    background: rgba(125, 140, 111, 0.22);
    border-color: rgba(125, 140, 111, 0.4);
    color: #92a382;
}

.profile-level-panel-body {
    padding: 20px 24px;
}

.profile-level-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1024px) {
    .profile-level-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 580px) {
    .profile-level-cards-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* â”€â”€ Dimmed Unselected Level Highlight Tokens â”€â”€ */
.word-hi.is-level-dimmed,
.word-auto.is-level-dimmed {
    background: transparent !important;
    color: inherit !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    cursor: default !important;
    pointer-events: none !important;
}

/* â”€â”€ Interactive Visits Breakdown Modal & 3-Brand-Color Design â”€â”€ */
.reading-visit-badge--btn {
    cursor: pointer !important;
    border: 1px solid #d8c296 !important;
    background: #faf6ee !important;
    color: #72552f !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.reading-visit-badge--btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 85, 47, 0.18);
    background: #f4ea8a !important;
}

.visits-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10500;
    background: rgba(20, 27, 20, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.visits-modal-card {
    background: #faf8f5;
    border: 1.5px solid #6b7f63;
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(15, 25, 15, 0.35);
    overflow: hidden;
}

.visits-modal-head {
    background: linear-gradient(135deg, #6b7f63 0%, #54664c 100%);
    padding: 20px 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.visits-modal-eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #dfc790;
    display: block;
    margin-bottom: 2px;
}

.visits-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.visits-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.visits-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.visits-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
}

.visits-loading-box {
    text-align: center;
    padding: 36px 20px;
    color: #64755e;
    font-weight: 600;
}

.visits-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

@media (max-width: 580px) {
    .visits-summary-cards {
        grid-template-columns: 1fr;
    }
}

.visits-sum-card {
    background: #ffffff;
    border: 1.5px solid #e8dfd3;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.visits-sum-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
}

.visits-sum-val {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 4px;
}

.visits-sum-val--green {
    color: #5c6c54;
}

.visits-sum-val--gold {
    color: #b89352;
}

.visits-sum-val--sub {
    font-size: 0.88rem;
    color: var(--ink-main);
}

.visits-section-box {
    margin-bottom: 22px;
}

.visits-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #3b2918;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visits-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 580px) {
    .visits-grid-cards {
        grid-template-columns: 1fr;
    }
}

.visits-breakdown-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1.5px solid #e5dccf;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visits-card--gold {
    border-color: #dfc790;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ea 100%);
}

.visits-card--sage {
    border-color: #b8c4b4;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7f3 100%);
}

.breakdown-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seq-badge-pill {
    background: #ebd7a8;
    color: #4a3821;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #c8a872;
}

.level-badge-pill {
    background: #d8e2d4;
    color: #384732;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #9bb094;
}

.seq-visit-badge {
    font-size: 0.76rem;
    font-weight: 750;
    color: #64755e;
}

.breakdown-time-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ink-main);
}

.breakdown-sub-label {
    font-size: 0.72rem;
    color: var(--ink-muted);
    margin-left: 4px;
}

.visits-table-wrap {
    background: #ffffff;
    border: 1.5px solid #e8dfd3;
    border-radius: 12px;
    overflow: hidden;
}

.visits-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.visits-log-table th {
    background: #f4efea;
    color: #5c4d3c;
    font-weight: 750;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1.5px solid #e2d7c9;
}

.visits-log-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee7de;
    color: var(--ink-main);
}

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

.table-seq-tag {
    background: #f6edd9;
    color: #614a2c;
    font-weight: 750;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
}

.table-lvl-tag {
    background: #e8eee6;
    color: #43543d;
    font-weight: 750;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
}

/* â”€â”€ Visits Breakdown Modal Dark Mode Styling â”€â”€ */
html[data-theme="dark"] .visits-modal-card {
    background: #1c221a;
    border-color: #586852;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
}

html[data-theme="dark"] .visits-modal-head {
    background: linear-gradient(135deg, #3d4a38 0%, #283325 100%);
    border-bottom: 1px solid #4a5c45;
}

html[data-theme="dark"] .visits-modal-eyebrow {
    color: #dfc790;
}

html[data-theme="dark"] .visits-modal-title {
    color: #ffffff;
}

html[data-theme="dark"] .visits-sum-card {
    background: #242c22;
    border-color: #384534;
}

html[data-theme="dark"] .visits-sum-label {
    color: #9cb097;
}

html[data-theme="dark"] .visits-sum-val--green {
    color: #9bb094;
}

html[data-theme="dark"] .visits-sum-val--gold {
    color: #ebd7a8;
}

html[data-theme="dark"] .visits-sum-val--sub {
    color: #e2e8e0;
}

html[data-theme="dark"] .visits-section-title {
    color: #e5edd6;
}

html[data-theme="dark"] .visits-breakdown-card {
    background: #242c22;
    border-color: #384534;
}

html[data-theme="dark"] .visits-card--gold {
    background: linear-gradient(180deg, #2a2c21 0%, #22251a 100%);
    border-color: #7a6840;
}

html[data-theme="dark"] .visits-card--sage {
    background: linear-gradient(180deg, #222b20 0%, #1a2219 100%);
    border-color: #43543e;
}

html[data-theme="dark"] .seq-badge-pill {
    background: #45371c;
    color: #f7edd4;
    border-color: #7a6840;
}

html[data-theme="dark"] .level-badge-pill {
    background: #2a3827;
    color: #d2e0d0;
    border-color: #43543e;
}

html[data-theme="dark"] .seq-visit-badge {
    color: #9cb097;
}

html[data-theme="dark"] .breakdown-time-val {
    color: #ffffff;
}

html[data-theme="dark"] .breakdown-sub-label {
    color: #9cb097;
}

html[data-theme="dark"] .visits-table-wrap {
    background: #242c22;
    border-color: #384534;
}

html[data-theme="dark"] .visits-log-table th {
    background: #192017;
    color: #cde0ca;
    border-bottom-color: #384534;
}

html[data-theme="dark"] .visits-log-table td {
    border-bottom-color: #2b3528;
    color: #e2e8e0;
}

html[data-theme="dark"] .table-seq-tag {
    background: #3a301c;
    color: #ecdcae;
}

html[data-theme="dark"] .table-lvl-tag {
    background: #283526;
    color: #cde0ca;
}

/* â”€â”€ Warm Gold/Beige Article Title Hero Section (Visible in Light & Dark Mode) â”€â”€ */
/* â”€â”€ Sage Green / Muted Olive Green Article Title Hero Section â”€â”€ */
.student-reading-top {
    background: linear-gradient(135deg, #e4ede2 0%, #d8e5d5 35%, #c8dac4 70%, #b8ccb3 100%) !important;
    border: 2px solid #5a7755 !important;
    border-radius: 20px !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    color: #183017 !important;
    box-shadow: 0 12px 28px rgba(36, 74, 34, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 360px !important;
}

.student-reading-top-inner {
    position: relative !important;
    width: 100% !important;
    min-height: 360px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
}

.student-reading-top-content {
    width: 52% !important;
    max-width: 52% !important;
    padding: 30px 34px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    z-index: 3 !important;
}

.student-reading-back {
    color: #183017 !important;
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1.5px solid #9cb897 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.student-reading-back:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f220e !important;
}

.student-reading-kicker-bar {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #244a22 !important;
    margin: 14px 0 8px 0 !important;
}

.student-reading-title {
    color: #183017 !important;
    font-size: clamp(2rem, 3.2vw, 2.5rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
    margin: 0 0 10px 0 !important;
}

.title-accent-word {
    color: #244a22 !important;
    border-bottom: 3.5px solid #5a7755 !important;
    display: inline-block !important;
    padding-bottom: 2px !important;
}

.student-reading-lead {
    color: #2e472c !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    opacity: 1 !important;
    margin-bottom: 16px !important;
}

.student-reading-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 4px !important;
}

.student-reading-chip {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1.5px solid #9cb897 !important;
    border-radius: 999px !important;
    padding: 7px 16px !important;
    color: #183017 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 12px rgba(36, 74, 34, 0.06) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.student-reading-chip--accent {
    background: #244a22 !important;
    color: #ffffff !important;
    border: 1.5px solid #244a22 !important;
}

.student-reading-stats-bar {
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1.5px solid #9cb897 !important;
    border-radius: 16px !important;
    padding: 8px 16px !important;
    margin-top: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    max-width: max-content !important;
    gap: 16px !important;
}

.stats-bar-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.stats-bar-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    display: grid !important;
    place-items: center !important;
    color: #244a22 !important;
    box-shadow: 0 4px 10px rgba(36, 74, 34, 0.08) !important;
}

.stats-bar-label {
    display: block !important;
    font-size: 0.72rem !important;
    color: #3b573a !important;
    font-weight: 700 !important;
}

.stats-bar-val {
    display: block !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #183017 !important;
}

.stats-bar-val--green {
    color: #244a22 !important;
}

.stats-bar-divider {
    width: 1px !important;
    height: 26px !important;
    background: rgba(90, 119, 85, 0.3) !important;
}

.student-reading-top-thumb-full {
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    bottom: -3px !important;
    left: 48% !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    overflow: hidden !important;
    border-left: 2px solid #5a7755 !important;
    background: transparent !important;
    border-radius: 0 20px 20px 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
    box-shadow: none !important;
    z-index: 2 !important;
}

.student-reading-top-thumb-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    object-position: center !important;
    border-radius: 0 20px 20px 0 !important;
    display: block !important;
    transition: none !important;
    transform: none !important;
}

@media (max-width: 900px) {
    .student-reading-top-inner {
        flex-direction: column-reverse !important;
    }

    .student-reading-top-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 22px !important;
    }

    .student-reading-top-thumb-full {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 240px !important;
        border-radius: 0 0 18px 18px !important;
    }

    .student-reading-curve-svg {
        display: none !important;
    }
}

.student-reading-top-nav {
    border-bottom-color: rgba(157, 121, 72, 0.3) !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
}

.student-reading-back {
    color: #3b2918 !important;
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1.5px solid #d8c296 !important;
    font-weight: 800 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
}

.student-reading-back:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1e140a !important;
}

.student-reading-title {
    color: #251a10 !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 6px 0 !important;
}

.student-reading-lead {
    color: #4a3828 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
    margin-bottom: 14px !important;
}

.student-reading-kicker {
    color: #3b2918 !important;
    background: #f6eee0 !important;
    border: 1.5px solid #d8c296 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(118, 85, 47, 0.1) !important;
}

.student-reading-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 14px !important;
}

.student-reading-chip {
    background: rgba(255, 255, 255, 0.75) !important;
    color: #251a10 !important;
    border: 1.5px solid #c7b080 !important;
    font-weight: 800 !important;
    font-size: 0.84rem !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
}

.student-reading-chip--accent {
    background: #251a10 !important;
    color: #fdf8ef !important;
    border: 1.5px solid #140d07 !important;
    font-weight: 800 !important;
    font-size: 0.84rem !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 8px rgba(37, 26, 16, 0.25) !important;
}

/* Dark Mode Overrides for Hero Header */
html[data-theme="dark"] .student-reading-top {
    background: linear-gradient(135deg, #2c251e 0%, #1e1813 100%) !important;
    border: 2px solid #544535 !important;
    color: #f5ece0 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .student-reading-top-nav {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .student-reading-back {
    color: #f5ece0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1.5px solid #544535 !important;
}

html[data-theme="dark"] .student-reading-title {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-reading-lead {
    color: #d8cebe !important;
}

html[data-theme="dark"] .student-reading-kicker {
    color: #f0dfb5 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid #544535 !important;
}

html[data-theme="dark"] .student-reading-chip {
    background: #3b3127 !important;
    color: #f5ece0 !important;
    border: 1.5px solid #544535 !important;
}

html[data-theme="dark"] .student-reading-chip--accent {
    background: #e7d2a3 !important;
    color: #251a10 !important;
    border: 1.5px solid #9d7948 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
}

.preview-top-header-row h1,
.preview-top h1 {
    color: #ffffff !important;
}

/* Light Beige Article Body Part */
.article-reader-body-shell,
.article-body,
.preview-body,
.article-level-body,
.live-preview-body-content {
    background-color: #f7f4ee !important;
    color: #2b241d !important;
    line-height: 1.8;
}

.article-reader-body-shell {
    padding: 24px 28px;
    border-radius: 0 0 20px 20px;
}

.article-body,
.preview-body {
    color: #2b241d;
}

.article-body p,
.preview-body p {
    color: inherit;
}

/* â”€â”€ Recent Student Feedback Testimonials Section â”€â”€ */
.reviews-list-container {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed rgba(114, 129, 100, 0.25);
}

/* â”€â”€ Recent Student Feedback Testimonials Section â”€â”€ */
.reviews-list-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed rgba(114, 129, 100, 0.3);
}

/* Distinct Header Banner Background */
.reviews-list-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #728164 0%, #56644b 100%) !important;
    border: 1.5px solid #48543f !important;
    box-shadow: 0 6px 20px rgba(114, 129, 100, 0.22) !important;
}

.recent-feedback-quote-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.reviews-list-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: -0.01em;
}

.reviews-list-subtitle {
    font-size: 0.83rem !important;
    color: #e2ebd8 !important;
    margin: 2px 0 0;
    font-weight: 500;
}

.btn-reviews-view-all {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #48543f !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    padding: 6px 16px !important;
    border-radius: 999px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-reviews-view-all:hover {
    background: #f0f4ec !important;
    color: #2b3325 !important;
    transform: scale(1.03);
}

/* Grid Layout for Review Cards */
.reviews-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

/* Distinct Card Background Color */
.approved-review-card {
    background: #faf7f2 !important;
    border: 1.5px solid #e6decb !important;
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 4px 18px rgba(74, 50, 24, 0.07) !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.approved-review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(114, 129, 100, 0.18) !important;
    border-color: #728164 !important;
    background: #ffffff !important;
}

.review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.review-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.review-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    color: #fdf8ef !important;
    font-weight: 800;
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(44, 34, 30, 0.22);
    flex-shrink: 0;
    border: 2px solid #ffffff;
}

.review-author-name {
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    color: #2c221e !important;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-card-date {
    font-size: 0.76rem !important;
    color: #786858 !important;
    font-weight: 600 !important;
    display: block;
}

.review-card-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff8e7 !important;
    border: 1px solid #f3d999 !important;
    padding: 4px 12px;
    border-radius: 999px;
    flex-shrink: 0;
}

.review-card-stars .star--filled {
    color: #d97706 !important;
    font-size: 0.92rem;
}

.review-card-stars .star--empty {
    color: #d1c5b4 !important;
    font-size: 0.92rem;
}

.review-card-body {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1.5px dashed rgba(114, 129, 100, 0.22);
    font-size: 0.92rem !important;
    line-height: 1.58;
    color: #3b2c1e !important;
    font-style: italic;
    font-weight: 500;
}

.review-card-body--no-comment {
    font-style: normal;
    border-top: none;
    padding-top: 8px;
    margin-top: 10px;
}

.no-comment-pill {
    display: inline-block;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #4a3a2a !important;
    background: #f0e8d8 !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    border: 1px solid #d9ccb4 !important;
}

/* Dark Mode Overrides for Distinct Header & Cards */
html[data-theme="dark"] .reviews-list-title-wrap {
    background: linear-gradient(135deg, #3c4834 0%, #293223 100%) !important;
    border-color: #526347 !important;
}

html[data-theme="dark"] .approved-review-card {
    background: #25201a !important;
    border: 1.5px solid #443a2f !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .approved-review-card:hover {
    background: #2c251e !important;
    border-color: #728164 !important;
}

html[data-theme="dark"] .review-author-avatar {
    background: linear-gradient(135deg, #e7d2a3 0%, #d4b882 100%) !important;
    color: #251a10 !important;
    border-color: #25201a;
}

/* Mobile Optimization: Student Reviews Fully Visible & Proportionately Scaled */
@media (max-width: 768px) {
    .student-article-reviews-section {
        margin-top: 20px !important;
    }

    .reviews-summary-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .reviews-score-card,
    .reviews-form-card,
    .student-user-review-box {
        padding: 16px 14px !important;
        border-radius: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .reviews-big-score {
        font-size: 2.2rem !important;
    }

    .reviews-list-title-wrap {
        padding: 12px 14px !important;
        gap: 10px !important;
        border-radius: 14px !important;
    }

    .recent-feedback-quote-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
    }

    .recent-feedback-quote-icon svg {
        width: 13px !important;
        height: 13px !important;
    }

    .reviews-list-title {
        font-size: 0.98rem !important;
    }

    .reviews-list-subtitle {
        font-size: 0.76rem !important;
    }

    .btn-reviews-view-all {
        padding: 4px 12px !important;
        font-size: 0.72rem !important;
    }

    .reviews-cards-list {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .approved-review-card {
        padding: 14px 14px !important;
        border-radius: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .review-author-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.88rem !important;
    }

    .review-author-name {
        font-size: 0.86rem !important;
    }

    .review-card-date {
        font-size: 0.72rem !important;
    }

    .review-card-stars {
        padding: 2px 8px !important;
        gap: 2px !important;
    }

    .review-card-stars .star--filled,
    .review-card-stars .star--empty {
        font-size: 0.8rem !important;
    }

    .review-card-body {
        margin-top: 10px !important;
        padding-top: 8px !important;
        font-size: 0.86rem !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 480px) {

    .approved-review-card,
    .reviews-score-card,
    .reviews-form-card {
        padding: 12px 10px !important;
    }

    .review-card-head {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}

/* â”€â”€ Student Profile Header & Reading Level Preference Panel (Light & Dark Mode) â”€â”€ */

/* Section 1: Hero Avatar Header */
.profile-hero-layout {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.profile-avatar-block {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.profile-avatar-bubble {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    color: #fdf8ef !important;
    font-size: 2.2rem;
    font-weight: 800;
    border: 3px solid #ffffff !important;
    box-shadow: 0 6px 20px rgba(44, 34, 30, 0.25) !important;
    flex-shrink: 0;
}

.profile-avatar-bubble--img {
    object-fit: cover;
}

.profile-name-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.75) !important;
    color: #251a10 !important;
    border: 1.5px solid #c7b080 !important;
}

.profile-meta-chip--level {
    background: rgba(255, 255, 255, 0.75) !important;
    color: #251a10 !important;
    border: 1.5px solid #c7b080 !important;
}

/* Section 2: Reading Level Preference Panel */
.profile-level-panel {
    background: linear-gradient(135deg, #faf7f2 0%, #f4efe6 100%);
    border: 1.5px solid #e6decb;
    border-radius: 20px;
    padding: 26px 30px;
    margin-bottom: 28px;
    box-shadow: 0 6px 24px rgba(74, 50, 24, 0.08);
    position: relative;
}

.profile-level-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1.5px dashed rgba(114, 129, 100, 0.22);
}

/* Cards Grid & Level Option Buttons */
.profile-level-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: stretch;
}

.level-card-form {
    margin: 0 !important;
    display: flex !important;
    height: 100% !important;
    width: 100% !important;
}

.student-level-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 2px solid #e0d6c3;
    box-shadow: 0 3px 10px rgba(74, 50, 24, 0.05);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-level-card:hover {
    transform: translateY(-2px);
    border-color: #9d7948;
    box-shadow: 0 8px 20px rgba(74, 50, 24, 0.12);
}

.student-level-card.is-selected {
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    border-color: #140d07 !important;
    color: #fdf8ef !important;
    box-shadow: 0 8px 24px rgba(44, 34, 30, 0.25) !important;
}

.student-level-card.is-selected h3,
.student-level-card.is-selected p {
    color: #fdf8ef !important;
}

.level-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.level-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f4efe6;
    display: grid;
    place-items: center;
}

.level-card-check {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e7d2a3;
    color: #2c221e;
}

.level-card-info h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 800;
}

.level-card-info p {
    margin: 0;
    font-size: 0.78rem;
    color: #615243;
    line-height: 1.35;
}

/* â”€â”€ Student Profile Hero Header Responsive Layout â”€â”€ */
.profile-hero-layout {
    width: 100%;
}

.profile-avatar-block {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.profile-avatar-bubble {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ebd7a8 0%, #dfc790 100%);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #3b2918;
}

.profile-hero-name {
    word-break: break-word;
}

.profile-hero-actions,
.history-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.profile-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #d4b87b;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3b2918;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Base Hero Button Styles */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    color: #fdf8ef !important;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none !important;
    border: 1.5px solid #140d07 !important;
    box-shadow: 0 4px 14px rgba(44, 34, 30, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 34, 30, 0.35) !important;
    background: linear-gradient(135deg, #1e1613 0%, #3d2d1f 100%) !important;
    color: #ffffff !important;
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85) !important;
    color: #251a10 !important;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none !important;
    border: 1.5px solid #c7b080 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-hero-ghost:hover {
    transform: translateY(-2px);
    background: #ffffff !important;
    border-color: #9d7948 !important;
    color: #140d07 !important;
    box-shadow: 0 4px 14px rgba(118, 85, 47, 0.18) !important;
}

@media (max-width: 991px) {
    .student-articles-hero {
        padding: 16px 14px !important;
    }

    .profile-hero-layout {
        width: 100% !important;
    }

    /* Top Row Layout: Grid with Row 1 = Avatar + Eyebrow Badge side-by-side, Row 2 = Content */
    .profile-avatar-block {
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 10px 12px !important;
        align-items: center !important;
        width: 100% !important;
        position: static !important;
        padding-top: 0 !important;
    }

    /* Avatar Bubble: Inline beside Eyebrow Badge on top line */
    .profile-avatar-bubble {
        grid-column: 1 !important;
        grid-row: 1 !important;
        position: static !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 1.25rem !important;
        margin: 0 !important;
        border-width: 2px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* STUDENT DASHBOARD & PROFILE Eyebrow Badge: Inline beside Avatar on top line */
    .hero-eyebrow-badge {
        grid-column: 2 !important;
        grid-row: 1 !important;
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        max-width: 100% !important;
        font-size: 0.72rem !important;
        padding: 5px 12px !important;
        text-align: left !important;
        justify-self: start !important;
    }

    .hero-content {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        margin-top: 4px !important;
    }

    .profile-name-actions-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    .hero-title {
        font-size: clamp(1.35rem, 5vw, 1.7rem) !important;
        font-weight: 800 !important;
        text-align: left !important;
        width: 100% !important;
        word-break: break-word !important;
        overflow: visible !important;
        margin: 0 0 6px 0 !important;
        color: #251a10 !important;
        display: block !important;
    }

    .profile-hero-actions,
    .history-hero-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
        margin: 4px 0 10px 0 !important;
    }

    .btn-hero-primary,
    .btn-hero-ghost {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 10px 14px !important;
        min-height: 42px !important;
        font-size: 0.88rem !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 !important;
    }

    .profile-meta-chips {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 6px !important;
        margin-top: 6px !important;
    }

    .profile-meta-chip {
        display: flex !important;
        align-items: center !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        padding: 7px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-break: break-all !important;
        border-radius: 10px !important;
        max-width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* VOCABULARY CUSTOMIZATION Level Cards Grid: Match KPI Stat Grid size on mobile view */
    .profile-level-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .student-level-card {
        padding: 12px 14px !important;
        min-height: 110px !important;
    }

    .level-card-info h3 {
        font-size: 0.9rem !important;
    }

    .level-card-info p {
        font-size: 0.72rem !important;
    }
}

.profile-level-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #728164;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.profile-level-panel-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #251a10 !important;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.profile-level-panel-head p {
    font-size: 0.88rem;
    color: #6b5c4d !important;
    margin: 0;
}

.profile-level-active-pill {
    display: inline-flex;
    align-items: center;
    background: #728164 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.82rem;
    padding: 6px 16px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(114, 129, 100, 0.28) !important;
    flex-shrink: 0;
}

/* Cards Grid & Level Option Buttons */
.profile-level-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.level-card-form {
    margin: 0 !important;
    display: flex !important;
    height: 100% !important;
    width: 100% !important;
}

.student-level-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 2px solid #e6decb;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    width: 100% !important;
    height: 100% !important;
    min-height: 130px;
    box-sizing: border-box !important;
    text-align: left;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.level-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 36px;
}

.student-level-card:hover {
    transform: translateY(-3px);
    border-color: #728164;
    box-shadow: 0 8px 24px rgba(114, 129, 100, 0.18);
}

/* Custom Level-Colored Card Borders (Light Mode) */
.student-level-card--live {
    border: 2px solid #f3d999;
}

.student-level-card--live:hover,
.student-level-card--live.is-selected {
    background: #fffdf5;
    border: 2.5px solid #d97706;
    box-shadow: 0 6px 22px rgba(217, 119, 6, 0.22);
}

.student-level-card--live.is-selected .level-card-check {
    color: #d97706;
    background: rgba(217, 119, 6, 0.14);
    border-color: rgba(217, 119, 6, 0.3);
}

.student-level-card--basic {
    border: 2px solid #bbf7d0;
}

.student-level-card--basic:hover,
.student-level-card--basic.is-selected {
    background: #f4fcf6;
    border: 2.5px solid #137333;
    box-shadow: 0 6px 22px rgba(19, 115, 51, 0.22);
}

.student-level-card--basic.is-selected .level-card-check {
    color: #137333;
    background: rgba(19, 115, 51, 0.14);
    border-color: rgba(19, 115, 51, 0.3);
}

.student-level-card--intermediate {
    border: 2px solid #fde68a;
}

.student-level-card--intermediate:hover,
.student-level-card--intermediate.is-selected {
    background: #fffbf0;
    border: 2.5px solid #92400e;
    box-shadow: 0 6px 22px rgba(146, 64, 14, 0.22);
}

.student-level-card--intermediate.is-selected .level-card-check {
    color: #92400e;
    background: rgba(146, 64, 14, 0.14);
    border-color: rgba(146, 64, 14, 0.3);
}

.student-level-card--advanced {
    border: 2px solid #e9d5ff;
}

.student-level-card--advanced:hover,
.student-level-card--advanced.is-selected {
    background: #faf5ff;
    border: 2.5px solid #6b21a8;
    box-shadow: 0 6px 22px rgba(107, 33, 168, 0.22);
}

.student-level-card--advanced.is-selected .level-card-check {
    color: #6b21a8;
    background: rgba(107, 33, 168, 0.14);
    border-color: rgba(107, 33, 168, 0.3);
}

.student-level-card.is-selected .level-card-info h3 {
    font-weight: 800;
}

.student-level-card.is-selected .level-card-info p {
    font-weight: 600;
}

.level-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(114, 129, 100, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.level-card-info {
    width: 100%;
    flex: 1;
}

.level-card-info h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #251a10;
    margin: 0 0 4px 0;
}

.level-card-info p {
    font-size: 0.82rem;
    color: #6b5c4d;
    margin: 0;
    line-height: 1.4;
}

.level-card-check {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* Custom Level-Colored Card Borders (Dark Mode) */
html[data-theme="dark"] .student-level-card--live.is-selected {
    background: #332715 !important;
    border: 2.5px solid #fbbf24 !important;
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.3) !important;
}

html[data-theme="dark"] .student-level-card--live.is-selected .level-card-check {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.2) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected {
    background: #162c1d !important;
    border: 2.5px solid #34d399 !important;
    box-shadow: 0 6px 24px rgba(52, 211, 153, 0.3) !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected .level-card-check {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.2) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected {
    background: #332415 !important;
    border: 2.5px solid #f59e0b !important;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected .level-card-check {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected {
    background: #281738 !important;
    border: 2.5px solid #c084fc !important;
    box-shadow: 0 6px 24px rgba(192, 132, 252, 0.3) !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected .level-card-check {
    color: #c084fc !important;
    background: rgba(192, 132, 252, 0.2) !important;
    border-color: rgba(192, 132, 252, 0.4) !important;
}

/* Dark Mode Overrides for First 2 Profile Sections */
html[data-theme="dark"] .profile-avatar-bubble {
    background: linear-gradient(135deg, #e7d2a3 0%, #d4b882 100%) !important;
    color: #251a10 !important;
    border-color: #2c251e !important;
}

html[data-theme="dark"] .profile-meta-chip {
    background: #3b3127 !important;
    color: #f5ece0 !important;
    border-color: #544535 !important;
}

html[data-theme="dark"] .profile-meta-chip--level {
    background: #3b3127 !important;
    color: #f5ece0 !important;
    border-color: #544535 !important;
}

html[data-theme="dark"] .profile-level-panel {
    background: linear-gradient(135deg, #25201a 0%, #1b1612 100%) !important;
    border: 1.5px solid #443a2f !important;
    color: #f5ece0 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .profile-level-panel-head {
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .profile-level-eyebrow {
    color: #e7d2a3 !important;
}

html[data-theme="dark"] .profile-level-panel-head h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] .profile-level-panel-head p {
    color: #d8cebe !important;
}

html[data-theme="dark"] .profile-level-active-pill {
    background: #e7d2a3 !important;
    color: #251a10 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .student-level-card {
    background: #2b241d !important;
    border: 2px solid #473d32 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .student-level-card:hover {
    background: #332b23 !important;
    border-color: #e7d2a3 !important;
}

html[data-theme="dark"] .student-level-card.is-selected {
    background: #382e25 !important;
    border-color: #e7d2a3 !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .level-card-info h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .level-card-info p {
    color: #d8cebe !important;
}

html[data-theme="dark"] .level-card-check {
    color: #f0dfb5 !important;
    background: rgba(231, 210, 163, 0.15) !important;
    border-color: rgba(231, 210, 163, 0.3) !important;
}

/* â”€â”€ Hero Buttons High-Contrast Styling (Light & Dark Mode) â”€â”€ */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2c221e 0%, #4a3828 100%) !important;
    color: #fdf8ef !important;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none !important;
    border: 1.5px solid #140d07 !important;
    box-shadow: 0 4px 14px rgba(44, 34, 30, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 34, 30, 0.35) !important;
    background: linear-gradient(135deg, #1e1613 0%, #3d2d1f 100%) !important;
    color: #ffffff !important;
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85) !important;
    color: #251a10 !important;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none !important;
    border: 1.5px solid #c7b080 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-hero-ghost:hover {
    background: #ffffff !important;
    color: #1e140a !important;
    border-color: #9d7948 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

/* Dark Mode Overrides for Hero Buttons */
html[data-theme="dark"] .btn-hero-primary {
    background: linear-gradient(135deg, #e7d2a3 0%, #d4b882 100%) !important;
    color: #251a10 !important;
    border: 1.5px solid #9d7948 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .btn-hero-primary:hover {
    background: #f0dfb5 !important;
    color: #1a120b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .btn-hero-ghost {
    background: #3b3127 !important;
    color: #f5ece0 !important;
    border: 1.5px solid #544535 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .btn-hero-ghost:hover {
    background: #473b2f !important;
    color: #ffffff !important;
    border-color: #e7d2a3 !important;
    transform: translateY(-2px) !important;
}

html[data-theme="dark"] .review-author-name {
    color: #ffffff !important;
}

/* â”€â”€ Student Notifications Bell Button: 12px Squircle Box with Full Beige Fill â”€â”€ */
.student-notif-bell-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fff6e0 0%, #ebd39b 100%) !important;
    border: 1.5px solid #d4b472 !important;
    color: #2c1e0b !important;
    box-shadow: 0 3px 12px rgba(118, 85, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.student-notif-bell-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #f5e2b4 100%) !important;
    border-color: #c9a45e !important;
    box-shadow: 0 5px 16px rgba(118, 85, 47, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.student-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 0 2px #ebd39b !important;
}

html[data-theme="dark"] .review-card-date {
    color: #a89b8c !important;
}

/* â”€â”€ Example Sentences Card & CEFR Badges (Light & Dark Mode) â”€â”€ */
.meaning-card--example-sentences {
    background: #fdfbf7 !important;
    border: 1.5px solid #e6decb !important;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.level-filter-chip {
    font-size: 0.72rem;
    font-weight: 800;
    color: #728164 !important;
    background: rgba(114, 129, 100, 0.12) !important;
    border: 1px solid rgba(114, 129, 100, 0.28);
    padding: 2px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.example-sentences-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* Example Sentences Collapse Toggle */
.example-sentences-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid #d8c296;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #5c3c14;
    cursor: pointer;
    transition: all 0.15s ease;
}

.example-sentences-collapse-btn:hover {
    background: #ffffff;
    border-color: #9d7948;
    color: #2c1a08;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.example-sentences-chevron {
    width: 13px;
    height: 13px;
    color: #785832;
    transition: transform 0.2s ease;
}

.meaning-card--example-sentences.is-collapsed .example-sentences-list {
    display: none !important;
}

.meaning-card--example-sentences.is-collapsed .example-sentences-chevron {
    transform: rotate(180deg);
}

html[data-theme="dark"] .example-sentences-collapse-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(240, 223, 181, 0.3) !important;
    color: #f0dfb5 !important;
}

html[data-theme="dark"] .example-sentences-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(240, 223, 181, 0.5) !important;
}

html[data-theme="dark"] .example-sentences-chevron {
    color: #f0dfb5 !important;
}

.example-sentence-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #ffffff !important;
    border: 1px solid #efe8db !important;
}

.example-sentence-text {
    font-size: 0.88rem;
    color: #2c221e !important;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.cefr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.cefr-badge--a1 {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0;
}

.cefr-badge--a2 {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
}

.cefr-badge--b1 {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a;
}

.cefr-badge--b2 {
    background: #ffedd5 !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa;
}

.cefr-badge--c1 {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff;
}

.cefr-badge--c2 {
    background: #fce7f3 !important;
    color: #be185d !important;
    border: 1px solid #fbcfe8;
}

/* Primary & Secondary Example Sentence Badges */
.example-sentence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.example-badge--primary {
    background: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.2);
}

.example-badge--secondary {
    background: #e5e7eb !important;
    color: #4b5563 !important;
    border: 1px solid #d1d5db;
}

.example-sentence-item--primary {
    border: 1.5px solid #a7f3d0 !important;
    background: #f0fdf4 !important;
}

/* Dark Mode Overrides for Example Sentences Card */
html[data-theme="dark"] .meaning-card--example-sentences {
    background: #25201a !important;
    border: 1.5px solid #443a2f !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .level-filter-chip {
    color: #f0dfb5 !important;
    background: rgba(231, 210, 163, 0.15) !important;
    border-color: rgba(231, 210, 163, 0.3) !important;
}

html[data-theme="dark"] .example-sentence-item {
    background: #2b241d !important;
    border-color: #3f362c !important;
}

html[data-theme="dark"] .example-sentence-item--primary {
    border-color: #065f46 !important;
    background: rgba(6, 78, 59, 0.25) !important;
}

html[data-theme="dark"] .example-badge--secondary {
    background: #374151 !important;
    color: #d1d5db !important;
    border-color: #4b5563;
}

html[data-theme="dark"] .example-sentence-text {
    color: #f5ece0 !important;
}

html[data-theme="dark"] .review-card-body {
    color: #e8ded1 !important;
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .no-comment-pill {
    background: #362d24 !important;
    color: #e2d5c3 !important;
    border-color: #4d4034 !important;
}

/* â”€â”€ Sage Green / Muted Olive Green Word Meaning Report Modal Theme â”€â”€ */
.meaning-report-banner {
    background: linear-gradient(135deg, #4a5d2e 0%, #637841 100%) !important;
}

.meaning-report-avatar-badge {
    background: linear-gradient(135deg, #5b7052 0%, #4a5d2e 100%) !important;
    color: #ffffff !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 14px rgba(74, 93, 46, 0.3) !important;
}

.meaning-report-check-card:hover {
    border-color: #5b7052 !important;
    background: #f7f9f5 !important;
}

.meaning-report-check-card.is-checked {
    background: #f0f4ec !important;
    border: 2px solid #4a5d2e !important;
    box-shadow: 0 4px 14px rgba(74, 93, 46, 0.18) !important;
}

.meaning-report-full-submit-btn,
.meaning-report-submit-btn {
    background: linear-gradient(135deg, #4a5d2e 0%, #5b7052 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(74, 93, 46, 0.3) !important;
    border: none !important;
}

.meaning-report-full-submit-btn:hover,
.meaning-report-submit-btn:hover {
    background: linear-gradient(135deg, #3f5027 0%, #4a5d2e 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(74, 93, 46, 0.4) !important;
}

/* Dark Mode Sage Green Report Modal Overrides */
html[data-theme="dark"] .meaning-report-banner {
    background: linear-gradient(135deg, #374622 0%, #4a5d2e 100%) !important;
}

html[data-theme="dark"] .meaning-report-avatar-badge {
    background: linear-gradient(135deg, #4a5d2e 0%, #374622 100%) !important;
    border-color: #1e2419 !important;
}

html[data-theme="dark"] .meaning-report-check-card:hover {
    border-color: #7b9968 !important;
    background: #232c1e !important;
}

html[data-theme="dark"] .meaning-report-check-card.is-checked {
    background: #1f271a !important;
    border-color: #7b9968 !important;
}

html[data-theme="dark"] .meaning-report-full-submit-btn,
html[data-theme="dark"] .meaning-report-submit-btn {
    background: linear-gradient(135deg, #5b7052 0%, #4a5d2e 100%) !important;
    color: #ffffff !important;
}

/* â”€â”€ 1. Pop-Up Word Modal Dark Mode UI Enhancements â”€â”€ */
html[data-theme="dark"] .word-popup-bg,
html[data-theme="dark"] .word-popup-backdrop {
    background: rgba(8, 6, 12, 0.72) !important;
    backdrop-filter: blur(8px) !important;
}

html[data-theme="dark"] .word-popup {
    background: #1b1612 !important;
    border: 1.5px solid #443a2f !important;
    color: #f5ece0 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .popup-head {
    background: linear-gradient(135deg, #2b231a 0%, #1f1912 100%) !important;
    border-bottom: 1.5px solid #483a2a !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .popup-word-row h2,
html[data-theme="dark"] .popup-head h2 {
    color: #f5ece0 !important;
}

html[data-theme="dark"] .popup-kicker {
    color: #d4b87b !important;
}

html[data-theme="dark"] .popup-badge {
    background: rgba(212, 184, 123, 0.16) !important;
    color: #e7d2a3 !important;
    border-color: rgba(212, 184, 123, 0.28) !important;
}

html[data-theme="dark"] .popup-pronounce-btn,
html[data-theme="dark"] .popup-close {
    background: #3b3127 !important;
    border-color: #544535 !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .popup-pronounce-btn:hover,
html[data-theme="dark"] .popup-close:hover {
    background: #4b3e32 !important;
    border-color: #e7d2a3 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .popup-favorite-btn {
    background: #3b3127 !important;
    border-color: #544535 !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .popup-favorite-btn:hover {
    background: #4b3e32 !important;
    border-color: #e7d2a3 !important;
}

html[data-theme="dark"] .popup-favorite-btn.is-active {
    background: linear-gradient(135deg, #3b2c17 0%, #2b1f0d 100%) !important;
    color: #fbbf24 !important;
    border-color: #d97706 !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3) !important;
}

html[data-theme="dark"] .pos-block {
    background: #25201a !important;
    border-color: #443a2f !important;
}

html[data-theme="dark"] .pos-title {
    background: #332b22 !important;
    color: #e7d2a3 !important;
}

html[data-theme="dark"] .pos-title small {
    color: #b8a692 !important;
}

html[data-theme="dark"] .form-section h3 {
    color: #d4b87b !important;
}

html[data-theme="dark"] .form-item {
    background: #2c251e !important;
    border-color: #443a2f !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .form-label {
    color: #d4b87b !important;
}

html[data-theme="dark"] .form-value {
    color: #f5ece0 !important;
}

html[data-theme="dark"] .meaning-card,
html[data-theme="dark"] .meaning-card--selected,
html[data-theme="dark"] .meaning-card--usage {
    background: #25201a !important;
    border-color: #443a2f !important;
    border-left-color: #d4b87b !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .meaning-card--sentence {
    background: #221c17 !important;
    border-color: #443a2f !important;
    border-left-color: #b8924b !important;
}

html[data-theme="dark"] .meaning-card-label {
    color: #d4b87b !important;
}

html[data-theme="dark"] .meaning-card-label--highlight {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.16) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

html[data-theme="dark"] .meaning-level-badge {
    background: rgba(212, 184, 123, 0.2) !important;
    color: #f0dfb5 !important;
    border-color: rgba(212, 184, 123, 0.35) !important;
}

html[data-theme="dark"] .meaning-card-text,
html[data-theme="dark"] .meaning-card--sentence .meaning-card-text {
    color: #f5ece0 !important;
}

html[data-theme="dark"] .meaning-card-meta,
html[data-theme="dark"] .meaning-card-tags {
    color: #c4b5a2 !important;
}

html[data-theme="dark"] .meaning-card-meta b {
    color: #ffffff !important;
}

html[data-theme="dark"] .word-sentence-highlight,
html[data-theme="dark"] .meaning-card--sentence mark {
    background: #78350f !important;
    color: #fef08a !important;
}

/* â”€â”€ All Parts of Speech & Meanings Dark Mode Styling â”€â”€ */
html[data-theme="dark"] .popup-section-title {
    color: #f0dfb5 !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .popup-pos-acc-help {
    color: #d8cebe !important;
}

html[data-theme="dark"] .popup-pos-accordion {
    border: 1.5px solid #4a3c2c !important;
    background: #25201a !important;
    border-radius: 10px !important;
}

html[data-theme="dark"] .popup-pos-accordion:hover {
    border-color: #d4b87b !important;
}

html[data-theme="dark"] .popup-pos-accordion.is-open {
    border-color: #d4b87b !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .popup-pos-accordion-head {
    background: #2e261e !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .popup-pos-accordion-head:hover {
    background: #392f25 !important;
}

html[data-theme="dark"] .popup-pos-accordion.is-open .popup-pos-accordion-head {
    background: #382e24 !important;
    border-bottom: 1.5px solid #4d3f30 !important;
}

html[data-theme="dark"] .pos-mother-tag {
    color: #d4b87b !important;
}

html[data-theme="dark"] .pos-mother-tag b {
    color: #ffffff !important;
}

html[data-theme="dark"] .pos-count-chip {
    background: #3c3227 !important;
    color: #f0dfb5 !important;
    border: 1px solid #584838 !important;
}

html[data-theme="dark"] .pos-form-badge {
    color: #d8cebe !important;
}

html[data-theme="dark"] .popup-pos-acc-status {
    color: #f0dfb5 !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .pos-acc-chevron {
    color: #f0dfb5 !important;
}

html[data-theme="dark"] .popup-pos-accordion-body {
    background: #1f1a14 !important;
}

html[data-theme="dark"] .popup-acc-subtitle {
    color: #ebd7a8 !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .meaning-card--secondary {
    background: #2b241d !important;
    border: 1.5px solid #473c2e !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .meaning-report-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f0dfb5 !important;
    border: 1px solid rgba(240, 223, 181, 0.28) !important;
}

html[data-theme="dark"] .meaning-report-btn:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: #f0dfb5 !important;
}

/* â”€â”€ 2. Profile VOCABULARY CUSTOMIZATION Section Dark Mode Overrides â”€â”€ */
html[data-theme="dark"] .profile-level-panel {
    background: linear-gradient(135deg, #25201a 0%, #1b1612 100%) !important;
    border: 2px solid #544535 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .profile-level-panel-head h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] .profile-level-panel-head p {
    color: #d8cebe !important;
}

html[data-theme="dark"] .profile-level-eyebrow {
    color: #d4b87b !important;
}

html[data-theme="dark"] .profile-level-active-pill {
    background: #3b3127 !important;
    color: #e7d2a3 !important;
    border-color: #544535 !important;
}

html[data-theme="dark"] .student-level-card {
    background: #25201a !important;
    border-color: #443a2f !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .student-level-card:hover {
    border-color: #e7d2a3 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .level-card-info h3 {
    color: #f5ece0 !important;
}

html[data-theme="dark"] .level-card-info p {
    color: #c4b5a2 !important;
}

html[data-theme="dark"] .level-card-icon {
    background: rgba(231, 210, 163, 0.12) !important;
    color: #e7d2a3 !important;
}

/* Selected Level Cards Dark Mode Theme Enhancements */
html[data-theme="dark"] .student-level-card--live.is-selected {
    background: linear-gradient(135deg, #3d2d15 0%, #261b0a 100%) !important;
    border: 2.5px solid #fbbf24 !important;
    box-shadow: 0 8px 28px rgba(251, 191, 36, 0.35) !important;
}

html[data-theme="dark"] .student-level-card--live.is-selected .level-card-check {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.22) !important;
    border: 1px solid rgba(251, 191, 36, 0.45) !important;
}

html[data-theme="dark"] .student-level-card--live.is-selected .level-card-info h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-level-card--live.is-selected .level-card-info p {
    color: #fde68a !important;
}

html[data-theme="dark"] .student-level-card--live.is-selected .level-card-icon {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected {
    background: linear-gradient(135deg, #133320 0%, #0a1f13 100%) !important;
    border: 2.5px solid #34d399 !important;
    box-shadow: 0 8px 28px rgba(52, 211, 153, 0.35) !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected .level-card-check {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.22) !important;
    border: 1px solid rgba(52, 211, 153, 0.45) !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected .level-card-info h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected .level-card-info p {
    color: #a7f3d0 !important;
}

html[data-theme="dark"] .student-level-card--basic.is-selected .level-card-icon {
    background: rgba(52, 211, 153, 0.2) !important;
    color: #34d399 !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected {
    background: linear-gradient(135deg, #3d2611 0%, #261608 100%) !important;
    border: 2.5px solid #f59e0b !important;
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected .level-card-check {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.22) !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected .level-card-info h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected .level-card-info p {
    color: #fde68a !important;
}

html[data-theme="dark"] .student-level-card--intermediate.is-selected .level-card-icon {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected {
    background: linear-gradient(135deg, #301742 0%, #1c0c29 100%) !important;
    border: 2.5px solid #c084fc !important;
    box-shadow: 0 8px 28px rgba(192, 132, 252, 0.35) !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected .level-card-check {
    color: #c084fc !important;
    background: rgba(192, 132, 252, 0.22) !important;
    border: 1px solid rgba(192, 132, 252, 0.45) !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected .level-card-info h3 {
    color: #ffffff !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected .level-card-info p {
    color: #e9d5ff !important;
}

html[data-theme="dark"] .student-level-card--advanced.is-selected .level-card-icon {
    background: rgba(192, 132, 252, 0.2) !important;
    color: #c084fc !important;
}

/* â”€â”€ 3. Student Notifications Bell Button: 12px Squircle Box with Full Beige Fill â”€â”€ */
.student-notif-bell-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fff6e0 0%, #ebd39b 100%) !important;
    border: 1.5px solid #d4b472 !important;
    color: #2c1e0b !important;
    box-shadow: 0 3px 12px rgba(118, 85, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.student-notif-bell-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #f5e2b4 100%) !important;
    border-color: #c9a45e !important;
    box-shadow: 0 5px 16px rgba(118, 85, 47, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.student-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 0 2px #ebd39b !important;
}

/* ── Responsive Notifications Dropdown System (Mobile, Tablet, Desktop) ── */
.admin-topnav-notif-popover {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 10px) !important;
    width: 340px !important;
    max-width: calc(100vw - 24px) !important;
    background: #ffffff !important;
    border: 1.5px solid var(--border, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 16px !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 6px 16px rgba(0, 0, 0, 0.1) !important;
    z-index: 999999 !important;
}

/* Tablet & Medium Views (<= 768px) */
@media (max-width: 768px) {

    .student-notif-dropdown-menu,
    .admin-topnav-notif-popover {
        width: 320px !important;
        max-width: calc(100vw - 24px) !important;
        right: -8px !important;
        padding: 14px !important;
    }
}

/* Mobile Devices (<= 576px) */
@media (max-width: 576px) {

    .student-notif-dropdown-menu,
    .admin-topnav-notif-popover {
        position: fixed !important;
        top: 64px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        border-radius: 18px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
        z-index: 999999 !important;
    }
}

/* â”€â”€ Topnav Action Buttons & Bell (Light Beige Brand System for BOTH Light & Dark Modes) â”€â”€ */
.student-notif-bell-btn,
.admin-topnav-notif-btn,
.top-nav-settings-btn,
.theme-toggle-btn,
.theme-toggle,
.admin-topnav-date-chip,
html[data-theme="dark"] .student-notif-bell-btn,
html[data-theme="dark"] .admin-topnav-notif-btn,
html[data-theme="dark"] .top-nav-settings-btn,
html[data-theme="dark"] .theme-toggle-btn,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .admin-topnav-date-chip {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7edd4 100%) !important;
    border: 1.5px solid #d4b87b !important;
    color: #2c221e !important;
    box-shadow: 0 3px 12px rgba(74, 50, 24, 0.08) !important;
}

.student-notif-bell-btn:hover,
.admin-topnav-notif-btn:hover,
.top-nav-settings-btn:hover,
.theme-toggle-btn:hover,
.theme-toggle:hover,
.admin-topnav-date-chip:hover,
html[data-theme="dark"] .student-notif-bell-btn:hover,
html[data-theme="dark"] .admin-topnav-notif-btn:hover,
html[data-theme="dark"] .top-nav-settings-btn:hover,
html[data-theme="dark"] .theme-toggle-btn:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .admin-topnav-date-chip:hover {
    background: #ffffff !important;
    border-color: #728164 !important;
    color: #2c221e !important;
}

.student-notif-bell-btn svg,
.admin-topnav-notif-btn svg,
.top-nav-settings-btn svg,
.theme-toggle-btn svg,
.theme-toggle svg,
html[data-theme="dark"] .student-notif-bell-btn svg,
html[data-theme="dark"] .admin-topnav-notif-btn svg,
html[data-theme="dark"] .top-nav-settings-btn svg,
html[data-theme="dark"] .theme-toggle-btn svg,
html[data-theme="dark"] .theme-toggle svg {
    color: #2c221e !important;
    stroke: #2c221e !important;
}

html[data-theme="dark"] .student-notif-badge {
    border-color: #f7edd4 !important;
    box-shadow: 0 0 0 2px #f7edd4 !important;
}

html[data-theme="dark"] .admin-topnav-notif-popover {
    background: #1b1612 !important;
    border-color: #443a2f !important;
    color: #f5ece0 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65) !important;
}

/* â”€â”€ Badges & Streaks Page 3-Brand-Color Design System (Light Beige, Dark Taupe, Sage Green) â”€â”€ */
.student-badges-hero {
    background: linear-gradient(135deg, #e7d2a3 0%, #f0dfb5 35%, #e3cc99 70%, #d8bb82 100%) !important;
    border: 2px solid #9d7948 !important;
    color: #251a10 !important;
}

.awarded-badge-card-v2,
.awarded-badge {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7edd4 100%) !important;
    border: 2px solid #d4b87b !important;
    box-shadow: 0 8px 24px rgba(74, 50, 24, 0.1) !important;
}

.awarded-badge:hover,
.awarded-badge-card-v2:hover {
    transform: translateY(-3px) !important;
    border-color: #728164 !important;
    box-shadow: 0 12px 30px rgba(114, 129, 100, 0.2) !important;
}

.badge-type-pill-v2,
.awarded-badge-type {
    background: #728164 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
}

.badge-unlocked-pill-v2,
.awarded-badge-check,
.status-pill--unlocked {
    background: #e7d2a3 !important;
    color: #251a10 !important;
    border: 1px solid #c7b080 !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
}

.emblem-3d-circle,
.available-3d-circle {
    background: linear-gradient(135deg, #ebd7a8 0%, #c7b080 100%) !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 6px 18px rgba(74, 50, 24, 0.18) !important;
}

.awarded-badge-name,
.badge-v2-name {
    color: #251a10 !important;
    font-weight: 800 !important;
}

.awarded-badge-target,
.badge-v2-target {
    color: #6b5c4d !important;
}

.awarded-time-chip {
    background: rgba(114, 129, 100, 0.12) !important;
    color: #48543f !important;
    border: 1px solid rgba(114, 129, 100, 0.28) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
}

/* Available Milestone Cards */
.available-card-top {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

.available-badge-card {
    background: #ffffff !important;
    border: 1.5px solid #e6decb !important;
    border-radius: 18px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.available-badge-card:hover {
    transform: translateY(-3px) !important;
    border-color: #728164 !important;
    box-shadow: 0 8px 24px rgba(114, 129, 100, 0.16) !important;
}

.available-badge-card--unlocked {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7edd4 100%) !important;
    border: 2px solid #728164 !important;
}

.available-type-pill {
    background: #e8dfd0 !important;
    color: #251a10 !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
}

.status-pill--locked {
    background: #efe8db !important;
    color: #6b5c4d !important;
    border: 1px solid #dcd3c3 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
}

/* How Awards Work Pipeline & Track Infographics */
.badge-howto-v2 {
    background: linear-gradient(135deg, #fdfbf7 0%, #f4efe6 100%) !important;
    border: 1.5px solid #e6decb !important;
    border-radius: 20px !important;
    padding: 24px 28px !important;
}

.badge-howto-eyebrow {
    color: #728164 !important;
    font-weight: 800 !important;
}

.step-num-badge {
    background: #728164 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

.pipeline-step-card {
    background: #ffffff !important;
    border: 1.5px solid #e6decb !important;
    border-radius: 14px !important;
}

.badge-track--hours {
    border-left: 4px solid #728164 !important;
    background: #ffffff !important;
}

.badge-track--days {
    border-left: 4px solid #d4b87b !important;
    background: #ffffff !important;
}

/* Dark Mode 3-Brand-Color Badges Overrides */
html[data-theme="dark"] .student-badges-hero {
    background: linear-gradient(135deg, rgba(114, 129, 100, 0.2) 0%, rgba(37, 26, 16, 0.4) 100%) !important;
    border-color: rgba(114, 129, 100, 0.35) !important;
}

html[data-theme="dark"] .awarded-badge-card-v2,
html[data-theme="dark"] .awarded-badge,
html[data-theme="dark"] .available-badge-card--unlocked {
    background: linear-gradient(135deg, #2b241d 0%, #1e1913 100%) !important;
    border-color: #d4b87b !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .badge-howto-v2,
html[data-theme="dark"] .available-badge-card {
    background: #25201a !important;
    border-color: #443a2f !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .pipeline-step-card,
html[data-theme="dark"] .badge-track {
    background: #2c251e !important;
    border-color: #443a2f !important;
    color: #f5ece0 !important;
}

/* â”€â”€ Student Reader Hero Toolbar & Article Body Dark Mode Styling â”€â”€ */
html[data-theme="dark"] .student-reader-toolbar {
    background: linear-gradient(135deg, #2b231a 0%, #1e1812 100%) !important;
    border: 1.5px solid #483a2a !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    padding: 14px 18px !important;
}

html[data-theme="dark"] .now-reading-icon-badge {
    background: linear-gradient(135deg, #e7d2a3 0%, #d4b882 100%) !important;
    color: #251a10 !important;
    border-color: #544535 !important;
}

html[data-theme="dark"] .student-reader-eyebrow {
    color: #f0dfb5 !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .student-level-stepper {
    background: #282017 !important;
    background-color: #282017 !important;
    border: 1.5px solid #544535 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .student-active-level-badge {
    background: transparent !important;
    color: #f0dfb5 !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .level-stepper-btn {
    background: #3c3125 !important;
    background-color: #3c3125 !important;
    border: 1px solid #584838 !important;
    color: #f0dfb5 !important;
}

html[data-theme="dark"] .level-stepper-btn:hover {
    background: #4a3d2e !important;
    border-color: #d4b87b !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .article-reader-card,
html[data-theme="dark"] .article-reader-card--student,
html[data-theme="dark"] .preview-shell,
html[data-theme="dark"] .preview-top,
html[data-theme="dark"] .article-reader-body-shell,
html[data-theme="dark"] .article-sequence-panel-wrap,
html[data-theme="dark"] .preview-body,
html[data-theme="dark"] .article-body,
html[data-theme="dark"] .article-level-body {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .article-title,
html[data-theme="dark"] .article-reader-card h1,
html[data-theme="dark"] .article-reader-card h2,
html[data-theme="dark"] .article-reader-card h3,
html[data-theme="dark"] .article-reader-card h4 {
    color: #ffffff !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] .article-body,
html[data-theme="dark"] .preview-body {
    color: #e2e8f0;
}

html[data-theme="dark"] .article-body p,
html[data-theme="dark"] .article-body div,
html[data-theme="dark"] .article-body li,
html[data-theme="dark"] .preview-body p {
    color: inherit;
    line-height: 1.9;
}

html[data-theme="dark"] .article-body h1,
html[data-theme="dark"] .article-body h2,
html[data-theme="dark"] .article-body h3,
html[data-theme="dark"] .article-body h4,
html[data-theme="dark"] .article-body h5,
html[data-theme="dark"] .article-body h6,
html[data-theme="dark"] .preview-body h1,
html[data-theme="dark"] .preview-body h2,
html[data-theme="dark"] .preview-body h3,
html[data-theme="dark"] .preview-body h4,
html[data-theme="dark"] .preview-body h5,
html[data-theme="dark"] .preview-body h6 {
    color: #ffffff;
    font-weight: 800;
}

html[data-theme="dark"] .article-body em,
html[data-theme="dark"] .article-body i,
html[data-theme="dark"] .preview-body em,
html[data-theme="dark"] .preview-body i {
    color: #94a3b8;
}

html[data-theme="dark"] .article-body strong,
html[data-theme="dark"] .article-body b,
html[data-theme="dark"] .preview-body strong,
html[data-theme="dark"] .preview-body b {
    color: #ffffff;
}

html[data-theme="dark"] .article-body blockquote {
    background: #1a2234 !important;
    border-left: 4px solid #3b82f6 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .header-level-select,
html[data-theme="dark"] .level-reset-btn,
html[data-theme="dark"] .glossary-expand-floating-btn {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .level-reset-btn:hover,
html[data-theme="dark"] .glossary-expand-floating-btn:hover {
    background: #334155 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* â”€â”€ All Platform Hero Sections (Light Beige Brand System for BOTH Light & Dark Modes) â”€â”€ */
.lb-hero-cosmic,
.student-articles-hero,
.student-tests-hero,
.student-badges-hero,
.student-welcome-hero,
.admin-hero,
.admin-hero--compact,
html[data-theme="dark"] .lb-hero-cosmic,
html[data-theme="dark"] .student-articles-hero,
html[data-theme="dark"] .student-tests-hero,
html[data-theme="dark"] .student-badges-hero,
html[data-theme="dark"] .student-welcome-hero,
html[data-theme="dark"] .admin-hero,
html[data-theme="dark"] .admin-hero--compact {
    background: linear-gradient(135deg, #f7edd4 0%, #ebd7a8 40%, #f4e7c7 80%, #dfc790 100%) !important;
    border: 2px solid #d4b87b !important;
    color: #2c221e !important;
    box-shadow: 0 8px 28px rgba(74, 50, 24, 0.12) !important;
}

.lb-hero-title,
.hero-title,
.admin-hero h1,
html[data-theme="dark"] .lb-hero-title,
html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .admin-hero h1 {
    color: #2c221e !important;
    font-weight: 800 !important;
}

.lb-hero-subtitle,
.hero-subtitle,
.admin-hero p,
.lb-breadcrumb a,
.lb-breadcrumb .is-current,
html[data-theme="dark"] .lb-hero-subtitle,
html[data-theme="dark"] .hero-subtitle,
html[data-theme="dark"] .admin-hero p,
html[data-theme="dark"] .lb-breadcrumb a,
html[data-theme="dark"] .lb-breadcrumb .is-current {
    color: #5c4d40 !important;
}

.lb-hero-stat-card,
.hero-stats-card,
html[data-theme="dark"] .lb-hero-stat-card,
html[data-theme="dark"] .hero-stats-card {
    background: rgba(253, 251, 247, 0.92) !important;
    border: 1.5px solid #d4b87b !important;
    color: #2c221e !important;
    box-shadow: 0 4px 14px rgba(74, 50, 24, 0.08) !important;
}

.lb-stat-icon-wrap,
html[data-theme="dark"] .lb-stat-icon-wrap {
    background: #f7edd4 !important;
    color: #2c221e !important;
    border: 1.5px solid #d4b87b !important;
}

.lb-stat-number,
.stat-count-completed,
html[data-theme="dark"] .lb-stat-number,
html[data-theme="dark"] .stat-count-completed {
    color: #2c221e !important;
    font-weight: 800 !important;
}

.lb-stat-label,
.stat-count-label,
html[data-theme="dark"] .lb-stat-label,
html[data-theme="dark"] .stat-count-label {
    color: #5c4d40 !important;
}

.lb-stat-level-chip,
.hero-eyebrow-badge,
.stats-card-badge,
html[data-theme="dark"] .lb-stat-level-chip,
html[data-theme="dark"] .hero-eyebrow-badge,
html[data-theme="dark"] .stats-card-badge {
    background: #f7edd4 !important;
    border: 1px solid #d4b87b !important;
    color: #2c221e !important;
    font-weight: 800 !important;
}

.lb-hero-btn--ghost,
html[data-theme="dark"] .lb-hero-btn--ghost {
    background: #f7edd4 !important;
    border: 1.5px solid #d4b87b !important;
    color: #2c221e !important;
}

.lb-hero-btn--ghost:hover,
html[data-theme="dark"] .lb-hero-btn--ghost:hover {
    background: #ffffff !important;
    border-color: #728164 !important;
    color: #2c221e !important;
}

/* â”€â”€ Live Streak Banner (Light Mode & Dark Mode Styling) â”€â”€ */
.live-streak-banner-container {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7edd4 100%);
    border: 1.5px solid #d4b87b;
    border-radius: 20px;
    padding: 22px 26px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(74, 50, 24, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.live-streak-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-streak-flame-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #f7edd4;
    border: 1.5px solid #d4b87b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(74, 50, 24, 0.12);
}

.live-streak-title {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #728164;
}

.live-streak-days {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2c221e;
    line-height: 1.1;
}

.live-streak-sub {
    font-size: 0.82rem;
    color: #6b5c4d;
    margin-top: 2px;
}

.live-streak-goal-card {
    min-width: 260px;
    flex: 1;
    max-width: 400px;
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1.5px solid #d4b87b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.live-streak-goal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.live-streak-goal-title {
    color: #2c221e;
}

.live-streak-goal-completed,
.live-streak-goal-mins {
    color: #728164;
    font-weight: 800;
}

.live-streak-goal-track {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: #efe8db;
    overflow: hidden;
    margin-bottom: 6px;
}

.live-streak-goal-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.live-streak-goal-sub {
    font-size: 0.76rem;
    color: #6b5c4d;
    font-weight: 600;
}

/* Dark Mode Streak Overrides */
html[data-theme="dark"] .live-streak-banner-container {
    background: linear-gradient(135deg, #2b231a 0%, #1e1812 100%) !important;
    border: 1.5px solid #483a2a !important;
    color: #f5ece0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .live-streak-flame-box {
    background: #392f24 !important;
    border: 1.5px solid #544535 !important;
}

html[data-theme="dark"] .live-streak-title {
    color: #f0dfb5 !important;
}

html[data-theme="dark"] .live-streak-days {
    color: #ffffff !important;
}

html[data-theme="dark"] .live-streak-sub {
    color: #d8cebe !important;
}

html[data-theme="dark"] .live-streak-goal-card {
    background: #25201a !important;
    border: 1.5px solid #443a2f !important;
    color: #f5ece0 !important;
}

html[data-theme="dark"] .live-streak-goal-title {
    color: #ffffff !important;
}

html[data-theme="dark"] .live-streak-goal-completed,
html[data-theme="dark"] .live-streak-goal-mins {
    color: #9bb094 !important;
}

html[data-theme="dark"] .live-streak-goal-track {
    background: #382e24 !important;
}

html[data-theme="dark"] .live-streak-goal-sub {
    color: #d8cebe !important;
}

/* â”€â”€ Top User Profile Pill (Light Beige Brand System for BOTH Light & Dark Modes) â”€â”€ */
.student-topnav-user-toggle,
.admin-topnav-user-toggle,
.student-topnav-streak-link,
html[data-theme="dark"] .student-topnav-user-toggle,
html[data-theme="dark"] .admin-topnav-user-toggle,
html[data-theme="dark"] .student-topnav-streak-link {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7edd4 100%) !important;
    border: 1.5px solid #d4b87b !important;
    color: #2c221e !important;
    box-shadow: 0 3px 12px rgba(74, 50, 24, 0.08) !important;
}

.student-topnav-user-text strong,
.admin-topnav-user-text strong,
.student-topnav-user-text span,
.admin-topnav-user-text span,
.streak-pill-text,
html[data-theme="dark"] .student-topnav-user-text strong,
html[data-theme="dark"] .admin-topnav-user-text strong,
html[data-theme="dark"] .student-topnav-user-text span,
html[data-theme="dark"] .admin-topnav-user-text span,
html[data-theme="dark"] .streak-pill-text {
    color: #2c221e !important;
}

.student-topnav-avatar,
.admin-topnav-avatar,
html[data-theme="dark"] .student-topnav-avatar,
html[data-theme="dark"] .admin-topnav-avatar {
    background: #ebd7a8 !important;
    border: 1.5px solid #c7b080 !important;
    color: #2c221e !important;
    font-weight: 800 !important;
}

.article-reader-body-shell {
    perspective: 2500px;
    transform-style: preserve-3d;
    position: relative;
    overflow: visible;
    /* Let the rotating page pop out visually */
}

/* Center book spine crease fold line */
.article-reader-body-shell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04) 60%, transparent);
    z-index: 15;
    pointer-events: none;
    border-radius: 4px 0 0 4px;
}

.article-level-body {
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transform-origin: left center;
}

/* Active Resting Book Page: Inner Spine Fold Shadow & Page Crease */
.article-level-body.is-active {
    position: relative;
    box-shadow: inset 14px 0 18px -8px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Active Resting Book Page: Top-Right Corner Page Curl & Fold Shading */
.article-level-body.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 65%, rgba(0, 0, 0, 0.02) 82%, rgba(0, 0, 0, 0.06) 100%);
    pointer-events: none;
    z-index: 5;
    border-radius: 0 12px 0 0;
}

/* Page curl shading overlay */
.article-level-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.2s ease;
}

/* Forward transition: Right to Left flip */
.article-level-body.page-flip-out-forward {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    transform-origin: left center;
    animation: pageFlipOutForward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}

.article-level-body.page-flip-in-forward {
    z-index: 1;
    transform-origin: left center;
    animation: pageFlipInForward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.article-level-body.page-flip-out-forward::after {
    opacity: 1;
    animation: pageCurlShadowForward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Backward transition: Left to Right flip */
.article-level-body.page-flip-out-backward {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    transform-origin: right center;
    animation: pageFlipOutBackward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}

.article-level-body.page-flip-in-backward {
    z-index: 1;
    transform-origin: right center;
    animation: pageFlipInBackward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.article-level-body.page-flip-out-backward::after {
    opacity: 1;
    animation: pageCurlShadowBackward 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Keyframes for Forward Flip (Right to Left) */
@keyframes pageFlipOutForward {
    0% {
        transform: perspective(2500px) rotateY(0deg) rotateZ(0deg) rotateX(0deg) skewY(0deg) translateZ(0px) scale(1);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        border-radius: 4px;
        opacity: 1;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
    }

    22% {
        transform: perspective(2200px) rotateY(-42deg) rotateZ(-12deg) rotateX(20deg) skewY(-16deg) translateZ(125px) scaleX(0.85);
        clip-path: polygon(0% 0%, 45% 2%, 78% 10%, 94% 28%, 100% 50%, 94% 72%, 78% 90%, 45% 98%, 0% 100%);
        border-radius: 4px 50% 50% 4px / 4px 140px 140px 4px;
        box-shadow: -50px 38px 80px rgba(0, 0, 0, 0.45);
    }

    50% {
        transform: perspective(2200px) rotateY(-95deg) rotateZ(-7deg) rotateX(12deg) skewY(-10deg) translateZ(80px) scaleX(0.90);
        clip-path: polygon(0% 0%, 55% 1%, 84% 6%, 96% 20%, 100% 50%, 96% 80%, 84% 94%, 55% 99%, 0% 100%);
        border-radius: 4px 40% 40% 4px / 4px 100px 100px 4px;
        box-shadow: -32px 24px 56px rgba(0, 0, 0, 0.32);
        opacity: 1;
    }

    75% {
        transform: perspective(2200px) rotateY(-148deg) rotateZ(-3deg) rotateX(5deg) skewY(-4deg) translateZ(35px) scaleX(0.95);
        clip-path: polygon(0% 0%, 75% 0%, 92% 3%, 98% 12%, 100% 50%, 98% 88%, 92% 97%, 75% 100%, 0% 100%);
        border-radius: 4px 20% 20% 4px / 4px 50px 50px 4px;
        box-shadow: -18px 14px 32px rgba(0, 0, 0, 0.20);
        opacity: 1;
    }

    88% {
        transform: perspective(2200px) rotateY(-172deg) rotateZ(-1deg) rotateX(2deg) skewY(-1deg) translateZ(10px) scaleX(0.99);
        clip-path: polygon(0% 0%, 95% 0%, 99% 1%, 100% 50%, 99% 99%, 95% 100%, 0% 100%);
        border-radius: 4px 8% 8% 4px;
        opacity: 0.95;
    }

    100% {
        transform: perspective(2500px) rotateY(-180deg) rotateZ(0deg) rotateX(0deg) skewY(0deg) translateZ(0px) scale(1);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        border-radius: 4px;
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes pageFlipInForward {
    0% {
        transform: perspective(2500px) rotateY(180deg) rotateZ(0deg) rotateX(0deg);
        opacity: 0;
    }

    35% {
        opacity: 0.15;
    }

    82% {
        transform: perspective(2500px) rotateY(-2.5deg) rotateZ(0.6deg) skewY(0.4deg);
        opacity: 0.95;
    }

    100% {
        transform: perspective(2500px) rotateY(0deg) rotateZ(0deg) rotateX(0deg) skewY(0deg);
        opacity: 1;
    }
}

@keyframes pageCurlShadowForward {
    0% {
        background: linear-gradient(115deg, rgba(0, 0, 0, 0) 15%, rgba(255, 255, 255, 0.7) 40%, rgba(0, 0, 0, 0.4) 58%, rgba(255, 255, 255, 0.45) 75%, rgba(0, 0, 0, 0) 100%);
        background-position: 100% 0;
        background-size: 250% 100%;
    }

    45% {
        background: linear-gradient(115deg, rgba(0, 0, 0, 0.42) 0%, rgba(255, 255, 255, 0.55) 18%, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0) 65%);
        background-position: 50% 0;
        background-size: 250% 100%;
    }

    100% {
        background: linear-gradient(115deg, rgba(0, 0, 0, 0.25) 0%, rgba(255, 255, 255, 0.2) 10%, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0) 60%);
        background-position: 0% 0;
        background-size: 250% 100%;
    }
}

/* Keyframes for Backward Flip (Left to Right) */
@keyframes pageFlipOutBackward {
    0% {
        transform: perspective(2500px) rotateY(0deg) rotateZ(0deg) rotateX(0deg) skewY(0deg) translateZ(0px) scale(1);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        border-radius: 4px;
        opacity: 1;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
    }

    22% {
        transform: perspective(2200px) rotateY(42deg) rotateZ(12deg) rotateX(20deg) skewY(16deg) translateZ(125px) scaleX(0.85);
        clip-path: polygon(55% 2%, 100% 0%, 100% 100%, 55% 98%, 22% 90%, 6% 72%, 0% 50%, 6% 28%, 22% 10%);
        border-radius: 50% 4px 4px 50% / 140px 4px 4px 140px;
        box-shadow: 50px 38px 80px rgba(0, 0, 0, 0.45);
    }

    50% {
        transform: perspective(2200px) rotateY(95deg) rotateZ(7deg) rotateX(12deg) skewY(10deg) translateZ(80px) scaleX(0.90);
        clip-path: polygon(45% 1%, 100% 0%, 100% 100%, 45% 99%, 16% 94%, 4% 80%, 0% 50%, 4% 20%, 16% 6%);
        border-radius: 40% 4px 4px 40% / 100px 4px 4px 100px;
        box-shadow: 32px 24px 56px rgba(0, 0, 0, 0.32);
        opacity: 1;
    }

    75% {
        transform: perspective(2200px) rotateY(148deg) rotateZ(3deg) rotateX(5deg) skewY(4deg) translateZ(35px) scaleX(0.95);
        clip-path: polygon(25% 0%, 100% 0%, 100% 100%, 25% 100%, 8% 97%, 2% 88%, 0% 50%, 2% 12%, 8% 3%);
        border-radius: 20% 4px 4px 20% / 50px 4px 4px 50px;
        box-shadow: 18px 14px 32px rgba(0, 0, 0, 0.20);
        opacity: 1;
    }

    88% {
        transform: perspective(2200px) rotateY(172deg) rotateZ(1deg) rotateX(2deg) skewY(1deg) translateZ(10px) scaleX(0.99);
        clip-path: polygon(5% 0%, 100% 0%, 100% 100%, 5% 100%, 1% 99%, 0% 50%, 1% 1%);
        border-radius: 8% 4px 4px 8%;
        opacity: 0.95;
    }

    100% {
        transform: perspective(2500px) rotateY(180deg) rotateZ(0deg) rotateX(0deg) skewY(0deg) translateZ(0px) scale(1);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        border-radius: 4px;
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes pageFlipInBackward {
    0% {
        transform: perspective(2500px) rotateY(-180deg) rotateZ(0deg) rotateX(0deg);
        opacity: 0;
    }

    35% {
        opacity: 0.15;
    }

    82% {
        transform: perspective(2500px) rotateY(2.5deg) rotateZ(-0.6deg) skewY(-0.4deg);
        opacity: 0.95;
    }

    100% {
        transform: perspective(2500px) rotateY(0deg) rotateZ(0deg) rotateX(0deg) skewY(0deg);
        opacity: 1;
    }
}

@keyframes pageCurlShadowBackward {
    0% {
        background: linear-gradient(-115deg, rgba(0, 0, 0, 0) 15%, rgba(255, 255, 255, 0.7) 40%, rgba(0, 0, 0, 0.4) 58%, rgba(255, 255, 255, 0.45) 75%, rgba(0, 0, 0, 0) 100%);
        background-position: 0% 0;
        background-size: 250% 100%;
    }

    45% {
        background: linear-gradient(-115deg, rgba(0, 0, 0, 0.42) 0%, rgba(255, 255, 255, 0.55) 18%, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0) 65%);
        background-position: 50% 0;
        background-size: 250% 100%;
    }

    100% {
        background: linear-gradient(-115deg, rgba(0, 0, 0, 0.25) 0%, rgba(255, 255, 255, 0.2) 10%, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0) 60%);
        background-position: 0% 0;
        background-size: 250% 100%;
    }
}

/* â”€â”€ Layout Footer Styling â”€â”€ */
.app-footer {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    margin-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.footer-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

.footer-link:hover {
    color: var(--primary-hover, var(--primary));
    text-decoration: underline;
}

/* Light / dark theme border adaptivity */
html[data-theme="light"] .app-footer {
    border-top-color: color-mix(in srgb, var(--border) 80%, black);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-footer {
        margin-top: 12px;
        padding: 10px 16px;
        font-size: 0.76rem;
    }
}

/* â”€â”€ Meaning Action Tool Buttons (Edit, Delete, History - Compact Icon Only) â”€â”€ */
.meaning-item-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin-left: 6px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

.btn-meaning-tool {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    border: 1px solid var(--border, #cbd5e1) !important;
    background: var(--surface, #ffffff) !important;
    color: var(--ink-muted, #64748b) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    flex: 0 0 auto !important;
    box-shadow: none !important;
}

.btn-meaning-tool svg {
    width: 12px !important;
    height: 12px !important;
    display: block !important;
    stroke-width: 2.2 !important;
    pointer-events: none !important;
}

.btn-meaning-tool:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

.btn-meaning-tool:hover svg {
    transform: scale(1.1);
}

.btn-meaning-edit:hover {
    border-color: #818cf8;
    color: #4f46e5;
    background: #eef2ff;
}

.btn-meaning-delete:hover {
    border-color: #fca5a5;
    color: #ef4444;
    background: #fef2f2;
}

.btn-meaning-history:hover {
    border-color: #7dd3fc !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
}

/* â”€â”€ Meaning Action Modals Stacking Order (Always In Front of Highlights Popup) â”€â”€ */
.meaning-action-modal-backdrop {
    z-index: 100080 !important;
}

.meaning-action-modal {
    z-index: 100090 !important;
}

/* â”€â”€ Vocabulary Meaning Status Badges (Edited & Deletion Pending) â”€â”€ */
.vocab-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
    margin-left: 3px !important;
    letter-spacing: 0.02em !important;
}

.vocab-status-badge--pending-delete {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5 !important;
}

.vocab-status-badge--edited {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid #a5b4fc !important;
}

.vocab-card-status-chip {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
}

.vocab-card-status-chip--del {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.vocab-card-status-chip--edit {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4338ca !important;
    border: 1px solid rgba(79, 70, 229, 0.3) !important;
}

/* â”€â”€ Admin Panel Full Mobile Responsiveness â”€â”€ */
@media (max-width: 768px) {
    .admin-hero {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 14px;
        padding: 18px 20px !important;
    }

    .admin-hero-actions {
        width: 100%;
        display: flex;
    }

    .admin-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-filter-row {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .admin-filter-field {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }

    .admin-filter-row .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .pending-deletions-card {
        padding: 16px 14px !important;
    }

    .pending-deletions-card>div:first-child {
        flex-direction: column;
        align-items: flex-start !important;
    }

    #deletionBulkActions {
        width: 100%;
        flex-direction: column;
        gap: 6px !important;
    }

    #deletionBulkActions .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-panel-head {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .admin-panel-head-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-panel-head-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-hero-copy h1 {
        font-size: 1.5rem !important;
    }

    .student-kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .admin-topnav-title strong {
        font-size: 1rem !important;
    }

    .admin-topnav-search-wrap {
        max-width: 100% !important;
    }
}

/* â”€â”€ Top Nav Profile Button & Avatar Shapes (Non-Circular Rounded Rectangles for Desktop & Mobile) â”€â”€ */
.admin-topnav-avatar,
.student-topnav-avatar,
img.admin-topnav-avatar,
img.student-topnav-avatar,
html[data-theme="dark"] .admin-topnav-avatar {
    border-radius: 10px !important;
}

html[data-theme="dark"] .student-topnav-avatar {
    border-radius: 50% !important;
}

.admin-topnav-user-toggle,
html[data-theme="dark"] .admin-topnav-user-toggle {
    border-radius: 12px !important;
}

.student-topnav-user-toggle,
.student-topnav-actions--has-settings .student-topnav-user-toggle,
html[data-theme="dark"] .student-topnav-user-toggle {
    border-radius: 50% !important;
}

/* â”€â”€ Full Mobile Responsiveness for /admin/pos/search and /admin/pos Lexicon â”€â”€ */
@media (max-width: 768px) {

    /* Touch-Scrollable Category Tabs Bar in 1 Single Line */
    .pos-lexicon-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px !important;
        margin-bottom: 12px !important;
        scrollbar-width: none !important;
        gap: 6px !important;
    }

    .pos-lexicon-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .pos-lexicon-tab {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 6px 14px !important;
        font-size: 0.84rem !important;
        border-radius: 999px !important;
    }

    /* Hero Header Stacking */
    .admin-hero-actions {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .admin-hero-actions .btn,
    .admin-hero-actions .admin-meta-chip {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Panel Head & Search Controls */
    .admin-panel-toolbar {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .admin-search-form,
    label.admin-search {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Pending Deletions Container Card Layout */
    .pending-deletions-card {
        padding: 14px 16px !important;
        border-radius: 14px !important;
        margin-bottom: 16px !important;
    }

    .pending-deletions-card>div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #deletionBulkActions {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    #deletionBulkActions .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .pending-deletions-card table thead {
        display: none !important;
    }

    .pending-deletions-card table,
    .pending-deletions-card table tbody {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .pending-deletions-card table tr {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px !important;
        border: 1px solid #ded7c8 !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        gap: 10px !important;
    }

    .pending-deletions-card table td:nth-child(1) {
        flex: 0 0 auto !important;
        padding: 0 !important;
        border: none !important;
    }

    .pending-deletions-card table td:nth-child(2) {
        flex: 1 !important;
        padding: 0 !important;
        border: none !important;
        white-space: normal !important;
    }

    .pending-deletions-card table td:nth-child(4),
    .pending-deletions-card table td:nth-child(5) {
        flex: 0 0 auto !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.78rem !important;
    }

    .pending-deletions-card table td:nth-child(3) {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 12px !important;
        border: 1px solid #eee7d9 !important;
        border-radius: 10px !important;
        background: #fdfbf7 !important;
        color: #374151 !important;
        font-style: italic !important;
        font-size: 0.86rem !important;
        line-height: 1.45 !important;
        box-sizing: border-box !important;
    }

    .pending-deletions-card table td:nth-child(6) {
        flex: 0 0 100% !important;
        width: 100% !important;
        padding: 4px 0 0 !important;
        border: none !important;
        text-align: left !important;
        display: flex !important;
        gap: 8px !important;
    }

    .pending-deletions-card table td:nth-child(6) button {
        flex: 1 !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }
}

@media (max-width: 720px) {

    /* POS Search Results Mobile Cards (Clean Vocabulary Card Design) */
    #pos-search-table-wrap {
        max-height: none !important;
        overflow: visible !important;
    }

    #pos-search-table-wrap .employee-data-table thead {
        display: none !important;
    }

    #pos-search-table-wrap .employee-data-table,
    #pos-search-table-wrap .employee-data-table tbody {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }

    #pos-search-table-wrap .employee-data-table tr {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
        border: 1px solid var(--border) !important;
        border-radius: 16px !important;
        background: var(--surface) !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
        gap: 8px !important;
    }

    /* Remove ugly data-label uppercase pseudo headers */
    #pos-search-table-wrap .employee-data-table td::before {
        display: none !important;
    }

    /* Word and POS Header Line inside Card */
    #pos-search-table-wrap .employee-data-table td.col-word,
    #pos-search-table-wrap .employee-data-table td[data-label="POS"] {
        display: inline-flex !important;
        padding: 0 !important;
        border-bottom: none !important;
        width: auto !important;
        min-width: 0 !important;
    }

    #pos-search-table-wrap .employee-data-table td.col-word {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: var(--ink) !important;
        flex: 1 !important;
    }

    #pos-search-table-wrap .employee-data-table td[data-label="POS"] {
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }

    /* Meaning Paragraph Body */
    #pos-search-table-wrap .employee-data-table td[data-label="Meaning"] {
        display: block !important;
        padding: 8px 0 10px !important;
        border-top: 1px dashed var(--border) !important;
        border-bottom: 1px dashed var(--border) !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        font-size: 0.9rem !important;
        color: var(--ink) !important;
        line-height: 1.5 !important;
        text-align: left !important;
        margin: 2px 0 !important;
    }

    /* Action Buttons Row */
    #pos-search-table-wrap .employee-data-table td[data-label="Action"],
    #pos-search-table-wrap .employee-data-table td.col-action {
        display: flex !important;
        padding: 2px 0 0 !important;
        border-bottom: none !important;
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    #pos-search-table-wrap .employee-data-table td[data-label="Action"] .row-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #pos-search-table-wrap .employee-data-table td[data-label="Action"] .btn {
        flex: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 9px 14px !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 576px) {

    /* Responsive Pagination Footer */
    #pos-search-pagination,
    .admin-pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 14px 10px !important;
        margin-top: 16px !important;
    }

    #pos-search-pagination .admin-page-meta,
    .admin-pagination .admin-page-meta {
        width: 100% !important;
        text-align: center !important;
        order: -1 !important;
        font-size: 0.82rem !important;
        color: var(--ink-muted) !important;
        display: block !important;
        margin-bottom: 2px !important;
    }

    #pos-search-pagination .admin-page-btn,
    .admin-pagination .admin-page-btn {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        min-width: 100px !important;
        max-width: 160px !important;
        padding: 8px 16px !important;
    }

    /* POS Word Details Modal */
    .pos-modal-backdrop {
        padding: 10px !important;
    }

    .pos-modal-card {
        width: calc(100vw - 20px) !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 18px !important;
        margin: 0 auto !important;
    }

    #posModalFieldsGrid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* =========================================================
   STUDENT DASHBOARD LIGHT MODE REDESIGN (SAGE GREEN THEME)
   ========================================================= */

body.student-shell,
.student-layout,
.student-main,
.student-content-wrap {
    background-color: #ffffff !important;
}

.student-dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* â”€â”€ Top Header Navigation Bar â”€â”€ */
.student-topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e6eaf2;
}

.student-topnav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.student-topnav-brand {
    display: flex;
    align-items: center;
}

.student-topnav-logo-link img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.student-topnav-logo-text {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #141b2d;
    text-decoration: none;
}

.student-topnav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #5c6478;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-pill-item:hover {
    color: #141b2d;
    background: #f4f6fb;
}

.nav-pill-item.active {
    background: #f3e8ff;
    color: #9333ea;
    font-weight: 700;
}

.student-topnav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.student-topnav-streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed;
    border: 1px solid #ffedd5;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ea580c;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.student-topnav-streak-pill:hover {
    transform: translateY(-1px);
}

.student-notif-bell-btn-modern {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e6eaf2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c6478;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.student-notif-bell-btn-modern:hover {
    color: #141b2d;
    border-color: #d4dae6;
    background: #f8fafc;
}

.student-notif-badge-pill {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 99px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
}

.student-theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e6eaf2;
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #5c6478;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-theme-toggle-btn:hover {
    color: #141b2d;
    background: #f8fafc;
}

/* â”€â”€ Hero Welcome Banner â”€â”€ */
.student-welcome {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3d4a37 0%, #4a5744 50%, #63725a 100%) !important;
    border-radius: 24px;
    padding: 40px 48px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 16px 40px rgba(45, 60, 35, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.student-welcome-text {
    max-width: 580px;
    z-index: 2;
}

.student-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffffff;
    margin-bottom: 12px;
}

.welcome-bg-arcs {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.student-welcome-lead {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.student-welcome-name {
    font-weight: 800;
    color: #ffffff;
}

@keyframes waveHand {
    0% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(14deg);
    }

    30% {
        transform: rotate(-8deg);
    }

    45% {
        transform: rotate(14deg);
    }

    60% {
        transform: rotate(-4deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.student-welcome-wave-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transform-origin: 75% 75%;
    animation: waveHand 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.5));
}

.student-welcome-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.7rem;
    font-weight: 700;
    line-height: 1.18;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: -0.02em;
}

.title-highlight {
    color: #f472b6;
    position: relative;
    display: inline-block;
}

.swoop-underline {
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 100%;
    height: auto;
    overflow: visible;
    pointer-events: none;
}

.student-welcome-graphic {
    width: 380px;
    height: auto;
    z-index: 2;
}

.welcome-3d-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Sequential Page-by-Page Reading Animation */
@keyframes pageTurnSeq {
    0% {
        transform: rotate(0deg) translateY(0px) scaleX(1);
        opacity: 0.1;
    }

    15% {
        opacity: 0.95;
    }

    50% {
        transform: rotate(-6deg) translateY(-8px) scaleX(0.92);
        opacity: 1;
    }

    85% {
        opacity: 0.95;
    }

    100% {
        transform: rotate(-12deg) translateY(-2px) scaleX(0.85);
        opacity: 0.15;
    }
}

.seq-page-animated {
    transform-origin: 198px 90px;
    animation: pageTurnSeq 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.page-turn-1 {
    animation-delay: 0s;
}

.page-turn-2 {
    animation-delay: 1.6s;
}

.page-turn-3 {
    animation-delay: 3.2s;
}

/* Book Light Highlight Pulse */
@keyframes bookLightPulse {
    0% {
        opacity: 0.55;
    }

    50% {
        opacity: 0.85;
    }

    100% {
        opacity: 0.55;
    }
}

.book-light-highlight {
    animation: bookLightPulse 3s ease-in-out infinite;
}

/* Lamp Light Glow Pulse Animation */
@keyframes lampPulse {
    0% {
        opacity: 0.85;
        filter: drop-shadow(0 0 6px rgba(253, 224, 71, 0.4));
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(253, 224, 71, 0.95));
    }

    100% {
        opacity: 0.85;
        filter: drop-shadow(0 0 6px rgba(253, 224, 71, 0.4));
    }
}

.lamp-bulb-glow {
    animation: lampPulse 3s ease-in-out infinite;
}

@keyframes coneShimmer {
    0% {
        opacity: 0.78;
    }

    50% {
        opacity: 0.95;
    }

    100% {
        opacity: 0.78;
    }
}

.lamp-light-cone {
    animation: coneShimmer 3s ease-in-out infinite;
}

/* Floating Light Dust Particles */
@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.2;
    }

    50% {
        transform: translateY(-14px) translateX(5px);
        opacity: 0.95;
    }

    100% {
        transform: translateY(-28px) translateX(0px);
        opacity: 0.1;
    }
}

.light-particle {
    animation: particleFloat 4.2s ease-in-out infinite;
}

.particle-1 {
    animation-delay: 0s;
}

.particle-2 {
    animation-delay: 0.8s;
}

.particle-3 {
    animation-delay: 1.6s;
}

.particle-4 {
    animation-delay: 2.4s;
}

.particle-5 {
    animation-delay: 3.2s;
}

/* â”€â”€ Top 4 Metric Summary Cards Grid â”€â”€ */
.student-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.student-metric-card {
    background: #ffffff !important;
    border: 1px solid #e8ecf4 !important;
    border-radius: 20px !important;
    padding: 22px 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.student-metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-metric-icon-box svg {
    width: 22px;
    height: 22px;
}

.student-metric-content {
    flex: 1;
    min-width: 0;
}

.student-metric-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.student-metric-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-metric-ring {
    width: 56px;
    height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent !important;
}

.student-metric-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.student-metric-ring-track {
    stroke: #e2e8f0 !important;
    stroke-width: 4.5 !important;
    fill: none !important;
}

.student-metric-ring-value {
    stroke-width: 4.5 !important;
    fill: none !important;
    stroke-linecap: round !important;
    filter: none !important;
    transition: stroke-dashoffset 0.6s ease;
}

.student-metric-ring-text {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    pointer-events: none !important;
    z-index: 5 !important;
    transform: none !important;
}

.student-metric-ring-text strong {
    display: block !important;
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.02em !important;
}

/* â”€â”€ Your Progress Section â”€â”€ */
.student-progress {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.student-progress-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.student-progress-title-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #141b2d;
    margin: 0 0 4px;
}

.section-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-progress-title-block p {
    margin: 0;
    font-size: 0.85rem;
    color: #5c6478;
}

.growth-period-tabs {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.growth-period-tab {
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5c6478;
    cursor: pointer;
    transition: all 0.2s ease;
}

.growth-period-tab.is-active {
    background: #f3e8ff;
    color: #9333ea;
    font-weight: 700;
}

.student-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.student-progress-card {
    background: #ffffff !important;
    border: 1px solid #e6eaf2 !important;
    border-radius: 22px !important;
    padding: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

.student-progress-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-progress-icon svg {
    width: 16px;
    height: 16px;
}

.growth-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.growth-date-row h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #141b2d;
}

.growth-year-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #8b93a7;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.dashboard-panel-head p {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #5c6478;
}

.student-progress-chip {
    padding: 4px 14px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 800;
}

/* â”€â”€ Quick Links Section matching Reference Screenshot (Compact & Responsive) â”€â”€ */
.student-quicklinks {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 24px 28px !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04) !important;
    border: none !important;
}

.student-quicklinks-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.student-quicklinks-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.section-title-icon--lightning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.student-quicklinks-head p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.student-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* Compact Quick Link Cards */
.student-quicklink {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 16px !important;
    padding: 14px 14px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

.student-quicklink:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
    border-color: #e2e8f0 !important;
    background: #ffffff !important;
}

/* 3D Vibrant Gradient Squircles */
.student-quicklink-squircle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-quicklink:hover .student-quicklink-squircle {
    transform: scale(1.06);
}

.squircle--purple {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #4f46e5 100%) !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35) !important;
}

.squircle--green {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 50%, #4d7c0f 100%) !important;
    box-shadow: 0 6px 16px rgba(101, 163, 13, 0.35) !important;
}

.squircle--orange {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35) !important;
}

.squircle--blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35) !important;
}

.student-quicklink-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-quicklink-copy strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-quicklink-copy small {
    font-size: 0.74rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-quicklink-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.25s ease;
}

.student-quicklink:hover .student-quicklink-arrow {
    transform: translateX(4px);
    color: #0f172a;
}

.student-dashboard-footer {
    text-align: center;
    padding: 20px 0 10px;
    border-top: 1px solid #e6eaf2;
    margin-top: 10px;
}

.student-dashboard-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #8b93a7;
    font-weight: 500;
}

/* â”€â”€ Responsive Media Queries for Dashboard â”€â”€ */
@media (max-width: 1200px) {
    .student-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .student-quicklinks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .student-welcome {
        padding: 32px 28px;
    }

    .student-welcome-graphic {
        width: 240px;
    }

    .student-progress-grid {
        grid-template-columns: 1fr;
    }

    .student-quicklinks {
        padding: 20px 20px !important;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .student-dashboard {
        padding: 16px 14px 32px;
        gap: 24px;
    }

    .student-welcome {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .student-welcome-title {
        font-size: 1.7rem;
    }

    .student-welcome-graphic {
        display: none;
    }

    .student-metric-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .student-quicklinks {
        padding: 16px 14px !important;
        border-radius: 18px !important;
        gap: 14px;
    }

    .student-quicklinks-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .student-quicklink {
        padding: 12px 12px !important;
    }

    .student-topnav-inner {
        padding: 10px 14px;
    }

    .student-topnav-links {
        display: none;
    }
}

/* â”€â”€ Student Dashboard Dark Mode Support â”€â”€ */
html[data-theme="dark"] body.student-shell,
html[data-theme="dark"] .student-layout,
html[data-theme="dark"] .student-main,
html[data-theme="dark"] .student-content-wrap {
    background-color: #0b0f19 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-dashboard {
    background-color: transparent !important;
}

/* Dark Mode: Metric Summary Cards */
html[data-theme="dark"] .student-metric-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .student-metric-card:hover {
    border-color: #475569 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
    background: #243146 !important;
}

html[data-theme="dark"] .student-metric-value {
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-metric-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .student-metric-ring-track {
    stroke: #334155 !important;
}

html[data-theme="dark"] .student-metric-ring-text strong {
    color: #f8fafc !important;
}

/* Dark Mode: Your Progress Charts Section */
html[data-theme="dark"] .student-progress-title-block h2 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-progress-title-block p {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .growth-period-tabs {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .growth-period-tab {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .growth-period-tab:hover {
    color: #f8fafc !important;
}

html[data-theme="dark"] .growth-period-tab.is-active {
    background: #3b0764 !important;
    color: #e9d5ff !important;
}

html[data-theme="dark"] .student-progress-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .growth-date-row h3 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .growth-year-badge {
    color: #cbd5e1 !important;
    background: #334155 !important;
}

html[data-theme="dark"] .dashboard-panel-head p {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .student-progress-range {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .student-progress-empty {
    color: #94a3b8 !important;
}

/* Dark Mode: Quick Links Section matching Reference Screenshot */
html[data-theme="dark"] .student-quicklinks {
    background: #1e293b !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .student-quicklinks-head h2 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-quicklinks-head p {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .student-quicklink {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .student-quicklink:hover {
    background: #162032 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .student-quicklink-copy strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-quicklink-copy small {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .student-quicklink-arrow {
    color: #64748b !important;
}

html[data-theme="dark"] .student-quicklink:hover .student-quicklink-arrow {
    color: #f8fafc !important;
}

html[data-theme="dark"] .student-dashboard-footer {
    border-top-color: #334155 !important;
}

html[data-theme="dark"] .student-dashboard-footer p {
    color: #94a3b8 !important;
}

/* â”€â”€ Admin Articles View Toggle [List] [Tiles] â”€â”€ */
.article-view-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-muted);
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    color: var(--ink);
    background: rgba(0, 0, 0, 0.04);
}

.view-toggle-btn.is-active {
    background: var(--surface-elevated) !important;
    color: var(--brand) !important;
    box-shadow: var(--shadow-sm);
}

/* â”€â”€ Admin Article Tiles View Grid â”€â”€ */
.article-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    padding: 20px;
}

.article-tile-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-tile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}

.article-tile-thumb-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%);
    overflow: hidden;
}

.article-tile-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.35s ease;
}

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

.article-tile-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
    opacity: 0.9;
}

.article-tile-thumb-fallback .fallback-icon {
    width: 36px;
    height: 36px;
}

.article-tile-thumb-fallback .fallback-text {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.article-tile-thumb-overlay {
    position: absolute;
    inset: 0;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 60%);
    pointer-events: none;
}

.tile-status-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tile-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #4ade80;
    font-size: 0.72rem;
    font-weight: 800;
}

.tile-live-badge .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.article-tile-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-tile-title {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.article-tile-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-tile-title a:hover {
    color: var(--brand);
}

.article-tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.article-tile-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.article-tile-tag.tag-course {
    background: #dbeafe;
    color: #1e40af;
}

.article-tile-tag.tag-subject {
    background: #fef3c7;
    color: #92400e;
}

.article-tile-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
    padding-top: 4px;
}

.article-tile-footer {
    padding: 12px 18px;
    background: var(--surface-muted);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Dark Mode Support for Tiles View */
html[data-theme="dark"] .article-tile-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .article-tile-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .article-tile-title a {
    color: #f8fafc !important;
}

html[data-theme="dark"] .article-tile-footer {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

html[data-theme="dark"] .view-toggle-btn.is-active {
    background: #334155 !important;
    color: #38bdf8 !important;
}

/* ==========================================================================
   GSAP (GreenSock Animation Platform) High-Performance Student Panel Engine Styles
   ========================================================================== */

/* GPU Accelerated 3D Perspective & Hover Physics */
.student-stat-card,
.article-tile-card,
.badge-card,
.test-card {
    will-change: transform, box-shadow, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Glowing Aura for Unlocked Badges & Active Cards */
.gsap-glow-aura {
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.35) !important;
}

/* Magnetic Button Transition Helper */
.btn-magnetic {
    display: inline-block;
    will-change: transform;
}

/* Glassmorphism Glare Effect Overlay */
.gsap-glare-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.student-stat-card:hover .gsap-glare-overlay,
.article-tile-card:hover .gsap-glare-overlay {
    opacity: 1;
}

/* ==========================================================================
   Student Dashboard UX Redesign Styles
   ========================================================================== */

/* Section 1: Today's Learning Panels */
.student-today-section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.student-today-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

@media (max-width: 991px) {
    .student-today-grid {
        grid-template-columns: 1fr;
    }
}

.student-today-panel {
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.student-today-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* Deep Forest Primary Continuation Panel */
.student-today-continuation {
    background: linear-gradient(135deg, #13241e 0%, #1c332b 100%);
    border: 1px solid #2a473d;
    color: #f0fdf4;
}

html[data-theme="light"] .student-today-continuation {
    background: linear-gradient(135deg, #19332a 0%, #24473b 100%);
    color: #ffffff;
}

.today-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.today-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 5px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.today-badge--forest {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.today-badge--amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.today-time-estimate {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.continuation-title {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.continuation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
}

.meta-tag--cefr {
    background: #4ade80;
    color: #0f172a;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}

.continuation-progress-wrap {
    margin-bottom: 20px;
}

.continuation-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.continuation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 999px;
    transition: width 1s ease;
}

.continuation-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-continuation {
    background: #4ade80;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary-continuation:hover {
    background: #86efac;
    color: #0f172a;
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.4);
}

.continuation-hint {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Daily 20 Vocabulary Panel */
.student-today-daily20 {
    background: var(--surface-card, #ffffff);
    border: 1.5px solid var(--border, #e2e8f0);
}

html[data-theme="dark"] .student-today-daily20 {
    background: #1e293b;
    border-color: #334155;
}

.daily20-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-primary);
}

.daily20-status-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.daily20-progress-wrap {
    margin-bottom: 20px;
}

.daily20-progress-track {
    height: 6px;
    background: var(--surface-muted, #f1f5f9);
    border-radius: 999px;
    overflow: hidden;
}

html[data-theme="dark"] .daily20-progress-track {
    background: #334155;
}

.daily20-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 999px;
    transition: width 1s ease;
}

.daily20-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-secondary-daily20 {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .btn-secondary-daily20 {
    background: #451a03;
    color: #fef08a;
    border-color: #78350f;
}

.btn-secondary-daily20:hover {
    background: #fde68a;
    color: #78350f;
}

.daily20-remaining {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Section 2: Unified Learning Summary Strip */
.student-summary-strip-section {
    margin-bottom: 28px;
}

.student-summary-strip {
    background: var(--surface-card, #ffffff);
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 18px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .student-summary-strip {
    background: #1e293b;
    border-color: #334155;
}

.summary-col {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    padding: 6px 12px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.summary-col:hover {
    background: var(--surface-hover, rgba(0, 0, 0, 0.03));
}

html[data-theme="dark"] .summary-col:hover {
    background: rgba(255, 255, 255, 0.05);
}

.summary-col-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.summary-icon--purple {
    background: #f3e8ff;
    color: #9333ea;
}

.summary-icon--orange {
    background: #ffedd5;
    color: #ea580c;
}

.summary-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

html[data-theme="dark"] .summary-icon--green {
    background: #14532d;
    color: #86efac;
}

html[data-theme="dark"] .summary-icon--purple {
    background: #581c87;
    color: #d8b4fe;
}

html[data-theme="dark"] .summary-icon--orange {
    background: #7c2d12;
    color: #fdba74;
}

html[data-theme="dark"] .summary-icon--blue {
    background: #1e3a8a;
    color: #93c5fd;
}

.summary-col-icon svg {
    width: 22px;
    height: 22px;
}

.summary-col-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-col-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.summary-col-period {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.summary-divider {
    width: 1px;
    height: 40px;
    background: var(--border, #e2e8f0);
    flex-shrink: 0;
}

html[data-theme="dark"] .summary-divider {
    background: #334155;
}

@media (max-width: 991px) {
    .student-summary-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .summary-divider {
        display: none;
    }
}

/* Section 3: Learning Rhythm & Recent Activity Grid */
.student-rhythm-activity-section {
    margin-bottom: 32px;
}

.student-rhythm-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

@media (max-width: 991px) {
    .student-rhythm-grid {
        grid-template-columns: 1fr;
    }
}

.rhythm-card,
.activity-card {
    background: var(--surface-card, #ffffff);
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .rhythm-card,
html[data-theme="dark"] .activity-card {
    background: #1e293b;
    border-color: #334155;
}

.rhythm-card-head,
.activity-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rhythm-title-wrap h3,
.activity-card-head h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}

.rhythm-title-wrap p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.activity-link-all {
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    text-decoration: none;
}

.activity-link-all:hover {
    text-decoration: underline;
}

/* Activity Item List */
.student-activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-muted, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    transition: transform 0.15s ease;
}

html[data-theme="dark"] .activity-item {
    background: #0f172a;
    border-color: #334155;
}

.activity-item:hover {
    transform: translateX(2px);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon--article {
    background: #e0f2fe;
    color: #0284c7;
}

.activity-icon--test {
    background: #dcfce7;
    color: #16a34a;
}

.activity-icon--badge {
    background: #f3e8ff;
    color: #9333ea;
}

.activity-icon--vocab {
    background: #fef3c7;
    color: #d97706;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.activity-badge-time {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-card, #ffffff);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border, #e2e8f0);
}

html[data-theme="dark"] .activity-badge-time {
    background: #1e293b;
    border-color: #334155;
}

/* Learning Rhythm Dynamic SVG Chart Styling */
.rhythm-chart-area {
    margin-top: 14px;
    position: relative;
}

.rhythm-chart-canvas-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.rhythm-svg-chart {
    width: 100%;
    height: auto;
    display: block;
}

.rhythm-bar-rect {
    transition: fill 0.2s ease, filter 0.2s ease;
}

.rhythm-bar-rect:hover {
    filter: drop-shadow(0 4px 12px rgba(74, 222, 128, 0.5));
}

.rhythm-chart-tooltip {
    position: absolute;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.rhythm-tooltip-date {
    display: block;
    color: #94a3b8;
    font-size: 0.7rem;
}

.rhythm-tooltip-value {
    display: block;
    color: #4ade80;
    font-weight: 700;
}

/* â”€â”€ Student Dashboard Redesign (Reference Match) â”€â”€ */

/* Section 1: Today's Learning Grid */
.student-today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 900px) {
    .student-today-grid {
        grid-template-columns: 1fr;
    }
}

.student-today-panel {
    border-radius: 20px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* Cool Crisp Light Mode Cards for Today's Learning (No Dark Background) */
.today-crisp-card {
    border-radius: 24px;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.today-crisp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.crisp-card--emerald {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #a7f3d0;
}

.crisp-card--amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
}

.crisp-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.crisp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 999px;
}

.crisp-badge--emerald {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.crisp-badge--amber {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.crisp-estimate {
    font-size: 0.8rem;
    font-weight: 600;
    color: #047857;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.crisp-estimate--amber {
    color: #b45309;
}

.crisp-title {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.crisp-card--emerald .crisp-title {
    color: #064e3b;
}

.crisp-card--amber .crisp-title {
    color: #78350f;
}

.crisp-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: #047857;
    margin-bottom: 20px;
}

.crisp-meta--amber {
    color: #92400e;
}

.crisp-level-pill {
    background: #059669;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
}

.crisp-progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.crisp-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.crisp-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.fill--emerald {
    background: linear-gradient(90deg, #10b981, #059669);
}

.fill--amber {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.crisp-percent {
    font-size: 0.85rem;
    font-weight: 700;
}

.percent--emerald {
    color: #047857;
}

.percent--amber {
    color: #b45309;
}

.btn-crisp {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-crisp--emerald {
    background: #059669;
    color: #ffffff;
}

.btn-crisp--emerald:hover {
    background: #047857;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}

.btn-crisp--amber {
    background: #d97706;
    color: #ffffff;
}

.btn-crisp--amber:hover {
    background: #b45309;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}

/* â”€â”€ 4 KPI Summary Cards (Pastel Gradient Portrait Format Matching Reference Image) â”€â”€ */
.student-summary-strip-section {
    margin-bottom: 28px;
}

.student-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .student-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .student-summary-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-pastel-card {
    border-radius: 26px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 210px;
}

.kpi-pastel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.kpi-pastel-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kpi-pastel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 22px 0 18px;
    letter-spacing: -0.01em;
}

.kpi-pastel-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.kpi-pastel-unit {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.kpi-pastel-caption {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-top: 2px;
}

/* Gradient Themes Matching Reference Image */
.kpi-pastel-card--blue {
    background: linear-gradient(170deg, #93c5fd 0%, #c084fc 55%, #fbcfe8 100%);
}

.kpi-pastel-card--coral {
    background: linear-gradient(170deg, #fb923c 0%, #fdba74 55%, #fef08a 100%);
}

.kpi-pastel-card--mint {
    background: linear-gradient(170deg, #4ade80 0%, #86efac 55%, #fef08a 100%);
}

.kpi-pastel-card--purple {
    background: linear-gradient(170deg, #a855f7 0%, #c084fc 55%, #fed7aa 100%);
}

/* Recent Activity Timeline Redesign */
.activity-card--timeline {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.activity-head-titles h3 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px;
}

.activity-head-sub {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
}

.recent-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    margin-top: 20px;
}

.recent-timeline-list::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 17px;
    width: 2px;
    background: #f1f5f9;
    z-index: 1;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.timeline-icon-sq {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.icon-sq--article {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
}

.icon-sq--test {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.icon-sq--badge {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #f3e8ff;
}

.timeline-content {
    flex: 1;
}

.timeline-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.timeline-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1e293b;
}

.timeline-time {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.timeline-sub {
    font-size: 0.82rem;
    color: #64748b;
}


.kpi-sparkline svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Section 3: Middle Grid (Learning Rhythm + Recent Activity) */
.student-rhythm-activity-section {
    margin-bottom: 28px;
}

.student-rhythm-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .student-rhythm-grid {
        grid-template-columns: 1fr;
    }
}

.rhythm-card {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.activity-card {
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1.5px solid #e9d5ff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.08);
}

.rhythm-card-head,
.activity-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rhythm-title-wrap h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.activity-card-head h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #581c87;
    margin: 0;
}

.rhythm-title-wrap p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 2px 0 0;
}

/* Eye-Catching Growth Period Tabs (Dark Slate Container + Neon Emerald Glowing Active Pill) */
.growth-period-tabs {
    display: flex;
    background: #0f172a;
    padding: 4px;
    border-radius: 999px;
    gap: 3px;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.growth-period-tab {
    border: 0;
    background: transparent;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s ease;
}

.growth-period-tab:hover {
    color: #f8fafc;
}

.growth-period-tab.is-active {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.45);
}

.rhythm-stats-bar {
    margin-bottom: 16px;
}

.rhythm-big-stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.rhythm-big-stat .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}

.rhythm-big-stat .stat-meta {
    font-size: 0.84rem;
    color: #64748b;
}

.rhythm-big-stat .stat-trend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rhythm-chart-area {
    width: 100%;
    margin-bottom: 16px;
}

.rhythm-svg-full {
    width: 100%;
    height: auto;
    display: block;
}

.rhythm-insight-banner {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-flame-icon {
    font-size: 1.2rem;
}

.banner-text strong {
    display: block;
    font-size: 0.88rem;
    color: #854d0e;
}

.banner-text span {
    display: block;
    font-size: 0.78rem;
    color: #a16207;
}

.btn-insight-outline {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-insight-outline:hover {
    background: #bbf7d0;
}

.activity-link-all {
    font-size: 0.84rem;
    font-weight: 700;
    color: #9333ea;
    text-decoration: none;
}

.activity-link-all:hover {
    text-decoration: underline;
}

.student-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-row {
    background: #ffffff;
    border: 1px solid #e9d5ff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.activity-row:hover {
    background: #ffffff;
    border-color: #c084fc;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.12);
}

.activity-icon-sq {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.activity-icon--purple {
    background: #f3e8ff;
    color: #9333ea;
}

.activity-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.activity-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.activity-icon--lavender {
    background: #faf5ff;
    color: #a855f7;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-sub {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
}

.activity-time-chevron {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Section 4: Bottom Grid (3 Columns) */
.student-bottom-grid-section {
    margin-bottom: 40px;
}

.student-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1.4fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .student-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.bottom-card {
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Circular Goal Ring Card (Soft Emerald Background) */
.card-monthly-goal {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1.5px solid #a7f3d0;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-monthly-goal .bottom-card-title {
    color: #064e3b;
}

.goal-ring-percent {
    font-size: 1.6rem;
    font-weight: 800;
    color: #064e3b;
}

.goal-sub-text {
    font-size: 0.86rem;
    font-weight: 700;
    color: #047857;
}

/* Recent Achievements Card (Warm Golden Amber Background) */
.card-achievements {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #fed7aa;
    box-shadow: 0 4px 18px rgba(249, 115, 22, 0.08);
}

.card-achievements .bottom-card-title {
    color: #7c2d12;
}

.badge-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #451a03;
    line-height: 1.2;
}

.badge-desc {
    font-size: 0.7rem;
    color: #92400e;
    margin-top: 2px;
}

.rhythm-stats-bar {
    margin-bottom: 16px;
}

.rhythm-big-stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.rhythm-big-stat .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}

.rhythm-big-stat .stat-meta {
    font-size: 0.84rem;
    color: #64748b;
}

.rhythm-big-stat .stat-trend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rhythm-chart-area {
    width: 100%;
    margin-bottom: 16px;
}

.rhythm-svg-full {
    width: 100%;
    height: auto;
    display: block;
}

.rhythm-insight-banner {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-flame-icon {
    font-size: 1.2rem;
}

.banner-text strong {
    display: block;
    font-size: 0.88rem;
    color: #854d0e;
}

.banner-text span {
    display: block;
    font-size: 0.78rem;
    color: #a16207;
}

.btn-insight-outline {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-insight-outline:hover {
    background: #bbf7d0;
}

.activity-link-all {
    font-size: 0.84rem;
    font-weight: 700;
    color: #16a34a;
    text-decoration: none;
}

.activity-link-all:hover {
    text-decoration: underline;
}

.student-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-row {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.activity-row:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateX(3px);
}

.activity-icon-sq {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.activity-icon--purple {
    background: #f3e8ff;
    color: #9333ea;
}

.activity-icon--blue {
    background: #dbeafe;
    color: #2563eb;
}

.activity-icon--green {
    background: #dcfce7;
    color: #16a34a;
}

.activity-icon--lavender {
    background: #faf5ff;
    color: #a855f7;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-sub {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
}

.activity-time-chevron {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Section 4: Bottom Grid (3 Columns) */
.student-bottom-grid-section {
    margin-bottom: 40px;
}

.student-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1.4fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .student-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.bottom-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.bottom-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px;
}

/* Section 4: 3 Bottom Cards (Matching Reference Screenshot) */
.student-bottom-grid-section {
    margin-bottom: 30px;
}

.student-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .student-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.bottom-card {
    background: linear-gradient(135deg, #fdfcf9 0%, #f4eee5 100%);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #e7dfd3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Card 1: Monthly Reading Goal */
.card-monthly-goal {
    position: relative;
}

.goal-card-header {
    margin-bottom: 16px;
}

.goal-sub-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8a9aae;
    display: block;
    margin-bottom: 4px;
}

.goal-card-title {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.goal-card-body {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 18px;
}

.goal-left-side {
    flex-shrink: 0;
}

.goal-ring-wrap {
    position: relative;
    width: 110px;
    height: 110px;
}

.goal-svg-ring {
    width: 100%;
    height: 100%;
}

.goal-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.goal-hero-percent {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.goal-hero-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #8a9aae;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.goal-vertical-line {
    width: 1px;
    height: 90px;
    background: #e7dfd3;
    flex-shrink: 0;
}

.goal-right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goal-encourage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #1e5631;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0;
    border: none;
    border-radius: 0;
    align-self: flex-start;
}

.goal-encourage-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.goal-footer {
    margin-top: auto;
}

.goal-footer-line {
    height: 1px;
    background: #e7dfd3;
    margin-bottom: 14px;
}

.goal-footer-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #8a9aae;
}

/* Card 2: Recent Achievements */
.card-achievements {
    position: relative;
}

.achievements-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.achievements-card-title {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.achievements-3col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 10px;
}

.achievement-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 10px;
    position: relative;
}

.achievement-column:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: #e7dfd3;
}

.medal-3d-wrapper {
    width: 76px;
    height: 84px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
}

.ach-title {
    font-family: Fraunces, Georgia, serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.25;
}

.ach-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* Card 3: Daily Motivation Quote Card */
.card-quote-card {
    background: linear-gradient(135deg, #fdfcf9 0%, #f4eee5 100%);
    border: 1px solid #e7dfd3;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.quote-card-inner {
    position: relative;
    z-index: 2;
    max-width: 84%;
}

.quote-mark-icon {
    font-family: Fraunces, Georgia, serif;
    font-size: 3.2rem;
    color: #2d5a44;
    line-height: 0.8;
    margin-bottom: 12px;
}

.quote-body-text {
    font-family: Fraunces, Georgia, serif;
    font-style: italic;
    font-size: 1.22rem;
    line-height: 1.45;
    color: #1a3627;
    font-weight: 600;
    margin: 0 0 18px;
}

.quote-author-name {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #64748b;
}

.quote-svg-graphic {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 230px;
    height: 160px;
    pointer-events: none;
    z-index: 1;
}

.quote-editorial-svg {
    width: 100%;
    height: 100%;
}

/* Student Footer */
.student-footer {
    border-top: 1px solid #e2e8f0;
    padding: 24px 0;
    margin-top: 40px;
}

.student-footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #64748b;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
}

.footer-links a:hover {
    color: #0f172a;
}

/* ==========================================================================
   Full Responsiveness Media Queries (Top Nav & Student Dashboard)
   ========================================================================== */

/* Top Navigation Responsive Drawer (<= 960px) */
@media (max-width: 960px) {
    .student-topnav-toggle {
        display: flex !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    html[data-theme="dark"] .student-topnav-toggle {
        background: rgba(0, 0, 0, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .student-topnav-toggle span {
        background: #ffffff !important;
    }

    .student-topnav-inner {
        position: relative;
    }

    .student-topnav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background: #182822;
        border: 1px solid #2d453b;
        border-radius: 16px;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    html[data-theme="light"] .student-topnav-links {
        background: #ffffff;
        border-color: #e2e8f0;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    }

    html[data-theme="light"] .student-topnav-links a {
        color: #1e293b !important;
    }

    .student-topnav.student-nav-open .student-topnav-links {
        display: flex !important;
    }

    .student-topnav-links a {
        padding: 10px 16px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .student-topnav-actions {
        margin-left: auto;
        gap: 8px;
    }
}

/* Tablet Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
    .student-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    .student-bottom-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Medium Mobile / Tablet Layout (<= 991px) */
@media (max-width: 991px) {

    .student-today-grid,
    .student-rhythm-activity-grid,
    .student-reading-vocab-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .student-main {
        width: calc(100% - 24px) !important;
        padding-top: 16px !important;
    }

    .student-hero-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
}

/* Mobile Devices (<= 640px) */
@media (max-width: 640px) {
    .student-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .student-topnav-inner {
        padding: 0 10px;
    }

    .student-topnav-logo-link img {
        width: 105px !important;
    }

    .goal-card-body {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
    }

    .goal-vertical-line {
        width: 80% !important;
        height: 1px !important;
    }

    .goal-right-side {
        align-items: center !important;
    }

    .goal-encourage-badge {
        align-self: center !important;
    }

    .achievements-3col-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
    }

    .medal-3d-wrapper {
        width: 60px !important;
        height: 70px !important;
    }

    .ach-title {
        font-size: 0.8rem !important;
    }

    .ach-sub {
        font-size: 0.68rem !important;
    }

    .card-quote-card {
        padding: 22px 18px !important;
    }

    .quote-svg-graphic {
        width: 180px !important;
        height: 130px !important;
    }

    .student-footer-container {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
}

/* Extra Small Phones (<= 420px) */
@media (max-width: 420px) {
    .achievements-3col-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .achievement-column:not(:last-child)::after {
        display: none !important;
    }

    .student-topnav-streak-pill span:not(.streak-icon-wrap) {
        font-size: 0.72rem;
    }
}

/* Realistic depth for the welcome book page turn. */
.student-welcome .book-turning-page {
    filter: drop-shadow(7px 10px 5px rgba(15, 23, 42, .22));
    transform-origin: 200px 100px
}

.student-welcome .book-turning-shadow {
    filter: blur(2.6px);
    mix-blend-mode: multiply
}

.student-welcome .book-light-highlight {
    mix-blend-mode: screen
}

.student-welcome .reading-table-structure ellipse {
    filter: blur(1.5px)
}

html[data-theme="dark"] .student-welcome .book-turning-shadow {
    mix-blend-mode: screen;
    opacity: .45
}

/* ==========================================================================
   PlayStation 5 Console Navigation System (Vector Icons & Curated Palette)
   ========================================================================== */
.ps5-nav-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    outline: none;
    user-select: none;
}

.ps5-ambient-lightbar {
    display: none !important;
}

/* Primary Top Navigation Bar (No Background) */
.ps5-primary-nav-bar,
html[data-theme="light"] .ps5-primary-nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 6px;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.ps5-primary-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(241, 245, 249, 0.75) !important;
    cursor: pointer;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .ps5-primary-item {
    color: rgba(241, 245, 249, 0.8) !important;
}

.ps5-primary-item:hover,
.ps5-primary-item.is-focused,
html[data-theme="light"] .ps5-primary-item:hover,
html[data-theme="light"] .ps5-primary-item.is-focused {
    color: #ffffff !important;
}

.ps5-primary-item.is-active,
html[data-theme="light"] .ps5-primary-item.is-active {
    color: #ffffff !important;
    font-weight: 800;
}

/* Shared Layout Focus Active Pill (Dark Glass Glow) */
.ps5-primary-active-pill,
html[data-theme="light"] .ps5-primary-active-pill {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    z-index: 0;
}

.ps5-primary-icon-wrap,
.ps5-primary-label,
.ps5-sub-icon-wrap,
.ps5-sub-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ps5-nav-svg-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.ps5-primary-item:hover .ps5-nav-svg-icon {
    transform: scale(1.12);
}

/* Secondary Sub-Navigation Floating Popover Container */
.ps5-sub-nav-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    padding-top: 6px;
    z-index: 1050;
    pointer-events: none;
}

.ps5-sub-nav-popover {
    pointer-events: auto;
}

.ps5-sub-nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(11, 15, 25, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
}

html[data-theme="light"] .ps5-sub-nav-bar {
    background: rgba(15, 23, 42, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.ps5-sub-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: 999px;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: 0.81rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.75);
    text-decoration: none;
    white-space: nowrap;
    outline: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

html[data-theme="light"] .ps5-sub-item {
    color: #64748b;
}

.ps5-sub-item:hover {
    color: #ffffff;
}

html[data-theme="light"] .ps5-sub-item:hover {
    color: #0f172a;
}

.ps5-sub-item.is-active {
    color: #38bdf8 !important;
    font-weight: 800;
}

html[data-theme="light"] .ps5-sub-item.is-active {
    color: #0284c7 !important;
}

.ps5-sub-active-pill {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
    z-index: 0;
}

html[data-theme="light"] .ps5-sub-active-pill {
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.38);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.15);
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 900px) {

    .ps5-primary-nav-bar,
    .ps5-sub-nav-bar {
        max-width: 96vw;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-left: 10px;
        padding-right: 10px;
    }

    .ps5-primary-nav-bar::-webkit-scrollbar,
    .ps5-sub-nav-bar::-webkit-scrollbar {
        display: none;
    }

    .ps5-primary-item {
        padding: 7px 16px;
        font-size: 0.84rem;
    }

    .ps5-sub-item {
        padding: 4px 12px;
        font-size: 0.76rem;
    }
}

@media (max-width: 480px) {
    .ps5-ambient-lightbar {
        width: 92%;
        top: -8px;
    }

    .ps5-primary-item {
        padding: 6px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    .ps5-sub-item {
        padding: 4px 10px;
        font-size: 0.74rem;
        gap: 4px;
    }
}



/* Final student navigation responsiveness. */
@media (max-width:1100px) {
    .student-topnav-inner {
        position: relative !important;
        width: calc(100% - 32px) !important;
        min-height: 64px !important;
        gap: 10px !important;
    }

    .student-topnav-toggle {
        display: flex !important;
        order: 2 !important;
        width: 42px !important;
        height: 42px !important;
        margin-left: auto !important;
        background: rgba(255, 255, 255, .14) !important;
        border-color: rgba(255, 255, 255, .35) !important;
    }

    .student-topnav-actions {
        order: 3 !important;
        margin-left: 0 !important;
        gap: 6px !important;
    }

    .student-topnav-links {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        display: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 12px !important;
        margin: 0 !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 86px) !important;
        background: #173e30 !important;
        border: 1px solid #5e866c !important;
        border-radius: 14px !important;
        box-shadow: 0 18px 40px rgba(11, 32, 22, .28) !important;
        z-index: 1005 !important;
    }

    .student-topnav.student-nav-open .student-topnav-links,
    .student-layout.student-nav-open .student-topnav-links,
    body.student-nav-open .student-topnav-links {
        display: flex !important;
    }

    .student-nav-open .student-topnav-inner,
    .student-topnav.student-nav-open .student-topnav-inner,
    body.student-nav-open .student-topnav-inner {
        flex-wrap: nowrap !important;
    }

    .student-nav-open .student-topnav-links a,
    .student-topnav.student-nav-open .student-topnav-links a,
    body.student-nav-open .student-topnav-links a {
        width: 100% !important;
        min-height: 46px !important;
        padding: 12px 14px !important;
        justify-content: flex-start !important;
        border-radius: 9px !important;
        color: #edf7ee !important;
        background: rgba(255, 255, 255, .08) !important;
        border: 1px solid rgba(255, 255, 255, .12) !important;
    }

    .student-nav-open .student-topnav-links a.active,
    .student-topnav.student-nav-open .student-topnav-links a.active,
    body.student-nav-open .student-topnav-links a.active {
        background: #f1d28a !important;
        color: #263c2d !important;
        border-color: #f1d28a !important;
    }
}

@media (max-width:560px) {
    .student-topnav-inner {
        width: calc(100% - 20px) !important;
        min-height: 58px !important;
    }

    .student-topnav-logo-link img {
        width: 96px !important;
    }

    .student-topnav-actions {
        gap: 4px !important;
    }

    .student-topnav-streak-pill {
        display: none !important;
    }

    .student-topnav-toggle {
        width: 40px !important;
        height: 40px !important;
    }

    .student-topnav-links {
        left: 0 !important;
        right: 0 !important;
        top: calc(100% + 6px) !important;
    }

    .student-topnav-user-menu {
        right: 0 !important;
        max-width: calc(100vw - 24px) !important;
    }
}

@media (min-width:1101px) {
    .student-topnav-toggle {
        display: none !important;
    }

    .student-topnav-links {
        position: static !important;
        display: flex !important;
    }
}

/* Current PS5 student navigation: mobile drawer and compact action row. */
@media(max-width:1100px) {
    .student-topnav-inner {
        position: relative !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    #ps5-nav-root {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: calc(100% + 8px) !important;
        display: none !important;
        z-index: 1006 !important;
        padding: 12px !important;
        border-radius: 16px !important;
        background: #173e30 !important;
        border: 1px solid #638b71 !important;
        box-shadow: 0 18px 40px rgba(11, 32, 22, .3) !important;
    }

    body.student-nav-open #ps5-nav-root,
    .student-topnav.student-nav-open #ps5-nav-root,
    .student-layout.student-nav-open #ps5-nav-root {
        display: block !important;
    }

    #ps5-nav-root .ps5-nav-wrapper {
        align-items: stretch !important;
        gap: 10px !important
    }

    #ps5-nav-root .ps5-ambient-lightbar {
        display: none !important
    }

    #ps5-nav-root .ps5-primary-nav-bar,
    #ps5-nav-root .ps5-sub-nav-bar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    #ps5-nav-root .ps5-primary-item,
    #ps5-nav-root .ps5-sub-item {
        justify-content: flex-start !important;
        min-height: 46px !important;
        padding: 11px 13px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, .08) !important;
        color: #edf7ee !important;
        border: 1px solid rgba(255, 255, 255, .13) !important;
    }

    #ps5-nav-root .ps5-primary-item.is-active,
    #ps5-nav-root .ps5-sub-item.is-active {
        background: #f1d28a !important;
        color: #263c2d !important;
        border-color: #f1d28a !important;
    }

    #ps5-nav-root .ps5-sub-nav-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        padding-top: 0 !important;
        pointer-events: auto !important;
        margin-top: 0 !important
    }
}

@media(max-width:560px) {
    .student-topnav-inner {
        width: calc(100% - 20px) !important;
        min-height: 58px !important
    }

    .student-topnav-brand {
        max-width: 105px !important;
        overflow: hidden !important
    }

    .student-topnav-logo-link img {
        width: 96px !important
    }

    .student-topnav-actions {
        gap: 4px !important
    }

    .student-topnav-streak-pill {
        display: none !important
    }

    #ps5-nav-root {
        left: 0 !important;
        right: 0 !important;
        max-height: calc(100vh - 74px) !important;
        overflow-y: auto !important
    }

    #ps5-nav-root .ps5-primary-nav-bar,
    #ps5-nav-root .ps5-sub-nav-bar {
        grid-template-columns: 1fr !important
    }
}

@media(min-width:1101px) {
    #ps5-nav-root {
        flex: 1;
        min-width: 0
    }
}

/* Mobile reader fix: keep every article control inside the viewport. */
@media(max-width:767px) {

    .student-reading,
    .student-reading-top,
    .student-reading-stage,
    .article-reader-layout,
    .article-reader--student,
    .article-reader-card--student {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .article-reader-layout,
    .article-reader--student {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    .article-reader-left-sidebar {
        width: 100% !important;
        max-width: none !important;
        position: static !important;
        order: 2 !important;
    }

    .article-reader-card--student {
        order: 1 !important;
        overflow: hidden !important;
        border-radius: 14px !important;
    }

    .article-reader-card--student .preview-top,
    .article-reader-card--student .preview-header-row,
    .article-reader-card--student .preview-controls-header-row,
    .article-reader-card--student .preview-toolbar {
        max-width: 100% !important;
        min-width: 0 !important;
        flex-wrap: wrap !important;
        overflow-x: auto !important;
    }

    .article-reader-card--student .preview-top {
        padding: 12px 14px !important;
    }

    .article-reader-card--student .article-reader-body-shell {
        padding: 22px 16px !important;
        overflow-wrap: anywhere !important;
    }

    .article-reader-card--student .article-body,
    .article-reader-card--student .preview-body {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 1rem !important;
        line-height: 1.78 !important;
        overflow-wrap: anywhere !important;
    }

    .article-reader-card--student .article-body img,
    .article-reader-card--student .preview-body img {
        max-width: 100% !important;
        height: auto !important;
    }

    .article-reader-card--student .article-body-pagination,
    .article-reader-card--student .article-sequence {
        max-width: calc(100% - 24px) !important;
        overflow-x: auto !important;
    }

    .reading-timer-panel--student {
        width: 100% !important;
        max-width: none !important;
    }
}

@media(max-width:420px) {
    .student-reading-top-content {
        padding: 16px !important
    }

    .student-reading-title {
        font-size: 1.8rem !important
    }

    .student-reading-top-nav {
        flex-wrap: wrap !important
    }

    .student-reading-stats-bar {
        width: 100% !important;
        max-width: none !important;
        justify-content: space-between !important;
        padding: 8px 10px !important
    }

    .stats-bar-item {
        gap: 6px !important
    }

    .article-reader-card--student .preview-top {
        padding: 10px !important
    }

    .article-reader-card--student .article-reader-body-shell {
        padding: 18px 13px !important
    }
}

/* Mobile navigation presentation. */
@media(max-width:1100px) {
    #ps5-nav-root {
        backdrop-filter: blur(18px) !important;
        background: linear-gradient(145deg, #102c23, #1d4e3a) !important;
        padding: 10px !important;
        border-radius: 18px !important
    }

    .ps5-primary-nav-bar,
    .ps5-sub-nav-bar {
        width: 100% !important
    }

    .ps5-primary-item,
    .ps5-sub-item {
        box-shadow: inset 0 1px rgba(255, 255, 255, .08) !important;
        font-size: .86rem !important
    }
}

/* ==========================================================================
   PS5 Contextual Hover Popover & Vibrant Colored Icons (No Text Labels)
   ========================================================================== */
.ps5-primary-item-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ps5-sub-nav-popover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 10px;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 100;
}

.ps5-sub-nav-popover--contextual {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1050;
    pointer-events: auto;
}

.ps5-sub-nav-popover--contextual::before {
    content: "";
    position: absolute;
    top: -14px;
    left: -10px;
    right: -10px;
    height: 14px;
}

/* macOS / Framer Motion Dock Styling (Clean - No Background/No Transparency) */
.ps5-dock-wrapper,
html[data-theme="light"] .ps5-dock-wrapper,
html[data-theme="dark"] .ps5-dock-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: auto !important;
}

.ps5-dock-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    text-decoration: none;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
    will-change: width, height;
}

.ps5-dock-icon .ps5-colored-icon-badge {
    width: 100%;
    height: 100%;
    border-radius: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps5-dock-icon:hover .ps5-colored-icon-badge {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Active Sub-Item Indicator Dot (Matching Reference Image Green Dot) */
.ps5-dock-active-dot {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981, 0 0 12px rgba(16, 185, 129, 0.8);
}

.ps5-sub-item--icon-only {
    padding: 2px;
    border-radius: 18px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps5-sub-item--icon-only:hover {
    transform: translateY(-2px) scale(1.08);
}

/* Vibrant Icon Badges (Squircle Cards) */
.ps5-colored-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 18px !important;
    border: none !important;
    transition: all 0.2s ease;
}

.ps5-colored-icon-badge .ps5-nav-svg-icon {
    stroke-width: 2.2px;
}

.ps5-colored-icon--articles,
.ps5-badge-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5) !important;
}

.ps5-colored-icon--library,
.ps5-badge-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5) !important;
}

.ps5-colored-icon--tests,
.ps5-badge-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5) !important;
}

.ps5-colored-icon--badges,
.ps5-badge-violet {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5) !important;
}

.ps5-colored-icon--history,
.ps5-badge-ruby {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5) !important;
}

/* Ultra-Premium Instant Sub-Nav Tooltip */
.ps5-sub-tooltip {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px) scale(0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.95) !important;
    color: #ffffff !important;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: opacity 0.08s ease-out, transform 0.08s ease-out, visibility 0.08s ease-out;
    z-index: 105;
}

/* Tooltip Arrow Pointer Nib */
.ps5-sub-tooltip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .ps5-sub-tooltip {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ps5-dock-icon:hover .ps5-sub-tooltip,
.ps5-sub-item--icon-only:hover .ps5-sub-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* â”€â”€ Mobile responsiveness for highlight settings side drawer â”€â”€ */
@media (max-width: 640px) {
    .highlight-settings-drawer {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        border-left: none !important;
        border-radius: 0 !important;
    }

    .highlight-drawer-header {
        padding: 14px 18px !important;
    }

    .highlight-drawer-title {
        font-size: 1.05rem !important;
    }

    .highlight-drawer-subtitle {
        font-size: 0.76rem !important;
    }

    .highlight-drawer-close-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .highlight-drawer-body {
        padding: 14px 16px !important;
    }

    .drawer-section {
        padding: 14px 14px !important;
        margin-bottom: 12px !important;
        border-radius: 14px !important;
    }

    .drawer-color-grid--swatches-only {
        gap: 4px !important;
        justify-content: space-between !important;
    }

    .drawer-color-card--swatch-only {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .drawer-color-card--swatch-only .drawer-color-swatch {
        width: 30px !important;
        height: 30px !important;
    }

    .drawer-custom-color-row {
        gap: 8px !important;
    }

    .drawer-custom-color-btn,
    .drawer-reset-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .drawer-scope-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .drawer-scope-btn {
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
    }

    .drawer-color-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .drawer-color-card {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }

    .drawer-glossary-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 8px !important;
    }

    .drawer-glossary-card {
        padding: 10px 12px !important;
    }

    .highlight-drawer-footer {
        padding: 12px 16px !important;
        gap: 10px !important;
    }

    .drawer-footer-reset-all {
        min-height: 44px !important;
        padding: 10px 14px !important;
        font-size: 0.82rem !important;
    }

    .drawer-footer-done-btn {
        min-height: 44px !important;
        padding: 10px 20px !important;
        font-size: 0.88rem !important;
    }
}

@media (max-width: 380px) {
    .drawer-scope-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .drawer-color-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* â”€â”€ Global top accent color stripe removal across all pages â”€â”€ */
html,
body,
.student-shell,
.employee-shell,
.student-topnav,
.admin-topnav,
.student-layout,
.admin-layout {
    border-top: none !important;
    margin-top: 0 !important;
}

body::before,
html::before,
.student-shell::before,
.employee-shell::before,
.student-topnav::before,
.admin-topnav::before {
    border-top: none !important;
}

/* Final shared top-nav sizing across student pages. */
@media (max-width: 1100px) {
    .student-topnav-inner {
        width: calc(100% - 28px) !important;
        min-height: 62px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        gap: 9px !important
    }

    .student-topnav-brand {
        min-width: 0 !important;
        flex: 0 1 auto !important
    }

    .student-topnav-brand img,
    .student-topnav-logo-link img {
        max-width: 112px !important;
        height: auto !important
    }

    .student-topnav-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-left: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto !important
    }

    .student-topnav-toggle {
        display: flex !important;
        order: 2 !important;
        flex: 0 0 40px !important;
        width: 40px !important;
        height: 40px !important;
        margin-left: auto !important;
        border-radius: 11px !important;
        background: rgba(255, 255, 255, .12) !important;
        border-color: rgba(255, 255, 255, .32) !important
    }

    #ps5-nav-root {
        position: absolute !important;
        top: calc(100% + 7px) !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        display: none !important;
        z-index: 1006 !important
    }

    body.student-nav-open #ps5-nav-root,
    .student-topnav.student-nav-open #ps5-nav-root,
    .student-layout.student-nav-open #ps5-nav-root {
        display: block !important
    }

    #ps5-nav-root .ps5-nav-wrapper {
        width: 100% !important;
        align-items: stretch !important;
        padding: 12px !important;
        gap: 9px !important;
        background: linear-gradient(145deg, #102c23, #1d4e3a) !important;
        border: 1px solid #638b71 !important;
        border-radius: 17px !important;
        box-shadow: 0 18px 40px rgba(11, 32, 22, .3) !important
    }

    #ps5-nav-root .ps5-ambient-lightbar {
        display: none !important
    }

    #ps5-nav-root .ps5-primary-nav-bar,
    #ps5-nav-root .ps5-sub-nav-bar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 6px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important
    }

    #ps5-nav-root .ps5-primary-item,
    #ps5-nav-root .ps5-sub-item {
        justify-content: flex-start !important;
        min-height: 46px !important;
        width: 100% !important;
        padding: 11px 13px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, .08) !important;
        border: 1px solid rgba(255, 255, 255, .13) !important;
        color: #edf7ee !important
    }

    #ps5-nav-root .ps5-primary-item.is-active,
    #ps5-nav-root .ps5-sub-item.is-active {
        background: #f1d28a !important;
        border-color: #f1d28a !important;
        color: #263c2d !important
    }

    #ps5-nav-root .ps5-sub-nav-container {
        width: 100% !important;
        margin: 0 !important
    }
}

@media (max-width:560px) {
    .student-topnav-inner {
        width: calc(100% - 18px) !important;
        min-height: 58px !important
    }

    .student-topnav-logo-link img {
        width: 94px !important;
        max-width: 94px !important
    }

    .student-topnav-streak-pill {
        display: none !important
    }

    .student-topnav-actions {
        gap: 4px !important
    }

    .student-topnav-toggle {
        width: 38px !important;
        height: 38px !important
    }

    #ps5-nav-root {
        top: calc(100% + 5px) !important;
        max-height: calc(100dvh - 72px) !important;
        overflow-y: auto !important
    }

    #ps5-nav-root .ps5-primary-nav-bar,
    #ps5-nav-root .ps5-sub-nav-bar {
        grid-template-columns: 1fr !important
    }
}

/* â”€â”€ Wider Article Body Container for Reading Comfort â”€â”€ */
.student-reading {
    width: min(1560px, 96%) !important;
    max-width: 1560px !important;
}

.article-reader-layout {
    grid-template-columns: 320px minmax(0, 1fr) !important;
    gap: 26px !important;
}

.article-reader-card,
.article-reader-card--student {
    width: 100% !important;
    max-width: 100% !important;
}

.article-reader-card--student .article-body,
.article-reader-card .article-body,
.article-body,
.preview-body,
.article-reader-body-shell .article-body {
    max-width: 100% !important;
    width: 100% !important;
}

.article-reader-card--student .article-reader-body-shell,
.article-reader-card .article-reader-body-shell,
.article-reader-body-shell {
    padding: 34px clamp(26px, 3.5vw, 64px) !important;
    width: 100% !important;
}

.student-topnav-inner{min-height:54px!important;padding-top:4px!important;padding-bottom:4px!important}
.student-topnav-brand img,.student-topnav-logo-link img{max-height:42px!important;width:auto!important}
.ps5-five-item-nav .ps5-dock-icon{transition:transform .14s cubic-bezier(.2,.8,.2,1),filter .14s ease!important;will-change:transform}
.ps5-five-item-nav .ps5-dock-icon:hover,.ps5-five-item-nav .ps5-dock-icon:focus-visible{transform:translateY(-2px) scale(1.045)!important;filter:brightness(1.035)}
.ps5-five-item-nav .ps5-dock-icon.is-active:hover,.ps5-five-item-nav .ps5-dock-icon.is-active:focus-visible{transform:translateY(-1px) scale(1.025)!important}
@media(prefers-reduced-motion:reduce){.ps5-five-item-nav .ps5-dock-icon{transition:none!important}.ps5-five-item-nav .ps5-dock-icon:hover,.ps5-five-item-nav .ps5-dock-icon:focus-visible{transform:none!important}}
@media(max-width:900px){.student-topnav-inner{min-height:52px!important;padding-top:3px!important;padding-bottom:3px!important}}

#ps5-nav-root .ps5-five-item-nav .ps5-active-nav-name{display:none!important}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon .ps5-sub-tooltip{display:none!important}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon:hover .ps5-sub-tooltip,#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon:focus-visible .ps5-sub-tooltip{display:block!important}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon{width:34px;height:34px}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon.is-active{width:34px;height:34px;border-radius:13px!important;transform:translateY(-1px) scale(1.08)!important}
@media(max-width:900px){#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon{width:32px;height:32px}#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon.is-active{width:32px;height:32px}}
@media(max-width:560px){#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon{width:30px;height:30px}#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon.is-active{width:30px;height:30px}}

/* Pastel five-icon tiles from the student navigation reference */
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon-badge{border:1px solid rgba(43,55,42,.06)!important;box-shadow:0 3px 8px rgba(39,48,38,.06)!important;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease!important}
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon--articles{background:#eef2dc!important;color:#43a51f!important}
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon--library{background:#f8e9df!important;color:#f15b5e!important}
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon--tests{background:#dff2f0!important;color:#08a5a2!important}
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon--badges{background:#e5e9fb!important;color:#4969f5!important}
#ps5-nav-root .ps5-five-item-nav .ps5-colored-icon--history{background:#f0e6fb!important;color:#8748ed!important}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon.is-active .ps5-colored-icon-badge{outline:1px solid currentColor!important;outline-offset:2px!important;box-shadow:0 5px 12px rgba(39,48,38,.1)!important}
#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon:hover .ps5-colored-icon-badge,#ps5-nav-root .ps5-five-item-nav .ps5-dock-icon:focus-visible .ps5-colored-icon-badge{transform:translateY(-1px)!important;box-shadow:0 6px 14px rgba(39,48,38,.11)!important}


/* ==========================================================================
   PERFECTED NOTIFICATION & USER PROFILE DROPDOWNS (RESPONSIVE & COOL DARK THEME)
   ========================================================================== */

@keyframes sfdDropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sfdPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.85; }
}

/* Nav Icons / Action Buttons */
.sfd-circle-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #cbd5e1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    position: relative !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.sfd-circle-btn:hover {
    background: rgba(41, 181, 232, 0.18) !important;
    border-color: rgba(41, 181, 232, 0.45) !important;
    color: #38bdf8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(41, 181, 232, 0.3) !important;
}

.sfd-circle-btn svg {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.2s ease !important;
}

.sfd-circle-btn:hover svg {
    transform: scale(1.1) !important;
}

.sfd-notif-dot {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 9px !important;
    height: 9px !important;
    background: #ef4444 !important;
    border-radius: 50% !important;
    border: 2px solid #08101e !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.9) !important;
    animation: sfdPulseDot 2s infinite !important;
}

/* User Avatar Toggle */
.sfd-avatar-btn,
.sfd-avatar-toggle {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.sfd-avatar-img-wrap {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 2px solid #29b5e8 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #111e33 !important;
    box-shadow: 0 0 16px rgba(41, 181, 232, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sfd-avatar-toggle:hover .sfd-avatar-img-wrap {
    transform: scale(1.08) !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 22px rgba(129, 140, 248, 0.5) !important;
}

.sfd-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.sfd-avatar-initial {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #29b5e8, #6366f1) !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ─────────────────────────────────────────────────────────────
   1. NOTIFICATION DROPDOWN (Scoped to data-theme in student-navigation.css)
   ───────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────
   2. USER / AVATAR PROFILE DROPDOWN — COOL DARK GLASS
   ───────────────────────────────────────────────────────────── */
.sfd-avatar-dropdown {
    display: none !important;
    background: rgba(10, 18, 34, 0.96) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(129, 140, 248, 0.4) !important;
    border-radius: 18px !important;
    box-shadow: 0 28px 56px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 28px -6px rgba(129, 140, 248, 0.18) !important;
    padding: 10px !important;
    z-index: 999999 !important;
    flex-direction: column !important;
    gap: 4px !important;
    box-sizing: border-box !important;
}

.sfd-avatar-dropdown.is-open {
    display: flex !important;
    animation: sfdDropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Profile Header - User Card */
.sfd-avatar-dropdown > div:first-child,
.sfd-avatar-user-info,
.sfd-avatar-dropdown [style*="padding: 8px 12px"],
.sfd-avatar-dropdown [style*="padding: 10px 12px 12px"] {
    padding: 12px 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 14px !important;
    margin-bottom: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.sfd-avatar-dropdown .sfd-user-name,
.sfd-avatar-dropdown > div:first-child > div:first-child {
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
    margin-bottom: 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

.sfd-avatar-dropdown .sfd-user-email,
.sfd-avatar-dropdown > div:first-child > div:last-child {
    font-size: 0.76rem !important;
    color: #94a3b8 !important;
    line-height: 1.3 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-break: break-all !important;
}

/* Divider */
.sfd-dropdown-divider {
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent) !important;
    margin: 4px 0 !important;
    border: none !important;
}

/* Action Items */
.sfd-avatar-dropdown .sfd-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    color: #cbd5e1 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    width: 100% !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transform: translateX(3px) !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item svg {
    width: 17px !important;
    height: 17px !important;
    color: #38bdf8 !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
    flex-shrink: 0 !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item:hover svg {
    transform: scale(1.15) !important;
    color: #7dd3fc !important;
}

.sfd-avatar-dropdown form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item--danger {
    color: #f87171 !important;
    margin-top: 2px !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item--danger svg {
    color: #f87171 !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item--danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

.sfd-avatar-dropdown .sfd-dropdown-item--danger:hover svg {
    color: #ef4444 !important;
}

/* ─────────────────────────────────────────────────────────────
   3. RESPONSIVE POSITIONING (DESKTOP vs MOBILE)
   ───────────────────────────────────────────────────────────── */

/* Desktop & Large Screen (> 640px) */
@media (min-width: 641px) {
    .sfd-notif-dropdown {
        position: absolute !important;
        top: calc(100% + 12px) !important;
        right: 0 !important;
        left: auto !important;
        width: 340px !important;
        max-width: 360px !important;
    }

    .sfd-avatar-dropdown {
        position: absolute !important;
        top: calc(100% + 12px) !important;
        right: 0 !important;
        left: auto !important;
        width: 270px !important;
        max-width: 300px !important;
    }
}

/* Mobile Devices (<= 640px) — Fixed within screen boundaries */
@media (max-width: 640px) {
    .sfd-notif-dropdown {
        position: fixed !important;
        top: 68px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 !important;
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(41, 181, 232, 0.2) !important;
    }

    .sfd-avatar-dropdown {
        position: fixed !important;
        top: 68px !important;
        right: 12px !important;
        left: auto !important;
        width: min(280px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(129, 140, 248, 0.2) !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   4. OPTIONAL LIGHT THEME (Explicit html[data-theme="light"] ONLY)
   ───────────────────────────────────────────────────────────── */
html[data-theme="light"] .sfd-circle-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #475569 !important;
}

html[data-theme="light"] .sfd-circle-btn:hover {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .sfd-notif-dropdown,
html[data-theme="light"] .sfd-avatar-dropdown {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-top: 1px solid rgba(2, 132, 199, 0.4) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.16) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .sfd-notif-dropdown > div:first-child span:first-child {
    color: #0f172a !important;
}

html[data-theme="light"] .sfd-notif-dropdown a[href*="daily20"] div > div:first-child,
html[data-theme="light"] .sfd-notif-dropdown .sfd-dropdown-item div > div:first-child {
    color: #0f172a !important;
}

html[data-theme="light"] .sfd-avatar-dropdown .sfd-user-name,
html[data-theme="light"] .sfd-avatar-dropdown > div:first-child > div:first-child {
    color: #0f172a !important;
}

html[data-theme="light"] .sfd-avatar-dropdown .sfd-dropdown-item {
    color: #334155 !important;
}

html[data-theme="light"] .sfd-avatar-dropdown .sfd-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}
