/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #eef1f6;
    color: #2d3436;
    line-height: 1.5;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Countdown (inline in page header) ───────────────────────── */
.nav-countdown {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.95rem;
    color: #0f172a;
    letter-spacing: 0.03em;
}
.nav-countdown .cd-num {
    font-weight: 700;
    font-size: 1.05rem;
}
.nav-countdown .cd-lbl {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.8;
    margin-right: 0.15rem;
}

/* ── Layout ──────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 200px;
    min-width: 200px;
    background: linear-gradient(180deg, #4338CA 0%, #3730A3 100%);
    border-right: none;
    padding: 0.8rem 0;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease, min-width 0.2s ease;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-collapsed {
    width: 52px;
    min-width: 52px;
}
.sidebar-collapsed .sidebar-text {
    display: none;
}
.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.sidebar-collapsed .sidebar-icon {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.12s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.sidebar-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;
}
.sidebar-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-toggle {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 0.3rem;
    padding-bottom: 0.6rem;
}
.sidebar-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 0.6rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: none;
    overflow-y: auto;
}

/* ── Container (fallback for non-logged-in pages) ────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0; }
.login-page .container { max-width: none; padding: 0; }

/* ── Flash ───────────────────────────────────────────────────── */
.flash {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ── Login Page ───────────────────────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, #4338CA 0%, #3730A3 50%, #312e81 100%);
    min-height: 100vh;
}
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}
.login-card-header {
    margin-bottom: 1.5rem;
}
.login-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}
.login-card-header p {
    font-size: 0.88rem;
    color: #6b7280;
}
.login-card input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-card input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    outline: none;
    background: #fff;
}
.login-card button {
    width: 100%;
    padding: 0.7rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.login-card button:hover { background: #1d4ed8; }
.login-error {
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 0.85rem;
}
.login-card .g_id_signin { display: inline-block; }

/* ── Page Header ─────────────────────────────────────────────── */
.page-header { margin-bottom: 1rem; }
.page-header h1 { font-size: 1.4rem; }
.subtitle { color: #64748b; font-size: 0.9rem; }

/* ── Search ──────────────────────────────────────────────────── */
.search-bar { margin-bottom: 1rem; }
.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

/* ── Student Table ───────────────────────────────────────────── */
.student-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.student-table th {
    background: #f8fafc;
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.student-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.student-table tr:last-child td { border-bottom: none; }
.student-table tr:hover { background: #f8fafc; }

.student-link { font-weight: 600; }

.exams-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.exam-tag {
    background: #eff6ff;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* ── Student Detail ──────────────────────────────────────────── */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}
.student-header {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.student-header h1 { font-size: 1.5rem; }
.student-meta {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* ── Summary Table ───────────────────────────────────────────── */
.summary-section { margin-bottom: 1.2rem; }
.summary-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.summary-table th {
    background: #f8fafc;
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.summary-table td {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    vertical-align: top;
}

.score-cell { min-width: 220px; }
.score-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 0.82rem;
}
.score-line:last-child { margin-bottom: 0; }
.score-test {
    color: #64748b;
    font-size: 0.75rem;
    min-width: 55px;
}
.score-exam { flex: 1; }
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}
.score-5 { background: #16a34a; }
.score-4 { background: #65a30d; }
.score-3 { background: #eab308; color: #1e293b; }
.score-2 { background: #f97316; }
.score-1 { background: #dc2626; }
.muted { color: #94a3b8; font-size: 0.85rem; }

/* ── Sections ────────────────────────────────────────────────── */
.section { margin-bottom: 1.2rem; }
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.collapsible-header:hover { color: #2563eb; }
.collapsible-header .expand-icon {
    font-size: 0.7rem;
    color: #94a3b8;
    width: 16px;
    display: inline-block;
}

/* ── Exam Details Table ──────────────────────────────────────── */
.exam-details-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.exam-details-table {
    width: 100%;
    border-collapse: collapse;
}
.exam-details-table th {
    background: #f8fafc;
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.exam-details-table td {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}
.exam-details-table tr:last-child td { border-bottom: none; }

.editable {
    cursor: pointer;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 1px;
}
.editable:hover { border-bottom-color: #2563eb; color: #2563eb; }
.inline-input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* ── Score History Card ──────────────────────────────────────── */
.score-history-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.8rem 1rem;
}
.score-history-card .section-title {
    margin-bottom: 0.6rem;
}

.breakdown-inner {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
}

.score-history-table {
    width: 100%;
    border-collapse: collapse;
}
.score-history-table th {
    background: #f8fafc;
    text-align: left;
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.score-history-table td {
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    border-bottom: 1px solid #f1f5f9;
}
.score-history-table tr:last-child td { border-bottom: none; }

/* ── Breakdown Cards ─────────────────────────────────────────── */
.breakdown-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
}
.breakdown-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.breakdown-table th {
    text-align: left;
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.breakdown-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
}
.breakdown-table tr:last-child td { border-bottom: none; }

/* ── Course Cards ────────────────────────────────────────────── */
.courses-section-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.6rem;
}
.courses-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }

.course-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.course-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    cursor: pointer;
    user-select: none;
}
.course-header:hover { background: #f8fafc; }
.course-title { display: flex; align-items: center; gap: 0.6rem; }
.course-title h2 { font-size: 1rem; font-weight: 600; }

.expand-icon {
    font-size: 0.7rem;
    color: #94a3b8;
    width: 16px;
    display: inline-block;
}

.platform-tag {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}
.platform-timeback { background: #dbeafe; color: #1e40af; }
.platform-edmentum { background: #fef3c7; color: #92400e; }
.platform-crush_ap { background: #d1fae5; color: #065f46; }
.platform-runestone { background: #ede9fe; color: #5b21b6; }
.platform-mathacademy { background: #fce7f3; color: #9d174d; }

.course-summary { display: flex; gap: 1.5rem; }
.metric { display: flex; flex-direction: column; align-items: center; }
.metric-label { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; }
.metric-value { font-size: 0.95rem; font-weight: 600; }

/* ── Course Body / Unit Table ────────────────────────────────── */
.course-body { padding: 0 1rem 1rem; }

.unit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.unit-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.unit-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
}
.unit-name-col { min-width: 200px; }

/* Progress bar */
.progress-bar-container {
    position: relative;
    background: #f1f5f9;
    border-radius: 4px;
    height: 22px;
    min-width: 100px;
}
.progress-bar {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s;
}
.progress-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
}

.low-acc { color: #dc2626; font-weight: 600; }

.no-units { color: #94a3b8; font-size: 0.9rem; padding: 0.5rem 0; }

/* ── Coaching Plan (embedded in course card) ─────────────────── */
.course-plan-block {
    margin: 1rem 0 0.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid #27b9ff;
    background: #f0f9ff;
    border-radius: 0 6px 6px 0;
}
.course-plan-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0c7abf;
    margin-bottom: 0.35rem;
}
.course-plan-content {
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.6;
}
.course-plan-content h3 { font-size: 0.92rem; margin: 0.5rem 0 0.25rem; }
.course-plan-content ul, .course-plan-content ol { margin: 0.25rem 0 0.25rem 1.2rem; }
.course-plan-content li { margin-bottom: 0.15rem; }
.course-plan-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    font-style: italic;
}

/* ── DRI Tags in Coaching Plan ──────────────────────────────── */
.dri-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
    vertical-align: middle;
}
.dri-submitted {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.dri-missing {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.course-plan-empty {
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

/* ── Supplementary Resources ─────────────────────────────────── */
.supp-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
}
.supp-card .section-title {
    padding: 0.9rem 1.2rem;
    margin: 0;
}
.supp-count {
    background: #27b9ff40;
    color: #0c7abf;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 0.5rem;
}
.supp-list { padding: 0 1.2rem 1rem; }
.supp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.supp-item:last-child { border-bottom: none; }
.supp-course-name { color: #1e293b; font-weight: 500; }
.supp-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
}
.supp-status-active { background: #dcfce7; color: #166534; }
.supp-status-tobedeleted { background: #fef2f2; color: #991b1b; }

/* ── Notes / Activity Log ───────────────────────────────────── */
.notes-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 0;
    overflow: hidden;
}

.notes-header-bar {
    background: linear-gradient(135deg, #27b9ff40 0%, #27b9ff65 100%);
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notes-header-bar h2 {
    color: #1e3a5f;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.notes-count {
    background: rgba(0,0,0,0.1);
    color: #0f172a;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.notes-inner { padding: 1.2rem 1.4rem; }

/* Compose area */
.note-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.2rem;
}
.note-form-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}
.note-type-select {
    padding: 0.35rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.85rem;
    background: #fff;
}
.pin-label {
    font-size: 0.82rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.note-content {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
    background: #fff;
}
.note-content:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.note-submit-btn {
    margin-top: 0.5rem;
    padding: 0.45rem 1.2rem;
    background: #27b9ff40;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.note-submit-btn:hover { background: #27b9ff; }

/* Timeline */
.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.notes-timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e2e8f0;
    border-radius: 1px;
}

.note-entry {
    position: relative;
    padding: 0.6rem 0 0.6rem 38px;
    border-bottom: 1px solid #f1f5f9;
}
.note-entry:last-child { border-bottom: none; }

.note-entry::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #fff;
    z-index: 1;
}
.note-pinned::before { background: #f59e0b; }

.note-pinned {
    background: #fffbeb;
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    padding-left: calc(38px + 1.4rem);
    padding-right: 1.4rem;
    border-left: 3px solid #f59e0b;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.note-type-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.note-type-general        { background: #f1f5f9; color: #475569; }
.note-type-coaching-log   { background: #dbeafe; color: #1e40af; }
.note-type-observation    { background: #fef3c7; color: #92400e; }
.note-type-custom-plan    { background: #d1fae5; color: #065f46; }
.note-type-dri            { background: #ede9fe; color: #5b21b6; }
.note-type-academics      { background: #fce7f3; color: #9d174d; }
.note-type-guide          { background: #ffedd5; color: #9a3412; }

.note-author { font-size: 0.8rem; font-weight: 600; color: #1e293b; }
.note-time   { font-size: 0.73rem; color: #94a3b8; }
.note-pin-icon { font-size: 0.73rem; }

.note-body {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
}

.note-actions { margin-left: auto; display: flex; gap: 0.3rem; opacity: 0; transition: opacity 0.15s; }
.note-entry:hover .note-actions { opacity: 1; }
.note-action-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.72rem;
    cursor: pointer;
    color: #94a3b8;
}
.note-action-btn:hover { background: #f8fafc; color: #1e293b; }
.note-delete-btn:hover { color: #dc2626; border-color: #fca5a5; }

.notes-empty {
    text-align: center;
    padding: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════════
   GET TO A 5 PLAN
   ══════════════════════════════════════════════════════════════ */
.plan-search-bar { margin-bottom: 1rem; }
.plan-search-bar input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.plan-list { display: flex; flex-direction: column; gap: 0.5rem; }

.plan-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    cursor: pointer;
    user-select: none;
}
.plan-card-header:hover { background: #f8fafc; }
.plan-student-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.plan-student-info h3 { font-size: 0.95rem; font-weight: 600; }
.plan-grade { font-size: 0.8rem; color: #64748b; }
.plan-exams { display: flex; flex-wrap: wrap; gap: 3px; }

.plan-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.plan-badge-submitted { background: #d1fae5; color: #065f46; }
.plan-badge-pending   { background: #fef2f2; color: #dc2626; }

.plan-student-count {
    font-size: 0.78rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 10px;
}
.plan-students-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}
.plan-student-chip {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}
.plan-student-chip:hover { background: #dbeafe; text-decoration: none; }

.plan-card-body { padding: 0 1rem 1rem; }

.plan-editor-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.plan-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0.3rem 0.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.plan-toolbar button {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #475569;
}
.plan-toolbar button:hover { background: #e2e8f0; }
.toolbar-sep {
    width: 1px;
    height: 18px;
    background: #d1d5db;
    margin: 0 4px;
}

.plan-editor {
    min-height: 150px;
    padding: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
    color: #1e293b;
}
.plan-editor:empty::before {
    content: attr(placeholder);
    color: #94a3b8;
}
.plan-editor h3 { font-size: 1rem; margin: 0.5rem 0 0.2rem; }
.plan-editor blockquote {
    border-left: 3px solid #27b9ff87;
    padding-left: 0.8rem;
    color: #475569;
    margin: 0.4rem 0;
}
.plan-editor ul, .plan-editor ol { padding-left: 1.5rem; }

.plan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.plan-meta { font-size: 0.75rem; color: #94a3b8; }
.plan-save-btn {
    padding: 0.35rem 1rem;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.plan-save-btn:hover { background: #0f172a; }

/* ══════════════════════════════════════════════════════════════════
   ANNOUNCEMENTS
   ══════════════════════════════════════════════════════════════ */
.ann-compose-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.ann-compose-header {
    background: linear-gradient(135deg, #27b9ff40 0%, #27b9ff65 100%);
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}
.ann-form { padding: 1rem 1.2rem; }
.ann-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.7rem;
}
.ann-field { display: flex; flex-direction: column; gap: 3px; }
.ann-field label { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; }
.ann-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.88rem;
    background: #fff;
}
.ann-content {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}
.ann-content:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.ann-submit-btn {
    margin-top: 0.5rem;
    padding: 0.45rem 1.2rem;
    background: #27b9ff40;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.ann-submit-btn:hover { background: #27b9ff65; }

.ann-feed { display: flex; flex-direction: column; gap: 0.6rem; }

.ann-entry {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.9rem 1.2rem;
}
.ann-entry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.ann-cat-tag {
    font-size: 0.68rem;
    padding: 2px 9px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.ann-urgent {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5;
    animation: pulse-urgent 2s infinite;
}
@keyframes pulse-urgent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.2); }
    50% { box-shadow: 0 0 0 4px rgba(220,38,38,0.1); }
}
.ann-cat-general          { background: #f1f5f9; color: #475569; }
.ann-cat-ap-biology       { background: #d1fae5; color: #065f46; }
.ann-cat-ap-chemistry     { background: #dbeafe; color: #1e40af; }
.ann-cat-ap-physics-1     { background: #ede9fe; color: #5b21b6; }
.ann-cat-ap-calculus-bc   { background: #fce7f3; color: #9d174d; }
.ann-cat-ap-computer-science-a { background: #fef3c7; color: #92400e; }
.ann-cat-ap-english-language-and-composition { background: #ffedd5; color: #9a3412; }
.ann-cat-ap-environmental-science { background: #d1fae5; color: #065f46; }
.ann-cat-ap-human-geography { background: #dbeafe; color: #1e40af; }
.ann-cat-ap-microeconomics { background: #fef3c7; color: #92400e; }
.ann-cat-ap-music-theory  { background: #ede9fe; color: #5b21b6; }
.ann-cat-ap-psychology    { background: #fce7f3; color: #9d174d; }
.ann-cat-ap-united-states-government-and-politics { background: #dbeafe; color: #1e40af; }
.ann-cat-ap-united-states-history { background: #ffedd5; color: #9a3412; }
.ann-cat-ap-world-history\:-modern { background: #fef3c7; color: #92400e; }

.ann-team-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: #1e293b;
    color: #fff;
}
.ann-author { font-size: 0.8rem; font-weight: 600; color: #1e293b; }
.ann-time   { font-size: 0.73rem; color: #94a3b8; }
.ann-delete-btn {
    margin-left: auto;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.72rem;
    cursor: pointer;
    color: #94a3b8;
    opacity: 0;
    transition: opacity 0.15s;
}
.ann-entry:hover .ann-delete-btn { opacity: 1; }
.ann-delete-btn:hover { color: #dc2626; border-color: #fca5a5; }

.ann-body {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ann-empty {
    text-align: center;
    padding: 2rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════════
   LEARNING SCIENCE
   ══════════════════════════════════════════════════════════════ */
.ls-section {
    margin-bottom: 1.2rem;
}
.ls-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: #27b9ff40;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    user-select: none;
}
.ls-section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.ls-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #1e293b;
    background: rgba(0,0,0,0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.ls-section-body {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0;
}

.ls-topic { border-bottom: 1px solid #f1f5f9; }
.ls-topic:last-child { border-bottom: none; }

.ls-topic-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    user-select: none;
}
.ls-topic-header:hover { background: #f8fafc; }
.ls-topic-header h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.ls-topic-body {
    padding: 0 1rem 0.8rem 2.4rem;
}

.ls-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ls-points li {
    font-size: 0.87rem;
    line-height: 1.5;
    color: #334155;
    padding-left: 1rem;
    position: relative;
}
.ls-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #27b9ff;
}

.ls-source {
    margin-top: 0.5rem;
    font-size: 0.76rem;
    color: #94a3b8;
    font-style: italic;
    padding-left: 1rem;
    border-left: 2px solid #e2e8f0;
}

/* ── Admin ───────────────────────────────────────────────────── */
.admin-section { margin-bottom: 1.5rem; }
.admin-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.admin-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
}
.pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
}
.pending-row:last-child { border-bottom: none; }
.admin-row-info { display: flex; align-items: center; gap: 0.8rem; }
.admin-name { font-weight: 600; color: #1e293b; }
.admin-email { color: #64748b; font-size: 0.85rem; }
.admin-date { color: #94a3b8; font-size: 0.78rem; }
.admin-row-actions { display: flex; align-items: center; gap: 0.5rem; }
.admin-role-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.82rem;
    min-width: 120px;
}
.admin-btn {
    padding: 0.35rem 0.8rem;
    border: none;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.admin-btn-approve { background: #dcfce7; color: #166534; }
.admin-btn-approve:hover { background: #bbf7d0; }
.admin-btn-reject { background: #fef2f2; color: #991b1b; }
.admin-btn-reject:hover { background: #fecaca; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
}
.admin-table td {
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.admin-role-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 3px;
    text-transform: capitalize;
}
.admin-role-admin { background: #fef3c7; color: #92400e; }
.admin-role-academic { background: #dbeafe; color: #1e40af; }
.admin-role-dri { background: #ede9fe; color: #5b21b6; }
.admin-role-coach { background: #dcfce7; color: #166534; }
.admin-role-guide { background: #fce7f3; color: #9d174d; }
.admin-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.admin-status-approved { background: #dcfce7; color: #166534; }
.admin-status-pending { background: #fef3c7; color: #92400e; }
.admin-btn-edit {
    padding: 0.25rem 0.6rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.78rem;
    color: #475569;
    cursor: pointer;
}
.admin-btn-edit:hover { background: #e2e8f0; }
.admin-add-form { width: 100%; }
.admin-add-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.admin-input {
    padding: 0.4rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.85rem;
    min-width: 160px;
}
.admin-input:focus { border-color: #3b82f6; outline: none; }
.admin-add-roles {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.admin-checkbox-label {
    font-size: 0.82rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    text-transform: capitalize;
}
