@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

/* ========== 设计变量（企业官网风格） ========== */
:root {
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-bg-deep: #0b1224;
  --color-bg-mid: #111b33;
  --color-accent: #3b82f6;
  --color-accent-soft: rgba(59, 130, 246, 0.15);
  --color-accent-glow: rgba(59, 130, 246, 0.45);
  --color-teal: #06b6d4;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: rgba(148, 163, 184, 0.35);
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-solid: #ffffff;
  --sidebar-width: 248px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.14);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-med: 0.35s var(--ease-out-expo);
}

/* ========== 全局基础 ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: #e8eef7;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* 动态背景：网格 + 光晕漂移 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(59, 130, 246, 0.18), transparent 50%),
    radial-gradient(ellipse 100% 60% at 100% 0%, rgba(6, 182, 212, 0.12), transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(99, 102, 241, 0.08), transparent 50%),
    linear-gradient(180deg, #eef2ff 0%, #f1f5f9 40%, #f8fafc 100%);
  animation: bg-shift 18s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

@keyframes bg-shift {
  0% {
    filter: hue-rotate(0deg) saturate(1);
  }
  100% {
    filter: hue-rotate(12deg) saturate(1.08);
  }
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

button {
  font-family: inherit;
}

input,
textarea,
select,
button {
  outline: none;
}

/* ========== 应用壳布局 ========== */
.layout-root {
  display: flex;
  min-height: 100vh;
  animation: layout-enter 0.6s var(--ease-out-expo) both;
}

@keyframes layout-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.layout-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 8px 0 40px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
}

.layout-sidebar::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  pointer-events: none;
  animation: sidebar-glow 8s ease-in-out infinite alternate;
}

@keyframes sidebar-glow {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  to {
    transform: translate(-20px, 30px) scale(1.15);
    opacity: 0.85;
  }
}

.layout-sidebar-head {
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.layout-sidebar-head-text {
  width: 100%;
}

.layout-sidebar-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-teal));
  box-shadow: 0 8px 24px var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  animation: logo-pop 0.7s var(--ease-out-expo) 0.15s both;
}

.layout-sidebar-logo-mark--img {
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  padding: 0;
}

.layout-sidebar-logo-mark .app-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

@keyframes logo-pop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.layout-sidebar-title {
  text-align: left;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.layout-sidebar-sub {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

.layout-sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  margin: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.layout-sidebar-menu li {
  padding: 13px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  border: 1px solid transparent;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  animation: menu-item-in 0.5s var(--ease-out-expo) backwards;
}

.layout-sidebar-menu li:nth-child(1) {
  animation-delay: 0.05s;
}
.layout-sidebar-menu li:nth-child(2) {
  animation-delay: 0.1s;
}
.layout-sidebar-menu li:nth-child(3) {
  animation-delay: 0.15s;
}
.layout-sidebar-menu li:nth-child(4) {
  animation-delay: 0.2s;
}
.layout-sidebar-menu li:nth-child(5) {
  animation-delay: 0.25s;
}
.layout-sidebar-menu li:nth-child(6) {
  animation-delay: 0.3s;
}
.layout-sidebar-menu li:nth-child(7) {
  animation-delay: 0.35s;
}
.layout-sidebar-menu li:nth-child(8) {
  animation-delay: 0.4s;
}

@keyframes menu-item-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.layout-sidebar-menu li img {
  margin-right: 12px;
  opacity: 0.9;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.layout-sidebar-menu li:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #f1f5f9;
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.layout-sidebar-menu li:hover img {
  transform: scale(1.06);
  opacity: 1;
}

.layout-sidebar-menu li:active {
  transform: translateX(2px) scale(0.99);
}

.layout-main {
  flex: 1;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.layout-main::before {
  content: "";
  position: absolute;
  top: 10%;
  right: 5%;
  width: min(420px, 50vw);
  height: min(420px, 50vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.layout-main .full-iframe {
  position: relative;
  z-index: 1;
}

.logout-box {
  padding: 12px 16px 0;
  position: relative;
  z-index: 1;
}

.logout-box .btn {
  border-radius: var(--radius-sm);
}

/* ========== 登录 / 注册 落地页 ========== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  /* 约 58% : 42%，两列随视口同比缩放，避免右侧固定过宽/过窄 */
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
  animation: auth-shell-in 0.8s var(--ease-out-expo) both;
}

@keyframes auth-shell-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 42%, #0c4a6e 100%);
  color: #f8fafc;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.25), transparent 40%);
  animation: hero-pulse 12s ease-in-out infinite alternate;
}

@keyframes hero-pulse {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.03);
  }
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: clamp(20px, 5vw, 64px);
  animation: auth-hero-text 0.9s var(--ease-out-expo) 0.12s both;
}

@keyframes auth-hero-text {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 登录 / 注册：左侧大图标 + 右侧文案 */
.auth-hero-brandline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: clamp(20px, 3.5vw, 44px);
}

.auth-hero-brand-mark {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.auth-hero-brand-mark .app-logo-img--hero {
  display: block;
  width: clamp(96px, 11vw, 140px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.auth-hero-copy {
  flex: 1;
  min-width: 0;
}

.auth-card-headline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px 22px;
  margin-bottom: 6px;
  text-align: left;
}

.auth-card-brand-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.auth-card-brand-mark .app-logo-img--card {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.auth-card-headline-text {
  flex: 1;
  min-width: 0;
}

.app-logo-img {
  display: inline-block;
  vertical-align: middle;
}

.app-top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.app-top-brand-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.app-logo-img--inline {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.auth-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.auth-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.auth-hero p {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.88);
  max-width: 440px;
}

.auth-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.auth-stat {
  animation: stat-in 0.6s var(--ease-out-expo) backwards;
}

.auth-stat:nth-child(1) {
  animation-delay: 0.35s;
}
.auth-stat:nth-child(2) {
  animation-delay: 0.45s;
}
.auth-stat:nth-child(3) {
  animation-delay: 0.55s;
}

@keyframes stat-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-stat span {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
  padding-left: clamp(20px, 5vw, 56px);
  padding-right: clamp(24px, 6vw, 72px);
  background: rgba(248, 250, 252, 0.65);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-lg) !important;
  animation: auth-card-in 0.75s var(--ease-out-expo) 0.2s both;
}

.auth-card.auth-card--wide {
  max-width: 440px;
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card .page-title {
  text-align: center;
  margin-bottom: 8px !important;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

.auth-card .auth-card-headline .page-title {
  text-align: left !important;
  margin-bottom: 4px !important;
}

.auth-card .auth-card-headline .auth-subtitle {
  text-align: left !important;
  margin: 0 0 20px !important;
}

/* ========== 页面容器与卡片 ========== */
.page-container {
  padding: clamp(16px, 2.5vw, 28px);
  position: relative;
  z-index: 1;
  animation: page-fade 0.5s var(--ease-out-expo) both;
}

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

.card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-fast);
  animation: fade-in-up 0.5s var(--ease-out-expo) both;
}

.card + .card {
  margin-top: 18px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(59, 130, 246, 0.07), rgba(6, 182, 212, 0.05));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.2);
}

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

/* 列表内嵌套卡片（作业列表等） */
.card .card {
  animation: none;
  margin-top: 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.card .card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.25);
}

#homeworkList,
#submitList,
#submitedList,
#classListContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== 标题与标签 ========== */
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.card-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 6px 20px var(--color-accent-glow);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.card:hover .card-icon {
  transform: scale(1.05) rotate(-3deg);
  box-shadow: 0 10px 28px var(--color-accent-glow);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.card:hover .badge {
  transform: scale(1.02);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--color-text-muted);
  font-size: 12px;
  margin-right: 6px;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

/* ========== 表单 ========== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.95);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

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

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
  transform: translateY(-1px);
}

.form-file {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
  background: rgba(248, 250, 252, 0.9);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.form-file:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.12s ease,
    color var(--transition-fast);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.4);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--color-accent);
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.btn-block {
  width: 100%;
}

/* 列表内操作按钮 */
.submit-btn,
.check-btn {
  margin-top: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-accent), #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.submit-btn:hover,
.check-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.4);
}

/* ========== 模态遮罩与对话框 ========== */
#modalOverlay,
#resetOverlay,
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: backdrop-in 0.35s var(--ease-out-expo) both;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-dialog {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  z-index: 999;
  width: min(400px, calc(100vw - 32px));
  max-width: 400px;
  padding: 24px 26px;
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.25);
  animation: modal-pop 0.45s var(--ease-out-expo) both;
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal-dialog h4 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.modal-dialog label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.modal-dialog .form-input,
.modal-dialog input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-dialog .form-input:focus,
.modal-dialog input[type="text"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.modal-dialog .btn + .btn {
  margin-left: 10px;
}

#submitModal.modal-dialog {
  max-width: 440px;
}

/* ========== iframe ========== */
.full-iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100vh;
  border: none;
  background: transparent;
}

/* ========== 班级列表项 ========== */
.class-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.class-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.class-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.add-btn {
  margin-top: 18px;
}

/* ========== 错误提示 ========== */
#errorMsg {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px !important;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 13px;
  font-weight: 500;
  animation: shake-in 0.4s var(--ease-out-expo);
}

@keyframes shake-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 工具类 ========== */
.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

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

/* ========== 教师学情统计看板 ========== */
.statistics-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analysis-block {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.99) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-med), border-color var(--transition-fast);
  animation: fade-in-up 0.55s var(--ease-out-expo) both;
}

.analysis-block:hover {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: var(--shadow-md);
}

.analysis-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.09), rgba(6, 182, 212, 0.06));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.analysis-block-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.analysis-block-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.analysis-pill {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.75);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.analysis-section-label {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4px 2px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.analysis-section-label--scores {
  padding: 6px 20px 0;
  margin-top: 4px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px 16px;
  padding: 18px 20px 22px;
}

.analysis-rate {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.75);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.analysis-rate:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.analysis-rate-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-rate-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.analysis-rate-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
  letter-spacing: -0.02em;
}

.analysis-rate-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.analysis-rate-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  width: 0%;
  transition: width 0.85s var(--ease-out-expo);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.analysis-rate-bar-fill--warm {
  background: linear-gradient(90deg, #f59e0b, #eab308);
}

.analysis-rate-bar-fill--success {
  background: linear-gradient(90deg, #10b981, #14b8a6);
}

.analysis-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px 22px;
}

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

.analysis-score-tile {
  position: relative;
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.analysis-score-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.analysis-score-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.analysis-score-tile--avg {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.9));
}

.analysis-score-tile--avg::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.analysis-score-tile--max {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), rgba(255, 255, 255, 0.9));
}

.analysis-score-tile--max::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.analysis-score-tile--min {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.9));
}

.analysis-score-tile--min::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.analysis-score-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.analysis-score-num {
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.analysis-score-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 2px;
}

.analysis-empty {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.analysis-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.55;
}

/* ========== 学生作业列表（与教师批改列表同系） ========== */
.homework-page-panel .homework-list-wrap {
  padding: 14px 18px 20px;
}

.homework-item .homework-item-meta {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}

.homework-item .homework-item-meta strong {
  color: var(--color-text-muted);
  font-weight: 600;
  margin-right: 6px;
}

.homework-item .homework-status-line {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.homework-item .homework-grade-block {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  font-size: 13px;
  line-height: 1.55;
}

.homework-item .homework-grade-block .homework-score {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
}

.homework-item-body {
  padding: 0 20px 16px;
}

.homework-grade-comment {
  margin-top: 8px;
}

.homework-item-actions {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  margin-top: 0;
}

.homework-pill--done {
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.homework-pill--submit {
  color: #1d4ed8 !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
  background: rgba(59, 130, 246, 0.1) !important;
}

.homework-pill--warn {
  color: #b45309 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.homework-pill--todo {
  color: #4338ca !important;
  border-color: rgba(99, 102, 241, 0.28) !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

/* ========== 学生通知 / 课程资料 ========== */
.notice-item .notice-item-time,
.material-item .material-item-time {
  margin-top: 4px !important;
}

.notice-item-body .notice-item-content {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
  word-break: break-word;
}

/* 后端返回 HTML 正文（如 <p>…</p>） */
.notice-item-content--html {
  white-space: normal;
}

.notice-item-content--html p {
  margin: 0 0 0.65em;
}

.notice-item-content--html p:last-child {
  margin-bottom: 0;
}

.notice-item-content--html a {
  color: var(--color-accent);
}

.notice-item-content--html ul,
.notice-item-content--html ol {
  margin: 0.4em 0 0.65em 1.25em;
  padding: 0;
}

.notice-item-content--html img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.material-item .analysis-block-title {
  font-size: 1.05rem;
}

/* ========== 管理员（班级 / 重置密码等） ========== */
.admin-page-panel .homework-list-wrap {
  padding: 14px 18px 20px;
}

.admin-panel-actions {
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-panel-actions--start {
  justify-content: flex-start;
}

.admin-reset-card {
  max-width: 520px;
  margin: 0 auto;
}

.class-item-card .analysis-block-title {
  font-size: 1.05rem;
}

.modal-dialog-homework-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-dialog-homework-head .card-header {
  margin-bottom: 0;
}

/* ========== 学生成绩查询 ========== */
.score-record-meta {
  margin-top: 4px !important;
}

.score-record-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-record-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.score-record-total-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.score-record-total-num {
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
  letter-spacing: -0.02em;
}

.score-record-total-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.score-record-split {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.score-record-split strong {
  color: var(--color-text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.score-record-split-gap {
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.45);
}

.score-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.score-pager-info {
  font-size: 13px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.score-pager-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.score-pager-btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: #1d4ed8;
  background: var(--color-accent-soft);
}

.score-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ========== 学生学习统计 KPI ========== */
.student-stats-kpi-wrap {
  padding: 14px 18px 20px;
}

.student-stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px 14px;
}

.student-stat-tile {
  padding: 14px 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.75);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.student-stat-tile:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.student-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.student-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.student-stat-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 4px;
}

.student-stat-tile--accent {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.92));
  border-color: rgba(59, 130, 246, 0.22);
}

.student-stat-tile--accent .student-stat-value {
  color: #1d4ed8;
}

.student-stat-tile--max {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), rgba(255, 255, 255, 0.92));
  border-color: rgba(16, 185, 129, 0.22);
}

.student-stat-tile--max .student-stat-value {
  color: #047857;
}

.student-stat-tile--min {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.92));
  border-color: rgba(245, 158, 11, 0.25);
}

.student-stat-tile--min .student-stat-value {
  color: #b45309;
}

.student-stat-tile--ok .student-stat-value {
  color: #047857;
}

.student-stat-tile--warn {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.92));
  border-color: rgba(245, 158, 11, 0.22);
}

.student-stat-tile--warn .student-stat-value {
  color: #b45309;
}

.student-charts-wrap {
  padding: 14px 18px 20px;
}

.student-chart-row {
  width: 100%;
}

.student-chart-row .chart-card {
  min-width: min(100%, 260px);
}

/* ========== 教师批改列表（与学情看板同系） ========== */
.review-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item .analysis-block-meta {
  margin-top: 6px;
  line-height: 1.6;
}

.review-item .analysis-block-meta span {
  display: inline-block;
  margin-right: 14px;
}

.review-item .analysis-block-meta span:last-child {
  margin-right: 0;
}

.review-item-actions {
  padding: 0 20px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  margin-top: 0;
  padding-top: 16px;
}

.review-item--done .analysis-pill {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
}

.review-item--done .analysis-block-head {
  border-bottom: none;
  padding-bottom: 18px;
}

/* ========== 教师成绩发布（全宽看板） ========== */
html.score-page-root,
body.score-page-root {
  height: 100%;
  margin: 0;
}

body.score-page-root {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-score-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(12px, 2vw, 24px);
  box-sizing: border-box;
}

.score-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.score-panel .analysis-block-head {
  flex-shrink: 0;
}

.score-body {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  padding: 22px 24px 8px;
  align-content: start;
}

.score-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.score-col-label {
  padding: 0 0 2px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.score-field-card {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.score-field-card:hover {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.score-field-card .form-group {
  margin-bottom: 0;
}

.score-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.score-footnote {
  flex-shrink: 0;
  margin-top: auto;
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5), rgba(241, 245, 249, 0.65));
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.score-footnote strong {
  color: var(--color-text);
  font-weight: 600;
}

@media (max-width: 768px) {
  .score-body {
    grid-template-columns: 1fr;
    padding: 18px 16px 8px;
  }

  .score-footnote {
    padding: 12px 16px 16px;
  }
}

/* ========== 师生个人资料（全宽看板 · 一屏为主；teacher/student profile 共用） ========== */
html.profile-page-root,
body.profile-page-root {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.profile-page-root {
  display: flex;
  flex-direction: column;
}

.page-profile-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 12px 6px 14px;
  box-sizing: border-box;
  overflow: hidden;
}

.profile-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.profile-panel .analysis-block-head {
  flex-shrink: 0;
  padding: 14px 12px 14px;
}

.profile-panel .analysis-block-title {
  font-size: 1.1rem;
  margin: 0;
}

.profile-head-meta {
  margin: 4px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.profile-body {
  display: grid;
  grid-template-columns: minmax(168px, 200px) minmax(0, 1fr);
  gap: 16px 20px;
  padding: 14px 10px 14px;
  align-items: start;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.profile-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 18px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(165deg, rgba(59, 130, 246, 0.06), rgba(255, 255, 255, 0.88));
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-avatar-wrap:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.07);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 3px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #3b82f6, #06b6d4) border-box;
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.24);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.profile-avatar:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.3);
}

.profile-avatar-hint {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 200px;
}

.profile-avatar-btn {
  font-size: 13px;
  padding: 7px 18px;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.profile-main .score-col-label {
  margin: 0;
  padding: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.profile-label-inline {
  padding-top: 0 !important;
}

.profile-card-compact {
  padding: 14px 16px !important;
}

.profile-card-compact .form-group {
  margin-bottom: 10px;
}

.profile-card-compact .form-group:last-child {
  margin-bottom: 0;
}

.profile-panel .form-label {
  font-size: 13px;
  margin-bottom: 5px;
}

.profile-panel .form-input,
.profile-panel .form-textarea {
  padding: 9px 12px;
  font-size: 14px;
}

.profile-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.profile-account-grid .form-group {
  margin-bottom: 0;
}

.profile-form-group-tight {
  margin-top: 4px !important;
  margin-bottom: 0 !important;
}

.profile-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.profile-password-grid .form-group {
  margin-bottom: 0;
}

.profile-remark-save {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 24px;
  align-items: end;
  margin-top: 4px;
  min-height: 0;
}

.profile-remark-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-remark-card {
  margin: 0;
}

.profile-remark-textarea {
  min-height: 56px !important;
  max-height: 72px;
  resize: none !important;
  line-height: 1.45;
}

.profile-save-row {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.profile-save-btn {
  padding: 10px 22px !important;
  font-size: 14px !important;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  html.profile-page-root,
  body.profile-page-root {
    overflow: auto;
  }

  .page-profile-fill {
    max-height: none;
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 14px 10px 20px;
  }

  .profile-panel {
    max-height: none;
    overflow: visible;
  }

  .profile-body {
    grid-template-columns: 1fr;
    padding: 16px 12px 18px;
    gap: 18px;
    overflow: visible;
  }

  .profile-main {
    overflow: visible;
  }

  .profile-password-grid {
    grid-template-columns: 1fr;
  }

  .profile-account-grid {
    grid-template-columns: 1fr;
  }

  .profile-remark-save {
    grid-template-columns: 1fr;
  }

  .profile-save-row .btn,
  .profile-save-btn {
    width: 100%;
    min-width: 0;
  }
}

/* ========== 图表容器 ========== */
.chart-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.chart-card {
  flex: 1;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  min-width: 240px;
  transition: box-shadow var(--transition-med), transform var(--transition-med);
}

.chart-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.chart-card > div {
  width: 100%;
  height: 300px;
}

/* ========== 响应式 ========== */
@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 280px;
    padding: 32px 24px;
  }

  .auth-hero-inner {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .auth-hero-brandline {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .auth-hero-copy {
    text-align: center;
  }

  .auth-hero-copy h1,
  .auth-hero-copy p {
    text-align: center;
  }

  .auth-hero-brand-mark .app-logo-img--hero {
    width: clamp(88px, 26vw, 128px);
  }

  .auth-panel {
    padding: 24px 16px 40px;
  }
}

@media (max-width: 420px) {
  .auth-card-headline {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card-headline-text {
    width: 100%;
  }

  .auth-card .auth-card-headline .page-title,
  .auth-card .auth-card-headline .auth-subtitle {
    text-align: left !important;
  }
}

@media (max-width: 768px) {
  .layout-root {
    flex-direction: column;
  }

  .layout-sidebar {
    width: 100%;
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 12px 8px;
  }

  .layout-sidebar-head {
    width: 100%;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .layout-sidebar-logo-mark {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .layout-sidebar-head-text {
    flex: 1;
    min-width: 0;
  }

  .layout-sidebar-title {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .layout-sidebar-sub {
    display: none;
  }

  .layout-sidebar-menu {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    flex: 1 1 100%;
    padding: 8px 8px 4px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .layout-sidebar-menu li {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 12px;
    animation: none;
  }

  .layout-sidebar-menu li:hover {
    transform: none;
  }

  .logout-box {
    padding: 8px 8px 12px;
    width: 100%;
  }

  .logout-box .btn {
    width: 100%;
  }

  .page-container {
    padding: 12px;
  }

  .full-iframe {
    height: calc(100vh - 200px);
    min-height: 400px;
  }

  .btn-block {
    width: 100%;
  }

  .modal-dialog .btn + .btn {
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
