:root {
  --bg: #f7f8ff;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --line: #e9ecf7;
  --text: #172033;
  --muted: #8e9ab2;
  --accent: #8b75ec;
  --accent-strong: #765ee5;
  --green: #47c987;
  --orange: #f39b52;
  --shadow: 0 18px 45px rgba(110, 123, 166, 0.13);
  --soft-shadow: 0 10px 26px rgba(122, 134, 175, 0.1);
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 86px minmax(760px, 1fr) 318px;
  gap: 22px;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(229, 233, 246, 0.75);
  backdrop-filter: blur(16px);
}

.rail nav {
  display: grid;
  gap: 10px;
}

.rail-create,
.rail-btn,
.rail-avatar,
.icon-btn,
.right-head button,
.row-actions button {
  border: 0;
  display: grid;
  place-items: center;
}

.rail-create {
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(145deg, #9d86ff, #755ee4);
  box-shadow: 0 14px 24px rgba(117, 94, 228, 0.32);
}

.rail-btn {
  width: 62px;
  min-height: 54px;
  color: #9aa6ba;
  border-radius: 16px;
  background: transparent;
  gap: 3px;
}

.rail-btn span,
.rail-btn small {
  display: block;
}

.rail-btn small {
  max-width: 58px;
  overflow: hidden;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-btn.active {
  color: var(--accent);
  background: #f1eeff;
  box-shadow: inset 0 0 0 1px rgba(139, 117, 236, 0.06);
}

.rail-avatar {
  margin-top: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffcf88, #8b75ec);
  box-shadow: 0 10px 18px rgba(139, 117, 236, 0.24);
}

.account-panel {
  position: absolute;
  left: 76px;
  bottom: 18px;
  z-index: 12;
  width: 286px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(54, 66, 101, 0.18);
}

.account-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffcf88, #8b75ec);
  font-weight: 900;
}

.account-head strong,
.account-head span {
  display: block;
}

.account-head strong {
  font-size: 14px;
}

.account-head span,
.account-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 12px;
  margin: 16px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f8f9fd;
}

.account-status span {
  color: var(--muted);
  font-size: 12px;
}

.account-status strong {
  font-size: 12px;
}

.permission-box {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.permission-box h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.permission-row span {
  font-size: 12px;
  font-weight: 800;
}

.permission-row input {
  width: 36px;
  height: 20px;
  accent-color: var(--accent);
}

.logout-btn {
  width: 100%;
  margin-top: 12px;
}

.account-page {
  display: grid;
  gap: 22px;
}

.account-hero,
.profile-card {
  border: 1px solid rgba(233, 236, 247, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.account-avatar.big {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  font-size: 22px;
}

.account-head h1,
.account-head p,
.profile-card h2,
.profile-card p {
  margin: 0;
}

.account-head h1 {
  font-size: 24px;
}

.account-head p,
.profile-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.account-actions {
  display: flex;
  gap: 12px;
}

.profile-status {
  margin: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.profile-card {
  padding: 22px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.user-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.admin-user-message {
  min-height: 18px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
}

.admin-user-message.success {
  color: var(--green);
}

.admin-user-message.error {
  color: #d75555;
}

.user-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.user-list button {
  flex: 0 0 auto;
  border: 0;
  padding: 7px 10px;
  color: #d75555;
  border-radius: 10px;
  background: #fff0f0;
  font-size: 12px;
  font-weight: 800;
}

.user-list button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.email-backup-panel {
  display: grid;
  gap: 18px;
}

.backup-status {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #8a96aa;
  background: #f4f6fb;
  font-size: 12px;
  font-weight: 900;
}

.backup-status.enabled {
  color: #1ca86d;
  background: #effcf5;
}

.email-backup-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.toggle-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcff;
  color: #65738b;
  font-size: 13px;
  font-weight: 800;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.ssl-toggle {
  grid-column: span 2;
}

.email-backup-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.email-backup-actions p {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 13px;
}

.runtime-log-panel {
  display: grid;
  gap: 18px;
}

.log-backup-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.log-backup-strip article,
.runtime-log-list article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.log-backup-strip article {
  padding: 13px;
}

.log-backup-strip strong,
.log-backup-strip span {
  display: block;
}

.log-backup-strip strong {
  font-size: 13px;
}

.log-backup-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.runtime-log-filter {
  display: grid;
  grid-template-columns: 150px 150px 180px 180px minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.runtime-log-list {
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.runtime-log-list article {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 14px;
  padding: 13px 14px;
}

.runtime-log-list strong,
.runtime-log-list span,
.runtime-log-list p {
  display: block;
}

.runtime-log-list strong {
  font-size: 13px;
}

.runtime-log-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.runtime-log-list p {
  margin: 0;
  color: #53627a;
  font-size: 13px;
  line-height: 1.6;
}

.runtime-log-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.runtime-log-footer span {
  color: var(--muted);
  font-size: 13px;
}

.runtime-log-footer div {
  display: flex;
  gap: 8px;
}

.user-list strong,
.user-list span {
  display: block;
}

.user-list strong {
  font-size: 13px;
}

.user-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.page-permission {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.permission-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
}

.permission-card > strong {
  font-size: 13px;
}

.workspace {
  padding: 28px 0 36px;
  min-width: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(139, 117, 236, 0.16), transparent 32%),
    radial-gradient(circle at 70% 78%, rgba(71, 201, 135, 0.12), transparent 28%),
    var(--bg);
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(233, 236, 247, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffcf88, #8b75ec);
  font-size: 20px;
  font-weight: 900;
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  margin-top: 20px;
  font-size: 28px;
}

.login-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-message {
  min-height: 18px;
  color: #d75555;
  font-size: 13px;
  font-weight: 800;
}

.auth-switch {
  width: 100%;
  margin-top: 16px;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.scroll-section {
  scroll-margin-top: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar h1,
.topbar p,
.panel h2,
.panel p,
.student-head h2,
.student-head p,
.right-panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.topbar p,
.student-head p,
.panel p,
.focus-panel p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 7px;
}

.top-actions {
  display: flex;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.wide-btn {
  height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(145deg, #9580f5, #765ee5);
  box-shadow: 0 12px 26px rgba(118, 94, 229, 0.22);
}

.ghost-btn,
.wide-btn {
  color: #5f6a7f;
  background: #fff;
  border-color: var(--line);
}

.is-disabled {
  opacity: 0.55;
}

.compact {
  height: 38px;
  padding: 0 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.metric-card,
.panel,
.student-panel,
.calendar,
.notice,
.sync-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(233, 236, 247, 0.8);
  box-shadow: var(--soft-shadow);
}

.metric-card {
  position: relative;
  min-height: 146px;
  border-radius: 24px;
  padding: 26px 24px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 14px;
  background: #f5f2ff;
}

.metric-card:nth-child(2) .metric-icon {
  color: #4b8fed;
  background: #eff7ff;
}

.metric-card:nth-child(3) .metric-icon {
  color: var(--green);
  background: #effcf5;
}

.metric-card:nth-child(4) .metric-icon {
  color: var(--orange);
  background: #fff6ed;
}

.metric-card span {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 8px;
  color: var(--green);
  background: #effcf5;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 20px;
  font-size: 30px;
  line-height: 1;
}

.metric-card p {
  margin: 9px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.metric-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

.flow-panel {
  margin-top: 22px;
}

.trend-only {
  min-height: 392px;
}

.panel-head,
.student-head,
.right-head,
.block-title,
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel h2,
.student-head h2,
.right-panel h2 {
  font-size: 18px;
  line-height: 1.25;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #f4f6fb;
}

.segmented span {
  padding: 7px 11px;
  border-radius: 9px;
  color: #8c98ac;
  font-size: 12px;
  font-weight: 700;
}

.segmented .active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 4px 10px rgba(96, 110, 143, 0.1);
}

#flowChart {
  width: 100%;
  margin-top: 18px;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.mini-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #738098;
  border-radius: 12px;
  background: #f8f9fd;
  font-size: 13px;
  font-weight: 900;
}

.mini-card strong,
.mini-card span {
  display: block;
  white-space: nowrap;
}

.mini-card strong {
  font-size: 13px;
}

.mini-card span {
  margin-top: 4px;
  color: var(--green);
  font-size: 12px;
}

.focus-panel {
  min-height: 382px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(139, 117, 236, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 245, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.status-pill {
  width: max-content;
  margin: 0 auto 16px;
  padding: 7px 12px;
  color: var(--green);
  border-radius: 999px;
  background: #effcf5;
  font-size: 12px;
  font-weight: 900;
}

.focus-figure {
  width: 74px;
  height: 74px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(139, 117, 236, 0.22);
}

.focus-figure svg {
  width: 36px;
  height: 36px;
}

.focus-list {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  text-align: left;
}

.focus-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(230, 233, 246, 0.8);
}

.focus-list span {
  color: var(--muted);
  font-size: 12px;
}

.focus-list strong {
  max-width: 62%;
  font-size: 13px;
  text-align: right;
}

.wide-btn {
  width: 100%;
}

.student-panel {
  margin-top: 22px;
  border-radius: 24px;
  padding: 22px;
  overflow: hidden;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.analysis-card,
.protection-panel,
.field-overview {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(233, 236, 247, 0.8);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.analysis-card {
  padding: 24px;
}

.analysis-card .panel-head > span {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--accent);
  border-radius: 999px;
  background: #f1eeff;
  font-size: 12px;
  font-weight: 900;
}

.bars {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.bar-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bar-row strong {
  font-size: 13px;
}

.bar-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.bar-row > span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f8;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9c84f7, #7fd8ac);
}

.protection-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(242, 255, 247, 0.92), rgba(246, 239, 255, 0.92)),
    #fff;
}

.protection-panel h2,
.protection-panel p,
.field-overview h2,
.field-overview p {
  margin: 0;
}

.protection-panel p,
.field-overview p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.protection-actions {
  display: flex;
  gap: 12px;
}

.field-overview {
  margin-top: 22px;
  padding: 22px;
}

.field-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.field-summary-grid article {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
}

.field-summary-grid b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 12px;
  background: #f1eeff;
}

.field-summary-grid strong,
.field-summary-grid span,
.field-summary-grid p {
  display: block;
}

.field-summary-grid strong {
  margin-top: 12px;
  font-size: 15px;
}

.field-summary-grid span {
  margin-top: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.field-summary-grid p {
  margin-top: 10px;
  line-height: 1.5;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, 170px);
  gap: 12px;
  margin-top: 18px;
}

.batch-bar {
  display: grid;
  grid-template-columns: auto 180px 180px auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
}

.batch-bar strong {
  align-self: center;
  font-size: 13px;
}

.batch-bar label {
  display: grid;
  gap: 6px;
}

.batch-bar label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.batch-bar select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
  outline: 0;
}

.search-box,
.select-filter {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.search-box input,
.select-filter select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.select-filter {
  display: grid;
  grid-template-columns: auto 1fr;
}

.select-filter span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px 14px;
  border-bottom: 1px solid #eef1f8;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.select-col {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.select-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #718098;
  background: #f9faff;
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #344055;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover,
tbody tr.selected {
  background: #f6f3ff;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button,
.right-head button,
.icon-btn {
  width: 34px;
  height: 34px;
  color: #9aa5b8;
  border-radius: 11px;
  background: #f7f8fc;
}

.row-actions button:hover {
  color: var(--accent);
  background: #eeeaff;
}

.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.student-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  min-height: calc(100vh - 48px);
}

.detail-main {
  display: grid;
  gap: 16px;
}

.detail-hero,
.detail-tabs,
.schedule-box,
.pending-card,
.activity-card,
.detail-aside section {
  border: 1px solid rgba(233, 236, 247, 0.88);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1.5fr auto;
  align-items: start;
  gap: 20px;
  padding: 20px 22px;
}

.detail-title span {
  color: #718098;
  font-size: 13px;
  font-weight: 800;
}

.detail-title h1 {
  margin: 5px 0 0;
  font-size: 25px;
  line-height: 1.2;
}

.detail-title b {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: #62708a;
  font-size: 12px;
}

.detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 26px;
}

.detail-fields div,
.summary-row {
  display: grid;
  gap: 5px;
}

.detail-fields span,
.summary-row span {
  color: #718098;
  font-size: 13px;
}

.detail-fields strong,
.summary-row strong {
  font-size: 14px;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
}

.detail-tabs button,
.activity-tabs button {
  border: 0;
  color: #33425e;
  background: transparent;
  font-weight: 800;
}

.detail-tabs button {
  min-height: 36px;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
}

.detail-tabs .active {
  color: #165dd8;
  border-color: #165dd8;
}

.detail-filter {
  margin-left: auto;
  width: 38px;
  border-radius: 10px;
  background: #f4f6fb !important;
}

.schedule-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #94a0b8;
  border-radius: 10px;
}

.pending-card,
.activity-card {
  padding: 18px;
}

.pending-card h2,
.activity-card h2,
.detail-aside h2 {
  margin: 0;
  font-size: 17px;
}

.pending-card > div {
  min-height: 150px;
  display: grid;
  place-content: center;
  text-align: center;
}

.pending-card strong {
  font-size: 14px;
}

.pending-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.pending-card span {
  color: #165dd8;
  font-size: 13px;
  font-weight: 800;
}

.activity-head {
  display: grid;
  gap: 18px;
}

.activity-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-tabs button {
  padding: 7px 10px;
  border-radius: 8px;
}

.activity-tabs .active {
  color: #fff;
  background: #44516c;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8da;
}

.timeline-item.is-update {
  background: #fff5f5;
}

.timeline-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #4b668a;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.timeline-item strong,
.timeline-item p,
.timeline-item span {
  display: block;
}

.timeline-item strong {
  font-size: 14px;
}

.timeline-item p {
  margin: 8px 0 14px;
  color: #24304a;
  line-height: 1.65;
  font-size: 13px;
}

.timeline-item span {
  color: #8a96aa;
  font-size: 12px;
}

.detail-aside {
  position: sticky;
  top: 24px;
  height: max-content;
}

.detail-aside section {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 16px;
}

.summary-row strong {
  font-size: 16px;
}

.right-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.66);
  border-left: 1px solid rgba(229, 233, 246, 0.9);
}

.calendar,
.sync-card {
  margin-top: 18px;
  border-radius: 22px;
  padding: 20px;
}

.week,
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 16px;
  text-align: center;
}

.week b {
  color: #99a5b8;
  font-size: 12px;
}

.days span {
  height: 28px;
  display: grid;
  place-items: center;
  color: #566177;
  border-radius: 50%;
  font-size: 12px;
}

.days .today {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(139, 117, 236, 0.28);
}

.notify-block {
  margin-top: 24px;
}

.block-title strong {
  font-size: 15px;
}

.block-title button,
.notice span {
  color: var(--accent);
  font-size: 12px;
}

.block-title button {
  border: 0;
  background: transparent;
  font-weight: 800;
}

.notice-list {
  max-height: 470px;
  overflow-y: auto;
  padding-right: 2px;
}

.notice {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  margin-top: 13px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 18px;
}

.notice-alert {
  border-color: rgba(235, 87, 87, 0.28);
  background: #fff8f8;
  box-shadow: 0 14px 32px rgba(235, 87, 87, 0.1);
}

.notice-alert .notice-icon {
  color: #e45050;
  background: #ffecec;
}

.notice-pinned {
  position: sticky;
  top: 0;
  z-index: 2;
}

.notice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green);
  border-radius: 14px;
  background: #edfcf5;
}

.notice strong {
  font-size: 13px;
}

.notice p {
  margin: 5px 0;
  color: #8b96aa;
  font-size: 12px;
  line-height: 1.45;
}

.read-btn {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #e45050;
  font-size: 12px;
  font-weight: 800;
}

.sync-card {
  min-height: 120px;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(222, 235, 255, 0.95), rgba(239, 232, 255, 0.95)),
    #fff;
}

.sync-card strong {
  color: var(--accent-strong);
}

.sync-card p {
  margin: 8px 0 0;
  color: #8491aa;
  font-size: 12px;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 26px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 32, 51, 0.36);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(26, 34, 55, 0.28);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.modal-head h2,
.modal-head p {
  margin: 0;
}

.modal-head h2 {
  font-size: 22px;
}

.modal-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.field-tabs {
  position: sticky;
  top: 87px;
  z-index: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 26px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.field-tabs a {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: #718098;
  border-radius: 999px;
  background: #f7f8fc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.form-groups {
  padding: 0 26px 88px;
}

.field-group {
  padding-top: 24px;
}

.field-group h3,
.backup-list h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.span-2 {
  grid-column: span 2;
}

.field span {
  color: #65738b;
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 13px;
  background: #fbfcff;
  color: var(--text);
  font-size: 13px;
  transition: border 0.16s ease, box-shadow 0.16s ease;
}

.field input,
.field select {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(139, 117, 236, 0.7);
  box-shadow: 0 0 0 4px rgba(139, 117, 236, 0.12);
}

.modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.modal-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.password-form {
  padding-bottom: 0;
}

.password-form > .field,
.backup-list,
.modal-message,
.permission-denied {
  margin: 22px 26px;
}

.permission-denied {
  padding: 18px;
  border: 1px solid #ffe1e1;
  border-radius: 18px;
  background: #fff7f7;
}

.permission-denied strong {
  color: #d75555;
}

.permission-denied p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.backup-list {
  display: grid;
  gap: 10px;
}

.backup-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
}

.backup-list strong,
.backup-list span {
  display: block;
}

.backup-list strong {
  font-size: 13px;
}

.backup-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.backup-list button {
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--accent);
  border-radius: 12px;
  background: #f1eeff;
}

.modal-message {
  min-height: 18px;
  font-size: 13px;
  font-weight: 800;
}

.modal-message.error {
  color: #d75555;
}

.modal-message.success {
  color: var(--green);
}

.empty-copy,
.empty-cell,
.boot-error {
  color: var(--muted);
  font-size: 13px;
}

.boot-error {
  margin: 48px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .right-panel {
    display: none;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .shell {
    display: block;
  }

  .rail {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
  }

  .rail nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .rail-avatar {
    margin-top: 0;
  }

  .workspace {
    padding: 18px 14px 30px;
  }

  .topbar,
  .student-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .toolbar,
  .batch-bar {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .connector-grid,
  .field-grid,
  .analysis-grid,
  .field-summary-grid {
    grid-template-columns: 1fr;
  }

  .protection-panel,
  .protection-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-form,
  .user-list,
  .email-backup-form,
  .log-backup-strip,
  .runtime-log-filter,
  .page-permission {
    grid-template-columns: 1fr;
  }

  .ssl-toggle,
  .email-backup-actions {
    grid-column: auto;
  }

  .email-backup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .runtime-log-list article {
    grid-template-columns: 1fr;
  }

  .runtime-log-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .account-hero,
  .account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .student-detail,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-actions,
  .activity-tabs,
  .detail-tabs {
    flex-wrap: wrap;
  }

  .detail-aside {
    position: static;
  }

  .field.span-2 {
    grid-column: auto;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: 94vh;
    border-radius: 20px;
  }
}
