/* ================================================================
   SPLASH SCREEN — Sliding Door Effect
   ================================================================ */
.splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.splash-door {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    z-index: 1;
    transition: transform 1.1s cubic-bezier(0.77, 0, 0.175, 1);
}

.splash-door-left {
    left: 0;
    transform: translateX(0);
}

.splash-door-right {
    right: 0;
    transform: translateX(0);
}

.splash.splash-open .splash-door-left {
    transform: translateX(-100%);
}

.splash.splash-open .splash-door-right {
    transform: translateX(100%);
}

.splash-logo-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash.splash-fade-logo .splash-logo-wrap {
    opacity: 0;
    transform: scale(0.88);
}

.splash-logo {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 24px rgba(0,0,0,0.08));
    animation: splashPulse 1.6s ease-in-out;
}

@keyframes splashPulse {
    0%   { opacity: 0; transform: scale(0.7); }
    40%  { opacity: 1; transform: scale(1.04); }
    60%  { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

/* ================================================================
   DESIGN SYSTEM — aligned with yns-ozturk.com
   ================================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Palette — extracted from personal site */
    --plum:         #633761;
    --plum-dark:    #4E2B4D;
    --plum-light:   #7D4E7A;
    --plum-soft:    rgba(99,55,97,0.08);
    --plum-mid:     rgba(99,55,97,0.15);

    --bg-base:      #FFFFFF;
    --bg-warm:      #F4ECE6;
    --bg-cream:     #FAF9F5;
    --bg-peach:     #FEE6C4;
    --bg-dark:      #30302E;

    --border:       rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.16);

    --text-primary:   #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-tertiary:  #888888;
    --text-on-plum:   #FFFFFF;

    /* Course accents — muted, academic tones */
    --c-plum:    #633761;
    --c-slate:   #4A5568;
    --c-teal:    #2C7A7B;
    --c-amber:   #B7791F;
    --c-navy:    #2B4C7E;
    --c-wine:    #9B2C2C;

    /* Layout */
    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  18px;
    --radius-full:9999px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
    --shadow:     0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg:  0 4px 24px rgba(0,0,0,0.08);
    --shadow-xl:  0 8px 32px rgba(0,0,0,0.1);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 0.25s;
    --nav-h: 72px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'avenir-lt-w01_35-light1475496', 'Avenir', 'Segoe UI', Arial, Helvetica, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--plum-mid); color: var(--text-primary); }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: var(--nav-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--dur) var(--ease);
}

.navbar.scrolled { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-label { display: flex; flex-direction: column; line-height: 1.25; }

.logo-name {
    font-family: 'Quicksand', 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--dur) var(--ease);
    letter-spacing: 0.2px;
}

.nav-links a:hover { color: var(--text-primary); background: var(--plum-soft); }
.nav-links a.active { color: var(--plum); background: var(--plum-soft); font-weight: 600; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 20px; height: 1.5px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--dur) var(--ease);
}

/* ================================================================
   PAGES
   ================================================================ */
.page {
    display: none;
    padding-top: var(--nav-h);
    min-height: 100vh;
}

.page.active {
    display: block;
    animation: pageIn 0.45s var(--ease);
}

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

/* ================================================================
   HERO
   ================================================================ */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.4;
    background:
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(99,55,97,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(99,55,97,0.04) 0%, transparent 50%);
}

.hero-grid { display: none; }

.hero-content {
    position: relative;
    z-index: 1;
    padding: 72px 0 64px;
    max-width: 620px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    background: var(--plum);
    color: var(--text-on-plum);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: 'Quicksand', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--plum);
}

.stat-label { font-size: 0.75rem; font-weight: 500; color: var(--text-tertiary); letter-spacing: 0.3px; }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn svg { flex-shrink: 0; }

.btn-primary {
    background: var(--plum);
    color: var(--text-on-plum);
}

.btn-primary:hover {
    background: var(--plum-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,55,97,0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-hover);
}

.btn-ghost:hover {
    color: var(--plum);
    border-color: var(--plum);
    background: var(--plum-soft);
}

/* ================================================================
   SECTIONS
   ================================================================ */
.section { padding: 64px 0 72px; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.section-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--plum);
    transition: opacity var(--dur) var(--ease);
}

.section-link:hover { opacity: 0.7; }

.page-header {
    text-align: center;
    padding: 52px 0 32px;
}

.page-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0 auto;
}

/* ================================================================
   FILTERS
   ================================================================ */
.filter-bar {
    display: inline-flex;
    gap: 2px;
    justify-content: center;
    margin-bottom: 10px;
    padding: 2px;
    background: var(--bg-cream);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.filter-bar + .filter-bar {
    margin-left: 8px;
}

.page-header + .filter-bar,
.filter-bar:first-of-type {
    margin-left: 0;
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}

.filter-btn:hover { color: var(--text-secondary); }

.filter-btn.active {
    background: var(--plum);
    color: var(--text-on-plum);
    box-shadow: var(--shadow-sm);
}

/* ================================================================
   COURSE CARDS
   ================================================================ */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-bottom: 48px;
}

.course-card {
    background: var(--bg-base);
    border-radius: var(--radius-lg);
    padding: 26px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent);
    opacity: 0.6;
    transition: opacity var(--dur) var(--ease);
}

.course-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.course-card:hover::before { opacity: 1; }

/* Course card with hero background image */
.course-card.has-hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.course-card.has-hero-image::before {
    display: none;
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.65) 50%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
    border-radius: var(--radius-lg);
    transition: background var(--dur) var(--ease);
}

.course-card.has-hero-image:hover .card-image-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.35) 100%);
}

.course-card.has-hero-image .card-top,
.course-card.has-hero-image .card-code,
.course-card.has-hero-image .card-title,
.course-card.has-hero-image .card-desc,
.course-card.has-hero-image .card-footer {
    position: relative;
    z-index: 2;
}

.course-card.has-hero-image .card-badge {
    background: #fff;
    color: #1a1a1a;
    font-weight: 700;
}

.course-card.has-hero-image .card-lock {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.course-card.has-hero-image .card-lock.unlocked {
    background: rgba(44,122,123,0.4);
    color: #fff;
}

.course-card.has-hero-image .card-code {
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.course-card.has-hero-image .card-title {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.course-card.has-hero-image .card-desc {
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.course-card.has-hero-image .card-footer {
    border-top-color: rgba(255,255,255,0.15);
}

.course-card.has-hero-image .card-meta {
    color: rgba(255,255,255,0.75);
}

.course-card.has-hero-image .card-meta svg {
    opacity: 0.65;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.card-badge.en { background: var(--plum-soft); color: var(--plum); }
.card-badge.tr { background: rgba(44,122,123,0.08); color: var(--c-teal); }

.card-lock {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--dur) var(--ease);
}

.card-lock.unlocked { color: var(--c-teal); background: rgba(44,122,123,0.08); }

.card-code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.76rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 5px;
    letter-spacing: 0.4px;
}

.card-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    display: flex;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.card-meta svg { opacity: 0.45; }

/* ================================================================
   COURSE DETAIL — HERO
   ================================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 22px 0 14px;
    transition: color var(--dur) var(--ease);
}

.back-link:hover { color: var(--plum); }

.course-hero {
    background: var(--bg-warm);
    border-radius: var(--radius-xl);
    padding: 40px 44px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 36px;
}

.course-hero.has-hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 44px;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    border: none;
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.45) 100%);
    z-index: 1;
}

.hero-content-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
}

.course-hero.has-hero-image .card-badge {
    font-size: 0.72rem;
    padding: 4px 14px;
    background: #fff;
    color: #1a1a1a;
    font-weight: 700;
}
.course-hero.has-hero-image .card-code {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.course-hero.has-hero-image .card-title {
    color: #fff;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.course-hero.has-hero-image .card-desc {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.course-hero.has-hero-image .registered-badge {
    color: #fff;
    background: rgba(255,255,255,0.15);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.course-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--card-accent, var(--plum));
    z-index: 3;
}

.course-hero .card-badge { font-size: 0.72rem; padding: 4px 14px; }
.course-hero .card-code  { font-size: 0.88rem; margin-bottom: 5px; margin-top: 12px; }

.course-hero .card-title {
    font-size: 1.7rem;
    margin-bottom: 12px;
}

.course-hero .card-desc {
    font-size: 0.95rem;
    max-width: 660px;
    -webkit-line-clamp: unset;
    margin-bottom: 0;
}

/* Course Hero Photo (round) */
.hero-photo {
    flex-shrink: 0;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    margin-right: 8px;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .course-hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-photo {
        width: 140px;
        height: 140px;
        order: -1;
        margin-right: 0;
    }
    .course-hero .card-desc {
        max-width: 100%;
    }
}

/* ================================================================
   ANNOUNCEMENTS PANEL
   ================================================================ */
.ann-panel {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b33;
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    margin-bottom: 24px;
}
.ann-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #92400e;
}
.ann-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #92400e;
}
.ann-header svg {
    color: #d97706;
    flex-shrink: 0;
}
/* Instructor form */
.ann-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #f59e0b55;
}
.ann-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ann-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(120, 53, 75, 0.08);
}
.ann-title-input {
    font-weight: 600;
}
.ann-body-input {
    resize: vertical;
    min-height: 60px;
}
.ann-publish-btn {
    padding: 8px 22px;
    background: #6B3A5D;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}
.ann-publish-btn:hover {
    background: #4E2B4D;
}
/* Announcement items */
.ann-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ann-item {
    background: #fff;
    border: 1px solid #f3e8c0;
    border-radius: 10px;
    padding: 16px 18px;
    transition: box-shadow 0.2s;
}
.ann-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ann-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.ann-item-title {
    margin: 0 0 6px 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1a1a1a;
}
.ann-item-body {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.55;
    white-space: pre-line;
}
.ann-item-date {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 500;
}
.ann-delete-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.ann-delete-btn:hover {
    opacity: 1;
}
.ann-empty {
    color: #9ca3af;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
    padding: 8px 0;
}
.ann-show-all-btn {
    display: block;
    margin: 14px auto 0;
    padding: 6px 18px;
    background: transparent;
    color: #92400e;
    border: 1px solid #f59e0b55;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ann-show-all-btn:hover {
    background: #fff7ed;
}

/* Announcement form — file attachment */
.ann-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ann-file-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px dashed var(--border-hover);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.ann-file-label:hover {
    border-color: var(--plum);
    color: var(--plum);
    background: var(--plum-soft);
}
.ann-file-input {
    display: none;
}
.ann-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.ann-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--plum-soft);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--plum);
    font-weight: 500;
}
.ann-file-chip .ann-file-size {
    opacity: 0.7;
    font-weight: 400;
}
/* Announcement item — attached files */
.ann-files {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f8f5ff;
    border-radius: 8px;
    border: 1px solid rgba(99,55,97,0.1);
}
.ann-files-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--plum);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ann-file-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid rgba(99,55,97,0.15);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--plum);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.ann-file-link:hover {
    background: var(--plum);
    color: #fff;
    border-color: var(--plum);
}
.ann-file-link:hover svg { stroke: #fff; }
.ann-file-link .ann-file-size {
    opacity: 0.65;
    font-weight: 400;
    font-size: 0.72rem;
}

/* ================================================================
   WEEKLY UPLOAD — per-week file uploads (readings, lectures, videos)
   ================================================================ */
.wk-upload-btn-wrap {
    margin-top: 6px;
}
.wk-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px dashed var(--border-hover);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}
.wk-upload-label:hover {
    border-color: var(--plum);
    color: var(--plum);
    background: var(--plum-soft);
}
.wk-upload-input {
    display: none;
}
.wk-upload-files {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(99,55,97,0.04);
    border-radius: 6px;
    border: 1px solid rgba(99,55,97,0.08);
}
.wk-upload-files-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--plum);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.wk-upload-file {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.wk-upload-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid rgba(99,55,97,0.12);
    border-radius: 5px;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--plum);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.wk-upload-link:hover {
    background: var(--plum);
    color: #fff;
    border-color: var(--plum);
}
.wk-upload-link:hover svg { stroke: #fff; }
.wk-upload-size {
    opacity: 0.6;
    font-weight: 400;
    font-size: 0.7rem;
}
.wk-upload-remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
    margin-right: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.55;
    transition: all 0.2s;
}
.wk-upload-remove:hover {
    opacity: 1;
    background: rgba(220, 38, 38, 0.1);
    transform: scale(1.1);
}
.wk-upload-remove svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}
.week-section-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--plum);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 16px 0 10px 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.empty-state-msg {
    text-align: center;
    color: var(--text-tertiary);
    font-style: italic;
    padding: 24px;
}
.res-upload-wrap {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
}
.res-upload-label {
    padding: 8px 18px;
    font-size: 0.85rem;
}
.content-item-uploaded {
    background: rgba(99,55,97,0.03);
    border-left: 3px solid var(--plum);
}
.content-unpublished-note {
    color: #b45309;
    font-style: italic;
    font-size: 0.72rem;
}
.content-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.res-publish-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
}
.res-remove-btn svg {
    width: 16px;
    height: 16px;
}
/* Static file hide/restore (instructor can remove existing course files) */
.static-file-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 4px;
}
.static-toggle-btn {
    background: none;
    border: none;
    padding: 2px;
    margin-left: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #dc2626;
    opacity: 0.55;
    transition: all 0.2s;
    vertical-align: middle;
}
.static-toggle-btn svg {
    width: 14px;
    height: 14px;
}
.static-toggle-btn:hover {
    opacity: 1;
    background: rgba(220, 38, 38, 0.1);
    transform: scale(1.1);
}
.static-toggle-btn.is-hidden {
    color: #059669;
}
.static-toggle-btn.is-hidden:hover {
    background: rgba(5, 150, 105, 0.1);
}
.static-hidden {
    opacity: 0.45;
}
.static-hidden a,
.static-hidden .content-title {
    text-decoration: line-through;
}
.static-file-wrap.static-hidden a {
    pointer-events: none;
}
/* ----- Resources drag-and-drop reordering ----- */
.res-drag-hint {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    margin: 0 0 10px 4px;
    font-style: italic;
}
.res-content-list .content-item[draggable="true"] {
    position: relative;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
.res-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--text-tertiary);
    cursor: grab;
    opacity: 0.5;
    margin-right: 4px;
    flex-shrink: 0;
    transition: opacity 0.15s var(--ease), color 0.15s var(--ease);
}
.res-drag-handle:hover { opacity: 1; color: var(--plum-deep); }
.res-drag-handle:active { cursor: grabbing; }
.res-drag-handle svg { width: 14px; height: 14px; }
.res-content-list .content-item.res-dragging {
    opacity: 0.4;
    background: var(--plum-soft);
}
.res-content-list .content-item.res-drop-target.res-drop-before {
    box-shadow: 0 -2px 0 0 var(--plum-deep) inset, 0 -2px 0 0 var(--plum-deep);
}
.res-content-list .content-item.res-drop-target.res-drop-after {
    box-shadow: 0 2px 0 0 var(--plum-deep) inset, 0 2px 0 0 var(--plum-deep);
}
.wk-publish-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* ================================================================
   COURSE DETAIL — BODY (sidebar + main)
   ================================================================ */
.course-body {
    display: grid;
    grid-template-columns: 256px 1fr;
    gap: 24px;
    margin-bottom: 80px;
}

.course-main {
    min-width: 0;
}

.course-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    align-self: start;
}

.sidebar-card {
    background: var(--bg-cream);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px;
}

.sidebar-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    padding: 7px 0;
    font-size: 0.84rem;
    gap: 2px;
}

.sidebar-item:not(:last-child) { border-bottom: 1px solid var(--border); }

.sidebar-label { color: var(--text-tertiary); font-size: 0.78rem; }
.sidebar-value { font-weight: 600; color: var(--text-primary); }

.sidebar-section { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }

.sidebar-section .sidebar-value a {
    color: var(--plum);
    text-decoration: none;
    font-weight: 600;
}
.sidebar-section .sidebar-value a:hover { text-decoration: underline; }

.sidebar-zoom .sidebar-value {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zoom-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    background: #2D8CFF;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: background var(--dur) var(--ease);
    width: fit-content;
}

.zoom-link:hover {
    background: #1a6fd1;
    text-decoration: none !important;
}

.zoom-link svg {
    opacity: 0.9;
}

.zoom-id {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar-textbook {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
    font-weight: 700;
}
.sidebar-textbook a.textbook-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(0,0,0,0.15);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.sidebar-textbook a.textbook-link:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}
.textbook-num {
    font-style: normal;
    font-weight: 800;
    color: var(--primary);
}

/* Hero Textbooks — on course home/detail page */
.hero-textbooks {
    margin-top: 18px;
    padding: 14px 18px;
    background: rgba(91, 35, 51, 0.06);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
}
.hero-tb-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 8px;
}
.hero-tb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-tb-item {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}
.hero-tb-num {
    font-weight: 800;
    color: var(--primary);
    margin-right: 2px;
}
a.hero-tb-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(91, 35, 51, 0.25);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
    cursor: pointer;
}
a.hero-tb-link:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

.sidebar-topics { margin-top: 18px; }

.sidebar-topic {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.topic-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-tertiary);
    min-width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ================================================================
   TABS
   ================================================================ */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1.5px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 12px 18px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color var(--dur) var(--ease);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1.5px; left: 10px; right: 10px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--plum);
    transform: scaleX(0);
    transition: transform var(--dur) var(--ease);
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--plum); font-weight: 600; }
.tab-btn.active::after { transform: scaleX(1); }

/* ================================================================
   CONTENT ITEMS
   ================================================================ */
.content-list { display: flex; flex-direction: column; gap: 8px; }

.content-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-base);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--dur) var(--ease);
}

.content-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.content-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.content-icon.pdf       { background: rgba(155,44,44,0.06); }
.content-icon.video     { background: rgba(99,55,97,0.06); }
.content-icon.link      { background: rgba(44,122,123,0.06); }
.content-icon.assignment{ background: rgba(183,121,31,0.06); }
.content-icon.slides    { background: rgba(43,76,126,0.06); }

.content-info { flex: 1; min-width: 0; }
.content-title { font-size: 0.87rem; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
.content-meta  { font-size: 0.74rem; color: var(--text-tertiary); margin-top: 2px; }

.content-action {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.content-action:hover {
    border-color: var(--plum);
    color: var(--plum);
    background: var(--plum-soft);
}

/* Week rows in syllabus */
.week-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-base);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.week-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--plum);
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--plum-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.week-info { flex: 1; }
.week-label { font-size: 0.72rem; color: var(--text-tertiary); font-weight: 500; }
.week-topic { font-size: 0.87rem; font-weight: 600; margin-top: 1px; color: var(--text-primary); }

.week-reading {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.week-reading svg { opacity: 0.5; width: 12px; height: 12px; }

.slides-admin {
    display: flex;
    align-items: center;
    gap: 10px;
}

.publish-btn {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--plum);
    background: transparent;
    color: var(--plum);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}

.publish-btn:hover {
    background: var(--plum-soft);
}

.publish-btn.published {
    background: var(--plum);
    color: #fff;
    border-color: var(--plum);
}

.publish-btn.published:hover {
    background: var(--c-wine);
    border-color: var(--c-wine);
}

.slides-link, .reading-link, .video-link {
    color: var(--plum);
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--dur) var(--ease);
}
.slides-link:hover, .reading-link:hover, .video-link:hover { opacity: 0.7; }

.reading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.reading-action-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.module-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--plum);
    background: var(--plum-soft);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-right: 4px;
    vertical-align: middle;
}

.reading-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 6px;
}
.reading-badge.required { background: rgba(155,44,44,0.08); color: #9B2C2C; }
.reading-badge.suggested { background: rgba(44,122,123,0.08); color: #2C7A7B; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.empty-icon svg { color: var(--text-tertiary); opacity: 0.35; }

.empty-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-hint {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* ================================================================
   ACCESS CODE MODAL
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
    animation: overlayIn 0.2s var(--ease);
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: modalIn 0.3s var(--ease);
    box-shadow: var(--shadow-xl);
}

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

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur) var(--ease);
}

.modal-close:hover { color: var(--text-primary); background: var(--bg-cream); }

.modal-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: var(--plum-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--plum);
}

.modal-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.modal-desc {
    font-size: 0.87rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.5;
}

.login-email {
    font-size: 0.8rem;
    color: var(--plum);
    font-weight: 600;
    margin-bottom: 18px;
    padding: 6px 12px;
    background: var(--plum-soft);
    border-radius: var(--radius);
    display: inline-block;
}

.auth-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.auth-choice-btn {
    width: 100%;
    justify-content: center;
}

.modal-field { margin-bottom: 16px; }

.modal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.modal-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--bg-cream);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.modal-input[type="email"],
.modal-input[type="text"],
.modal-input[type="password"] {
    font-family: inherit;
    letter-spacing: 0;
    font-size: 0.88rem;
}

.modal-input::placeholder {
    color: var(--text-tertiary);
    letter-spacing: 0;
    font-family: inherit;
}

.modal-input:focus {
    border-color: var(--plum);
    box-shadow: 0 0 0 3px var(--plum-soft);
}

.modal-input.error { border-color: var(--c-wine); }
.modal-input.error:focus { box-shadow: 0 0 0 3px rgba(155,44,44,0.1); }

.modal-error {
    font-size: 0.76rem;
    color: var(--c-wine);
    margin-top: 5px;
    display: none;
    line-height: 1.4;
}

.modal-error.show { display: block; animation: shake 0.35s var(--ease); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

.modal-submit { width: 100%; justify-content: center; padding: 12px; margin-top: 4px; }

/* Registered badge on course detail */
.registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(44,122,123,0.08);
    color: var(--c-teal);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 16px;
}

.registered-badge svg { flex-shrink: 0; }

.logout-link {
    color: var(--c-wine);
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}
.logout-link:hover {
    background: rgba(155,44,44,0.1);
}
.course-hero.has-hero-image .logout-link {
    color: rgba(255,180,180,0.9);
}
.course-hero.has-hero-image .logout-link:hover {
    background: rgba(255,255,255,0.15);
}

.change-pw-link {
    color: #6B3A5D;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
    font-size: 0.82rem;
}
.change-pw-link:hover {
    background: rgba(107,58,93,0.1);
}
.change-pw-link svg {
    width: 12px;
    height: 12px;
    vertical-align: -1px;
    margin-right: 2px;
}
.course-hero.has-hero-image .change-pw-link {
    color: rgba(255,220,240,0.9);
}
.course-hero.has-hero-image .change-pw-link:hover {
    background: rgba(255,255,255,0.15);
}

.modal-success {
    background: #dcfce7;
    color: #16a34a;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

/* Forgot Password link in login modal */
.forgot-pw-wrap {
    text-align: center;
    margin-top: 12px;
}
.forgot-pw-link {
    color: #6B3A5D;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-pw-link:hover {
    color: #4E2B4D;
    text-decoration: underline;
}

/* Reset Password student email display */
.reset-pw-student {
    background: #f3e8ee;
    color: #6B3A5D;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-bottom: 8px;
}

/* Reset Password button in Students tab */
.reset-pw-btn {
    background: #f3e8ee !important;
    color: #6B3A5D !important;
    border-color: #e5d4de !important;
}
.reset-pw-btn:hover {
    background: #e5d4de !important;
}

/* ================================================================
   ABOUT
   ================================================================ */
.about-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 44px;
    background: var(--bg-warm);
    border-radius: var(--radius-xl);
    padding: 44px;
    border: 1px solid var(--border);
    max-width: 860px;
    margin: 0 auto 80px;
}

.about-left { text-align: center; }

.about-avatar {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
}

.about-left h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.about-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.about-section { margin-bottom: 24px; }
.about-section:last-child { margin-bottom: 0; }

.about-section h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.about-section p {
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.about-course-chip {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.73rem;
    font-weight: 500;
    background: var(--bg-base);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.about-course-chip:hover {
    background: var(--plum);
    color: #fff;
    border-color: var(--plum);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    background: var(--bg-cream);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--text-tertiary);
}

.footer-note { opacity: 0.6; }

/* ================================================================
   PDF VIEWER
   ================================================================ */
.pdf-viewer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.pdf-viewer-overlay.open {
    display: flex;
}

.pdf-viewer {
    width: 90vw;
    height: 90vh;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-cream);
    border-bottom: 1px solid var(--border);
}

.pdf-viewer-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pdf-viewer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}

.pdf-viewer-close:hover {
    color: var(--text-primary);
    background: var(--border);
}

.pdf-viewer-frame {
    flex: 1;
    width: 100%;
    border: none;
}

/* ----- Page-info badge in the PDF header (canvas mode only) ----- */
.pdf-viewer-pageinfo {
    margin-left: auto;
    margin-right: 12px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pdf-viewer-pageinfo:empty { display: none; }

/* ----- Canvas-based PDF viewer (used on phones, tablets, touch devices) -----
   Hidden by default. JS adds `.use-canvas` to .pdf-viewer when canvas mode
   is active; that toggles the iframe off and this container on. */
.pdf-viewer-canvas {
    display: none;
    flex: 1;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #4a4a4a;
    padding: 16px 8px;
    text-align: center;
    /* Block save-as-image and text-selection so the file stays read-only */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.pdf-viewer.use-canvas .pdf-viewer-frame { display: none; }
.pdf-viewer.use-canvas .pdf-viewer-canvas { display: block; }

.pdf-page-canvas {
    display: block;
    margin: 0 auto 12px;
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    /* Right-click "Save image as..." is blocked by oncontextmenu on the parent;
       this prevents long-press save on iOS */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}
.pdf-page-placeholder {
    display: block;
    margin: 0 auto 12px;
    width: min(94%, 800px);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    color: #999;
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 32px 12px;
}
.pdf-viewer-loading {
    color: #eee;
    padding: 40px 16px;
    font-size: 0.9rem;
}
.pdf-viewer-error {
    color: #ffcccc;
    padding: 40px 16px;
    font-size: 0.9rem;
}

/* ================================================================
   VIDEO PLAYER MODAL
   ================================================================ */
.video-player-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.video-player-overlay.open {
    display: flex;
}

.video-player {
    width: 80vw;
    max-width: 960px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-cream);
    border-bottom: 1px solid var(--border);
}

.video-player-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.video-player-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}

.video-player-close:hover {
    color: var(--text-primary);
    background: var(--border);
}

.video-player-element {
    width: 100%;
    max-height: 75vh;
    background: #000;
    outline: none;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1080px) {
    .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .course-body { grid-template-columns: 1fr; }
    .course-sidebar { position: static; }
    .about-card { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 10px 20px 18px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open { display: flex; }

    .hero-content { padding: 44px 0 36px; }
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 18px; }
    .stat-num { font-size: 1.3rem; }

    .course-grid { grid-template-columns: 1fr; }
    .course-hero { padding: 26px; }
    .course-hero .card-title { font-size: 1.35rem; }

    .tabs { gap: 0; }
    .tab-btn { padding: 10px 12px; font-size: 0.78rem; }

    .modal { padding: 28px; }
    .footer-inner { flex-direction: column; gap: 4px; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .course-card { padding: 20px; }
    .card-title { font-size: 1.02rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}

/* --- Course Evaluation Section --- */
.eval-section {
    text-align: center;
    padding: 48px 24px;
    max-width: 520px;
    margin: 0 auto;
}
.eval-icon {
    margin-bottom: 16px;
    color: #E6A817;
}
.eval-icon svg {
    width: 48px;
    height: 48px;
}
.eval-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.eval-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}
.eval-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #E6A817;
    color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.eval-link:hover {
    background: #D49B15;
    transform: translateY(-1px);
}
.eval-link svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}
.eval-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.eval-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* --- Assignment Submission Form --- */
.submit-section {
    margin-top: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 10px;
}
.submit-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.submit-header svg {
    width: 15px;
    height: 15px;
}
.submit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.submit-file-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.submit-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.submit-file-btn:hover {
    border-color: var(--primary);
    background: #faf5f9;
}
.submit-file-btn svg {
    width: 14px;
    height: 14px;
}
.submit-file-input {
    display: none;
}
.submit-file-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}
.submit-file-name.submit-error {
    color: #dc2626;
    font-style: normal;
}
.submit-send-btn {
    align-self: flex-start;
    padding: 9px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.submit-send-btn:hover:not(:disabled) {
    background: var(--primary-dark, #4E2B4D);
}
.submit-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.submit-status {
    font-size: 0.82rem;
    font-weight: 500;
    min-height: 1.2em;
}
.submit-status.submit-success {
    color: #16a34a;
}
.submit-status.submit-error {
    color: #dc2626;
}
.submit-admin-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 10px 14px;
    margin-top: 10px;
}
.submit-admin-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
/* Submission toggle (instructor) */
.submit-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.submit-toggle-status {
    font-weight: 600;
    font-size: 0.85rem;
}
.submit-toggle-status.open {
    color: #16a34a;
}
.submit-toggle-status.closed {
    color: #9ca3af;
}
.submit-toggle-btn {
    margin-left: auto;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid;
}
.submit-toggle-btn.closed {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}
.submit-toggle-btn.closed:hover {
    background: #15803d;
    border-color: #15803d;
}
.submit-toggle-btn.open {
    background: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}
.submit-toggle-btn.open:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
/* Submission closed note (student) */
.submit-closed-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #9ca3af;
    padding: 10px 14px;
    margin-top: 10px;
    font-style: italic;
}
.submit-closed-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #9ca3af;
}

/* --- Gradebook --- */
.gradebook-panel {
    padding: 24px;
}

/* Instructor Table View */
.gradebook-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}
.gradebook-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 600px;
}
.gradebook-table th,
.gradebook-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}
.gradebook-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 1;
}
.gb-student-col {
    text-align: left !important;
    min-width: 180px;
    font-weight: 500;
    color: #1f2937;
}
.gb-assign-col {
    min-width: 100px;
}
.gb-assign-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.gb-assign-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}
.gb-assign-pts {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 400;
}
.gb-publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 8px;
    font-size: 0.68rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #6b7280;
}
.gb-publish-btn.published {
    background: #dcfce7;
    color: #16a34a;
    border-color: #86efac;
}
.gb-publish-btn:hover {
    transform: scale(1.05);
}
.gb-student-cell {
    text-align: left !important;
}
.gb-student-id {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.82rem;
}
.gb-student-email {
    font-size: 0.72rem;
    color: #9ca3af;
}
.gb-grade-cell {
    padding: 6px 8px;
}
.gb-grade-input {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    font-size: 0.82rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gb-grade-input:focus {
    outline: none;
    border-color: #6B3A5D;
    box-shadow: 0 0 0 3px rgba(107, 58, 93, 0.1);
}
.gb-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.gb-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #6B3A5D;
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.gb-save-btn:hover {
    background: #4E2B4D;
    transform: translateY(-1px);
}
.gb-save-status {
    font-size: 0.8rem;
    color: #16a34a;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
}
.gb-save-status.show {
    opacity: 1;
}

/* Student Gradebook View */
.gradebook-student {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gb-student-info {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #6b7280;
}
.gb-student-grades {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gb-student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    border: 1px solid #f3f4f6;
    transition: box-shadow 0.2s;
}
.gb-student-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.gb-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gb-row-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}
.gb-row-pts {
    font-size: 0.72rem;
    color: #9ca3af;
}
.gb-row-grade {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gb-grade-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #6B3A5D;
    background: #f3e8ee;
    padding: 4px 12px;
    border-radius: 8px;
}
.gb-not-published {
    font-size: 0.78rem;
    color: #9ca3af;
    font-style: italic;
}
.gb-no-grade {
    font-size: 0.85rem;
    color: #d1d5db;
}

/* Gradebook Average Row (Instructor) */
.gb-avg-row {
    background: #f3e8ee;
    border-top: 2px solid #e5d4de;
}
.gb-avg-row td {
    font-weight: 700;
    color: #6B3A5D;
    font-size: 0.85rem;
}
.gb-avg-label {
    font-style: italic;
}
.gb-avg-cell {
    text-align: center;
}

/* Student view average */
.gb-row-avg {
    color: #6B3A5D;
    font-weight: 600;
    font-style: normal;
}

/* --- Students Panel (Instructor Only) --- */
.students-panel {
    padding: 24px;
}
.students-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.students-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.students-title svg {
    width: 18px;
    height: 18px;
}
.students-stats {
    display: flex;
    gap: 10px;
    align-items: center;
}
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}
.stat-badge svg {
    width: 12px;
    height: 12px;
}
.stat-approved {
    background: #dcfce7;
    color: #166534;
}
.stat-pending {
    background: #fef3c7;
    color: #92400e;
}
.approve-all-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.approve-all-btn:hover {
    background: #15803d;
}
.students-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.students-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.students-table th {
    text-align: left;
    padding: 12px 14px;
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.students-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.students-table tr:last-child td {
    border-bottom: none;
}
.student-row.row-pending {
    background: #fffbeb;
}
.student-row.row-approved {
    background: #f0fdf4;
}
.student-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}
.student-status.approved {
    background: #dcfce7;
    color: #166534;
}
.student-status.pending {
    background: #fef3c7;
    color: #92400e;
}
.student-status svg {
    width: 11px;
    height: 11px;
}
.student-actions {
    display: flex;
    gap: 6px;
}
.student-action-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.student-action-btn:hover {
    transform: translateY(-1px);
}
.student-action-btn.approve-btn {
    background: #16a34a;
    color: #fff;
}
.student-action-btn.approve-btn:hover {
    background: #15803d;
}
.student-action-btn.remove-btn {
    background: #fee2e2;
    color: #dc2626;
}
.student-action-btn.remove-btn:hover {
    background: #fecaca;
}

/* --- Pending Approval Modal --- */
.pending-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.pending-overlay.open {
    opacity: 1;
}
.pending-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.pending-icon {
    margin-bottom: 16px;
    color: #E6A817;
}
.pending-icon svg {
    width: 40px;
    height: 40px;
}
.pending-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.pending-msg {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}
.pending-ok-btn {
    padding: 10px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.pending-ok-btn:hover {
    background: var(--primary-dark, #1a365d);
}

/* --- Reset All Students --- */
.students-reset-wrap {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
    text-align: right;
}
.reset-all-btn {
    padding: 10px 20px;
    background: #fff;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.reset-all-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* --- Reset Confirmation Modal --- */
.reset-confirm-modal {
    max-width: 440px;
}
.reset-icon {
    color: #dc2626;
}
.reset-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.reset-confirm-btn {
    padding: 10px 24px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.reset-confirm-btn:hover {
    background: #b91c1c;
}
.reset-cancel-btn {
    padding: 10px 24px;
    background: var(--bg-card, #f8f8f8);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.reset-cancel-btn:hover {
    background: var(--border);
}

@media (max-width: 768px) {
    .students-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .approve-all-btn {
        margin-left: 0;
    }
    .students-table {
        font-size: 0.8rem;
    }
    .students-table th,
    .students-table td {
        padding: 10px 8px;
    }
    .students-reset-wrap {
        text-align: center;
    }
}

/* ================================================================
   EMAIL NOTIFICATION TOAST
   ================================================================ */
.email-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    z-index: 99999;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 420px;
}
.email-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.email-toast-success { background: #2d7d46; }
.email-toast-error   { background: #b33a3a; }
.email-toast-warning { background: #b37a1a; }
.email-toast-info    { background: #5B2333; }
.email-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.email-toast-msg {
    line-height: 1.4;
}

/* ================================================================
   YNS-OZTURK.COM ECOSYSTEM ALIGNMENT
   Mirrors the typography & visual rhythm of yns-ozturk.com so the
   Course Portal reads as a continuation of the same site. The Wix
   personal portfolio uses Avenir Light W01 throughout, with ALL
   CAPS headings ("POLITICAL SCIENCE & INTERNATIONAL RELATIONS") in
   refined letter-spacing. We mirror that here.
   ================================================================ */
:root {
    --font-display: 'avenir-lt-w01_85-heavy1475544', 'Avenir Heavy', 'Avenir Next', 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-sans:    'avenir-lt-w01_35-light1475496', 'Avenir', 'Avenir Next', 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'avenir-lt-w01_35-light1475496', 'Avenir', 'Avenir Next', 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
    --plum-deep:    #3F1F3E;
    --rule:         rgba(99,55,97,0.18);
    --gold:         #B7942A;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.7;
    letter-spacing: 0.01em;
    font-feature-settings: "kern", "liga";
}

/* ----- Navbar mirrors yns-ozturk.com (Avenir, uppercase nav) ----- */
.navbar { background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border); }
.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.96rem;
    letter-spacing: 0.02em;
    color: var(--plum-deep);
    text-transform: none;
}
.logo-sub {
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    text-transform: none;
}
.nav-link,
.nav-links a {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.nav-link.active, .nav-link:hover,
.nav-links a.active, .nav-links a:hover { color: var(--plum-deep); }

/* ----- Hero — direct mirror of yns-ozturk.com bio layout ----- */
.hero {
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 100%),
        var(--bg-warm);
}
.hero-content { max-width: 720px; padding: 88px 0 80px; }

.hero-badge {
    background: transparent;
    color: var(--text-tertiary);
    padding: 0 0 18px 0;
    margin-bottom: 28px;
    border-radius: 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-style: normal;
    display: block;
    width: fit-content;
}

/* Hero title — same ALL CAPS Avenir treatment as
   "POLITICAL SCIENCE & INTERNATIONAL RELATIONS" on yns-ozturk.com */
.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.85rem, 3.6vw, 2.7rem);
    line-height: 1.18;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--plum-deep);
    margin-bottom: 28px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.04rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.78;
    max-width: 580px;
    margin-bottom: 40px;
    letter-spacing: 0.01em;
}
.hero-greeting {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--plum-deep);
    letter-spacing: 0.02em;
    margin-right: 4px;
}

.hero-actions { gap: 14px; margin-bottom: 56px; }

.hero-stats { gap: 38px; padding-top: 32px; border-top: 1px solid var(--rule); }
.stat-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: 0.02em;
    color: var(--plum-deep);
}
.stat-label {
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-top: 4px;
}
.stat-divider { background: var(--rule); height: 38px; }

/* ----- Buttons — Avenir caps, like Wix theme CTAs ----- */
.btn {
    border-radius: 4px;
    padding: 13px 28px;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.btn-primary {
    background: var(--plum-deep);
    color: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.btn-primary:hover { background: var(--plum); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,55,97,0.22); }
.btn-secondary, .btn-ghost {
    background: #fff;
    color: var(--plum-deep);
    border: 1px solid var(--rule);
}
.btn-secondary:hover, .btn-ghost:hover { border-color: var(--plum); color: var(--plum-deep); background: #fff; }

/* ----- Page titles (Courses, About) — ALL CAPS Avenir ----- */
.page-title, .courses-title, .about-title,
[id$="-page"] > .container > h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--plum-deep);
    text-align: center;
}
.page-desc, .courses-subtitle, .about-subtitle, .page-header p {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* ----- Course cards — clean Wix theme styling ----- */
.course-card {
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.25s var(--ease);
}
.course-card:hover {
    border-color: var(--rule);
    box-shadow: 0 12px 32px rgba(99,55,97,0.14);
    transform: translateY(-3px);
}
.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: none;
}
.card-code {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--plum-deep);
    text-transform: uppercase;
    font-weight: 700;
}
.card-badge {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 2px;
}
.card-desc { font-family: var(--font-body); font-weight: 300; line-height: 1.65; }

/* ----- Course-detail hero ----- */
.course-hero-badge, .lang-tag {
    font-family: var(--font-sans);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ----- Section titles & tabs ----- */
.tab-btn {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.tab-btn.active { color: var(--plum-deep); }

/* Course detail sidebar headers */
.course-info-block h3,
.info-block-title {
    font-family: var(--font-display);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 8px;
}

/* ----- Week items — Wix-style clean cards ----- */
.week-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--plum-deep);
    background: var(--plum-soft);
    letter-spacing: 0.02em;
}
.week-label {
    font-family: var(--font-sans);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.week-topic {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--plum-deep);
    letter-spacing: 0.01em;
    text-transform: none;
}
.week-reading {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}
.week-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s var(--ease);
}
.week-item:hover { border-color: var(--rule); box-shadow: 0 2px 12px rgba(99,55,97,0.06); }

/* ----- Content list items ----- */
.content-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.96rem;
    letter-spacing: 0.015em;
    color: var(--text-primary);
}
.content-meta { font-family: var(--font-body); font-weight: 300; letter-spacing: 0.01em; }
.content-action {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 6px 14px;
}

/* ----- Modal refinement ----- */
.modal-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--plum-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 1.1rem;
}
.modal-desc { font-family: var(--font-body); font-weight: 300; }
.modal-label {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ----- Announcement section ----- */
.announcements-title, .ann-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--plum-deep);
    letter-spacing: 0.02em;
}
.ann-body { font-family: var(--font-body); font-weight: 300; }

/* ----- Footer mirrors yns-ozturk.com institutional foot ----- */
.footer {
    background: var(--plum-deep);
    color: rgba(255,255,255,0.78);
    border-top: 4px solid var(--gold);
    padding: 36px 0 32px;
}
.footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.footer-inner p:first-child {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.footer-note {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.58);
    opacity: 1;
    text-transform: none;
}
.footer-inner::before {
    content: "Recep Tayyip Erdoğan University · Faculty of Economics & Administrative Sciences · Department of International Relations";
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
.footer-inner::after {
    content: "";
    display: block;
    width: 38px;
    height: 1px;
    background: var(--gold);
    margin-top: 8px;
}

/* ----- About page — Wix layout cleanup ----- */
.about-section h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--plum-deep);
    margin-bottom: 12px;
}
.about-section p {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.78;
    letter-spacing: 0.01em;
}
.about-left h2, .about-left h2 a {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--plum-deep);
    letter-spacing: 0.02em;
    text-transform: none;
}
.about-role {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.about-course-chip {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: none;
}

/* ----- Filter & form controls ----- */
.filter-btn, .filter-bar button {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ----- Selection / focus polish ----- */
::selection { background: var(--plum-mid); color: var(--plum-deep); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--plum);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Small consistent spacing for week items */
.content-list .week-item + .week-item { margin-top: 14px; }

/* ----- Course detail hero card title (e.g. "Turkish Foreign Policy — I") ----- */
.course-hero .card-title,
#courseHero .card-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--plum-deep);
    text-transform: none;
}

/* ================================================================
   MOBILE & TABLET RESPONSIVENESS (overrides — keep last)
   Ensures the Course Portal is fully usable on phones (≤480px),
   small phones (≤380px), and tablets in portrait/landscape (≤1024px).
   ================================================================ */

/* ---- Global: prevent horizontal page scroll on any device ---- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
img, svg, video, iframe { max-width: 100%; }

/* ---- iOS Safari: stop auto-zoom on form focus (needs ≥16px) ---- */
input, select, textarea {
    font-size: 16px;
}

/* ---- Touch-friendly tap targets everywhere ---- */
@media (pointer: coarse) {
    .btn,
    .tab-btn,
    .content-action,
    .pdf-view-link,
    .reading-link,
    .nav-link,
    .nav-links a,
    .ann-btn,
    .approve-all-btn,
    .reset-cancel-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    /* Native tap highlight subdued (we keep our own :active styles) */
    a, button { -webkit-tap-highlight-color: rgba(63,31,62,0.12); }
}

/* ================================================================
   TABLET (≤1024px) — large phones in landscape & small tablets
   ================================================================ */
@media (max-width: 1024px) {
    .container { padding-left: 20px; padding-right: 20px; }
    .course-body { grid-template-columns: 1fr; }
    .course-sidebar { position: static; }
    .about-card { grid-template-columns: 1fr; gap: 28px; }
    .hero-stats { flex-wrap: wrap; }

    /* Tab bar: turn into horizontal scroll strip so many tabs all fit */
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab-btn { flex: 0 0 auto; white-space: nowrap; }
}

/* ================================================================
   PHONE (≤768px) — typical phones in portrait
   ================================================================ */
@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }

    /* Hero: tighter padding, smaller stats, full-width CTAs */
    .hero-content { padding: 36px 0 28px; }
    .hero-stats { gap: 14px 22px; }
    .stat-num { font-size: 1.25rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    /* Course grid: one column on phones */
    .course-grid { grid-template-columns: 1fr; gap: 16px; }
    .course-card { padding: 20px; }
    .course-hero { padding: 22px; flex-direction: column; text-align: center; }
    .course-hero .hero-photo { width: 130px; height: 130px; order: -1; margin-right: 0; }
    .course-hero .card-title { font-size: 1.25rem; }
    .course-hero .card-desc { max-width: 100%; font-size: 0.92rem; }

    /* Lecture/reading rows: let multi-PDF lists wrap to multiple lines */
    .week-reading,
    .static-file-wrap,
    .reading-link,
    .pdf-view-link {
        flex-wrap: wrap;
        word-break: break-word;
    }
    .static-file-wrap { display: inline-flex !important; }

    /* Sidebar: stack inner items cleanly */
    .sidebar-item { padding: 12px 0; }

    /* Modals (login, etc.) */
    .modal { padding: 22px; width: calc(100vw - 32px); max-width: 100%; }

    /* PDF & video viewers: full screen on small devices */
    .pdf-viewer,
    .video-player {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .pdf-viewer-header,
    .video-player-header { padding: 10px 14px; }
    .pdf-viewer-title,
    .video-player-title {
        font-size: 0.82rem;
        max-width: calc(100vw - 80px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .pdf-viewer-close,
    .video-player-close {
        width: 44px; height: 44px;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .video-player-element { max-height: calc(100vh - 60px); }

    /* Tables stay scrollable horizontally; ensure wrappers fill width */
    .gradebook-table-wrap,
    .students-table-wrap { -webkit-overflow-scrolling: touch; }

    /* Email toast: don't crowd the screen edges */
    .email-toast {
        left: 16px; right: 16px; bottom: 16px;
        max-width: none;
        font-size: 13px;
        padding: 12px 16px;
    }

    /* Footer */
    .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}

/* ================================================================
   SMALL PHONE (≤480px) — iPhone SE / older Android
   ================================================================ */
@media (max-width: 480px) {
    :root { --nav-h: 60px; }
    .container { padding-left: 14px; padding-right: 14px; }

    .hero-title { font-size: 1.55rem; line-height: 1.25; }
    .hero-subtitle { font-size: 0.92rem; }

    .course-card { padding: 18px; }
    .card-title { font-size: 1rem; }
    .card-desc { font-size: 0.88rem; }

    .tab-btn { padding: 9px 11px; font-size: 0.74rem; }

    .sidebar-value, .sidebar-textbook { font-size: 0.88rem; }
    .ann-panel { padding: 18px 18px; }
    .ann-header h3 { font-size: 1.02rem; }

    /* Logo block in navbar: shrink subtitle so it doesn't wrap */
    .logo-name { font-size: 0.88rem; }
    .logo-sub  { font-size: 0.6rem;  letter-spacing: 0.06em; }

    /* Course meta chips (level / weeks / language) wrap nicely */
    .course-meta, .course-tags { flex-wrap: wrap; gap: 6px; }
}

/* ================================================================
   TINY PHONE (≤380px) — last-ditch tightening
   ================================================================ */
@media (max-width: 380px) {
    .hero-title { font-size: 1.4rem; }
    .stat-num { font-size: 1.1rem; }
    .course-hero .hero-photo { width: 110px; height: 110px; }
    .tab-btn { padding: 8px 9px; font-size: 0.7rem; }
}

/* ================================================================
   LANDSCAPE PHONE — keep PDF viewer usable when device is rotated
   ================================================================ */
@media (max-width: 900px) and (orientation: landscape) {
    .pdf-viewer,
    .video-player { width: 100vw; height: 100vh; border-radius: 0; }
    .hero-content { padding: 24px 0 18px; }
}
