:root {
    --teacher-bg: #f2f5fa;
    --teacher-card: #ffffff;
    --teacher-border: #d8e0ed;
    --teacher-text: #0f172a;
    --teacher-subtext: #5f6f87;
    --teacher-primary: #4f46e5;
    --teacher-primary-soft: #eef2ff;
    --teacher-success: #0f766e;
    --teacher-danger: #b42318;
    --teacher-warning: #b54708;
    --teacher-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

/* Critical teacher navigation styles: keep this first to avoid unstyled top tabs. */
body.teacher-body {
    margin: 0;
}

.teacher-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: 0.78rem 1.05rem 0.62rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-topbar-inner {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.78rem;
}

.teacher-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    min-width: max-content;
    color: var(--teacher-text);
    text-decoration: none;
}

.teacher-brand-mark {
    width: 2.42rem;
    height: 2.42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1f6feb 70%, #14b8a6 100%);
    box-shadow: 0 12px 26px rgba(31, 111, 235, 0.28);
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.teacher-brand-copy {
    display: grid;
    line-height: 1.05;
}

.teacher-brand-copy strong {
    color: #102033;
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.teacher-brand-copy small {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-nav-scroll {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.38rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding: 0.18rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    scrollbar-width: thin;
}

.teacher-nav-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    min-height: 2.18rem;
    padding: 0 0.78rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #40516a;
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 880;
    line-height: 1;
    word-break: keep-all;
    white-space: nowrap;
}

.teacher-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 50%;
    color: #64748b;
    background: rgba(226, 232, 240, 0.62);
    font-size: 0.74rem;
}

.teacher-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #1f6feb 0%, #2457d6 100%);
    box-shadow: 0 10px 20px rgba(31, 111, 235, 0.22);
}

.teacher-nav-link.active .teacher-nav-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.teacher-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.24rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    padding: 0 1.08rem;
    color: #334155;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .teacher-topbar-inner {
        grid-template-columns: 1fr;
    }

    .teacher-logout {
        width: 100%;
    }
}

:root {
    --teacher-bg: #f2f5fa;
    --teacher-card: #ffffff;
    --teacher-border: #d8e0ed;
    --teacher-text: #0f172a;
    --teacher-subtext: #5f6f87;
    --teacher-primary: #4f46e5;
    --teacher-primary-soft: #eef2ff;
    --teacher-success: #0f766e;
    --teacher-danger: #b42318;
    --teacher-warning: #b54708;
    --teacher-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

body.teacher-body {
    background: radial-gradient(circle at top right, #e8edff 0%, #f2f5fa 35%, #f2f5fa 100%);
    color: var(--teacher-text);
}

.teacher-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1.15rem 1.1rem 1.8rem;
}

.teacher-hero {
    border: 1px solid var(--teacher-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.96));
    box-shadow: var(--teacher-shadow);
    padding: 1rem 1.1rem;
    margin-bottom: 0.95rem;
}

.teacher-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.teacher-hero-title {
    font-size: 1.36rem;
    font-weight: 920;
    letter-spacing: -0.3px;
    color: #111b33;
}

.teacher-hero-sub {
    margin-top: 0.25rem;
    font-size: 0.86rem;
    font-weight: 720;
    color: var(--teacher-subtext);
    line-height: 1.45;
}

.teacher-badge-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.teacher-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.62rem;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 860;
}

.teacher-pill.on {
    background: #e7f9f3;
    color: #0f6b48;
    border-color: #bcecd7;
}

.teacher-pill.off {
    background: #fef0f0;
    color: #a6182f;
    border-color: #f9cdd3;
}

.teacher-pill.warn {
    background: #fff5ea;
    color: var(--teacher-warning);
    border-color: #fed8aa;
}

.teacher-hero-action {
    min-width: 240px;
    text-align: right;
}

.teacher-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--teacher-subtext);
    font-weight: 760;
}

.teacher-layout {
    display: grid;
    grid-template-columns: 318px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.teacher-sidebar {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 0.8rem;
}

.teacher-card {
    border: 1px solid var(--teacher-border);
    border-radius: 14px;
    background: var(--teacher-card);
    box-shadow: var(--teacher-shadow);
    padding: 0.88rem 0.9rem;
}

.teacher-card-title {
    font-size: 0.96rem;
    font-weight: 900;
    color: #111b33;
    margin-bottom: 0.6rem;
}

.teacher-card-sub {
    font-size: 0.76rem;
    color: var(--teacher-subtext);
    font-weight: 750;
    margin-bottom: 0.6rem;
}

.teacher-side-nav {
    display: grid;
    gap: 0.36rem;
}

.teacher-side-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #24324b;
    background: #f8fbff;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    padding: 0.46rem 0.58rem;
    font-size: 0.8rem;
    font-weight: 820;
}

.teacher-side-nav a:hover {
    color: #243fdd;
    border-color: #b9caf3;
    background: #edf3ff;
}

.teacher-side-nav a.active {
    color: #2f3be0;
    border-color: #bcc8fb;
    background: #eef2ff;
}

.teacher-class-list {
    display: grid;
    gap: 0.45rem;
}

.teacher-class-item {
    border: 1px solid #d8e2ef;
    border-radius: 10px;
    background: #fcfdff;
    padding: 0.5rem;
}

.teacher-class-item.active {
    border-color: #b8c6f7;
    background: #eef3ff;
}

.teacher-class-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.35rem;
}

.teacher-class-name {
    font-size: 0.82rem;
    font-weight: 870;
    color: #1a2853;
}

.teacher-class-meta {
    font-size: 0.71rem;
    font-weight: 740;
    color: #5f6f87;
}

.teacher-class-code {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #50617f;
    font-weight: 760;
}

.teacher-class-actions {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.teacher-main {
    display: grid;
    gap: 0.86rem;
}

.teacher-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.68rem;
}

.teacher-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

.teacher-kpi {
    border: 1px solid #d8e2ef;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.64rem 0.7rem;
}

.teacher-kpi-label {
    color: #5f6f87;
    font-size: 0.72rem;
    font-weight: 860;
    text-transform: uppercase;
}

.teacher-kpi-value {
    margin-top: 0.34rem;
    font-size: 1.24rem;
    font-weight: 930;
    color: #101a33;
}

.teacher-kpi-tip {
    margin-top: 0.14rem;
    font-size: 0.72rem;
    color: #8a97ad;
    font-weight: 730;
}

.teacher-empty {
    border: 1px dashed #c8d4e6;
    border-radius: 10px;
    background: #f8fbff;
    color: #5f6f87;
    font-size: 0.82rem;
    font-weight: 760;
    padding: 0.65rem;
}

.teacher-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.62rem;
    flex-wrap: wrap;
}

.teacher-section-title {
    font-size: 1rem;
    font-weight: 900;
    color: #111b33;
}

.teacher-section-meta {
    font-size: 0.76rem;
    color: #5f6f87;
    font-weight: 760;
}

.teacher-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
}

.teacher-field {
    margin-bottom: 0.54rem;
}

.teacher-field label {
    display: block;
    margin-bottom: 0.24rem;
    font-size: 0.76rem;
    font-weight: 850;
    color: #2c3c59;
}

.teacher-field input,
.teacher-field textarea,
.teacher-field select {
    width: 100%;
    border: 1px solid #cad6e6;
    border-radius: 10px;
    background: #fff;
    color: #111b33;
    padding: 0.5rem 0.58rem;
    font-size: 0.85rem;
    font-family: inherit;
}

.teacher-field textarea {
    min-height: 88px;
    resize: vertical;
}

.teacher-table-wrap {
    overflow: auto;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
}

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.teacher-table th,
.teacher-table td {
    border-bottom: 1px solid #e2e9f3;
    padding: 0.5rem 0.42rem;
    text-align: left;
    vertical-align: middle;
}

.teacher-table th {
    background: #f8fbff;
    color: #5f6f87;
    font-size: 0.72rem;
    font-weight: 880;
    text-transform: uppercase;
}

.teacher-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cad6e6;
    border-radius: 9px;
    padding: 0.28rem 0.54rem;
    text-decoration: none;
    color: #1f2f4f;
    background: #fff;
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 820;
}

.teacher-mini-btn:hover {
    color: #2f3be0;
    border-color: #b6c7f2;
}

.teacher-recent-list {
    display: grid;
    gap: 0.45rem;
}

.teacher-recent-item {
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.48rem 0.54rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.teacher-recent-link {
    color: inherit;
    text-decoration: none;
    align-items: center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.teacher-recent-link:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.teacher-recent-title {
    font-size: 0.79rem;
    color: #24324b;
    font-weight: 840;
}

.teacher-recent-meta {
    font-size: 0.75rem;
    color: #5f6f87;
    font-weight: 740;
}

.teacher-trend-list {
    display: grid;
    gap: 0.4rem;
}

.teacher-trend-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 0.46rem;
    color: #44546f;
    font-size: 0.74rem;
    font-weight: 760;
}

.teacher-trend-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #dbe5f3;
}

.teacher-trend-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #4f46e5);
}

.teacher-lock {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #f9ddb2;
    background: #fff5ea;
    color: #b54708;
    padding: 0.1rem 0.42rem;
    font-size: 0.66rem;
    font-weight: 860;
    white-space: nowrap;
}

.teacher-sub-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.9rem;
}

.teacher-plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.66rem;
}

.teacher-plan {
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.72rem;
}

.teacher-plan.pro {
    border-color: #c5cdfa;
    background: linear-gradient(180deg, #f1f4ff 0%, #fbfdff 100%);
}

.teacher-plan-name {
    font-size: 0.82rem;
    color: #50617f;
    font-weight: 860;
    text-transform: uppercase;
}

.teacher-plan-price {
    margin-top: 0.3rem;
    color: #111b33;
    font-size: 1.54rem;
    font-weight: 940;
}

.teacher-plan-price small {
    font-size: 0.76rem;
    color: #5f6f87;
}

.teacher-plan-list {
    margin-top: 0.6rem;
    display: grid;
    gap: 0.35rem;
}

.teacher-plan-item {
    font-size: 0.8rem;
    color: #32435f;
    font-weight: 760;
}

.teacher-kv-list {
    display: grid;
    gap: 0.42rem;
}

.teacher-kv-item {
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.45rem 0.56rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.teacher-kv-key {
    color: #5f6f87;
    font-size: 0.76rem;
    font-weight: 760;
}

.teacher-kv-value {
    color: #111b33;
    font-size: 0.82rem;
    font-weight: 860;
    text-align: right;
}

.teacher-focus-text {
    color: #243fdd;
    text-decoration: none;
    font-weight: 850;
}

@media (max-width: 1220px) {
    .teacher-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-sub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1020px) {
    .teacher-layout { grid-template-columns: 1fr; }
    .teacher-sidebar { position: static; }
    .teacher-grid-2 { grid-template-columns: 1fr; }
    .teacher-plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .teacher-grid-4 { grid-template-columns: 1fr; }
    .teacher-form-grid { grid-template-columns: 1fr; }
    .teacher-trend-row { grid-template-columns: 1fr; }
    .teacher-hero-action { text-align: left; min-width: 0; }
}

/* Teacher Studio polish: dedicated navigation and refined workspace surfaces. */
body.teacher-body {
    --teacher-bg: #edf2f7;
    --teacher-card: rgba(255, 255, 255, 0.96);
    --teacher-card-strong: #ffffff;
    --teacher-border: rgba(148, 163, 184, 0.32);
    --teacher-border-strong: rgba(100, 116, 139, 0.22);
    --teacher-text: #102033;
    --teacher-subtext: #64748b;
    --teacher-faint: #8a98aa;
    --teacher-primary: #1f6feb;
    --teacher-primary-dark: #174fb8;
    --teacher-primary-soft: #e7f0ff;
    --teacher-teal: #0f766e;
    --teacher-amber: #b7791f;
    --teacher-danger: #b42318;
    --teacher-radius-lg: 24px;
    --teacher-radius-md: 18px;
    --teacher-radius-sm: 13px;
    --teacher-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    --teacher-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.06);
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% -8%, rgba(47, 111, 235, 0.14), transparent 34rem),
        radial-gradient(circle at 92% 2%, rgba(20, 184, 166, 0.12), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0%, var(--teacher-bg) 100%);
    color: var(--teacher-text);
    font-family: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.teacher-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: 0.78rem 1.05rem 0.62rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-topbar-inner {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.78rem;
}

.teacher-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    min-width: max-content;
    color: var(--teacher-text);
    text-decoration: none;
}

.teacher-brand-mark {
    width: 2.42rem;
    height: 2.42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1f6feb 70%, #14b8a6 100%);
    box-shadow: 0 12px 26px rgba(31, 111, 235, 0.28);
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.teacher-brand-copy {
    display: grid;
    line-height: 1.05;
}

.teacher-brand-copy strong {
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.teacher-brand-copy small {
    margin-top: 0.18rem;
    color: var(--teacher-subtext);
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-nav-scroll {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.38rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding: 0.18rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    scrollbar-width: thin;
}

.teacher-nav-scroll::-webkit-scrollbar {
    height: 4px;
}

.teacher-nav-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.34);
}

.teacher-nav-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    min-height: 2.18rem;
    padding: 0 0.78rem;
    border-radius: 999px;
    color: #40516a;
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 880;
    line-height: 1;
    word-break: keep-all;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.teacher-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 50%;
    color: #64748b;
    background: rgba(226, 232, 240, 0.62);
    font-size: 0.74rem;
}

.teacher-nav-link:hover {
    color: var(--teacher-primary-dark);
    background: rgba(231, 240, 255, 0.86);
}

.teacher-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teacher-primary) 0%, #2457d6 100%);
    box-shadow: 0 10px 20px rgba(31, 111, 235, 0.22);
}

.teacher-nav-link.active .teacher-nav-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.teacher-logout,
body.teacher-body .btn,
body.teacher-body button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.44rem;
    border: 0;
    border-radius: 999px;
    padding: 0 1.08rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teacher-primary) 0%, #174fb8 100%);
    box-shadow: 0 14px 26px rgba(31, 111, 235, 0.22);
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transform: translateZ(0);
}

.teacher-logout {
    min-height: 2.24rem;
    color: #334155;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.34);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

body.teacher-body .btn:hover,
body.teacher-body button.btn:hover,
.teacher-logout:hover {
    transform: translateY(-1px);
}

.teacher-page {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 1.05rem 1.05rem 1.9rem;
}

.teacher-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--teacher-radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 247, 255, 0.94) 100%);
    box-shadow: var(--teacher-shadow);
    padding: 1.12rem 1.18rem;
    margin-bottom: 1rem;
}

.teacher-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.34rem;
    background: linear-gradient(180deg, var(--teacher-primary), #14b8a6);
}

.teacher-hero::after {
    content: "";
    position: absolute;
    right: -7rem;
    top: -9rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 111, 235, 0.16), transparent 66%);
    pointer-events: none;
}

.teacher-hero-head {
    position: relative;
    z-index: 1;
    align-items: center;
}

.teacher-hero-title {
    color: #0f1f35;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 950;
    letter-spacing: -0.055em;
}

.teacher-hero-sub {
    max-width: 58rem;
    margin-top: 0.28rem;
    color: var(--teacher-subtext);
    font-size: 0.9rem;
    font-weight: 760;
}

.teacher-note {
    margin-top: 0.52rem;
    color: #738197;
    font-size: 0.78rem;
    font-weight: 780;
}

.teacher-badge-row {
    gap: 0.42rem;
}

.teacher-pill {
    min-height: 1.58rem;
    padding: 0.22rem 0.66rem;
    border-radius: 999px;
    font-size: 0.71rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.teacher-pill.on {
    color: #0f6b48;
    background: rgba(220, 252, 231, 0.92);
    border-color: rgba(74, 222, 128, 0.38);
}

.teacher-pill.off {
    color: #a52a22;
    background: rgba(254, 226, 226, 0.9);
    border-color: rgba(248, 113, 113, 0.34);
}

.teacher-pill.warn {
    color: var(--teacher-amber);
    background: rgba(255, 247, 237, 0.96);
    border-color: rgba(251, 191, 36, 0.38);
}

.teacher-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.teacher-sidebar {
    top: 5.7rem;
    gap: 0.82rem;
}

.teacher-main {
    gap: 0.92rem;
}

.teacher-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--teacher-border);
    border-radius: var(--teacher-radius-md);
    background: var(--teacher-card);
    box-shadow: var(--teacher-shadow-soft);
    padding: 1rem;
}

.teacher-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(31, 111, 235, 0.32), transparent);
    opacity: 0.8;
}

.teacher-card-title,
.teacher-section-title {
    color: #102033;
    font-size: 1.02rem;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.teacher-card-sub,
.teacher-section-meta {
    color: var(--teacher-subtext);
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.45;
}

.teacher-section-head {
    margin-bottom: 0.78rem;
    align-items: flex-start;
}

.teacher-side-nav {
    gap: 0.42rem;
}

.teacher-side-nav a {
    min-height: 2.55rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 14px;
    color: #31425c;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    padding: 0.56rem 0.66rem;
    font-size: 0.82rem;
    font-weight: 880;
}

.teacher-side-nav a:hover {
    color: var(--teacher-primary-dark);
    border-color: rgba(31, 111, 235, 0.28);
    background: var(--teacher-primary-soft);
}

.teacher-side-nav a.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--teacher-primary) 0%, #174fb8 100%);
    box-shadow: 0 12px 22px rgba(31, 111, 235, 0.22);
}

.teacher-class-list {
    gap: 0.54rem;
}

.teacher-class-item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: #ffffff;
    padding: 0.72rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.teacher-class-item.active {
    border-color: rgba(31, 111, 235, 0.38);
    background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
}

.teacher-class-name {
    color: #102033;
    font-size: 0.86rem;
    font-weight: 920;
}

.teacher-class-meta,
.teacher-class-code {
    color: #6b7b90;
    font-size: 0.73rem;
    font-weight: 760;
}

.teacher-mini-btn {
    min-height: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    padding: 0.34rem 0.68rem;
    color: #334155;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    font-size: 0.74rem;
    font-weight: 880;
    white-space: nowrap;
}

.teacher-mini-btn:hover {
    color: var(--teacher-primary-dark);
    border-color: rgba(31, 111, 235, 0.34);
    background: #f7fbff;
}

.teacher-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.74rem;
}

.teacher-grid-2 {
    gap: 0.86rem;
}

.teacher-kpi {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.86rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.teacher-kpi-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 920;
    letter-spacing: 0.08em;
}

.teacher-kpi-value {
    color: #0f1f35;
    margin-top: 0.36rem;
    font-size: 1.46rem;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.teacher-kpi-tip {
    color: #8795a8;
    font-size: 0.72rem;
    font-weight: 750;
}

.teacher-empty {
    border: 1px dashed rgba(100, 116, 139, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.72));
    color: #5f6f87;
    font-size: 0.82rem;
    font-weight: 760;
    line-height: 1.55;
    padding: 0.78rem;
}

.teacher-empty.featured {
    min-height: 11rem;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.5rem;
}

.teacher-empty-icon {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.15rem;
    color: var(--teacher-primary);
    background: var(--teacher-primary-soft);
    font-size: 1.38rem;
    font-weight: 950;
}

.teacher-form-grid {
    gap: 0.72rem;
}

.teacher-field {
    margin-bottom: 0.66rem;
}

.teacher-field label {
    color: #334155;
    margin-bottom: 0.32rem;
    font-size: 0.76rem;
    font-weight: 900;
}

.teacher-field input,
.teacher-field textarea,
.teacher-field select,
.teacher-filter-form select,
.teacher-table input,
.teacher-table textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    color: #102033;
    padding: 0.62rem 0.72rem;
    font-size: 0.86rem;
    font-family: inherit;
    font-weight: 690;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.teacher-field input:focus,
.teacher-field textarea:focus,
.teacher-field select:focus,
.teacher-filter-form select:focus,
.teacher-table input:focus,
.teacher-table textarea:focus {
    border-color: rgba(31, 111, 235, 0.56);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.11);
    background: #ffffff;
}

.teacher-field textarea {
    min-height: 104px;
}

.teacher-split-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.34fr) minmax(280px, 0.78fr);
    gap: 0.86rem;
    align-items: stretch;
}

.teacher-form-panel,
.teacher-helper-panel {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.78);
    padding: 0.88rem;
}

.teacher-helper-panel {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    background:
        linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.teacher-helper-title {
    color: #102033;
    font-size: 0.94rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.teacher-helper-text {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.55;
}

.teacher-tip-list {
    display: grid;
    gap: 0.48rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.teacher-tip-list li {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    align-items: start;
    gap: 0.46rem;
    color: #45576f;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.45;
}

.teacher-tip-list li::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.36rem;
    border-radius: 50%;
    background: var(--teacher-primary);
    box-shadow: 0 0 0 5px rgba(31, 111, 235, 0.12);
}

.teacher-code-box {
    border: 1px solid rgba(31, 111, 235, 0.18);
    border-radius: 18px;
    background: #ffffff;
    padding: 0.8rem;
    box-shadow: 0 8px 18px rgba(31, 111, 235, 0.06);
}

.teacher-code-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-code-value {
    margin-top: 0.24rem;
    color: #102033;
    font-size: 1.45rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.teacher-action-row,
.teacher-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.teacher-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.52rem;
    margin-bottom: 0.66rem;
}

.teacher-check-tile {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.6rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: #ffffff;
    padding: 0.58rem 0.68rem;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 840;
    cursor: pointer;
}

.teacher-check-tile input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--teacher-primary);
}

.teacher-table-wrap {
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.teacher-table {
    min-width: 760px;
    font-size: 0.82rem;
}

.teacher-table th,
.teacher-table td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    padding: 0.72rem 0.68rem;
}

.teacher-table th {
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

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

.teacher-table-title {
    color: #102033;
    font-weight: 920;
    line-height: 1.3;
}

.teacher-table-desc,
.teacher-response-preview {
    margin-top: 0.24rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 720;
    line-height: 1.5;
}

.teacher-response-preview {
    max-width: 32rem;
    white-space: pre-wrap;
}

.teacher-review-score {
    width: 6rem !important;
}

.teacher-review-textarea {
    min-width: 14rem;
    min-height: 4.7rem;
    resize: vertical;
}

.teacher-recent-item {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: #ffffff;
    padding: 0.68rem 0.74rem;
}

.teacher-recent-title {
    color: #102033;
    font-weight: 900;
}

.teacher-trend-track {
    background: #e2e8f0;
}

.teacher-trend-fill {
    background: linear-gradient(90deg, #14b8a6, var(--teacher-primary));
}

.teacher-plan,
.teacher-kv-item {
    border-color: rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: #ffffff;
}

.teacher-plan.pro {
    border-color: rgba(31, 111, 235, 0.24);
    background: linear-gradient(180deg, #eef6ff 0%, #ffffff 100%);
}

.teacher-focus-text {
    color: var(--teacher-primary-dark);
}

@media (max-width: 1220px) {
    .teacher-topbar-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .teacher-logout {
        grid-column: 2;
        justify-self: end;
    }
    .teacher-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .teacher-split-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1020px) {
    .teacher-layout {
        grid-template-columns: 1fr;
    }
    .teacher-sidebar {
        position: static;
    }
    .teacher-grid-2,
    .teacher-plan-grid,
    .teacher-sub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .teacher-topbar {
        padding: 0.66rem 0.72rem 0.56rem;
    }
    .teacher-topbar-inner {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }
    .teacher-brand {
        justify-content: space-between;
    }
    .teacher-nav-scroll {
        border-radius: 18px;
    }
    .teacher-logout {
        grid-column: auto;
        justify-self: stretch;
        width: 100%;
    }
    .teacher-page {
        padding: 0.82rem 0.72rem 1.4rem;
    }
    .teacher-hero,
    .teacher-card {
        border-radius: 18px;
    }
    .teacher-grid-4,
    .teacher-form-grid,
    .teacher-check-grid {
        grid-template-columns: 1fr;
    }
    .teacher-hero-action {
        min-width: 0;
        text-align: left;
        width: 100%;
    }
    .teacher-hero-action .btn {
        width: 100%;
    }
    .teacher-trend-row {
        grid-template-columns: 1fr;
    }
}

.teacher-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.56rem;
    flex-wrap: wrap;
}

.teacher-select-pill,
.teacher-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.46rem;
    min-height: 2.2rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    background: #ffffff;
    padding: 0.28rem 0.68rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 880;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.teacher-select-pill select {
    border: 0;
    background: transparent;
    color: #102033;
    font-size: 0.8rem;
    font-weight: 880;
    outline: none;
    padding: 0;
}

.teacher-check-pill {
    cursor: pointer;
}

.teacher-check-pill input {
    width: 0.96rem;
    height: 0.96rem;
    accent-color: var(--teacher-primary);
}

.teacher-note-spaced {
    margin-top: 0.58rem;
}

.teacher-bookmark-row {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.teacher-bookmark-input {
    min-width: min(100%, 21rem);
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    background: #ffffff;
    color: #102033;
    padding: 0.58rem 0.78rem;
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 760;
    outline: none;
}

.teacher-bookmark-input:focus {
    border-color: rgba(31, 111, 235, 0.56);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.11);
}

.teacher-bookmark-list {
    margin-top: 0.56rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.teacher-bookmark-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border: 1px solid rgba(31, 111, 235, 0.22);
    border-radius: 999px;
    background: rgba(231, 240, 255, 0.88);
    padding: 0.2rem 0.3rem 0.2rem 0.7rem;
    color: #174fb8;
    font-size: 0.76rem;
    font-weight: 880;
}

.teacher-bookmark-chip a {
    color: inherit;
    text-decoration: none;
}

.teacher-bookmark-chip button {
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    padding: 0.18rem 0.42rem;
    font: inherit;
    cursor: pointer;
}

.teacher-row-selected td {
    background: rgba(231, 240, 255, 0.72);
}

.teacher-inline-action {
    margin-left: 0.34rem;
}

.teacher-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.8rem;
    margin-left: 0;
    white-space: nowrap;
}

.teacher-class-assignment-count {
    margin-top: 0.2rem;
}

.teacher-rubric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
}

.teacher-rubric-grid div {
    border: 1px solid rgba(31, 111, 235, 0.18);
    border-radius: 16px;
    background: #ffffff;
    padding: 0.66rem;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.04);
}

.teacher-rubric-grid span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 920;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-rubric-grid strong {
    display: block;
    margin-top: 0.22rem;
    color: #102033;
    font-size: 0.8rem;
    font-weight: 920;
}

.teacher-response-cell {
    max-width: 280px;
}

.teacher-score-cell {
    width: 92px;
}

.teacher-feedback-cell {
    min-width: 220px;
}

.teacher-action-row-spaced,
.teacher-card-title-spaced {
    margin-top: 0.9rem;
}

@media (max-width: 760px) {
    .teacher-rubric-grid {
        grid-template-columns: 1fr;
    }
    .teacher-response-cell,
    .teacher-feedback-cell {
        min-width: 220px;
    }
}

.teacher-class-console {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.teacher-class-overview-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.86fr);
    gap: 1rem;
    border: 1px solid rgba(31, 111, 235, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 8%, rgba(31, 111, 235, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
    padding: 1.1rem;
}

.teacher-class-overview-card::after {
    content: "";
    position: absolute;
    right: -4rem;
    top: -5rem;
    width: 14rem;
    height: 14rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.11);
    pointer-events: none;
}

.teacher-class-overview-main,
.teacher-class-overview-side {
    position: relative;
    z-index: 1;
}

.teacher-class-overview-main {
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem;
}

.teacher-class-kicker {
    color: #1f6feb;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.teacher-class-overview-main h2 {
    margin: 0.42rem 0 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.4vw, 2.25rem);
    font-weight: 950;
    letter-spacing: -0.045em;
}

.teacher-class-overview-main p {
    margin: 0.75rem 0 0;
    max-width: 46rem;
    color: #52657f;
    font-size: 0.9rem;
    font-weight: 720;
    line-height: 1.75;
}

.teacher-class-code-line {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.teacher-class-code-line span,
.teacher-class-meta-strip span,
.teacher-class-role-pill,
.teacher-class-count-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #64748b;
    padding: 0.34rem 0.62rem;
    font-size: 0.74rem;
    font-weight: 880;
}

.teacher-class-code-line strong {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    padding: 0.36rem 0.78rem;
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.teacher-link-button {
    border: 0;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.1);
    color: #174fb8;
    padding: 0.38rem 0.72rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 920;
    cursor: pointer;
}

.teacher-link-button:hover {
    background: rgba(31, 111, 235, 0.16);
}

.teacher-class-overview-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.teacher-class-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
}

.teacher-class-stat {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    padding: 0.82rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.teacher-class-stat span {
    display: block;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 920;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-class-stat strong {
    display: block;
    margin-top: 0.25rem;
    color: #102033;
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.teacher-class-meta-strip,
.teacher-class-actions,
.teacher-action-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.teacher-class-actions {
    margin-top: auto;
    padding-top: 0.18rem;
}

.teacher-mini-btn-primary {
    border-color: rgba(31, 111, 235, 0.34);
    background: #1f6feb;
    color: #ffffff;
}

.teacher-mini-btn-primary:hover {
    background: #174fb8;
    color: #ffffff;
}

.teacher-mini-btn-danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.92);
    color: #b91c1c;
}

.teacher-mini-btn-danger:hover {
    border-color: rgba(220, 38, 38, 0.38);
    background: #fee2e2;
    color: #991b1b;
}

.teacher-class-editor-panel[hidden] {
    display: none !important;
}

.teacher-class-editor-panel {
    border-color: rgba(31, 111, 235, 0.2);
    box-shadow: 0 18px 42px rgba(31, 111, 235, 0.09);
}

.teacher-editor-helper,
.teacher-create-helper {
    justify-content: flex-start;
}

.teacher-create-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.teacher-create-entry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 18%, rgba(31, 111, 235, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    padding: 0.92rem 1rem;
}

.teacher-compose-entry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(31, 111, 235, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 12%, rgba(31, 111, 235, 0.13), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.92));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    padding: 0.95rem 1rem;
}

.teacher-compose-entry-card h3 {
    margin: 0.22rem 0 0;
    color: #102033;
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: -0.025em;
}

.teacher-compose-entry-card p {
    margin: 0.28rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 760;
    line-height: 1.55;
}

.teacher-compose-panel[hidden] {
    display: none !important;
}

.teacher-compose-panel {
    border-color: rgba(31, 111, 235, 0.2);
    box-shadow: 0 18px 42px rgba(31, 111, 235, 0.08);
}

.teacher-action-command-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 6.2rem;
    padding: 1rem 1.05rem;
}

.teacher-command-marker {
    position: relative;
    width: 0.42rem;
    height: 3.2rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #1f6feb, rgba(15, 118, 110, 0.72));
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.18);
}

.teacher-command-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.78rem;
    height: 0.78rem;
    transform: translate(-50%, -50%);
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #1f6feb;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.13);
}

.teacher-command-main {
    min-width: 0;
}

.teacher-command-main h3 {
    margin: 0;
    color: #102033;
    font-size: 1.12rem;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.teacher-command-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.5rem;
}

.teacher-command-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.72rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #64748b;
    padding: 0.26rem 0.58rem;
    font-size: 0.74rem;
    font-weight: 880;
}

.teacher-compose-form-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
    gap: 0.9rem;
    align-items: start;
}

.teacher-compose-form-main {
    max-width: 820px;
}

.teacher-compose-aside {
    position: sticky;
    top: 6.4rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(circle at 88% 10%, rgba(31, 111, 235, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
    padding: 0.9rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.teacher-compose-aside-title {
    color: #102033;
    font-size: 0.9rem;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.teacher-compose-check-list {
    display: grid;
    gap: 0.46rem;
    margin-top: 0.72rem;
}

.teacher-compose-check-list span {
    position: relative;
    display: block;
    border: 1px solid rgba(31, 111, 235, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    padding: 0.58rem 0.62rem 0.58rem 1.8rem;
    font-size: 0.78rem;
    font-weight: 820;
    line-height: 1.42;
}

.teacher-compose-check-list span::before {
    content: "";
    position: absolute;
    left: 0.68rem;
    top: 0.82rem;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: #1f6feb;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.1);
}

.teacher-compose-note {
    margin-top: 0.75rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1.55;
}

.teacher-create-entry-card h3 {
    margin: 0.22rem 0 0;
    color: #102033;
    font-size: 1.04rem;
    font-weight: 950;
    letter-spacing: -0.025em;
}

.teacher-create-entry-card p {
    margin: 0.28rem 0 0;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 760;
    line-height: 1.55;
}

.teacher-create-entry-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.58rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.teacher-create-panel[hidden] {
    display: none !important;
}

.teacher-empty-action {
    margin-top: 0.85rem;
}

.teacher-create-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(260px, 0.62fr);
}

.teacher-class-count-pill {
    color: #174fb8;
    background: rgba(231, 240, 255, 0.92);
    border-color: rgba(31, 111, 235, 0.2);
}

.teacher-class-role-pill {
    color: #7c2d12;
    background: rgba(255, 247, 237, 0.94);
    border-color: rgba(251, 146, 60, 0.28);
}

.teacher-class-access-card .teacher-section-head {
    align-items: center;
}

.teacher-subscription-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.teacher-subscription-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.58fr);
    gap: 1rem;
    align-items: start;
}

.teacher-subscription-plans-card,
.teacher-current-rights-card,
.teacher-activation-card {
    border-radius: 24px;
}

.teacher-sub-status-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    padding: 0.38rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.teacher-sub-status-pill.active {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(240, 253, 244, 0.92);
    color: #15803d;
}

.teacher-plan-grid-upgraded {
    gap: 0.82rem;
    align-items: stretch;
}

.teacher-plan-grid-upgraded .teacher-plan {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 26rem;
    flex-direction: column;
    border-radius: 24px;
    padding: 1rem;
}

.teacher-plan-grid-upgraded .teacher-plan-free {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.teacher-plan-grid-upgraded .teacher-plan-pro {
    border-color: rgba(31, 111, 235, 0.3);
    background:
        radial-gradient(circle at 86% 8%, rgba(31, 111, 235, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(238, 246, 255, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: 0 18px 42px rgba(31, 111, 235, 0.12);
}

.teacher-plan-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.teacher-plan-grid-upgraded .teacher-plan-name {
    color: #102033;
    font-size: 0.92rem;
    letter-spacing: 0;
    text-transform: none;
}

.teacher-plan-grid-upgraded .teacher-plan-price {
    margin-top: 0.42rem;
    font-size: 2rem;
    letter-spacing: -0.055em;
}

.teacher-plan-grid-upgraded .teacher-plan-price small {
    letter-spacing: 0;
    font-weight: 850;
}

.teacher-plan-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    color: #64748b;
    padding: 0.28rem 0.58rem;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.teacher-plan-badge.pro {
    border-color: rgba(31, 111, 235, 0.22);
    background: rgba(231, 240, 255, 0.92);
    color: #174fb8;
}

.teacher-plan-grid-upgraded .teacher-plan-list {
    gap: 0.48rem;
    margin-top: 0.9rem;
}

.teacher-plan-grid-upgraded .teacher-plan-item {
    position: relative;
    padding-left: 1.28rem;
    color: #334155;
    line-height: 1.48;
}

.teacher-plan-grid-upgraded .teacher-plan-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42rem;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: #1f6feb;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.1);
}

.teacher-plan-grid-upgraded .teacher-plan-item.muted {
    color: #64748b;
}

.teacher-plan-grid-upgraded .teacher-plan-item.muted::before {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.teacher-plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.52rem;
    margin-top: auto;
    padding-top: 1rem;
}

.teacher-plan-actions .btn,
.teacher-plan-actions .teacher-mini-btn {
    width: 100%;
    min-height: 2.65rem;
}

.teacher-yearly-btn {
    border-color: rgba(31, 111, 235, 0.28);
    background: #ffffff;
    color: #174fb8;
}

.teacher-plan-footnote {
    margin-top: 0.72rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.5;
}

.teacher-subscription-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.teacher-kv-list-compact {
    gap: 0.44rem;
}

.teacher-kv-list-compact .teacher-kv-item {
    min-height: 2.44rem;
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
}

.teacher-activation-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(31, 111, 235, 0.12), transparent 32%),
        #ffffff;
}

.teacher-activation-card .teacher-field {
    margin-top: 0.28rem;
}

.teacher-activation-btn {
    width: 100%;
    margin-top: 0.72rem;
}

@media (max-width: 1080px) {
    .teacher-class-overview-card,
    .teacher-create-layout {
        grid-template-columns: 1fr;
    }
    .teacher-subscription-layout {
        grid-template-columns: 1fr;
    }
    .teacher-class-overview-main {
        min-height: 11rem;
    }
}

@media (max-width: 760px) {
    .teacher-class-overview-card {
        border-radius: 22px;
        padding: 0.78rem;
    }
    .teacher-create-entry-card {
        align-items: stretch;
        flex-direction: column;
    }
    .teacher-compose-entry-card {
        align-items: stretch;
        flex-direction: column;
    }
    .teacher-action-command-card {
        grid-template-columns: 1fr;
    }
    .teacher-command-marker {
        width: 100%;
        height: 0.32rem;
    }
    .teacher-compose-form-shell {
        grid-template-columns: 1fr;
    }
    .teacher-compose-aside {
        position: static;
    }
    .teacher-create-entry-actions,
    .teacher-create-entry-actions .btn,
    .teacher-compose-entry-card .btn {
        width: 100%;
    }
    .teacher-class-stat-grid {
        grid-template-columns: 1fr;
    }
    .teacher-class-actions .teacher-mini-btn,
    .teacher-action-row .teacher-mini-btn,
    .teacher-action-row .btn {
        width: 100%;
    }
    .teacher-plan-actions {
        grid-template-columns: 1fr;
    }
}

.teacher-body-subscription .teacher-hero {
    position: relative;
    overflow: hidden;
    padding: 0.86rem 1rem;
    margin-bottom: 0.78rem;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.86), rgba(242, 247, 255, 0.7)),
        radial-gradient(circle at 92% 0%, rgba(31, 111, 235, 0.18), transparent 24rem);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-body-subscription .teacher-hero::before {
    content: "";
    position: absolute;
    inset: -40% auto auto 58%;
    width: 28rem;
    height: 28rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.16), transparent 62%);
    pointer-events: none;
    animation: teacherGlowDrift 8s ease-in-out infinite alternate;
}

.teacher-body-subscription .teacher-hero-head {
    position: relative;
    z-index: 1;
}

.teacher-body-subscription .teacher-hero-sub {
    max-width: 46rem;
}

.teacher-body-subscription .teacher-badge-row {
    margin-top: 0.55rem;
}

.teacher-body-subscription .teacher-note {
    margin-top: 0.34rem;
}

.teacher-subscription-page-upgraded {
    gap: 0.78rem;
}

.teacher-subscription-layout-upgraded {
    grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.72fr);
    align-items: stretch;
    gap: 0.9rem;
}

.teacher-subscription-main-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 1rem 1.02rem;
    background:
        radial-gradient(circle at 4% -10%, rgba(31, 111, 235, 0.12), transparent 28rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 255, 0.72));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-subscription-main-card::after {
    content: "";
    position: absolute;
    right: -6rem;
    top: 8rem;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 111, 235, 0.11), transparent 68%);
    pointer-events: none;
}

.teacher-subscription-main-card > * {
    position: relative;
    z-index: 1;
}

.teacher-subscription-main-card .teacher-plan-grid-upgraded .teacher-plan {
    min-height: 22.5rem;
}

.teacher-subscription-main-card .teacher-plan-grid-upgraded .teacher-plan,
.teacher-reward-pack-card,
.teacher-current-rights-card-upgraded,
.teacher-activation-card-upgraded {
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.teacher-subscription-main-card .teacher-plan-grid-upgraded .teacher-plan:hover,
.teacher-reward-pack-card:hover,
.teacher-current-rights-card-upgraded:hover,
.teacher-activation-card-upgraded:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}

.teacher-reward-topup-hub {
    margin-top: 0.95rem;
    border: 1px solid rgba(31, 111, 235, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 95% 4%, rgba(20, 184, 166, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.96));
    padding: 0.92rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.teacher-reward-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem;
}

.teacher-reward-pack-card {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.76));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.teacher-reward-pack-title {
    color: #102033;
    font-size: 0.8rem;
    font-weight: 920;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.teacher-reward-pack-value {
    color: #174fb8;
    font-size: 1.16rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.teacher-reward-pack-price {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 920;
}

.teacher-reward-pack-desc {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.45;
    min-height: 2.1rem;
}

.teacher-reward-pack-btn {
    margin-top: auto;
    min-height: 2.25rem;
    border-radius: 11px;
}

.teacher-subscription-side-upgraded {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.teacher-current-rights-card-upgraded,
.teacher-activation-card-upgraded {
    border-radius: 22px;
}

.teacher-current-rights-card-upgraded {
    background:
        radial-gradient(circle at 92% 0%, rgba(31, 111, 235, 0.11), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.76));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.teacher-current-rights-card-upgraded .teacher-kv-list-compact .teacher-kv-item {
    border-radius: 14px;
    padding: 0.45rem 0.66rem;
}

.teacher-activation-card-upgraded {
    background:
        radial-gradient(circle at 90% -8%, rgba(31, 111, 235, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.78));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.teacher-subscription-page-upgraded .teacher-card,
.teacher-subscription-page-upgraded .teacher-reward-topup-hub {
    animation: teacherPanelRise 420ms ease both;
}

.teacher-subscription-page-upgraded .teacher-subscription-side-upgraded {
    animation-delay: 80ms;
}

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

@keyframes teacherGlowDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-2rem, 1.1rem, 0) scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .teacher-body-subscription .teacher-hero::before,
    .teacher-subscription-page-upgraded .teacher-card,
    .teacher-subscription-page-upgraded .teacher-reward-topup-hub {
        animation: none;
    }
    .teacher-subscription-main-card .teacher-plan-grid-upgraded .teacher-plan,
    .teacher-reward-pack-card,
    .teacher-current-rights-card-upgraded,
    .teacher-activation-card-upgraded {
        transition: none;
    }
}

@media (max-width: 1320px) {
    .teacher-subscription-layout-upgraded {
        grid-template-columns: 1fr;
    }
    .teacher-reward-pack-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .teacher-reward-pack-grid {
        grid-template-columns: 1fr;
    }
}

.teacher-field-hint {
    margin-top: 0.28rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 760;
}

.teacher-list-hint {
    margin-bottom: 0.62rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #f8fbff;
    color: #52657f;
    font-size: 0.76rem;
    font-weight: 760;
    padding: 0.5rem 0.62rem;
}

.teacher-student-list-grid {
    display: grid;
    gap: 0.56rem;
}

.teacher-student-item-card {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.58rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.teacher-student-item-card:hover {
    transform: translateY(-1px);
    border-color: rgba(31, 111, 235, 0.32);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.teacher-student-item-card.active {
    border-color: rgba(31, 111, 235, 0.34);
    box-shadow: 0 8px 20px rgba(31, 111, 235, 0.1);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), #ffffff);
}

.teacher-student-item-main {
    min-width: 0;
}

.teacher-student-item-name {
    color: #102033;
    font-size: 0.86rem;
    font-weight: 920;
}

.teacher-student-item-meta {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 740;
}

.teacher-student-item-stats {
    margin-top: 0.36rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.teacher-student-item-stats span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 0.2rem 0.52rem;
    font-size: 0.7rem;
    font-weight: 820;
}

.teacher-student-item-card .teacher-inline-action {
    margin-left: 0;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.teacher-students-table-wrap .teacher-table {
    min-width: 0;
}

.teacher-students-table-wrap .teacher-table th,
.teacher-students-table-wrap .teacher-table td {
    white-space: nowrap;
}

.teacher-record-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.teacher-record-summary span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(31, 111, 235, 0.18);
    border-radius: 999px;
    background: rgba(231, 240, 255, 0.74);
    color: #1e3a8a;
    padding: 0.22rem 0.56rem;
    font-size: 0.72rem;
    font-weight: 860;
}

@media (max-width: 760px) {
    .teacher-student-item-card {
        grid-template-columns: 1fr;
    }
    .teacher-student-item-card .teacher-inline-action {
        width: 100%;
    }
}

/* Professional teacher workspace layer. Keep at the end so older page patches do not override it. */
:root {
    --teacher-bg: #f4f7fb;
    --teacher-surface: #ffffff;
    --teacher-surface-soft: #f8fafc;
    --teacher-border: rgba(148, 163, 184, 0.24);
    --teacher-border-strong: rgba(100, 116, 139, 0.34);
    --teacher-text: #111827;
    --teacher-subtext: #64748b;
    --teacher-muted: #94a3b8;
    --teacher-primary: #2563eb;
    --teacher-primary-dark: #1d4ed8;
    --teacher-primary-soft: #eaf2ff;
    --teacher-success: #0f766e;
    --teacher-danger: #b42318;
    --teacher-warning: #b7791f;
    --teacher-radius-sm: 12px;
    --teacher-radius: 18px;
    --teacher-radius-lg: 24px;
    --teacher-shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.06);
    --teacher-shadow-card: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body.teacher-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.08), transparent 24rem),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
    color: var(--teacher-text);
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

.teacher-topbar {
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(255, 255, 255, 0.88);
    padding: 0.68rem 1.25rem;
}

.teacher-topbar-inner {
    width: min(1560px, 100%);
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 1rem;
}

.teacher-brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.78rem;
    background: linear-gradient(135deg, #132033, #2563eb);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.teacher-brand-copy strong {
    color: #172033;
    font-size: 0.98rem;
}

.teacher-brand-copy small {
    color: #7b8798;
    letter-spacing: 0.12em;
}

.teacher-nav-scroll,
.teacher-nav-link,
.teacher-nav-icon {
    display: none;
}

.teacher-topbar-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.62rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 820;
}

.teacher-context-label {
    color: #172033;
    font-weight: 940;
}

.teacher-context-divider {
    width: 1px;
    height: 1.1rem;
    background: rgba(148, 163, 184, 0.36);
}

.teacher-context-class {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-context-class.muted {
    color: var(--teacher-muted);
}

.teacher-context-code {
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: var(--teacher-primary-soft);
    color: var(--teacher-primary-dark);
    padding: 0.26rem 0.62rem;
    font: inherit;
    font-size: 0.74rem;
    cursor: pointer;
}

.teacher-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.48rem;
    min-width: 0;
}

.teacher-quick-link,
.teacher-logout {
    min-height: 2.18rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: #ffffff;
    color: var(--teacher-primary-dark);
    padding: 0 0.86rem;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: none;
}

.teacher-quick-link:not(.secondary) {
    background: var(--teacher-primary);
    color: #ffffff;
}

.teacher-quick-link.secondary {
    color: #334155;
    border-color: rgba(148, 163, 184, 0.28);
}

.teacher-account-chip {
    max-width: 11rem;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: #f8fafc;
    padding: 0.22rem 0.62rem 0.22rem 0.26rem;
    color: #334155;
}

.teacher-account-chip span {
    width: 1.56rem;
    height: 1.56rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #172033;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 920;
}

.teacher-account-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
}

.teacher-page {
    max-width: 1560px;
    padding: 1rem 1.25rem 2rem;
}

.teacher-hero {
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--teacher-shadow-soft);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

.teacher-hero-title {
    color: #111827;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.teacher-page-eyebrow {
    margin-bottom: 0.28rem;
    color: var(--teacher-primary-dark);
    font-size: 0.72rem;
    font-weight: 920;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-hero-sub {
    max-width: 46rem;
    color: #65748a;
    font-size: 0.88rem;
    font-weight: 700;
}

.teacher-hero-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.teacher-pill {
    border-radius: 999px;
    padding: 0.26rem 0.66rem;
    font-size: 0.72rem;
    font-weight: 880;
}

.teacher-pill.neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: rgba(148, 163, 184, 0.24);
}

.teacher-layout {
    grid-template-columns: 278px minmax(0, 1fr);
    gap: 1.05rem;
}

.teacher-sidebar {
    position: sticky;
    top: 5.25rem;
    align-self: start;
    gap: 0.86rem;
}

.teacher-sidebar-panel,
.teacher-card {
    border: 1px solid var(--teacher-border);
    border-radius: var(--teacher-radius-lg);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--teacher-shadow-card);
}

.teacher-sidebar-panel {
    padding: 0.86rem;
}

.teacher-sidebar-label {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.teacher-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.72rem;
}

.teacher-card-title {
    margin: 0.12rem 0 0;
    color: #172033;
    font-size: 0.94rem;
    font-weight: 940;
}

.teacher-class-limit {
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    padding: 0.18rem 0.48rem;
    font-size: 0.7rem;
    font-weight: 900;
}

.teacher-side-nav {
    gap: 0.28rem;
}

.teacher-side-nav a {
    min-height: 3.18rem;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: #334155;
    padding: 0.58rem 0.68rem;
}

.teacher-side-nav a span:first-child {
    display: grid;
    gap: 0.12rem;
}

.teacher-side-nav a strong {
    font-size: 0.82rem;
    font-weight: 930;
}

.teacher-side-nav a small {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 760;
}

.teacher-side-nav a:hover {
    background: #f8fafc;
    color: #1d4ed8;
}

.teacher-side-nav a.active {
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.teacher-side-nav a.active small {
    color: rgba(255, 255, 255, 0.78);
}

.teacher-side-arrow {
    color: inherit;
    opacity: 0.72;
}

.teacher-class-list {
    max-height: 22rem;
    overflow: auto;
    padding-right: 0.12rem;
}

.teacher-class-item {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: #ffffff;
    padding: 0.68rem;
}

.teacher-class-item.active {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.teacher-class-switch-link {
    display: grid;
    gap: 0.18rem;
    color: inherit;
    text-decoration: none;
}

.teacher-class-name {
    color: #172033;
    font-size: 0.84rem;
    font-weight: 930;
}

.teacher-class-meta {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 760;
}

.teacher-class-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.54rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
}

.teacher-class-code-row button {
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    padding: 0.18rem 0.48rem;
    font: inherit;
    cursor: pointer;
}

.teacher-sidebar-subscription {
    margin-top: 0.72rem;
    display: grid;
    gap: 0.14rem;
    border-radius: 18px;
    background: #111827;
    color: #ffffff;
    padding: 0.76rem 0.82rem;
    text-decoration: none;
}

.teacher-sidebar-subscription span {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.7rem;
    font-weight: 780;
}

.teacher-sidebar-subscription strong {
    font-size: 0.84rem;
    font-weight: 930;
}

.teacher-main {
    gap: 1rem;
}

.teacher-card {
    padding: 1.05rem;
}

.teacher-section-title {
    color: #111827;
    font-size: 1.04rem;
    font-weight: 940;
    letter-spacing: -0.03em;
}

.teacher-section-meta {
    color: #64748b;
}

.teacher-empty.compact {
    padding: 0.7rem;
    font-size: 0.76rem;
}

.teacher-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1rem;
    align-items: start;
}

.teacher-stack {
    display: grid;
    gap: 1rem;
}

.teacher-list-card-grid {
    display: grid;
    gap: 0.72rem;
}

.teacher-list-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: #ffffff;
    padding: 0.86rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

a.teacher-list-card {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

a.teacher-list-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.teacher-list-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.teacher-list-card-title {
    color: #111827;
    font-size: 0.96rem;
    font-weight: 930;
}

.teacher-list-card-desc {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
}

.teacher-list-card-meta,
.teacher-metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.teacher-list-card-meta {
    margin-top: 0.68rem;
}

.teacher-metric-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 0.22rem 0.58rem;
    font-size: 0.72rem;
    font-weight: 820;
}

.teacher-metric-chip.strong {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

.teacher-metric-chip.warn {
    background: #fff7ed;
    border-color: rgba(251, 146, 60, 0.3);
    color: #b45309;
}

.teacher-metric-chip.danger {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.28);
    color: #b91c1c;
}

.teacher-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
    flex-wrap: wrap;
    margin-top: 0.72rem;
}

.teacher-dashboard-class-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.78));
}

.teacher-quick-card {
    display: block;
}

.teacher-student-list-primary {
    gap: 0.68rem;
}

.teacher-student-list-primary .teacher-student-item-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.86rem;
    border-radius: 18px;
}

.teacher-compose-entry-card,
.teacher-create-entry-card {
    border: 1px solid var(--teacher-border);
    border-radius: var(--teacher-radius-lg);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--teacher-shadow-card);
}

.teacher-mini-btn,
.btn {
    border-radius: 999px;
    font-weight: 900;
}

.btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.teacher-empty {
    border-radius: 18px;
}

@media (max-width: 1180px) {
    .teacher-topbar-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .teacher-topbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .teacher-layout,
    .teacher-workspace-grid {
        grid-template-columns: 1fr;
    }

    .teacher-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .teacher-topbar,
    .teacher-page {
        padding-left: 0.78rem;
        padding-right: 0.78rem;
    }

    .teacher-topbar-inner {
        grid-template-columns: 1fr;
    }

    .teacher-topbar-context,
    .teacher-topbar-actions,
    .teacher-hero-head,
    .teacher-hero-status {
        justify-content: flex-start;
    }

    .teacher-account-chip,
    .teacher-context-code {
        display: none;
    }

    .teacher-grid-4,
    .teacher-grid-2,
    .teacher-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Teacher workspace phase 2: review queue and reports. */
.teacher-written-prompt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
}

.teacher-written-prompt-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: #ffffff;
    padding: 0.92rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.teacher-written-progress {
    height: 0.48rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    margin-top: 0.78rem;
}

.teacher-written-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #2563eb);
}

.teacher-review-queue-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.86));
}

.teacher-review-queue {
    display: grid;
    gap: 0.92rem;
}

.teacher-review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    gap: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    background: #ffffff;
    padding: 0.95rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.teacher-review-card.pending {
    border-color: rgba(245, 158, 11, 0.32);
}

.teacher-review-card.reviewed {
    border-color: rgba(20, 184, 166, 0.24);
}

.teacher-review-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.teacher-response-preview-card {
    max-width: none;
    min-height: 7rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: #f8fafc;
    color: #334155;
    padding: 0.78rem;
    line-height: 1.65;
}

.teacher-review-card-side {
    display: grid;
    gap: 0.72rem;
    align-content: start;
}

.teacher-review-field {
    display: grid;
    gap: 0.28rem;
}

.teacher-review-field span {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
}

.teacher-review-card .teacher-review-score {
    width: 100% !important;
    min-height: 2.48rem;
}

.teacher-review-card .teacher-review-textarea {
    width: 100%;
    min-width: 0;
    min-height: 7rem;
}

.teacher-review-save {
    width: 100%;
}

.teacher-report-control-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
}

.teacher-report-metrics-card .teacher-kpi {
    background: #ffffff;
}

.teacher-report-kpi-grid .teacher-kpi-value {
    font-size: 1.7rem;
}

.teacher-trend-list-upgraded {
    display: grid;
    gap: 0.55rem;
}

.teacher-trend-list-upgraded .teacher-trend-row {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: #ffffff;
    padding: 0.62rem 0.7rem;
}

.teacher-report-insight-grid {
    align-items: stretch;
}

.teacher-cefr-distribution,
.teacher-risk-list {
    display: grid;
    gap: 0.68rem;
}

.teacher-cefr-row {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: #ffffff;
    padding: 0.72rem;
}

.teacher-cefr-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.52rem;
}

.teacher-cefr-row-head strong {
    color: #111827;
    font-size: 0.92rem;
}

.teacher-cefr-row-head span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 820;
}

.teacher-cefr-track {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.teacher-cefr-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.teacher-risk-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 18px;
    background: #fffaf0;
    padding: 0.76rem;
}

.teacher-risk-card-metrics {
    display: flex;
    align-items: center;
    gap: 0.36rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .teacher-written-prompt-grid,
    .teacher-review-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .teacher-risk-card,
    .teacher-cefr-row-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Teacher workspace phase 2 polish: card-first student data and command surfaces. */
.teacher-command-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    height: 2.35rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.82), transparent 34%),
        linear-gradient(135deg, #eff6ff, #e0f2fe);
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 940;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 22px rgba(37, 99, 235, 0.1);
}

.teacher-mini-feed {
    display: grid;
    gap: 0.62rem;
}

.teacher-mini-feed-item {
    display: grid;
    gap: 0.28rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: #ffffff;
    padding: 0.72rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.teacher-mini-feed-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.26);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.teacher-mini-feed-item strong {
    color: #111827;
    font-size: 0.88rem;
    font-weight: 920;
    line-height: 1.35;
}

.teacher-mini-feed-item small {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 780;
}

.teacher-mini-feed-type {
    width: fit-content;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.18rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 900;
}

.teacher-mini-feed-type.written {
    background: #ecfdf5;
    color: #047857;
}

.teacher-leaderboard-card {
    overflow: hidden;
}

.teacher-leaderboard-list {
    display: grid;
    gap: 0.56rem;
}

.teacher-leaderboard-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.62rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.88));
    color: inherit;
    text-decoration: none;
    padding: 0.68rem;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.teacher-leaderboard-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.teacher-leaderboard-item.active {
    border-color: rgba(37, 99, 235, 0.34);
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.teacher-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 14px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 930;
}

.teacher-rank-badge.top {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.teacher-leaderboard-main {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.teacher-leaderboard-main strong {
    overflow: hidden;
    color: #111827;
    font-size: 0.86rem;
    font-weight: 930;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-leaderboard-main small {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 780;
}

.teacher-leaderboard-score {
    color: #1d4ed8;
    font-size: 0.86rem;
    font-weight: 940;
}

.teacher-class-editor-panel .teacher-section-head .teacher-mini-btn,
.teacher-create-panel .teacher-section-head .teacher-mini-btn {
    background: #f8fafc;
}

.teacher-student-list-primary .teacher-metric-chip {
    min-width: 5rem;
    justify-content: center;
}

@media (max-width: 760px) {
    .teacher-action-command-card {
        grid-template-columns: 1fr;
    }

    .teacher-command-icon {
        min-width: 0;
        width: fit-content;
    }

    .teacher-leaderboard-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .teacher-leaderboard-score {
        grid-column: 2;
    }

    .teacher-student-list-primary .teacher-student-item-card {
        grid-template-columns: 1fr;
    }

    .teacher-student-list-primary .teacher-metric-chip {
        width: 100%;
    }
}

.teacher-assignment-board {
    margin-top: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.72));
    padding: 0.86rem;
}

.teacher-assignment-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.teacher-assignment-board-head strong {
    display: block;
    color: #102033;
    font-size: 0.9rem;
}

.teacher-assignment-board-head span {
    display: block;
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.76rem;
}

.teacher-assignment-board-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.teacher-assignment-progress-bar {
    margin-top: 0.72rem;
    height: 0.48rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.18);
}

.teacher-assignment-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.teacher-assignment-stats {
    margin-top: 0.68rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.teacher-assignment-stats span,
.teacher-assignment-student-metrics span {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
    padding: 0.34rem 0.52rem;
}

.teacher-assignment-stats span.ok,
.teacher-assignment-student-metrics span.ok {
    color: #047857;
    background: rgba(236, 253, 245, 0.92);
    border-color: rgba(16, 185, 129, 0.24);
}

.teacher-assignment-stats span.warn,
.teacher-assignment-student-metrics span.warn {
    color: #b45309;
    background: rgba(255, 251, 235, 0.92);
    border-color: rgba(245, 158, 11, 0.24);
}

.teacher-assignment-stats span.danger,
.teacher-assignment-student-metrics span.danger {
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.92);
    border-color: rgba(239, 68, 68, 0.24);
}

.teacher-assignment-attention {
    margin-top: 0.72rem;
    display: grid;
    gap: 0.35rem;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.55;
}

.teacher-assignment-attention strong {
    color: #102033;
}

.teacher-assignment-student-details {
    margin-top: 0.76rem;
}

.teacher-assignment-student-details summary {
    cursor: pointer;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 900;
}

.teacher-assignment-student-grid {
    margin-top: 0.62rem;
    display: grid;
    gap: 0.48rem;
}

.teacher-assignment-student-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.58rem 0.64rem;
}

.teacher-assignment-student-row strong {
    display: block;
    color: #172033;
    font-size: 0.82rem;
}

.teacher-assignment-student-row span {
    color: #64748b;
    font-size: 0.74rem;
}

.teacher-assignment-student-metrics {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.teacher-student-risk-reasons {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.teacher-student-risk-reasons span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.86);
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.22rem 0.48rem;
}

.teacher-risk-panel,
.teacher-ability-panel {
    margin-top: 0.76rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
    padding: 0.84rem;
}

.teacher-risk-panel > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.teacher-risk-panel strong {
    color: #102033;
    font-size: 0.88rem;
}

.teacher-risk-panel > div:first-child span {
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.26rem 0.54rem;
}

.teacher-risk-panel p {
    margin: 0.48rem 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.55;
}

.teacher-risk-tags {
    margin-top: 0.58rem;
    display: flex;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.teacher-risk-tags span {
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    background: rgba(255, 251, 235, 0.92);
    color: #92400e;
    font-size: 0.74rem;
    font-weight: 850;
    padding: 0.3rem 0.56rem;
}

.teacher-ability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
}

.teacher-ability-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    padding: 0.68rem;
}

.teacher-ability-card-head,
.teacher-ability-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.teacher-ability-card-head strong {
    color: #172033;
    font-size: 0.82rem;
}

.teacher-ability-card-head span,
.teacher-ability-meta span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
}

.teacher-ability-bar {
    margin: 0.54rem 0 0.45rem;
    height: 0.44rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.18);
}

.teacher-ability-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8, #22c55e);
}

.teacher-ability-note {
    margin-top: 0.68rem;
    color: #475569;
    font-size: 0.76rem;
    line-height: 1.55;
}

.teacher-ai-review-btn {
    justify-content: center;
    width: 100%;
    border-color: rgba(20, 184, 166, 0.28);
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(236, 253, 245, 0.86));
    color: #0f766e;
}

.teacher-ai-review-panel {
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(240, 253, 250, 0.94), rgba(255, 255, 255, 0.92));
    padding: 0.74rem;
    color: #334155;
}

.teacher-ai-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.teacher-ai-review-head strong {
    color: #115e59;
    font-size: 0.82rem;
}

.teacher-ai-review-head span {
    border-radius: 999px;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.24rem 0.52rem;
}

.teacher-ai-review-panel p {
    margin: 0.52rem 0 0;
    font-size: 0.78rem;
    line-height: 1.55;
}

.teacher-ai-review-panel ul {
    margin: 0.56rem 0 0.62rem;
    padding-left: 1.05rem;
    color: #475569;
    font-size: 0.76rem;
    line-height: 1.5;
}

.teacher-ai-review-loading,
.teacher-ai-review-error {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.teacher-ai-review-error {
    color: #b91c1c;
}

/* Teacher student exercise detail. */
.teacher-detail-summary-card .teacher-kpi-value {
    font-size: 1.35rem;
}

.teacher-reading-passage {
    max-height: 620px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.9));
    color: #22304a;
    padding: 1rem;
    font-size: 0.94rem;
    font-weight: 660;
    line-height: 1.9;
}

.teacher-upgrade-note {
    margin-top: 0.8rem;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 14px;
    background: rgba(255, 251, 235, 0.86);
    color: #92400e;
    padding: 0.72rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 820;
    line-height: 1.55;
}

.teacher-question-review-list {
    display: grid;
    gap: 0.72rem;
}

.teacher-question-review-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    padding: 0.9rem;
}

.teacher-question-review-card.correct {
    border-color: rgba(16, 185, 129, 0.24);
}

.teacher-question-review-card.incorrect {
    border-color: rgba(245, 158, 11, 0.28);
}

.teacher-question-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.55rem;
}

.teacher-question-review-head strong {
    color: #102033;
    font-size: 0.92rem;
    font-weight: 940;
}

.teacher-question-review-head span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 820;
}

.teacher-question-review-text {
    color: #172033;
    font-size: 0.9rem;
    font-weight: 820;
    line-height: 1.6;
}

.teacher-question-options {
    margin-top: 0.62rem;
    display: grid;
    gap: 0.35rem;
}

.teacher-question-options div {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    color: #334155;
    padding: 0.48rem 0.58rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.teacher-answer-pair {
    margin-top: 0.72rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
}

.teacher-answer-pair div {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.62rem;
}

.teacher-answer-pair span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 0.22rem;
}

.teacher-answer-pair strong {
    color: #172033;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.45;
}

.teacher-evidence-panel {
    margin-top: 0.72rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    background: rgba(240, 249, 255, 0.9);
    color: #0f172a;
    padding: 0.72rem 0.8rem;
}

.teacher-evidence-panel p {
    margin: 0.35rem 0;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.6;
}

.teacher-ability-report-summary {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.teacher-ability-report-summary span,
.teacher-ability-desc {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.86);
    color: #64748b;
    padding: 0.3rem 0.58rem;
    font-size: 0.74rem;
    font-weight: 820;
}

.teacher-ability-desc {
    margin-top: 0.58rem;
    border-radius: 12px;
    line-height: 1.45;
}

.teacher-student-ability-table-wrap {
    margin-top: 0.9rem;
}

.teacher-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.68rem;
}

.teacher-pack-card {
    display: grid;
    gap: 0.58rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
    padding: 0.82rem;
}

.teacher-pack-card.locked {
    opacity: 0.78;
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.86));
}

.teacher-pack-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.56rem;
}

.teacher-pack-head strong {
    color: #102033;
    font-size: 0.9rem;
    font-weight: 940;
}

.teacher-pack-head span,
.teacher-pack-meta span {
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.22rem 0.52rem;
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

.teacher-pack-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.55;
}

.teacher-pack-meta {
    display: flex;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.teacher-pack-meta span {
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
}

@media (max-width: 1020px) {
    .teacher-pack-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .teacher-pack-grid {
        grid-template-columns: 1fr;
    }
}

.teacher-empty.compact {
    margin-top: 0.64rem;
    padding: 0.5rem 0.62rem;
    font-size: 0.76rem;
}

@media (max-width: 760px) {
    .teacher-assignment-board-head,
    .teacher-assignment-student-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .teacher-assignment-board-actions,
    .teacher-assignment-student-metrics {
        justify-content: stretch;
    }

    .teacher-assignment-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-assignment-board-actions .teacher-mini-btn {
        width: 100%;
    }

    .teacher-ability-grid {
        grid-template-columns: 1fr;
    }
}

/* Teacher account settings. */
.teacher-settings-grid {
    grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1fr);
}

.teacher-account-summary-card,
.teacher-password-card {
    min-height: 100%;
}

.teacher-account-profile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.78));
}

.teacher-account-avatar {
    width: 3.45rem;
    height: 3.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(102, 126, 234, 0.26);
}

.teacher-account-name {
    color: #102033;
    font-size: 1.02rem;
    font-weight: 950;
}

.teacher-account-email {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 760;
    word-break: break-all;
}

.teacher-settings-meta-list {
    display: grid;
    gap: 0.58rem;
    margin-top: 0.9rem;
}

.teacher-settings-meta-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0.72rem 0.78rem;
}

.teacher-settings-meta-list span,
.teacher-settings-actions span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 760;
}

.teacher-settings-meta-list strong {
    color: #172033;
    font-size: 0.82rem;
    font-weight: 920;
    text-align: right;
}

.teacher-settings-form {
    margin-top: 0.9rem;
}

.teacher-settings-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.72rem;
    margin-top: 0.45rem;
}

@media (max-width: 1020px) {
    .teacher-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Teacher auth pages now use the shared QRead Auth system in premium.css. */
body.teacher-auth-body .qread-auth-role-pill {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.72);
    border-color: rgba(20, 184, 166, 0.22);
}

body.teacher-auth-body .qread-auth-notice-list {
    scrollbar-color: rgba(20, 184, 166, 0.34) rgba(255, 255, 255, 0.35);
}

body.teacher-auth-body .qread-auth-notice-list::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.34);
}
