/*
Theme Name: LevaPiano
Theme URI: https://levapiano.com
Author: LevaTech
Description: An elegant editorial theme for a classical pianist. Features music school enrollment, student portal with recording levels, interests showcase, and multi-purpose contact form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPLv2
Text Domain: levapiano
*/

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --cream: #F5F0E8;
    --cream-deep: #EDE5D8;
    --ivory: #FDFBF7;
    --ink: #1A1410;
    --ink-soft: #3A2E26;
    --ink-light: #5C4D42;
    --ink-muted: #8A7A6E;
    --gold: #B8860B;
    --gold-soft: rgba(184, 134, 11, 0.1);
    --gold-deep: #8B6508;
    --burgundy: #722F37;
    --burgundy-deep: #4A1E24;
    --border: #D8CFC0;
    --border-soft: #E8E0D1;
    --white: #FFFFFF;

    --font-display: 'Cormorant Garamond', 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
    --font-script: 'Italiana', 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.75rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --space-2xl: 8rem;

    --max-w: 1320px;
    --narrow: 680px;
    --header-h: 72px;

    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
    --t-fast: 0.2s var(--ease);
    --t-base: 0.4s var(--ease);
    --t-slow: 0.8s var(--ease);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-soft);
    background: var(--cream);
    overflow-x: hidden;
    letter-spacing: 0.005em;
}

/* Subtle paper texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--ink); color: var(--cream); }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 400;
}

h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
}

h4 {
    font-size: 1.15rem;
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0;
}

.script {
    font-family: var(--font-script);
    font-style: italic;
    font-weight: 400;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-deep);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.eyebrow::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--gold);
}

.eyebrow--center::before {
    display: none;
}

.lead {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 300;
    line-height: 1.5;
    color: var(--ink-soft);
    font-style: italic;
}

p { max-width: 62ch; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

.container--narrow {
    max-width: var(--narrow);
}

.section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.section--compact {
    padding: var(--space-xl) 0;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: all var(--t-base);
}

.site-header--hidden {
    display: none !important;
}
.site-footer--hidden {
    display: none !important;
}

.site-header.scrolled {
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.site-logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.site-logo__mark {
    color: var(--gold);
    font-style: italic;
    font-size: 1.1em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.site-nav a {
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--ink-light);
    transition: color var(--t-fast);
    position: relative;
    padding: 0.3rem 0;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width var(--t-base);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--ink-light) !important;
    transition: all var(--t-fast) !important;
}

.nav-login:hover {
    border-color: var(--gold);
    color: var(--gold) !important;
    background: var(--gold-soft);
}

.nav-login::after { display: none !important; }

/* Notification Bell */
.nav-notif {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
}

.nav-notif__bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: none;
    color: var(--ink-light);
    cursor: pointer;
    transition: all var(--t-fast);
    position: relative;
    padding: 0;
}

.nav-notif__bell:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-soft);
}

.nav-notif__bell::after { display: none !important; }

.nav-notif__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--gold);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

.nav-notif__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -12px;
    width: 320px;
    max-height: 380px;
    overflow-y: auto;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 200;
}

.nav-notif__dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: var(--cream);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    transform: rotate(45deg);
}

.nav-notif.open .nav-notif__dropdown {
    display: block;
    animation: fadeUp 0.25s var(--ease) forwards;
}

.nav-notif__header {
    padding: 0.85rem 1rem 0.6rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
}

.nav-notif__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ink-faint);
    font-size: 0.82rem;
}

.nav-notif__item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    text-decoration: none !important;
    color: var(--ink) !important;
    transition: background var(--t-fast);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.nav-notif__item:hover {
    background: var(--gold-soft);
}

.nav-notif__item::after { display: none !important; }

.nav-notif__icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: rgba(183,142,78,0.10);
    color: var(--gold-deep);
}

.nav-notif__icon--graded {
    background: rgba(76,145,65,0.10);
    color: #4c9141;
}

.nav-notif__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.nav-notif__msg {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--ink);
}

.nav-notif__time {
    font-size: 0.68rem;
    color: var(--ink-faint);
}

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    margin: 5px 0;
    transition: var(--t-base);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO (HOMEPAGE)
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + var(--space-xl)) 0 var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-xl);
    align-items: center;
    width: 100%;
}

.hero__content .eyebrow {
    margin-bottom: var(--space-md);
}

.hero__title {
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeUp 1s var(--ease) 0.3s forwards;
}

.hero__title em {
    font-family: var(--font-script);
    font-style: italic;
    color: var(--gold);
    font-weight: 400;
}

.hero__subtitle {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 300;
    font-style: italic;
    color: var(--ink-light);
    max-width: 36ch;
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeUp 1s var(--ease) 0.5s forwards;
}

.hero__actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    opacity: 0;
    animation: fadeUp 1s var(--ease) 0.7s forwards;
}

.hero__image-wrap {
    position: relative;
    aspect-ratio: 3/4;
    opacity: 0;
    animation: fadeUp 1.2s var(--ease) 0.4s forwards;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    filter: sepia(0.1) contrast(1.02);
}

.hero__image-frame {
    position: absolute;
    inset: -20px -20px -20px -20px;
    border: 1px solid var(--gold);
    border-radius: 2px;
    pointer-events: none;
    z-index: -1;
}

.hero__quote {
    position: absolute;
    left: -30px;
    bottom: 30px;
    background: var(--ivory);
    padding: 1rem 1.5rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink-soft);
    border-left: 2px solid var(--gold);
    max-width: 220px;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hero__quote-author {
    display: block;
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-top: 0.5rem;
}

/* Piano keys decoration */
.piano-keys {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    opacity: 0.08;
    pointer-events: none;
}

.piano-keys__key {
    flex: 1;
    border-right: 1px solid var(--ink);
    background: var(--ivory);
}

.piano-keys__key--black {
    background: var(--ink);
    flex: 0.6;
    height: 60%;
    margin-right: -0.3%;
    margin-left: -0.3%;
    z-index: 2;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid var(--ink);
    border-radius: 0;
    transition: all var(--t-base);
    cursor: pointer;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
}

.btn--primary {
    background: var(--ink);
    color: var(--cream);
}

.btn--primary:hover {
    background: var(--burgundy);
    border-color: var(--burgundy);
}

.btn--ghost {
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.btn--ghost:hover {
    color: var(--gold-deep);
}

.btn--arrow::after {
    content: '→';
    font-family: serif;
    font-size: 1.1em;
    transition: transform var(--t-fast);
}

.btn--arrow:hover::after {
    transform: translateX(4px);
}

/* ============================================
   BIO SECTION
   ============================================ */
.bio-section {
    background: var(--ivory);
    padding: var(--space-2xl) 0;
    position: relative;
}

.bio-grid {
    display: grid;
    grid-template-columns: 0.42fr 0.58fr;
    gap: var(--space-2xl);
    align-items: center;
}

.bio-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.bio-photo__img {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 16px;
    border: 2px solid var(--border);
    transition: filter var(--t-base);
}

.bio-photo__placeholder {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: linear-gradient(160deg, var(--cream-deep) 0%, var(--ink) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-photo__placeholder span {
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.5;
}

.bio-photo .bio-label__title {
    text-align: center;
}

.bio-label__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.2;
}

.bio-content p {
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: var(--space-md);
    color: var(--ink-soft);
}


.bio-content p strong {
    font-weight: 500;
    color: var(--ink);
}

/* ============================================
   MUSIC SCHOOL (Lessons Page)
   ============================================ */
.lessons-hero {
    padding-top: calc(var(--header-h) + var(--space-2xl));
    padding-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lessons-hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    margin-bottom: var(--space-sm);
    line-height: 1.05;
}

.lessons-hero__accent {
    font-style: italic;
    color: var(--gold-deep);
    font-weight: 400;
}

.lessons-hero .lead {
    max-width: 50ch;
    margin: 0 auto;
}

/* ── Three tilted photo cards ── */
.lessons-hero__visual {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: var(--space-xl);
}

.lessons-hero__card {
    width: 190px;
    height: 265px;
    border-radius: 110px 110px 16px 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(26,20,16,0.08);
    transition: transform var(--t-base);
}

.lessons-hero__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lessons-hero__card--1 {
    transform: rotate(-6deg) translateY(20px);
}

.lessons-hero__card--2 {
    transform: translateY(-10px);
}

.lessons-hero__card--3 {
    transform: rotate(6deg) translateY(20px);
}

.lessons-hero__card:hover {
    transform: translateY(-16px) rotate(0deg);
}

/* ── Piano keys decoration ── */
.lessons-hero__keys {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: var(--space-xl);
    opacity: 0.12;
}

.lk {
    display: block;
    width: 28px;
    height: 80px;
    border: 1px solid var(--ink);
    border-radius: 0 0 4px 4px;
    position: relative;
}

.lk--b {
    width: 18px;
    height: 50px;
    background: var(--ink);
    border-radius: 0 0 3px 3px;
    margin: 0 -9px;
    z-index: 1;
    opacity: 0.4;
}

/* Lesson types */
.lesson-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--border);
    margin: var(--space-xl) 0;
}

.lesson-card {
    background: var(--ivory);
    padding: var(--space-xl) var(--space-lg);
    transition: background var(--t-base);
    position: relative;
    overflow: hidden;
}

.lesson-card__shape {
    position: absolute;
    top: 0;
    right: -20px;
    width: 300px;
    height: 300px;
    pointer-events: none;
    color: var(--ink);
}

.lesson-card:hover {
    background: var(--cream-deep);
}

.lesson-card__number {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    font-style: italic;
    color: var(--gold);
    line-height: 1;
}

.lesson-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.lesson-card p {
    color: var(--ink-light);
    margin-bottom: var(--space-md);
}

.lesson-card__meta {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
}

.lesson-card__meta dt {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2px;
}

.lesson-card__meta dd {
    font-weight: 500;
    color: var(--ink);
}

/* Recording levels */
.recordings-section {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-2xl) 0;
    position: relative;
}

.recordings-section h2,
.recordings-section h3 {
    color: var(--ivory);
}

.recordings-section .eyebrow {
    color: var(--gold);
}

.recordings-section .eyebrow::before {
    background: var(--gold);
}

.recordings-section p {
    color: var(--cream-deep);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: var(--space-xl);
}

.level-card {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(245, 240, 232, 0.12);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    position: relative;
    transition: all var(--t-base);
}

.level-card:hover {
    border-color: var(--gold);
    background: rgba(184, 134, 11, 0.06);
}

.level-card__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1rem;
    font-family: var(--font-display);
    font-style: italic;
}

.level-card__lock {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.level-card h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ivory);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.level-card p {
    font-size: 0.8rem;
    color: var(--ink-muted);
    max-width: none;
}

.enrollment-cta {
    text-align: center;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
}

.enrollment-cta h2 {
    margin-bottom: var(--space-md);
}

/* ============================================
   INTERESTS PAGE — Modern v3
   ============================================ */

/* ── Hero (light, matches site) ── */
.ix-hero {
    padding: calc(var(--header-h) + var(--space-2xl)) 0 var(--space-xl);
    text-align: center;
    background: var(--cream);
    position: relative;
}

.ix-hero__label {
    display: inline-flex;
    align-items: center;
    position: relative;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.75rem;
    border: 1px solid var(--border);
}

.ix-hero__keys {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.18;
}

.ix-hero__label-text {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-deep);
    padding: 0.55rem 1.4rem;
}

.ix-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.ix-hero__sub {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.75;
    color: var(--ink-muted);
    max-width: 56ch;
    margin: 0 auto;
}

/* ── Section ── */
.ix-section {
    padding: 0 0 var(--space-2xl);
}

/* ── Grid ── */
.ix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* ── Card Base ── */
.ix-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: default;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.ix-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(26, 20, 16, 0.1);
}

/* SVG shape layer */
.ix-card__shape {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 1s var(--ease), opacity 0.6s var(--ease);
    opacity: 0.85;
}

.ix-card__shape svg {
    width: 90%;
    height: 90%;
    max-width: 460px;
}

.ix-card:hover .ix-card__shape {
    transform: scale(1.06) rotate(1deg);
    opacity: 1;
}

/* Inner content */
.ix-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 1.75rem 2rem;
}

.ix-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ix-card__num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    opacity: 0.35;
}

.ix-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.ix-card__tags span {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    border: 1px solid;
    transition: all var(--t-fast);
}

.ix-card__bottom {
    margin-top: auto;
}

.ix-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: inherit;
}

.ix-card__desc {
    font-size: 0.84rem;
    line-height: 1.65;
    opacity: 0.65;
    max-width: 42ch;
}

/* ── Card Variants ── */

/* COSMOS — full-width, dark, starry */
.ix-card--cosmos {
    grid-column: span 2;
    min-height: 380px;
    background: #0B0915;
    color: var(--ivory);
}
.ix-card--cosmos .ix-card__shape { color: rgba(180, 170, 220, 1); }
.ix-card--cosmos .ix-card__tags span {
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45);
}
.ix-card--cosmos .ix-card__tags span:hover {
    border-color: rgba(184,134,11,0.35);
    color: var(--gold);
}

/* ARTS — warm dark */
.ix-card--arts {
    min-height: 340px;
    background: linear-gradient(155deg, #2E1218, #180A0E);
    color: var(--ivory);
}
.ix-card--arts .ix-card__shape { color: rgba(220, 160, 130, 1); }
.ix-card--arts .ix-card__tags span {
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45);
}
.ix-card--arts .ix-card__tags span:hover {
    border-color: rgba(220,160,100,0.4);
    color: #E0C090;
}

/* PHOTO — clean white */
.ix-card--photo {
    min-height: 340px;
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--border-soft);
}
.ix-card--photo .ix-card__shape { color: var(--ink); }
.ix-card--photo .ix-card__tags span {
    border-color: var(--border);
    color: var(--ink-muted);
}
.ix-card--photo .ix-card__tags span:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* SPORT — deep green */
.ix-card--sport {
    min-height: 340px;
    background: linear-gradient(155deg, #0C2418, #06140E);
    color: var(--ivory);
}
.ix-card--sport .ix-card__shape { color: rgba(120, 210, 150, 1); }
.ix-card--sport .ix-card__tags span {
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45);
}
.ix-card--sport .ix-card__tags span:hover {
    border-color: rgba(100,200,140,0.4);
    color: #7CC89A;
}

/* WRITINGS — warm cream */
.ix-card--writings {
    min-height: 340px;
    background: var(--cream-deep);
    color: var(--ink);
    border: 1px solid var(--border-soft);
}
.ix-card--writings .ix-card__shape { color: var(--gold-deep); }
.ix-card--writings .ix-card__tags span {
    border-color: var(--border);
    color: var(--ink-light);
}
.ix-card--writings .ix-card__tags span:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
}

/* ── CTA ── */
.ix-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.ix-cta__text {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: var(--ink-light);
    margin-bottom: 0;
}

.ix-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--ivory);
    background: var(--ink);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all var(--t-base);
}

.ix-cta__btn:hover {
    background: var(--burgundy);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 20, 16, 0.18);
}

.ix-cta__btn svg {
    transition: transform var(--t-fast);
}

.ix-cta__btn:hover svg {
    transform: translateX(4px);
}

/* ── Interests: Shape Animations ── */

/* Keyframes */
@keyframes ix-orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes ix-orbit-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
@keyframes ix-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes ix-float-alt {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-8px) translateX(4px); }
}
@keyframes ix-pulse {
    0%, 100% { opacity: 0.2; r: 2; }
    50% { opacity: 0.7; r: 3; }
}
@keyframes ix-pulse-sm {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.5; }
}
@keyframes ix-breathe {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.08); opacity: 0.14; }
}
@keyframes ix-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}
@keyframes ix-draw {
    0%, 100% { stroke-dashoffset: 0; }
    50% { stroke-dashoffset: 10; }
}
@keyframes ix-lens-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes ix-shutter {
    0%, 85%, 100% { opacity: 0.06; r: 15; }
    90% { opacity: 0.2; r: 12; }
}
@keyframes ix-page-flutter {
    0%, 100% { transform: rotate(10deg) translateY(0); }
    50% { transform: rotate(14deg) translateY(-6px); }
}
@keyframes ix-page-flutter-2 {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50% { transform: rotate(-5deg) translateY(-5px); }
}
@keyframes ix-stride {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(3px) translateY(-4px); }
    75% { transform: translateX(-2px) translateY(2px); }
}
@keyframes ix-speed-lines {
    0%, 100% { opacity: 0.1; transform: translateX(0); }
    50% { opacity: 0.02; transform: translateX(-8px); }
}

/* ── COSMOS animations ── */
.ix-card--cosmos .cosmos-ring-1 {
    transform-origin: 250px 250px;
    animation: ix-orbit 45s linear infinite;
}
.ix-card--cosmos .cosmos-ring-2 {
    transform-origin: 250px 250px;
    animation: ix-orbit-reverse 55s linear infinite;
}
.ix-card--cosmos .cosmos-ring-3 {
    transform-origin: 250px 250px;
    animation: ix-orbit 35s linear infinite;
}
.ix-card--cosmos .cosmos-planet-ring {
    transform-origin: 250px 250px;
    animation: ix-orbit 20s linear infinite;
}
.ix-card--cosmos .cosmos-planet {
    animation: ix-breathe 6s ease-in-out infinite;
    transform-origin: 250px 250px;
}
.ix-card--cosmos .cosmos-moon {
    animation: ix-float 5s ease-in-out infinite;
}
.ix-card--cosmos .cosmos-moon-2 {
    animation: ix-float-alt 7s ease-in-out infinite;
}
.ix-card--cosmos .cosmos-star {
    animation: ix-pulse 3s ease-in-out infinite;
}
.ix-card--cosmos .cosmos-star:nth-child(8) { animation-delay: 0.4s; }
.ix-card--cosmos .cosmos-star:nth-child(9) { animation-delay: 0.9s; }
.ix-card--cosmos .cosmos-star:nth-child(10) { animation-delay: 1.5s; }
.ix-card--cosmos .cosmos-star:nth-child(11) { animation-delay: 0.2s; }
.ix-card--cosmos .cosmos-star:nth-child(12) { animation-delay: 1.1s; }
.ix-card--cosmos .cosmos-star:nth-child(13) { animation-delay: 0.7s; }
.ix-card--cosmos .cosmos-star:nth-child(14) { animation-delay: 1.8s; }
.ix-card--cosmos .cosmos-star:nth-child(15) { animation-delay: 0.5s; }
.ix-card--cosmos .cosmos-star:nth-child(16) { animation-delay: 1.3s; }
.ix-card--cosmos .cosmos-star:nth-child(17) { animation-delay: 2.0s; }

/* ── ARTS animations ── */
.ix-card--arts .arts-arm {
    transform-origin: 108px 260px;
    animation: ix-sway 3s ease-in-out infinite;
}
.ix-card--arts .arts-brush {
    animation: ix-sway 3s ease-in-out infinite;
    transform-origin: 165px 195px;
}
.ix-card--arts .arts-splotch {
    animation: ix-breathe 4s ease-in-out infinite;
}
.ix-card--arts .arts-splotch:nth-child(n+2) { animation-delay: 0.8s; }
.ix-card--arts .arts-splotch:nth-child(n+3) { animation-delay: 1.6s; }
.ix-card--arts .arts-palette {
    animation: ix-float-alt 6s ease-in-out infinite;
}
.ix-card--arts .arts-palette-dot {
    animation: ix-pulse-sm 3s ease-in-out infinite;
}
.ix-card--arts .arts-palette-dot:nth-child(n+2) { animation-delay: 0.5s; }
.ix-card--arts .arts-palette-dot:nth-child(n+3) { animation-delay: 1.0s; }
.ix-card--arts .arts-palette-dot:nth-child(n+4) { animation-delay: 1.5s; }

/* ── PHOTO animations ── */

/* Shutter flash */
@keyframes photo-shutter-flash {
    0%, 85%, 100% { opacity: 0; }
    88% { opacity: 0.12; }
    91% { opacity: 0; }
}

/* Focus points appear on shutter */
@keyframes photo-focus-show {
    0%, 83%, 100% { opacity: 0; }
    86%, 94% { opacity: 0.12; }
    96% { opacity: 0; }
}

/* Aperture pulse */
@keyframes photo-aperture-pulse {
    0%, 85%, 100% { r: 8; opacity: 0.06; }
    89% { r: 4; opacity: 0.12; }
    92% { r: 8; opacity: 0.06; }
}

/* Flare shimmer */
@keyframes photo-flare-shimmer {
    0%, 100% { opacity: 0.03; transform: translate(0, 0); }
    50%      { opacity: 0.07; transform: translate(2px, -2px); }
}

/* Lens ring 1 — slow rotate */
.ix-card--photo .photo-lens-ring-1 {
    transform-origin: 250px 210px;
    animation: ix-lens-rotate 15s linear infinite;
}
/* Lens ring 2 — counter rotate */
.ix-card--photo .photo-lens-ring-2 {
    transform-origin: 250px 210px;
    animation: ix-lens-rotate 22s linear infinite reverse;
}
/* Aperture pulse */
.ix-card--photo .photo-aperture {
    animation: photo-aperture-pulse 7s ease-in-out infinite;
}
/* Flash */
.ix-card--photo .photo-flash {
    animation: photo-shutter-flash 7s ease-in-out infinite;
}
/* Focus points */
.ix-card--photo .photo-focus-points {
    animation: photo-focus-show 7s ease-in-out infinite;
}
/* Flare shimmer */
.ix-card--photo .photo-flare-2 {
    animation: photo-flare-shimmer 5s ease-in-out infinite;
}
/* Strap sway */
.ix-card--photo .photo-strap-l {
    transform-origin: 111px 145px;
    animation: ix-sway 5s ease-in-out infinite;
}
.ix-card--photo .photo-strap-r {
    transform-origin: 389px 145px;
    animation: ix-sway 5s ease-in-out infinite reverse;
}

/* ── SPORT animations ── */
.ix-card--sport .sport-figure {
    animation: ix-stride 2s ease-in-out infinite;
}
.ix-card--sport .sport-speed {
    animation: ix-speed-lines 2s ease-in-out infinite;
}
.ix-card--sport .sport-speed:nth-child(n+2) { animation-delay: 0.3s; }
.ix-card--sport .sport-speed:nth-child(n+3) { animation-delay: 0.6s; }
.ix-card--sport .sport-energy {
    animation: ix-pulse-sm 3s ease-in-out infinite;
}

/* ── WRITINGS animations ── */

/* Pen writing motion — moves along each cursive line */
@keyframes w-pen-write {
    0%    { transform: translate(150px, 91px) rotate(0deg); }
    10%   { transform: translate(342px, 89px) rotate(1deg); }
    12%   { transform: translate(150px, 121px) rotate(-1deg); }
    22%   { transform: translate(290px, 119px) rotate(0deg); }
    24%   { transform: translate(150px, 151px) rotate(1deg); }
    38%   { transform: translate(347px, 149px) rotate(-1deg); }
    40%   { transform: translate(150px, 181px) rotate(0deg); }
    48%   { transform: translate(270px, 178px) rotate(1deg); }
    50%   { transform: translate(150px, 211px) rotate(-1deg); }
    64%   { transform: translate(352px, 209px) rotate(0deg); }
    66%   { transform: translate(150px, 241px) rotate(1deg); }
    78%   { transform: translate(338px, 238px) rotate(-1deg); }
    80%   { transform: translate(150px, 271px) rotate(0deg); }
    90%   { transform: translate(285px, 269px) rotate(1deg); }
    92%, 100% { transform: translate(285px, 269px) rotate(0deg); }
}

/* Cursive ink lines draw themselves */
@keyframes w-ink-draw {
    0%   { stroke-dashoffset: 500; opacity: 0; }
    3%   { opacity: 0.14; }
    100% { stroke-dashoffset: 0; opacity: 0.14; }
}

/* Page curl breathe */
@keyframes w-page-curl {
    0%, 100% { transform: scaleX(1) scaleY(1); opacity: 0.12; }
    50%      { transform: scaleX(1.15) scaleY(1.08); opacity: 0.18; }
}

/* Ink drops appear */
@keyframes w-drop-appear {
    0%, 80%, 100% { opacity: 0; transform: scale(0); }
    85% { opacity: 0.06; transform: scale(1.3); }
    90% { opacity: 0.04; transform: scale(1); }
}

/* Back pages subtle shift */
@keyframes w-page-shift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-1px, 1px); }
}

/* Pen */
.ix-card--writings .w-pen {
    animation: w-pen-write 10s ease-in-out infinite;
}

/* Cursive ink lines draw themselves */
.ix-card--writings .w-ink {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}
.ix-card--writings .w-ink-1 { animation: w-ink-draw 1.4s ease-out 0s forwards; }
.ix-card--writings .w-ink-2 { animation: w-ink-draw 1.1s ease-out 1.4s forwards; }
.ix-card--writings .w-ink-3 { animation: w-ink-draw 1.5s ease-out 2.5s forwards; }
.ix-card--writings .w-ink-4 { animation: w-ink-draw 0.9s ease-out 4s forwards; }
.ix-card--writings .w-ink-5 { animation: w-ink-draw 1.5s ease-out 4.9s forwards; }
.ix-card--writings .w-ink-6 { animation: w-ink-draw 1.3s ease-out 6.4s forwards; }
.ix-card--writings .w-ink-7 { animation: w-ink-draw 1s ease-out 7.7s forwards; }

/* Page curl */
.ix-card--writings .w-page-turn {
    transform-origin: 376px 357px;
    animation: w-page-curl 4s ease-in-out infinite;
}

/* Back pages shift (staggered for depth) */
.ix-card--writings .w-page-back-1 {
    animation: w-page-shift 5s ease-in-out infinite;
}
.ix-card--writings .w-page-back-2 {
    animation: w-page-shift 5s ease-in-out infinite 0.25s;
}
.ix-card--writings .w-page-back-3 {
    animation: w-page-shift 5s ease-in-out infinite 0.5s;
}
.ix-card--writings .w-page-back-4 {
    animation: w-page-shift 5s ease-in-out infinite 0.75s;
}
.ix-card--writings .w-page-back-5 {
    animation: w-page-shift 5s ease-in-out infinite 1s;
}

/* Ink drops */
.ix-card--writings .w-drop-1 { animation: w-drop-appear 10s ease-in-out infinite 2s; }
.ix-card--writings .w-drop-2 { animation: w-drop-appear 10s ease-in-out infinite 5s; }
.ix-card--writings .w-drop-3 { animation: w-drop-appear 10s ease-in-out infinite 7s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .ix-card__shape *,
    .ix-card__shape svg * {
        animation: none !important;
    }
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-hero {
    padding-top: calc(var(--header-h) + var(--space-2xl));
    padding-bottom: var(--space-lg);
    text-align: center;
}

.contact-hero h1 {
    margin-bottom: var(--space-md);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.38fr 0.62fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: sticky;
    top: calc(var(--header-h) + var(--space-md));
}

.contact-info__card {
    background: var(--ivory);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: border-color var(--t-fast);
}

.contact-info__card:hover {
    border-color: var(--border);
}

.contact-info__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cream-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold-deep);
}

.contact-info__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2px;
}

.contact-info__value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--ink);
}

.contact-info__value a:hover {
    color: var(--gold-deep);
}

.contact-info__social {
    padding: var(--space-md) 0 0;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-md);
}

.social-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--ink-light);
    transition: all var(--t-fast);
}

.social-icon:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--cream);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    background: var(--ivory);
    padding: var(--space-xl);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

.inquiry-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: var(--space-md);
}

.inquiry-chip {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-light);
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inquiry-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.inquiry-chip.selected {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--cream);
}

.inquiry-chip__icon {
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--ink);
    outline: none;
    transition: border-color var(--t-fast);
    border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-bottom-color: var(--ink);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ============================================
   STUDENT AREA / LOGIN
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + var(--space-lg)) 0 var(--space-xl);
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--ivory);
    padding: var(--space-xl);
    border: 1px solid var(--border-soft);
    text-align: center;
}

.auth-card h1 {
    font-size: 2.2rem;
    margin-bottom: var(--space-sm);
}

.auth-card p {
    color: var(--ink-light);
    margin: 0 auto var(--space-lg);
    font-size: 0.95rem;
}

.auth-card .form-group {
    text-align: left;
}

.auth-card .btn {
    width: 100%;
    margin-top: var(--space-sm);
}

.student-portal {
    padding: calc(var(--header-h) + var(--space-xl)) 0 var(--space-xl);
}

.portal-header {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-xl);
}

.portal-welcome {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.portal-welcome em {
    font-family: var(--font-script);
    color: var(--gold);
}

.recordings-list {
    display: grid;
    gap: 1rem;
}

/* Level Accordion */
.level-accordion__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-sm) 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: none;
    cursor: pointer;
    text-align: left;
}
.level-accordion__toggle:hover { border-color: var(--gold); }
.level-accordion__count {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-left: auto;
}
.level-accordion__arrow {
    color: var(--ink-muted);
    transition: transform var(--t-fast);
    flex-shrink: 0;
}
.level-accordion__toggle[aria-expanded="false"] .level-accordion__arrow {
    transform: rotate(-90deg);
}
.level-accordion__content {
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding-top: var(--space-md);
}
.level-accordion__toggle[aria-expanded="false"] + .level-accordion__content {
    max-height: 0 !important;
    padding-top: 0;
}

/* Recording Items */
.recording-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--ivory);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    transition: all var(--t-fast);
}

.recording-item:hover {
    border-color: var(--gold);
}

.recording-item__level {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--gold);
    font-style: italic;
    font-weight: 400;
    min-width: 50px;
}

.recording-item h4 {
    margin-bottom: 0.2rem;
}

.recording-item__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.recording-item__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: var(--gold-soft);
    color: var(--gold-deep);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.recording-item__play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--gold);
    color: var(--cream);
    border: none;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t-fast);
}
.recording-item__play:hover {
    background: var(--gold-deep);
}

.recording-item audio {
    width: 220px;
    max-width: 100%;
    height: 36px;
}

/* Video Modal */
/* video-modal styles moved to media-modal in student panel section */

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: 1rem 1.25rem;
    margin-bottom: var(--space-md);
    font-size: 0.88rem;
    border: 1px solid;
}

.flash--success {
    background: rgba(78, 130, 76, 0.08);
    color: #2D5930;
    border-color: rgba(78, 130, 76, 0.25);
}

.flash--error {
    background: rgba(122, 40, 40, 0.08);
    color: var(--burgundy);
    border-color: rgba(122, 40, 40, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-xl) 0 var(--space-md);
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--ivory);
    letter-spacing: 0.02em;
}

.footer-brand__mark {
    color: var(--gold);
    font-style: italic;
}

.footer-brand__tagline {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-top: var(--space-sm);
    max-width: 34ch;
    font-weight: 300;
    line-height: 1.7;
}

.footer-col h5 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.footer-col a {
    display: block;
    font-size: 0.88rem;
    color: var(--cream-deep);
    padding: 0.3rem 0;
    transition: color var(--t-fast);
    font-weight: 300;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(245, 240, 232, 0.1);
    font-size: 0.78rem;
    color: var(--ink-muted);
    font-weight: 300;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 240, 232, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: var(--cream-deep);
    transition: all var(--t-fast);
}

.footer-social a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger .reveal:nth-child(5) { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; gap: var(--space-xl); }
    .hero__image-wrap { max-width: 500px; margin: 0 auto; }
    .bio-grid { grid-template-columns: 1fr; justify-items: center; }
    .bio-photo__img { max-width: 280px; }
    .lesson-types { grid-template-columns: 1fr; }
    .lessons-hero__card { width: 140px; height: 195px; }
    .lessons-hero__keys .lk { width: 20px; height: 60px; }
    .lessons-hero__keys .lk--b { width: 13px; height: 38px; margin: 0 -6.5px; }
    .levels-grid { grid-template-columns: repeat(2, 1fr); }
    .ix-grid { grid-template-columns: 1fr 1fr; }
    .ix-card--cosmos { min-height: 340px; }
    .ix-card--arts,
    .ix-card--photo,
    .ix-card--sport,
    .ix-card--writings { min-height: 300px; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--cream);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-md);
        transition: right var(--t-base);
        z-index: 99;
    }
    .site-nav.open { right: 0; }
    .site-nav a {
        font-family: var(--font-display);
        font-size: 1.8rem;
    }
    h1 { font-size: 3rem; }
    .ix-grid { grid-template-columns: 1fr; }
    .ix-card--cosmos { grid-column: span 1; min-height: 320px; }
    .ix-card--arts,
    .ix-card--photo,
    .ix-card--sport,
    .ix-card--writings { grid-column: span 1; min-height: 280px; }
    .ix-card__inner { padding: 1.5rem; }
    .ix-card__shape svg { width: 80%; height: 80%; }
    .ix-hero { padding: calc(var(--header-h) + 2.5rem) 0 2rem; }
    .inquiry-types { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .levels-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
    .recording-item { grid-template-columns: auto 1fr; }
    .recording-item audio { grid-column: 1 / -1; width: 100%; }
    .nav-notif__dropdown {
        position: fixed;
        top: var(--header-h);
        right: 0;
        left: 0;
        width: auto;
        max-height: 60vh;
        border-radius: 0 0 12px 12px;
    }
    .nav-notif__dropdown::before { display: none; }
}

/* =============================================
   STUDENT PANEL — SaaS Dashboard
   ============================================= */

/* Layout shell */
.sp {
    display: flex;
    min-height: 100vh;
    padding-top: 0;
    background: #f7f5f0;
}

/* ---- Sidebar ---- */
.sp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--ink);
    color: var(--cream-deep);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
}

.sp-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sp-avatar {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
    color: #fff; letter-spacing: 0.02em; flex-shrink: 0;
}

.sp-sidebar__name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

.sp-sidebar__role {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.1rem;
}

.sp-sidebar__nav {
    flex: 1;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
    position: relative;
}

.sp-nav-item:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.05);
}

.sp-nav-item.active {
    color: #fff;
    background: rgba(183,142,78,0.15);
}

.sp-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gold);
}

.sp-nav-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sp-nav-item.active .sp-nav-item__icon { opacity: 1; }

.sp-nav-item__label { flex: 1; }

.sp-sidebar__user { min-width: 0; }

.sp-nav-item__badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--gold);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sp-sidebar__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sp-sidebar__logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.15s;
}

.sp-sidebar__logout:hover { color: rgba(255,255,255,0.8); }

.sp-sidebar__copyright {
    padding: 0.75rem 1.25rem;
    font-size: 0.65rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.25);
}
.sp-sidebar__copyright a {
    color: var(--gold);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.sp-sidebar__copyright a:hover { opacity: 1; }

/* ---- Main Area ---- */
.sp-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 2.5rem 3rem;
    min-width: 0;
}

/* Sections */
.sp-section { display: none; }
.sp-section.active { display: block; animation: spFadeIn 0.3s ease; }

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

/* Page header */
.sp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.sp-page-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.sp-page-title em {
    font-style: italic;
    color: var(--gold);
}

.sp-page-sub {
    font-size: 0.88rem;
    color: var(--ink-light);
    margin-top: 0.3rem;
}

.sp-header-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--gold);
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 1rem;
}

/* ---- Dashboard Grid ---- */
.sp-dash-grid {
    display: grid;
    grid-template-columns: 240px 1fr 1fr;
    gap: 1rem;
}

.sp-dash-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sp-dash-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border-color: var(--border);
}

/* Progress ring */
.sp-dash-card--ring {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sp-ring {
    position: relative;
    width: 130px;
    height: 130px;
    margin-bottom: 1rem;
}

.sp-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sp-ring__bg {
    fill: none;
    stroke: var(--border-soft);
    stroke-width: 8;
}

.sp-ring__fill {
    fill: none;
    stroke: url(#sp-ring-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sp-ring__pct {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.sp-ring__text {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    margin-top: 0.2rem;
}

.sp-dash-card__title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
}

.sp-dash-card__sub {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-top: 0.2rem;
}

/* Stat mini card */
.sp-dash-stat {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.85rem;
}

.sp-dash-stat__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-dash-stat__icon--rec { background: rgba(183,142,78,0.12); color: var(--gold-deep); }
.sp-dash-stat__icon--quiz { background: rgba(59,130,246,0.1); color: #3b82f6; }
.sp-dash-stat__icon--hw { background: rgba(245,158,11,0.1); color: #f59e0b; }
.sp-dash-stat__icon--lit { background: rgba(16,185,129,0.1); color: #10b981; }

.sp-dash-stat__body { flex: 1; min-width: 0; }

.sp-dash-stat__num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.sp-dash-stat__num span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ink-muted);
    margin-left: 0.15rem;
}

.sp-dash-stat__label {
    font-size: 0.78rem;
    color: var(--ink-light);
    margin-top: 0.25rem;
}

.sp-dash-stat__bar {
    width: 100%;
    height: 5px;
    background: var(--border-soft);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.sp-dash-stat__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.sp-bar--rec { background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }
.sp-bar--quiz { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.sp-bar--hw { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.sp-bar--lit { background: linear-gradient(90deg, #34d399, #10b981); }

/* ---- Recent Activity ---- */
.sp-recent {
    margin-top: 2rem;
}

.sp-recent-list {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
}

.sp-recent-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    transition: background 0.15s;
}

.sp-recent-item:last-child { border-bottom: none; }
.sp-recent-item:hover { background: rgba(183,142,78,0.04); }

.sp-recent-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sp-dot--rec { background: var(--gold); }
.sp-dot--quiz { background: #3b82f6; }
.sp-dot--hw { background: #f59e0b; }
.sp-dot--lit { background: #10b981; }

.sp-recent-item__info { flex: 1; min-width: 0; }

.sp-recent-item__title {
    font-size: 0.88rem;
    color: var(--ink);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-recent-item__meta {
    font-size: 0.75rem;
    color: var(--ink-muted);
    display: block;
    margin-top: 0.15rem;
}

.sp-recent-item__arrow {
    color: var(--ink-muted);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.sp-recent-item:hover .sp-recent-item__arrow { opacity: 1; }

/* ---- Cards Grid (Recordings) ---- */
.sp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ---- Recording List Rows ---- */
.sp-rec-list {
    display: flex;
    flex-direction: column;
}
.sp-rec-row {
    display: grid;
    grid-template-columns: 32px 1fr 140px 70px 60px 110px auto;
    align-items: center;
    gap: 0 1rem;
    padding: 0.75rem 1.15rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s;
}
.sp-rec-row:last-child { border-bottom: none; }
.sp-rec-row:hover { background: rgba(0,0,0,0.015); }
.sp-rec-row--done { opacity: 0.7; }
.sp-rec-row--done:hover { opacity: 1; }

.sp-rec-row__status {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-rec-row__check {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #e6f4ea;
    color: #1e8e3e;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-rec-row__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #dadce0;
}

.sp-rec-row__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.sp-rec-row__title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-badge--new {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.sp-rec-row__composer {
    font-size: 0.82rem;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-rec-row__duration {
    font-size: 0.82rem;
    color: var(--ink-muted);
    text-align: center;
}

.sp-rec-row__progress {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sp-rec-row__bar {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: #eee;
    overflow: hidden;
    min-width: 50px;
}
.sp-rec-row__bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-deep));
    transition: width 0.4s ease;
}
.sp-rec-row__pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-muted);
    min-width: 28px;
    text-align: right;
}

.sp-rec-row__type {
    display: flex;
    align-items: center;
}
.sp-rec-row__type-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sp-rec-row__type-tag--video { background: rgba(139,92,246,0.1); color: #7c3aed; }
.sp-rec-row__type-tag--audio { background: rgba(245,158,11,0.1); color: #d97706; }

.sp-rec-row__action {
    display: flex;
    justify-content: flex-end;
}
.sp-rec-row__action .sp-btn {
    width: 110px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

/* Recording list responsive */
@media (max-width: 768px) {
    .sp-rec-row {
        grid-template-columns: 28px 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.2rem 0.6rem;
        padding: 0.65rem 0.85rem;
    }
    .sp-rec-row__status { grid-row: 1 / 3; }
    .sp-rec-row__info { grid-column: 2; }
    .sp-rec-row__composer,
    .sp-rec-row__duration,
    .sp-rec-row__type { display: none; }
    .sp-rec-row__progress {
        grid-column: 2;
        grid-row: 2;
    }
    .sp-rec-row__action {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
    }
}

.sp-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.sp-card:hover {
    border-color: var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.sp-card--new {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(183,142,78,0.1);
}

.sp-card--done {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 40%);
}

.sp-card__tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gold);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 6px;
    line-height: 1.5;
    z-index: 2;
}

.sp-panel > .sp-card__tag {
    top: 14px;
    right: auto;
    left: 14px;
}

.sp-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sp-card__level {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #fff;
    letter-spacing: 0.04em;
}

.sp-card__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
}

.sp-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.sp-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-bottom: auto;
}

.sp-card__meta span + span::before {
    content: '\00B7';
    margin-right: 0.4rem;
}

.sp-card__media-tag {
    display: inline-flex;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sp-card__media-tag::before { content: none !important; }

.sp-card__media-tag--video {
    background: rgba(183,142,78,0.12);
    color: var(--gold-deep);
}

.sp-card__media-tag--audio {
    background: rgba(59,130,246,0.1);
    color: #3b82f6;
}

.sp-card__progress {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.sp-card__progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border-soft);
    border-radius: 3px;
    overflow: hidden;
}

.sp-card__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-deep));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.sp-card__progress-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-light);
    min-width: 32px;
    text-align: right;
}

.sp-card__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.75rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-card__action:hover {
    box-shadow: 0 4px 16px rgba(183,142,78,0.35);
    transform: translateY(-1px);
}

.sp-card__audio {
    margin-top: 1rem;
}

.sp-card__audio audio {
    width: 100%;
    height: 36px;
}

.sp-card__placeholder {
    margin-top: 1rem;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--ink-muted);
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
}

/* ---- Panels (Quiz, Homework, Literature) ---- */
.sp-panel {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
    transition: all 0.2s;
}

.sp-panel:hover {
    border-color: var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.sp-panel--new {
    border-color: var(--gold);
}

.sp-panel__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.sp-panel__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-panel__icon--rec { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.sp-panel__icon--quiz { background: rgba(59,130,246,0.1); color: #3b82f6; }
.sp-panel__icon--hw { background: rgba(245,158,11,0.1); color: #f59e0b; }
.sp-panel__icon--lit { background: rgba(16,185,129,0.1); color: #10b981; }

.sp-panel__info { flex: 1; min-width: 0; }

.sp-panel__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
}

.sp-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.sp-panel__meta span + span::before {
    content: '\00B7';
    margin-right: 0.4rem;
}

.sp-panel__status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Collapsible homework panels */
.sp-panel__header--toggle {
    cursor: pointer;
    transition: background 0.15s;
}

.sp-panel__header--toggle:hover {
    background: rgba(0,0,0,0.015);
}

.sp-panel__chevron {
    display: flex;
    align-items: center;
    color: var(--ink-muted);
    transition: transform 0.25s var(--ease);
}

.sp-panel--expanded .sp-panel__chevron {
    transform: rotate(180deg);
}

.sp-panel__collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
}

.sp-panel__collapse--open {
    max-height: none;
    overflow: visible;
}

.sp-panel__submitted-date {
    font-size: 0.75rem;
    color: var(--ink-muted);
    white-space: nowrap;
}

.sp-panel--submitted {
    border-color: var(--border-soft);
}

.sp-panel__body {
    padding: 0 1.5rem 1.25rem;
}

.sp-panel__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.04);
    background: rgba(0,0,0,0.01);
}

/* ---- Badges ---- */
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.sp-badge--info { background: #e8f0fe; color: #1967d2; }
.sp-badge--success { background: #e6f4ea; color: #1e8e3e; }
.sp-badge--warning { background: #fef7e0; color: #b06000; }
.sp-badge--danger { background: #fce8e6; color: #c5221f; }
.sp-badge--purple { background: #f3e8fd; color: #7627bb; }
.sp-badge--score { background: #f0ecf9; color: #5f4b8b; font-variant-numeric: tabular-nums; }

/* ---- Shared Components ---- */

/* Buttons */
.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.sp-btn--primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #fff;
}

.sp-btn--primary:hover {
    box-shadow: 0 4px 16px rgba(183,142,78,0.35);
    transform: translateY(-1px);
}

.sp-btn--outline {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink);
}

.sp-btn--outline:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
}

.sp-btn--sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.sp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Textarea */
.sp-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: vertical;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
}

.sp-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(183,142,78,0.1);
}

/* File chips */
.sp-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.15s;
}

.sp-file-chip:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
    background: rgba(183,142,78,0.04);
}

/* Homework attachment from teacher */
.sp-hw-attachment {
    margin-bottom: 0.5rem;
}
.sp-hw-attachment__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-light);
    margin-bottom: 10px;
}
.sp-hw-attachment__label svg {
    color: var(--gold);
}
.sp-hw-attachment__image-wrap {
    display: block;
    max-width: 400px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    transition: border-color 0.2s;
}
.sp-hw-attachment__image-wrap:hover {
    border-color: var(--gold);
}
.sp-hw-attachment__image {
    display: block;
    width: 100%;
    height: auto;
}
.sp-file-chip--lg {
    padding: 0.6rem 1.1rem;
    font-size: 0.88rem;
    gap: 0.5rem;
}

/* Teacher feedback */
.sp-feedback {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(59,130,246,0.04);
    border-radius: 12px;
    border-left: 3px solid #3b82f6;
}

.sp-feedback__label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sp-feedback p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink);
    margin: 0;
}

/* Empty state */
.sp-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
}

.sp-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(0,0,0,0.03);
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.sp-empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 0.4rem;
}

.sp-empty-state p {
    font-size: 0.88rem;
    color: var(--ink-muted);
    max-width: 360px;
    margin: 0 auto;
}

/* ---- Quiz ---- */
.sp-quiz-form { margin-top: -0.25rem; }

.sp-question {
    padding: 1.15rem;
    margin-bottom: 0.5rem;
    background: rgba(0,0,0,0.015);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}

.sp-question__head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.sp-question__num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sp-question__text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
    padding-top: 0.15rem;
}

.sp-question__audio {
    display: block;
    margin: 0.5rem 0;
    width: 100%;
    height: 36px;
}

.sp-question__img {
    max-width: 300px;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.sp-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sp-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
    background: #fff;
}

.sp-option:hover {
    border-color: var(--gold);
    background: rgba(183,142,78,0.03);
}

.sp-option input[type="radio"] { display: none; }

.sp-option__check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: all 0.15s;
    position: relative;
}

.sp-option input:checked + .sp-option__check {
    border-color: var(--gold-deep);
    background: var(--gold-deep);
}

.sp-option input:checked + .sp-option__check::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.sp-option input:checked ~ .sp-option__text { font-weight: 500; }

/* Quiz results */
.sp-result-bar {
    padding: 0.85rem 1rem;
    background: rgba(183,142,78,0.06);
    border-radius: 12px;
}

.sp-result-bar__score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sp-result-bar__num {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gold-deep);
}

.sp-result-bar__grade {
    padding: 0.15rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e6f4ea;
    color: #1e8e3e;
}

.sp-quiz-result { padding: 1rem; }
.sp-quiz-score {
    font-family: var(--font-display); font-size: 1.3rem;
    color: var(--gold-deep); margin-bottom: 0.75rem;
}
.sp-quiz-correct {
    padding: 0.4rem 0.75rem; margin-bottom: 0.3rem;
    background: #e6f4ea; color: #1e8e3e; border-radius: 6px; font-size: 0.85rem;
}
.sp-quiz-wrong {
    padding: 0.4rem 0.75rem; margin-bottom: 0.3rem;
    background: #fce8e6; color: #c5221f; border-radius: 6px; font-size: 0.85rem;
}

/* ---- Quiz Review ---- */
.sp-quiz-review {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sp-review-q {
    background: rgba(0,0,0,0.015);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    border-left: 3px solid #dadce0;
}
.sp-review-q--correct { border-left-color: #1e8e3e; }
.sp-review-q--wrong { border-left-color: #c5221f; }
.sp-review-q--pending { border-left-color: var(--gold); }

.sp-review-q__head {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.sp-review-q__num {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-review-q__text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
}
.sp-review-q__icon {
    flex-shrink: 0;
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-review-q--correct .sp-review-q__icon { color: #1e8e3e; }
.sp-review-q--wrong .sp-review-q__icon { color: #c5221f; }
.sp-review-q--pending .sp-review-q__icon { color: var(--gold-deep); }

.sp-review-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sp-review-opt {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.6);
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: var(--ink-muted);
    transition: background 0.2s;
}
.sp-review-opt--correct {
    background: #e6f4ea;
    border-color: #a8dab5;
    color: #1e8e3e;
    font-weight: 500;
}
.sp-review-opt--wrong {
    background: #fce8e6;
    border-color: #f5c6c2;
    color: #c5221f;
    font-weight: 500;
}
.sp-review-opt--answer {
    background: #e6f4ea;
    border-color: #a8dab5;
    color: #1e8e3e;
}

.sp-review-opt__marker {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(0,0,0,0.05);
    color: var(--ink-muted);
}
.sp-review-opt--correct .sp-review-opt__marker { background: #1e8e3e; color: #fff; }
.sp-review-opt--wrong .sp-review-opt__marker { background: #c5221f; color: #fff; }
.sp-review-opt--answer .sp-review-opt__marker { background: #1e8e3e; color: #fff; }

.sp-review-opt__text { flex: 1; }

.sp-review-opt__tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.06);
    color: var(--ink-muted);
    white-space: nowrap;
}
.sp-review-opt--correct .sp-review-opt__tag { background: rgba(30,142,62,0.12); color: #1e8e3e; }
.sp-review-opt--wrong .sp-review-opt__tag { background: rgba(197,34,31,0.1); color: #c5221f; }
.sp-review-opt__tag--correct { background: rgba(30,142,62,0.12) !important; color: #1e8e3e !important; }

.sp-review-text-answer {
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.6);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
}
.sp-review-text-answer__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.3rem;
}
.sp-review-text-answer p {
    margin: 0;
    color: var(--ink);
    line-height: 1.55;
}

/* ---- Homework ---- */
.sp-instructions {
    padding: 1rem 1.15rem;
    background: rgba(0,0,0,0.015);
    border-radius: 12px;
    border-left: 3px solid var(--gold);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ink);
    margin-bottom: 1rem;
}

.sp-instructions p { margin: 0 0 0.5rem; }
.sp-instructions p:last-child { margin-bottom: 0; }

.sp-text--danger { color: #c5221f !important; font-weight: 600; }

.sp-hw-form { display: flex; flex-direction: column; }

.sp-upload-area { margin-bottom: 0.75rem; }
.sp-hw-file-list { margin-top: 0.5rem; }
.sp-hw-file-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; background: rgba(0,0,0,0.02);
    border-radius: 8px; margin-bottom: 0.3rem; font-size: 0.85rem;
}
.sp-hw-file-icon { font-size: 1.1rem; }
.sp-hw-file-remove {
    margin-left: auto; color: #c5221f; font-size: 0.78rem;
    text-decoration: none;
}
.sp-hw-file-remove:hover { text-decoration: underline; }
.sp-uploading { color: var(--ink-light); font-style: italic; }

.sp-hw-success {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 1rem; background: #e6f4ea; border-radius: 12px;
    color: #1e8e3e; font-weight: 500;
}
.sp-hw-success span { font-size: 1.2rem; }

.sp-submitted {
    margin-top: 0;
}

.sp-submitted__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #1e8e3e;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.sp-submitted__text {
    padding: 0.85rem 1rem;
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.sp-submitted__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* ---- Literature ---- */
.sp-reading-content {
    padding: 1rem 1.15rem;
    background: rgba(0,0,0,0.015);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.75;
}

.sp-reading-content p { margin: 0 0 0.75rem; }
.sp-reading-content p:last-child { margin-bottom: 0; }

/* ---- Video Modal ---- */
/* ---- Media Modal (video & audio) ---- */
.media-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.media-modal__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.88); backdrop-filter: blur(8px);
}
.media-modal__wrap {
    position: relative; z-index: 1; width: 90%; max-width: 900px;
}
.media-modal__close {
    position: absolute; top: -44px; right: 0;
    background: none; border: none; color: #fff;
    font-size: 2rem; cursor: pointer; opacity: 0.7;
    transition: opacity 0.2s;
}
.media-modal__close:hover { opacity: 1; }
.media-modal__title {
    color: #fff; font-family: var(--font-display);
    font-size: 1.1rem; margin-bottom: 0.75rem; opacity: 0.9;
}
.media-modal__body { border-radius: 16px; overflow: hidden; background: #000; }
.media-modal__body video {
    display: block; width: 100%; max-height: 80vh; border-radius: 16px;
}
/* Audio mode: narrower, centered, with artwork-like styling */
.media-modal__body--audio {
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 3rem 2rem 2rem;
    text-align: center;
}
.media-modal__body--audio video {
    width: 100%;
    max-height: 60px;
    border-radius: 8px;
}
.media-modal__body--audio::before {
    content: '';
    display: block;
    width: 100px; height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='1.5'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px;
}

/* ---- Mobile Bar ---- */
.sp-mobile-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--ink);
    color: #fff;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    z-index: 89;
}

.sp-mobile-bar__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.sp-mobile-bar__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
}

.sp-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 89;
}

/* ---- Student Panel Responsive ---- */
@media (max-width: 1024px) {
    .sp-dash-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sp-dash-card--ring {
        grid-row: span 1;
        grid-column: span 2;
        flex-direction: row;
        gap: 1.5rem;
        text-align: left;
    }
    .sp-ring { margin-bottom: 0; width: 100px; height: 100px; }
    .sp-main { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
    .sp-sidebar {
        transform: translateX(-100%);
        z-index: 91;
    }
    .sp-sidebar.open {
        transform: translateX(0);
    }
    .sp-sidebar-overlay.open {
        display: block;
    }
    .sp-mobile-bar {
        display: flex;
    }
    .sp-main {
        margin-left: 0;
        padding: calc(52px + 1.5rem) 1rem 2rem;
    }
    .sp-dash-grid {
        grid-template-columns: 1fr;
    }
    .sp-dash-card--ring {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
    }
    .sp-ring { margin-bottom: 1rem; }
    .sp-cards-grid {
        grid-template-columns: 1fr;
    }
    .sp-panel__header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    .sp-panel__body { padding: 0 1rem 1rem; }
    .sp-panel__footer { padding: 0.75rem 1rem; }
    .sp-panel__status { margin-left: auto; }
    .sp-page-title { font-size: 1.4rem; }
    .sp-option { padding: 0.5rem 0.7rem; }
    .media-modal__wrap { width: 95%; }
}

@media (max-width: 480px) {
    .sp-page-header { flex-direction: column; gap: 0.5rem; }
    .sp-card { padding: 1rem; }
    .sp-dash-stat__num { font-size: 1.3rem; }
}

/* ============================================
   TEACHER PANEL STYLES
   ============================================ */

/* Section header titles */
.sp-section__title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 4px;
    line-height: 1.3;
}
.sp-section__subtitle {
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin: 0;
}
.sp-section__header {
    margin-bottom: 24px;
}

/* Teacher avatar accent */
.sp-avatar--teacher {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
}

/* Dashboard stat card grid variants */
.sp-dash-grid--4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.sp-dash-grid--2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Stat card (teacher dashboard) */
.sp-stat-card {
    background: #fff;
    border: 1px solid var(--border-soft, #E8E0D4);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.sp-stat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-color: var(--border);
}

.sp-stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sp-stat-card__icon svg {
    width: 20px;
    height: 20px;
}

.sp-stat-card__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sp-stat-card__label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

/* Teacher stat cards (mini variant for student detail) */
.sp-stat-card--mini {
    padding: 12px 16px;
    text-align: center;
}
.sp-stat-card--mini .sp-stat-card__value {
    font-size: 1.4rem;
}

/* Students layout: list + detail */
.tp-students-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    min-height: 500px;
}

.tp-student-list {
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border, #D8CFC0);
    border-radius: 12px;
    overflow: hidden;
    max-height: 700px;
    overflow-y: auto;
}

.tp-student-search {
    padding: 12px;
    border-bottom: 1px solid var(--border, #D8CFC0);
}

.tp-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border, #D8CFC0);
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
}
.tp-search-input:focus { border-color: var(--gold); }

.tp-student-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
    font-family: inherit;
    color: var(--ink);
}
.tp-student-item:hover { background: rgba(184,134,11,0.04); }
.tp-student-item.active {
    background: rgba(184,134,11,0.08);
    border-left: 3px solid var(--gold);
}

.sp-avatar--sm {
    width: 32px; height: 32px;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.tp-student-item__info { flex: 1; min-width: 0; }
.tp-student-item__name { font-size: 0.82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-student-item__email { font-size: 0.7rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-student-item__stat { flex-shrink: 0; }
.tp-student-item__count { font-size: 0.7rem; color: var(--ink-muted); background: rgba(0,0,0,0.04); padding: 2px 8px; border-radius: 10px; }

/* Student Detail Panel */
.tp-student-detail {
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border, #D8CFC0);
    border-radius: 12px;
    padding: 24px;
    min-height: 400px;
}

.tp-student-detail__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--ink-muted);
    gap: 12px;
}
.tp-student-detail__empty p { font-size: 0.88rem; }

.tp-student-detail__loading {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 60px 0; color: var(--ink-muted); font-size: 0.88rem;
}

.tp-detail-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.tp-detail-name { font-family: var(--font-serif); font-size: 1.3rem; margin: 0 0 4px; color: var(--ink); font-weight: 500; }
.tp-detail-meta { color: var(--ink-muted); font-size: 0.78rem; margin: 0; }

.tp-section-h3 {
    font-size: 0.88rem; font-weight: 600; color: var(--ink);
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
    margin: 0 0 12px;
}

/* Tables */
.tp-table-wrap { overflow-x: auto; }

.tp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.tp-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--ink-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.tp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--ink-soft);
}
.tp-table tr:hover td { background: rgba(184,134,11,0.02); }

.tp-table--compact th, .tp-table--compact td { padding: 8px 10px; }

/* Filter Tabs */
.tp-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tp-filter-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--ink-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tp-filter-tab:hover { color: var(--ink); }
.tp-filter-tab.active {
    color: var(--gold-deep, #8B6508);
    border-bottom-color: var(--gold);
    font-weight: 500;
}

.tp-filter-tab__badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px;
    background: #b06000; color: #fff;
    border-radius: 9px;
    font-size: 0.65rem; font-weight: 600;
    padding: 0 5px;
}

/* Submissions Wrap */
.tp-submissions-wrap {
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.tp-submissions-wrap .tp-table th { background: rgba(0,0,0,0.02); }

/* Content stats (dashboard) */
.tp-content-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.tp-content-stat {
    text-align: center;
    padding: 16px 8px;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
}
.tp-content-stat__count {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.tp-content-stat__label {
    font-size: 0.72rem;
    color: var(--ink-muted);
    margin-top: 2px;
}

/* Assign Content Form */
.tp-assign-form {
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.tp-assign-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.tp-assign-field {
    flex: 1;
}
.tp-assign-field--wide { flex: 2; }

.tp-assign-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-light);
    margin-bottom: 6px;
}

.tp-optional { font-weight: 400; color: var(--ink-muted); }

.tp-select, .tp-input, .tp-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.tp-select:focus, .tp-input:focus, .tp-textarea:focus { border-color: var(--gold); }

.tp-textarea { min-height: 80px; resize: vertical; }

.tp-assign-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-assign-feedback { font-size: 0.82rem; }

.tp-current-assignments { }
.tp-assign-student-select { margin-bottom: 16px; max-width: 400px; }
.tp-assignments-list { }

/* Grading Modal */
.tp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.tp-modal__wrap {
    position: relative;
    background: var(--ivory, #FDFBF7);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.tp-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ink-muted);
    cursor: pointer;
    z-index: 1;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.tp-modal__close:hover { background: rgba(0,0,0,0.05); }

.tp-modal__header {
    padding: 24px 24px 0;
}
.tp-modal__title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}

.tp-modal__body {
    padding: 20px 24px 24px;
}

.tp-modal__loading {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 60px 0; color: var(--ink-muted); font-size: 0.88rem;
}

/* Submission detail within modal */
.tp-sub-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.tp-sub-header h3 { margin: 0 0 4px; font-size: 1rem; }
.tp-sub-meta { font-size: 0.78rem; color: var(--ink-muted); margin: 0; }

.tp-sub-score {
    background: rgba(184,134,11,0.08);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gold-deep);
    margin-bottom: 16px;
}

.tp-answer {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    line-height: 1.6;
    border-left: 4px solid transparent;
    position: relative;
}
.tp-answer strong {
    color: var(--ink);
}
.tp-answer--correct {
    background: #e6f4ea;
    border-left-color: #1e8e3e;
}
.tp-answer--correct::before {
    content: '\2713';
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e8e3e;
}
.tp-answer--wrong {
    background: #fce8e6;
    border-left-color: #d93025;
}
.tp-answer--wrong::before {
    content: '\2717';
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #d93025;
}

.tp-sub-text {
    background: rgba(0,0,0,0.03);
    padding: 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.tp-sub-files { margin-bottom: 16px; }
.tp-sub-files h4 { font-size: 0.82rem; margin: 0 0 8px; }
.tp-sub-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.04);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gold-deep);
    font-size: 0.78rem;
    margin-right: 8px;
    margin-bottom: 6px;
    transition: background 0.15s;
}
.tp-sub-file:hover { background: rgba(0,0,0,0.07); }

/* Grade form within modal */
.tp-grade-form {
    background: rgba(184,134,11,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.tp-grade-form h4 { margin: 0 0 12px; font-size: 0.88rem; }
.tp-grade-form__row { display: flex; gap: 12px; margin-bottom: 12px; }
.tp-grade-form__field { flex: 1; }
.tp-grade-form__field label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; color: var(--ink-light); }

/* Button variants */
.sp-btn--sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    gap: 4px;
}

.sp-btn--danger {
    background: #fce8e6;
    color: #c5221f;
    border-color: transparent;
}
.sp-btn--danger:hover {
    background: #f9d7d5;
}

/* Collapsible sections in student detail */
.tp-type-section {
    margin-bottom: 12px;
    border: 1px solid var(--border, #D8CFC0);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.tp-type-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink);
    transition: background 0.15s;
}
.tp-type-header:hover { background: rgba(184,134,11,0.04); }

.tp-type-header__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tp-type-header__icon svg { width: 16px; height: 16px; }

.tp-type-header__label {
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.tp-type-header__count {
    font-size: 0.72rem;
    color: var(--ink-muted);
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 10px;
}

.tp-type-header__chevron {
    transition: transform 0.25s;
    color: var(--ink-muted);
}
.tp-type-section.open .tp-type-header__chevron {
    transform: rotate(180deg);
}

.tp-type-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.tp-type-section.open .tp-type-body {
    max-height: 2000px;
}

.tp-type-body__inner {
    padding: 0 16px 16px;
}

/* Progress items inside collapsible sections */
.tp-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.82rem;
}
.tp-progress-item:last-child { border-bottom: none; }

.tp-progress-item__title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
    font-weight: 500;
}

.tp-progress-item__bar {
    width: 80px;
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.tp-progress-item__bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gold);
    transition: width 0.3s;
}

.tp-progress-item__percent {
    font-size: 0.72rem;
    color: var(--ink-muted);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.tp-progress-item__status {
    flex-shrink: 0;
}

/* Content manager list header */
.tp-content-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.tp-content-list-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.tp-content-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 0;
    color: var(--ink-muted);
    font-size: 0.88rem;
}

.tp-content-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.tp-content-empty p {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin: 0;
}

/* Upload zone */
.tp-upload-zone {
    border: 2px dashed var(--border, #D8CFC0);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ink-muted);
    font-size: 0.82rem;
}
.tp-upload-zone:hover {
    border-color: var(--gold);
    background: rgba(184,134,11,0.03);
}
.tp-upload-zone--dragover {
    border-color: var(--gold);
    background: rgba(184,134,11,0.08);
}
.tp-upload-zone--uploading {
    opacity: 0.7;
    pointer-events: none;
}
.tp-upload-zone__hint {
    font-size: 0.7rem;
    color: var(--ink-muted);
    opacity: 0.7;
}
.tp-upload-zone strong {
    color: var(--gold-deep, #8B6508);
}

/* Upload preview */
.tp-upload-preview__file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #e6f4ea;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #1e8e3e;
}
.tp-upload-preview__file svg {
    flex-shrink: 0;
    color: #1e8e3e;
}
.tp-upload-preview__file span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-upload-preview__remove {
    background: none;
    border: none;
    color: var(--ink-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.tp-upload-preview__remove:hover {
    color: #c5221f;
}

/* Expandable sidebar: Content parent + sub-items */
.sp-nav-item--parent {
    position: relative;
    cursor: pointer;
}
.sp-nav-item--parent .sp-nav-item__chevron {
    transition: transform 0.25s;
    color: var(--ink-muted);
    margin-left: auto;
    flex-shrink: 0;
}
.sp-nav-item--parent.open .sp-nav-item__chevron {
    transform: rotate(180deg);
}

.sp-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.sp-nav-sub.open {
    max-height: 300px;
}

.sp-nav-item--sub {
    padding-left: 44px !important;
    font-size: 0.8rem;
}
.sp-nav-item--sub .sp-nav-item__icon {
    width: 22px;
    height: 22px;
}
.sp-nav-item--sub .sp-nav-item__icon svg {
    width: 14px;
    height: 14px;
}

.sp-nav-item__count {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--ink-muted);
    background: rgba(0,0,0,0.05);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Form tabs (Data / Assign Students) */
.tp-form-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border);
}

.tp-form-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--ink-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tp-form-tab:hover { color: var(--ink); }
.tp-form-tab.active {
    color: var(--gold-deep, #8B6508);
    border-bottom-color: var(--gold);
    font-weight: 500;
}
.tp-form-tab svg { flex-shrink: 0; }

/* Form panels (switched by tab) */
.tp-form-panel {
    display: none;
    padding-top: 20px;
}
.tp-form-panel.active {
    display: block;
}

/* Assign students panel within form */
.tp-assign-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(184,134,11,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--ink-muted);
}
.tp-assign-notice svg { flex-shrink: 0; color: var(--gold); }

.tp-assign-search-wrap {
    margin-bottom: 12px;
}
.tp-assign-search-wrap .tp-input {
    max-width: 320px;
}

.tp-assign-student-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.tp-assign-student-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
    font-size: 0.82rem;
}
.tp-assign-student-row:last-child { border-bottom: none; }
.tp-assign-student-row:hover { background: rgba(184,134,11,0.03); }
.tp-assign-student-row--active {
    background: rgba(30,142,62,0.06);
}
.tp-assign-student-row--active:hover {
    background: rgba(30,142,62,0.1);
}

.tp-assign-checkbox {
    accent-color: var(--gold);
    flex-shrink: 0;
}

.tp-assign-student-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.tp-assign-student-row__name {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tp-assign-student-row__email {
    font-size: 0.72rem;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row actions in content table */
.tp-row-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

/* Content sub-tabs (legacy, kept for compatibility) */
.tp-create-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.tp-create-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--ink-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tp-create-tab:hover { color: var(--ink); }
.tp-create-tab.active {
    color: var(--gold-deep, #8B6508);
    border-bottom-color: var(--gold);
    font-weight: 500;
}
.tp-create-tab svg { flex-shrink: 0; }

.tp-create-form {
    background: var(--ivory, #FDFBF7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: none;
}
.tp-create-form.active { display: block; }

.tp-form-group {
    margin-bottom: 18px;
}
.tp-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-light);
    margin-bottom: 6px;
}

.tp-form-row {
    display: flex;
    gap: 16px;
}
.tp-form-row > .tp-form-group { flex: 1; }

/* Quiz Builder */
.tp-quiz-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.tp-quiz-q {
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    position: relative;
}

.tp-quiz-q__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.tp-quiz-q__num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-deep);
    background: rgba(184,134,11,0.1);
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tp-quiz-q__remove {
    position: absolute;
    top: 12px; right: 12px;
    background: none; border: none;
    color: var(--ink-muted); cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.tp-quiz-q__remove:hover { background: #fce8e6; color: #c5221f; }

.tp-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.tp-quiz-option {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tp-quiz-option input[type="radio"] {
    accent-color: var(--gold);
}
.tp-quiz-option input[type="text"] {
    flex: 1;
}
.tp-quiz-option__remove {
    background: none; border: none;
    color: var(--ink-muted); cursor: pointer;
    padding: 2px;
    font-size: 1.1rem;
    line-height: 1;
}
.tp-quiz-option__remove:hover { color: #c5221f; }

.tp-add-option, .tp-add-question {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(184,134,11,0.08);
    border: 1px dashed var(--gold);
    border-radius: 8px;
    color: var(--gold-deep);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.tp-add-option:hover, .tp-add-question:hover {
    background: rgba(184,134,11,0.14);
}

.tp-create-feedback {
    font-size: 0.82rem;
    margin-left: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .sp-dash-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .sp-dash-grid--2 {
        grid-template-columns: 1fr;
    }
    .tp-students-layout {
        grid-template-columns: 1fr;
    }
    .tp-student-list {
        max-height: 300px;
    }
    .tp-assign-row, .tp-form-row {
        flex-direction: column;
        gap: 12px;
    }
    .tp-content-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sp-dash-grid--4 {
        grid-template-columns: 1fr 1fr;
    }
    .tp-modal__wrap { width: 95%; max-height: 90vh; }
    .tp-sub-header { flex-direction: column; gap: 8px; }
    .tp-grade-form__row { flex-direction: column; }
    .tp-create-tabs { overflow-x: auto; }
}
