:root {
  --bg: #eef6ff;
  --bg-warm: #fff1f8;
  --surface: rgba(255, 255, 255, .74);
  --surface-solid: #ffffff;
  --surface-raised: rgba(255, 255, 255, .9);
  --surface-hover: rgba(255, 255, 255, .98);
  --line: rgba(255, 255, 255, .82);
  --line-strong: rgba(180, 198, 230, .58);
  --text: #111827;
  --text-soft: #314057;
  --muted: #7b8496;
  --blue: #2088ff;
  --blue-deep: #1467d8;
  --blue-soft: rgba(32, 136, 255, .13);
  --green: #37cf70;
  --green-deep: #1aa95a;
  --pink: #ff61ad;
  --orange: #ff9a22;
  --purple: #8f7cff;
  --danger: #ff4d4f;
  --shadow-sm: 0 18px 48px rgba(70, 96, 140, .12);
  --shadow-md: 0 28px 86px rgba(73, 100, 150, .18);
  --glow-blue: 0 14px 30px rgba(32, 136, 255, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(159, 207, 255, .85), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(255, 214, 242, .9), transparent 31%),
    radial-gradient(circle at 74% 58%, rgba(205, 231, 255, .88), transparent 38%),
    linear-gradient(115deg, #eef7ff 0%, #f5f7ff 42%, #fff3fb 100%);
  background-attachment: fixed;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255,255,255,.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.34) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.08) 55%, transparent);
  pointer-events: none;
}

button, input, textarea, select { font: inherit; letter-spacing: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
.container { width: min(100% - 56px, 1490px); max-width: none; padding: 0; }
.muted { color: var(--muted); }

.app-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,.75);
  background: linear-gradient(90deg, rgba(218,236,255,.78), rgba(255,235,248,.78));
  box-shadow: 0 10px 28px rgba(87, 111, 156, .08);
  backdrop-filter: blur(24px) saturate(130%);
}

.nav-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}
.brand-lockup:hover { color: var(--text); }

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 12px;
  background: linear-gradient(145deg, #248fff, #47d87c);
  box-shadow: 0 12px 24px rgba(32, 136, 255, .2), inset 0 1px 0 rgba(255,255,255,.38);
}
.brand-mark::before,
.brand-mark::after { content: ""; position: absolute; height: 3px; border-radius: 999px; background: #fff; }
.brand-mark::before { width: 19px; left: 8px; top: 13px; transform: rotate(-20deg); }
.brand-mark::after { width: 13px; left: 14px; top: 22px; transform: rotate(24deg); }
.brand-name { display: block; color: #1d5fc9; font-size: 20px; line-height: 1.1; font-weight: 900; }
.brand-subtitle { display: block; margin-top: 3px; color: #526179; font-size: 9px; line-height: 1; font-weight: 800; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-home,
.nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #111827;
  background: rgba(255,255,255,.68);
  box-shadow: 0 8px 22px rgba(80, 102, 143, .09);
  text-decoration: none;
  font-weight: 820;
}
.nav-home:hover { color: #fff; border-color: rgba(32,136,255,.24); background: var(--blue); box-shadow: var(--glow-blue); }
.nav-logout:hover { color: #fff; border-color: rgba(255,77,79,.2); background: var(--danger); box-shadow: 0 14px 28px rgba(255,77,79,.22); }
.nav-actions svg { width: 17px; height: 17px; }

.app-main { padding-top: 34px; padding-bottom: 80px; }

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 610px);
  align-items: center;
  gap: 46px;
  min-height: 228px;
  padding: 34px 42px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(125deg, rgba(255,255,255,.86), rgba(255,255,255,.58));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px) saturate(138%);
}
.page-heading h1 { margin: 0; color: #101827; font-size: 44px; font-weight: 900; line-height: 1.12; }
.page-heading p { max-width: 760px; margin-top: 12px; color: #5c6677; font-size: 16px; }

.page-kicker,
.section-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.page-kicker::before { content: ""; width: 30px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--green)); }

.overview-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 16px 40px rgba(82, 104, 148, .11);
}
.admin-overview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-item {
  position: relative;
  min-height: 104px;
  padding: 22px 24px;
  overflow: hidden;
  border-right: 1px solid rgba(189,202,224,.46);
}
.overview-item:last-child { border-right: 0; }
.overview-item::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -18px;
  width: 78px;
  height: 150px;
  transform: skewX(-18deg);
  background: rgba(255,255,255,.74);
}
.overview-number { position: relative; z-index: 1; display: block; color: #152235; font-size: 31px; font-weight: 900; line-height: 1; }
.overview-item:nth-child(1) .overview-number { color: var(--blue); }
.overview-item:nth-child(2) .overview-number { color: var(--green-deep); }
.overview-label { position: relative; z-index: 1; display: block; margin-top: 10px; color: #5a6475; font-size: 12px; font-weight: 760; }

.section-jump {
  display: inline-flex;
  gap: 8px;
  margin: 24px 0 0;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 12px 28px rgba(85,104,145,.1);
  backdrop-filter: blur(20px);
}
.section-jump a {
  min-width: 122px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #172033;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 860;
}
.section-jump a:hover { color: #fff; background: var(--blue); box-shadow: var(--glow-blue); }

.dashboard-module { padding-top: 52px; scroll-margin-top: 96px; }
.module-title-row { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 18px; }
.module-title-row h2 { margin: 0; color: #101827; font-size: 28px; font-weight: 900; }
.module-title-row p { margin-top: 4px; color: #687283; font-size: 13px; }
.module-count { color: #7a8496; font-size: 12px; font-weight: 780; }

.panel,
.surface {
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(24px) saturate(132%);
}
.panel { padding: 25px; }
.panel-title { margin: 0 0 5px; color: #111827; font-size: 19px; font-weight: 900; }
.panel-caption { margin: 0 0 20px; color: #7b8496; font-size: 12px; font-weight: 650; }

.form-control,
.form-select {
  min-height: 46px;
  border: 1px solid rgba(176, 191, 220, .72);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.78);
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.form-control::placeholder { color: #a2aaba; }
.form-control:focus,
.form-select:focus {
  color: var(--text);
  border-color: rgba(32,136,255,.64);
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 4px rgba(32,136,255,.13), 0 14px 32px rgba(32,136,255,.12);
}
textarea.form-control { min-height: 108px; resize: vertical; }
.field-label { display: block; margin-bottom: 7px; color: #344056; font-size: 12px; font-weight: 850; }

.btn { min-height: 42px; border-radius: 999px; font-weight: 880; letter-spacing: 0; }
.btn svg { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; }
.btn-success {
  color: #fff;
  border-color: rgba(55,207,112,.24);
  background: linear-gradient(135deg, #37cf70, #21b2ff);
  box-shadow: 0 14px 30px rgba(43, 190, 137, .27);
}
.btn-success:hover,
.btn-success:focus { color: #fff; filter: brightness(1.04); }
.btn-primary {
  color: #fff;
  border-color: rgba(32,136,255,.3);
  background: linear-gradient(135deg, #2088ff, #6b8dff);
  box-shadow: var(--glow-blue);
}
.btn-primary:hover,
.btn-primary:focus { color: #fff; filter: brightness(1.04); }
.btn-outline-success { color: var(--green-deep); border-color: rgba(55,207,112,.42); background: rgba(255,255,255,.62); }
.btn-outline-success:hover { color: #fff; border-color: rgba(55,207,112,.24); background: var(--green); box-shadow: 0 12px 26px rgba(55,207,112,.22); }
.btn-outline-primary { color: var(--blue-deep); border-color: rgba(32,136,255,.36); background: rgba(255,255,255,.62); }
.btn-outline-primary:hover { color: #fff; border-color: rgba(32,136,255,.25); background: var(--blue); box-shadow: var(--glow-blue); }
.btn-outline-danger { color: var(--danger); border-color: rgba(255,77,79,.35); background: rgba(255,255,255,.6); }
.btn-outline-danger:hover { color: #fff; border-color: rgba(255,77,79,.2); background: var(--danger); box-shadow: 0 12px 26px rgba(255,77,79,.2); }
.btn-outline-secondary { color: #4d5a70; border-color: rgba(176,191,220,.65); background: rgba(255,255,255,.62); }
.btn-outline-secondary:hover { color: #111827; border-color: rgba(129,149,184,.72); background: rgba(255,255,255,.94); }

.alert { border-radius: 16px; border-width: 1px; }
.alert-danger { color: #8b2024; border-color: rgba(255,77,79,.25); background: rgba(255,223,227,.78); }
.alert-info { color: #1467a8; border-color: rgba(32,136,255,.25); background: rgba(220,238,255,.8); }
.alert-success { color: #137044; border-color: rgba(55,207,112,.25); background: rgba(225,249,235,.82); }
.badge { border-radius: 999px; padding: .44em .72em; letter-spacing: 0; font-weight: 850; }
.badge-ai { color: var(--blue-deep); border: 1px solid rgba(32,136,255,.22); background: rgba(32,136,255,.1); }
.status-badge { color: #5962ce; border: 1px solid rgba(143,124,255,.22); background: rgba(143,124,255,.11); }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 28px;
  border: 1px dashed rgba(142,158,192,.56);
  border-radius: 18px;
  color: #7b8496;
  background: rgba(255,255,255,.42);
  text-align: center;
}

.class-management-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.create-class-panel { position: sticky; top: 100px; }
.create-class-panel::before {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 12px 24px rgba(32,136,255,.18);
}
.class-gallery { min-width: 0; }
.class-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.class-card {
  position: relative;
  min-height: 178px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  background: linear-gradient(130deg, rgba(255,255,255,.78), rgba(228,240,255,.66));
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.class-entry-card { display: block; color: var(--text); text-decoration: none; }
.class-entry-card:hover { color: var(--text); }
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: rgba(255,255,255,.9); }
.class-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -20px;
  width: 90px;
  height: 168px;
  transform: skewX(-18deg);
  background: rgba(255,255,255,.82);
}
.class-card-head { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.class-card-head svg { width: 24px; height: 24px; color: var(--blue); opacity: .85; }
.class-name { color: #111827; font-size: 20px; font-weight: 900; }
.class-meta { margin-top: 5px; color: #677286; font-size: 12px; font-weight: 680; }
.invite-label { position: relative; z-index: 1; display: block; margin-top: 28px; color: #8891a1; font-size: 10px; font-weight: 820; }
.invite-code { position: relative; z-index: 1; display: inline-block; color: var(--blue-deep); font-family: Consolas, monospace; font-size: 17px; font-weight: 900; }
.class-open-hint { position: relative; z-index: 1; display: block; margin-top: 18px; color: #526179; font-size: 12px; font-weight: 820; }

.task-management-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr); gap: 22px; align-items: start; }
.class-task-layout { display: grid; grid-template-columns: minmax(420px, .78fr) minmax(0, 1.22fr); gap: 22px; align-items: start; }
.class-detail-hero { min-height: 190px; }
.class-detail-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 640px);
  gap: 28px;
  align-items: start;
}
.class-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.class-invite-panel {
  min-width: 210px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 16px 40px rgba(82, 104, 148, .11);
}
.class-invite-panel span { display: block; color: #7b8496; font-size: 12px; font-weight: 820; }
.class-invite-panel strong { display: block; margin-top: 7px; color: var(--blue-deep); font-family: Consolas, monospace; font-size: 24px; font-weight: 900; letter-spacing: 0; }
.class-summary-panel {
  min-height: 98px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,.58);
  box-shadow: 0 16px 40px rgba(82, 104, 148, .11);
  text-decoration: none;
}
.class-summary-panel span { display: block; color: #7b8496; font-size: 12px; font-weight: 820; }
.class-summary-panel strong { display: block; margin-top: 7px; color: var(--blue-deep); font-size: 24px; font-weight: 900; letter-spacing: 0; }
.class-summary-panel:first-child strong { font-family: Consolas, monospace; }
.class-summary-link:hover {
  color: var(--text);
  border-color: rgba(32,136,255,.36);
  background: rgba(229,243,255,.96);
  box-shadow: var(--shadow-md);
}
.student-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.student-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow-sm);
}
.student-profile-card strong { display: block; color: #111827; font-size: 17px; font-weight: 900; }
.student-profile-card small { display: block; margin-top: 3px; }
.student-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: var(--glow-blue);
  font-size: 20px;
  font-weight: 900;
}
.admin-management-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-users-panel { min-width: 0; }
.admin-user-list { display: grid; gap: 13px; }
.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  gap: 18px;
  align-items: center;
  min-height: 104px;
  padding: 18px 19px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  background: rgba(255,255,255,.64);
  box-shadow: var(--shadow-sm);
}
.admin-user-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.admin-user-main strong { display: block; color: #111827; font-size: 17px; font-weight: 900; }
.admin-user-main small { display: block; margin-top: 3px; }
.admin-user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.admin-password-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px; min-width: 0; }
.admin-password-form .form-control { min-height: 40px; }
.task-publisher-list,
.task-list,
.student-task-grid,
.submission-list,
.review-list { display: grid; gap: 13px; }
.task-publisher { border: 1px solid rgba(210,219,235,.75); border-radius: 16px; background: rgba(255,255,255,.54); overflow: hidden; }
.task-publisher summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; }
.task-publisher summary::-webkit-details-marker { display: none; }
.task-publisher summary:hover { background: rgba(255,255,255,.48); }
.task-publisher[open] summary { border-bottom: 1px solid rgba(210,219,235,.75); background: rgba(230,243,255,.72); }
.task-publisher summary .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}
.task-publisher summary small,
.task-list-item small,
.submission-card small,
.student-task-card small { display: block; margin-top: 3px; }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.task-form-grid .wide { grid-column: 1 / -1; }

.task-list-item,
.submission-card,
.student-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 17px;
  min-height: 92px;
  padding: 17px 19px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,.68);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.task-list-item:hover,
.submission-card:hover,
.student-task-card:hover { color: var(--text); border-color: rgba(32,136,255,.28); background: rgba(255,255,255,.96); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.list-arrow {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32,136,255,.2);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(32,136,255,.08);
}
.list-arrow svg { width: 17px; height: 17px; }
.student-action { min-height: 44px; white-space: nowrap; }

.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: #3a4a62; font-size: 13px; font-weight: 850; text-decoration: none; }
.back-link:hover { color: var(--blue); }
.back-link svg { width: 16px; height: 16px; }
.detail-hero {
  position: relative;
  min-height: 220px;
  padding: 32px;
  overflow: hidden;
  background: linear-gradient(125deg, rgba(255,255,255,.86), rgba(234,244,255,.62));
}
.detail-hero h1 { color: #101827; font-size: 40px; }
.detail-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -24px;
  width: 150px;
  height: calc(100% + 60px);
  transform: skewX(-18deg);
  background: rgba(255,255,255,.74);
  pointer-events: none;
}

.workspace-grid { display: grid; grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr); gap: 22px; align-items: start; }
.workspace-sidebar { display: grid; gap: 16px; }
.artwork-panel { display: grid; gap: 16px; }
.artwork-frame { padding: 12px; border: 1px solid rgba(255,255,255,.86); border-radius: 18px; background: rgba(255,255,255,.6); }
.art-thumb { display: block; width: 100%; max-height: 660px; object-fit: contain; border-radius: 12px; background: #f5f8ff; }
.art-actions { display: grid; gap: 10px; margin-top: 17px; }
.review-item { padding: 17px 0; border-bottom: 1px solid rgba(210,219,235,.72); }
.review-item:first-child { padding-top: 4px; }
.review-item:last-child { padding-bottom: 0; border-bottom: 0; }
.review-item p { margin: 8px 0 0; color: #3f4d63; }
.review-meta { color: #6d5ee8; font-size: 11px; font-weight: 850; }
.ai-note { padding-left: 13px; border-left: 3px solid var(--blue); }
audio { color-scheme: light; }

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 4%, rgba(173,216,255,.82), transparent 36%),
    radial-gradient(circle at 90% 2%, rgba(255,219,244,.88), transparent 34%),
    linear-gradient(115deg, #edf7ff, #fff4fb);
}
.auth-shell { width: min(100% - 28px, 560px); margin: 0 auto; padding: 58px 0; }
.auth-heading { margin-bottom: 22px; text-align: center; }
.auth-heading h1 { margin: 18px 0 5px; color: #101827; font-size: 36px; font-weight: 900; }
.auth-panel { box-shadow: var(--shadow-md); }

.login-page { min-height: 100vh; overflow-x: hidden; color: var(--text); background: #eef6ff; }
.login-bg,
.login-bg::before,
.login-bg::after,
.login-bg span { position: fixed; inset: 0; }
.login-bg { z-index: 0; overflow: hidden; }
.login-bg::before {
  content: "";
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(239,247,255,.58) 0%, rgba(241,247,255,.36) 48%, rgba(255,240,248,.46) 100%);
}
.login-bg::after {
  content: "";
  z-index: 3;
  background:
    radial-gradient(circle at 13% 4%, rgba(130,194,255,.24), transparent 32%),
    radial-gradient(circle at 84% 9%, rgba(255,199,234,.26), transparent 33%),
    linear-gradient(90deg, rgba(255,255,255,.28), transparent 38%, rgba(255,255,255,.2));
}
.login-bg span { opacity: 0; background-size: cover; background-position: center; filter: saturate(1.05) contrast(1.04) brightness(1); animation: loginCarousel 28s infinite; transform: scale(1.02); }
.login-bg span:nth-child(2) { animation-delay: 7s; }
.login-bg span:nth-child(3) { animation-delay: 14s; }
.login-bg span:nth-child(4) { animation-delay: 21s; }
@keyframes loginCarousel {
  0% { opacity: 0; transform: scale(1.02); }
  7% { opacity: .82; }
  27% { opacity: .82; }
  34% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.08); }
}

.login-shell {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 80px;
  align-items: center;
  width: min(100% - 64px, 1420px);
  margin: 0 auto;
  padding: 54px 0;
}
.login-copy { padding-left: 24px; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 42px; color: #526179; font-size: 14px; font-weight: 850; }
.login-copy h1 { max-width: 700px; margin: 0; color: #101827; font-size: 62px; font-weight: 930; line-height: 1.08; }
.login-copy p { max-width: 590px; margin: 20px 0 0; color: #526179; font-size: 17px; font-weight: 650; }
.login-caption { display: flex; align-items: center; gap: 10px; margin-top: 38px; color: #7d8798; font-size: 11px; font-weight: 760; }
.login-caption::before { content: ""; width: 38px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--green)); }
.login-card {
  position: relative;
  padding: 34px;
  color: var(--text);
  border-color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(28px) saturate(135%);
}
.login-card::before {
  content: none;
}
.login-card h2 { margin: 0 0 24px; color: #101827; font-size: 29px; font-weight: 900; }
.login-card-intro { margin: 6px 0 24px; color: #7b8496; font-size: 12px; font-weight: 650; }
.register-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(210,219,235,.72); }
.register-entry .btn { background: rgba(255,255,255,.62); }
.login-register-button,
.login-register-button:visited {
  color: var(--blue-deep) !important;
  border: 1px solid rgba(32,136,255,.42) !important;
  background: rgba(255,255,255,.78) !important;
}
.login-register-button:hover,
.login-register-button:focus,
.login-register-button:active {
  color: #0f5fc9 !important;
  border-color: rgba(32,136,255,.72) !important;
  background: rgba(229, 243, 255, .96) !important;
  box-shadow: 0 12px 26px rgba(32,136,255,.16) !important;
}
.login-footnote { position: absolute; right: 0; bottom: 20px; color: #7d8798; font-size: 10px; }

@media (max-width: 1180px) {
  .class-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { gap: 42px; grid-template-columns: minmax(0, 1fr) 430px; }
  .page-heading { grid-template-columns: minmax(0, 1fr) 440px; }
  .class-detail-head { grid-template-columns: 1fr; }
}

@media (max-width: 940px) {
  .class-management-layout,
  .admin-management-layout,
  .class-task-layout,
  .task-management-layout,
  .workspace-grid { grid-template-columns: 1fr; }
  .create-class-panel { position: static; }
  .page-heading { grid-template-columns: 1fr; min-height: auto; gap: 28px; }
  .overview-strip { width: 100%; }
  .login-shell { grid-template-columns: 1fr; gap: 30px; align-content: center; }
  .login-copy { padding-left: 0; }
  .login-brand { margin-bottom: 24px; }
  .login-copy h1 { font-size: 48px; }
  .login-copy p { margin-top: 12px; }
  .login-caption { display: none; }
  .login-card { width: min(100%, 540px); }
  .class-summary-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { width: min(100% - 28px, 1490px); }
  .app-main { padding-top: 22px; padding-bottom: 44px; }
  .brand-subtitle,
  .nav-home span,
  .nav-logout span { display: none; }
  .nav-home,
  .nav-logout { width: 42px; padding: 0; }
  .page-heading { padding: 24px 20px; border-radius: 20px; }
  .page-heading h1 { font-size: 34px; }
  .page-heading p { font-size: 14px; }
  .overview-strip { grid-template-columns: 1fr; }
  .admin-overview-strip { grid-template-columns: 1fr; }
  .overview-item { min-height: 76px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid rgba(189,202,224,.46); }
  .overview-item:last-child { border-bottom: 0; }
  .overview-number { font-size: 24px; }
  .section-jump { display: flex; width: 100%; }
  .section-jump a { flex: 1; min-width: 0; }
  .dashboard-module { padding-top: 36px; }
  .module-title-row { align-items: flex-start; }
  .module-title-row h2 { font-size: 24px; }
  .panel { padding: 19px; }
  .class-card-grid { grid-template-columns: 1fr; }
  .student-profile-grid { grid-template-columns: 1fr; }
  .task-form-grid { grid-template-columns: 1fr; padding: 14px; }
  .task-form-grid .wide { grid-column: auto; }
  .task-publisher summary,
  .task-list-item,
  .submission-card,
  .student-task-card { align-items: stretch; flex-direction: column; }
  .admin-user-card,
  .admin-user-actions,
  .admin-password-form { grid-template-columns: 1fr; align-items: stretch; }
  .admin-user-actions { display: grid; }
  .admin-user-actions .btn { width: 100%; }
  .task-publisher summary .btn,
  .student-task-card .btn { width: 100%; }
  .list-arrow { display: none; }
  .detail-hero { min-height: auto; padding: 22px; }
  .detail-hero h1 { font-size: 32px; }
  .login-shell { width: min(100% - 28px, 1420px); padding: 28px 0 54px; }
  .login-copy h1 { font-size: 39px; }
  .login-copy p { font-size: 14px; }
  .login-card { padding: 24px; }
  .login-card h2 { font-size: 26px; }
  .register-entry { grid-template-columns: 1fr; }
  .login-footnote { left: 0; right: auto; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .login-bg span { animation: none; opacity: .82; transform: none; }
  .class-card,
  .task-list-item,
  .submission-card,
  .student-task-card { transition: none; }
}
