:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-soft: #f8f7f3;
  --ink: #19231f;
  --muted: #6e7771;
  --line: #e7e5dd;
  --primary: #27665a;
  --primary-dark: #1d5048;
  --primary-soft: #e8f1ee;
  --sidebar: #172b27;
  --sidebar-muted: #a9bbb5;
  --accent: #c77846;
  --accent-soft: #f8ece3;
  --gold: #a87722;
  --gold-soft: #fbf3df;
  --danger: #b94b4b;
  --danger-soft: #fbecec;
  --blue: #3e6685;
  --blue-soft: #edf2f6;
  --schedule-reserved: #13513e;
  --schedule-reserved-soft: #e8f4ef;
  --schedule-confirmed: #173f70;
  --schedule-confirmed-soft: #eaf2f9;
  --schedule-other: #a9d8ec;
  --schedule-other-hover: #90cce5;
  --schedule-other-text: #17465f;
  --shadow-sm: 0 1px 2px rgba(25, 35, 31, 0.04), 0 6px 18px rgba(25, 35, 31, 0.035);
  --shadow-md: 0 12px 40px rgba(25, 35, 31, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

input,
select,
textarea {
  min-width: 0;
}

textarea {
  resize: vertical;
}

.hidden {
  display: none !important;
}

.spacer {
  flex: 1;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #d8b27c;
}

/* ---------------------------------------------------------------- 登录 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.16fr) minmax(390px, 0.84fr);
  background: #f6f3ed;
}

.login-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  overflow: hidden;
  padding: 64px clamp(42px, 6vw, 96px);
  color: #f5f2e8;
  background:
    radial-gradient(circle at 84% 16%, rgba(215, 163, 101, 0.24), transparent 29%),
    radial-gradient(circle at 18% 80%, rgba(112, 166, 145, 0.19), transparent 35%),
    linear-gradient(145deg, #16332c 0%, #1c453b 50%, #112c27 100%);
}

.login-visual::before {
  content: "";
  position: absolute;
  top: 8%;
  right: -14%;
  width: 50vw;
  height: 50vw;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(255, 255, 255, 0.025),
    0 0 0 160px rgba(255, 255, 255, 0.018);
}

.login-visual::after {
  content: "师";
  position: absolute;
  top: 9%;
  left: 8%;
  color: rgba(255, 255, 255, 0.035);
  font-family: STSong, SimSun, serif;
  font-size: min(32vw, 430px);
  font-weight: 700;
  line-height: 1;
}

.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.login-visual h1 {
  margin: 18px 0 24px;
  font-family: STSong, SimSun, "Noto Serif CJK SC", serif;
  font-size: clamp(38px, 4.4vw, 70px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.24;
}

.login-visual p {
  max-width: 570px;
  color: #c2d0cb;
  font-size: 15px;
  line-height: 1.9;
}

.login-feature-row {
  display: flex;
  gap: 30px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #aabeb8;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
}

.login-card {
  width: 100%;
  max-width: 390px;
}

.login-card h2 {
  margin: 18px 0 4px;
  font-family: STSong, SimSun, serif;
  font-size: 34px;
  font-weight: 600;
}

.login-card > p {
  margin-bottom: 34px;
}

.login-card .field {
  margin-bottom: 18px;
}

.login-card .btn {
  margin-top: 14px;
}

.login-hint {
  margin: 18px 0 0 !important;
  color: #9a9d96;
  font-size: 11px;
  text-align: center;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(216, 178, 124, 0.48);
  border-radius: 11px;
  color: #f6ebe0;
  background: rgba(255, 255, 255, 0.06);
  font-family: STSong, SimSun, serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-mark.large {
  width: 48px;
  height: 48px;
  border-color: #d6c1a2;
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 24px;
}

/* ---------------------------------------------------------------- 应用框架 */
.app {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 228px;
  height: 100vh;
  display: flex;
  flex: 0 0 228px;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #e8eeeb;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    var(--sidebar);
  background-size: 26px 26px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 28px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  color: #f4f0e6;
  font-family: STSong, SimSun, serif;
  font-size: 17px;
  letter-spacing: 0.05em;
}

.brand-copy span {
  margin-top: 1px;
  color: var(--sidebar-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #bac9c5;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  border-color: rgba(216, 178, 124, 0.18);
  color: #fff9ef;
  background: rgba(216, 178, 124, 0.1);
  box-shadow: inset 3px 0 0 #d2a563;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 7px;
  color: #d8e1de;
  background: rgba(255, 255, 255, 0.055);
  font-family: STSong, SimSun, serif;
  font-size: 12px;
}

.nav-item.active .nav-icon {
  color: #f6e3c4;
  background: rgba(216, 178, 124, 0.14);
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #223d36;
  background: #e3d1b7;
  font-family: STSong, SimSun, serif;
  font-weight: 700;
}

.user-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.user-copy strong {
  overflow: hidden;
  color: #f3f0e9;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.icon-text-btn {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border: none;
  color: #aebfba;
  background: transparent;
  font-size: 11px;
  text-align: left;
}

.icon-text-btn:hover {
  color: #fff;
}

.main {
  width: calc(100% - 228px);
  min-width: 0;
  padding: 30px clamp(22px, 3vw, 46px) 46px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.topbar h2 {
  font-family: STSong, SimSun, serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-chip,
.permission-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.permission-chip {
  border-color: #d9e6e1;
  color: var(--primary);
  background: var(--primary-soft);
}

.section-title {
  font-family: STSong, SimSun, serif;
  font-size: 20px;
}

/* ---------------------------------------------------------------- 按钮与表单 */
.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  transition: 150ms ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(39, 102, 90, 0.15);
}

.btn-primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line);
  color: #35423d;
  background: #fff;
}

.btn-ghost:hover {
  border-color: #cfcbc0;
  background: var(--surface-soft);
}

.btn-danger {
  border-color: #efd7d7;
  color: var(--danger);
  background: var(--danger-soft);
}

.btn-danger:hover {
  background: #f8dfe0;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px;
}

.btn-lg {
  min-height: 46px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-square {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-color: var(--line);
  color: #34433d;
  background: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.btn-square:hover {
  background: var(--surface-soft);
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  color: #4f5a55;
  font-size: 11px;
  font-weight: 700;
}

.field > span b {
  color: var(--accent);
}

.field input,
.field select,
.field textarea,
.customer-toolbar > select {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #dfded7;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  transition: 150ms ease;
}

.field textarea {
  min-height: 76px;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a6aaa6;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.customer-toolbar > select:focus {
  border-color: #73a598;
  box-shadow: 0 0 0 3px rgba(39, 102, 90, 0.09);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  color: #626a66;
  background: #f3f2ee;
}

.checkbox-field {
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfded7;
  border-radius: 9px;
  background: #fafaf7;
  cursor: pointer;
  transition: 150ms ease;
}

.checkbox-field input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkbox-copy strong {
  color: #40504a;
  font-size: 11px;
}

.checkbox-copy small {
  color: #8d948f;
  font-size: 8px;
  line-height: 1.45;
}

.checkbox-field:has(input:checked) {
  border-color: #a9c9bd;
  background: var(--primary-soft);
}

.checkbox-field:has(input:disabled) {
  cursor: default;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.form-section-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #2e3a35;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.form-section-title:not(:first-child) {
  margin-top: 24px;
}

.error-msg {
  min-height: 18px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
}

.record-meta,
.permission-note {
  padding: 10px 12px;
  border: 1px solid #e3e7e2;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
}

.permission-note {
  margin-top: 18px;
  border-color: #dce8e3;
  color: #4f6d63;
  background: var(--primary-soft);
  line-height: 1.7;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  padding: 16px;
}

.panel-head h3 {
  font-family: STSong, SimSun, serif;
  font-size: 17px;
}

/* ---------------------------------------------------------------- 日历 */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.month-switcher,
.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-teacher-filter,
.calendar-month-filter,
.calendar-year-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.calendar-teacher-filter > span,
.calendar-month-filter > span,
.calendar-year-filter > span {
  color: #88908b;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-teacher-filter select,
.calendar-month-filter select,
.calendar-year-filter input {
  max-width: 125px;
  height: 36px;
  padding: 0 27px 0 4px;
  border: none;
  outline: none;
  color: #34433d;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.calendar-month-filter select {
  min-width: 70px;
  padding-right: 20px;
}

.calendar-year-filter input {
  min-width: 76px;
  padding-right: 2px;
}

.calendar-teacher-filter:focus-within,
.calendar-month-filter:focus-within,
.calendar-year-filter:focus-within {
  border-color: #8db5a9;
  box-shadow: 0 0 0 3px rgba(39, 102, 90, 0.07);
}

.month-switcher > div {
  min-width: 115px;
  padding: 0 3px;
  text-align: center;
}

.month-title {
  color: #29342f;
  font-family: STSong, SimSun, serif;
  font-size: 19px;
  font-weight: 700;
}

.month-sub {
  color: #8c928e;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.legend-list {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 5px;
  color: var(--muted);
  font-size: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.legend-dot.accent {
  background: var(--accent);
}

.legend-dot.status-reserved {
  background: var(--schedule-reserved);
}

.legend-dot.status-confirmed {
  background: var(--schedule-confirmed);
}

.legend-dot.status-other {
  background: var(--schedule-other);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: start;
}

.calendar-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-weekday {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  color: #818783;
  background: #faf9f6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.cal-day {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 120ms ease;
}

.cal-day:nth-child(7n + 8) {
  border-right: none;
}

.cal-day:hover {
  background: #fbfcfa;
}

.cal-day.dim {
  background: #faf9f7;
}

.cal-day.dim .day-num {
  color: #b3b7b3;
}

.cal-day.today {
  box-shadow: inset 0 0 0 1px var(--primary);
  background: #f7fbf9;
}

.day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.day-num {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #4b5550;
  font-size: 10px;
  font-weight: 800;
}

.cal-day.today .day-num {
  color: #fff;
  background: var(--primary);
}

.day-add {
  width: 19px;
  height: 19px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  line-height: 1;
}

.cal-day:hover .day-add {
  display: inline-flex;
}

.cal-event {
  width: 100%;
  display: block;
  overflow: hidden;
  margin-top: 3px;
  padding: 5px 6px;
  border: none;
  border-left: 3px solid var(--schedule-reserved);
  border-radius: 4px;
  color: #fff;
  background: var(--schedule-reserved);
  font-size: 9px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.cal-event.status-reserved:hover {
  color: #fff;
  background: #1a684f;
}

.cal-event.status-confirmed {
  border-left-color: var(--schedule-confirmed);
  color: #fff;
  background: var(--schedule-confirmed);
}

.cal-event.status-confirmed:hover {
  color: #fff;
  background: #245387;
}

.cal-event.status-other {
  border-left-color: #5ca9c9;
  color: var(--schedule-other-text);
  background: var(--schedule-other);
}

.cal-event.status-other:hover {
  color: #103b51;
  background: var(--schedule-other-hover);
}

.cal-event.status-other .event-city {
  border-color: rgba(23, 70, 95, 0.2);
  background: rgba(255, 255, 255, 0.4);
}

.cal-event.status-other .event-sub {
  color: rgba(23, 70, 95, 0.78);
}

.cal-event.continues {
  opacity: 0.74;
  font-style: italic;
}

.cal-event .event-time {
  margin-right: 3px;
  font-weight: 800;
}

.event-main {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.event-teacher {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-city {
  max-width: 52%;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 1px 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-more {
  padding: 3px 4px;
  color: #9a9d98;
  font-size: 8px;
}

.agenda-panel {
  min-width: 0;
}

.count-pill {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.agenda-list {
  max-height: 576px;
  overflow-y: auto;
  padding: 4px 15px 14px;
}

.agenda-item {
  width: 100%;
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-date {
  width: 39px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
}

.agenda-item.status-confirmed .agenda-date {
  color: var(--schedule-confirmed);
  background: var(--schedule-confirmed-soft);
}

.agenda-item.status-other .agenda-date {
  color: var(--schedule-other-text);
  background: #e4f4fa;
}

.agenda-status {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--schedule-reserved);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.agenda-item.status-confirmed .agenda-status,
.agenda-status.status-confirmed {
  color: #fff;
  background: var(--schedule-confirmed);
}

.agenda-status.status-other {
  color: var(--schedule-other-text);
  background: var(--schedule-other);
}

.agenda-date b {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
}

.agenda-date span {
  margin-top: 3px;
  font-size: 8px;
}

.agenda-copy {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}

.agenda-copy strong {
  display: block;
  overflow: hidden;
  color: #28342f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #818984;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-item:hover .agenda-copy strong {
  color: var(--primary);
}

#sched-status.status-reserved {
  border-color: var(--schedule-reserved);
  color: #fff;
  background: var(--schedule-reserved);
  font-weight: 700;
}

#sched-status.status-confirmed {
  border-color: var(--schedule-confirmed);
  color: #fff;
  background: var(--schedule-confirmed);
  font-weight: 700;
}

#sched-status.status-other {
  border-color: #7abdd8;
  color: var(--schedule-other-text);
  background: var(--schedule-other);
  font-weight: 700;
}

.empty-mini {
  padding: 38px 8px;
  color: #929993;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

/* ---------------------------------------------------------------- 业务概览 */
.summary-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 26px 29px;
  border-radius: var(--radius);
  color: #f3f0e8;
  background:
    radial-gradient(circle at 85% 10%, rgba(215, 164, 103, 0.25), transparent 33%),
    linear-gradient(125deg, #17382f, #245647);
  box-shadow: var(--shadow-sm);
}

.summary-hero::after {
  content: "览";
  position: absolute;
  right: 3%;
  bottom: -50px;
  color: rgba(255, 255, 255, 0.045);
  font-family: STSong, SimSun, serif;
  font-size: 190px;
  line-height: 1;
}

.summary-hero h3 {
  position: relative;
  z-index: 1;
  margin: 4px 0 4px;
  font-family: STSong, SimSun, serif;
  font-size: 27px;
  font-weight: 600;
}

.summary-hero p {
  position: relative;
  z-index: 1;
  color: #b8ccc5;
  font-size: 11px;
}

.summary-hero-date {
  position: relative;
  z-index: 1;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dce5e2;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
}

.summary-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 16px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.summary-scope-bar > span {
  color: #78817c;
  font-size: 9px;
  font-weight: 700;
}

.summary-scope-switch {
  display: flex;
  gap: 4px;
}

.summary-scope-switch button {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #737b76;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.summary-scope-switch button.active {
  border-color: #d5e5df;
  color: var(--primary);
  background: var(--primary-soft);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -22px;
  right: -22px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.stat-card.accent::after {
  background: var(--accent-soft);
}

.stat-card.gold::after {
  background: var(--gold-soft);
}

.stat-card.blue::after {
  background: var(--blue-soft);
}

.stat-label {
  position: relative;
  z-index: 1;
  color: #777f7a;
  font-size: 10px;
  font-weight: 600;
}

.stat-value {
  position: relative;
  z-index: 1;
  margin: 6px 0 3px;
  color: #23322c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.15;
}

.stat-value.small {
  font-size: 22px;
}

.stat-sub {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #919792;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.dashboard-panel.wide {
  grid-column: 1 / -1;
}

.dashboard-panel .panel-head {
  padding: 16px 18px;
}

.dashboard-panel .panel-head h3 {
  font-size: 15px;
}

.panel-subtitle {
  margin-top: 2px;
  color: #919793;
  font-size: 9px;
}

.panel-body {
  padding: 16px 18px 18px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(60px, 100px) 1fr 26px;
  align-items: center;
  gap: 10px;
}

.rank-label {
  overflow: hidden;
  color: #505a55;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0efe9;
}

.rank-bar > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a887b, #29665a);
}

.rank-row:nth-child(2n) .rank-bar > span {
  background: linear-gradient(90deg, #dcb080, #bd784b);
}

.rank-count {
  color: #3e4c46;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.funnel-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.funnel-stage {
  width: 87px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: #66706a;
  font-size: 9px;
}

.funnel-track {
  height: 31px;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 30px;
  padding-left: 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.funnel-row:nth-child(2) .funnel-track {
  background: #3d7c70;
}

.funnel-row:nth-child(3) .funnel-track {
  background: #b88552;
}

.funnel-row:nth-child(4) .funnel-track {
  background: #a9aaa3;
}

.followup-feed {
  display: flex;
  flex-direction: column;
}

.feed-item {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.feed-copy {
  min-width: 0;
}

.feed-copy strong {
  display: block;
  overflow: hidden;
  color: #36413c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-copy span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #8b918d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-time {
  color: #a0a49f;
  font-size: 8px;
  white-space: nowrap;
}

.upcoming-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.upcoming-item {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.upcoming-date {
  width: 37px;
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.upcoming-date b {
  display: block;
  font-size: 16px;
}

.upcoming-copy {
  min-width: 0;
}

.upcoming-copy strong,
.upcoming-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-copy strong {
  font-size: 10px;
}

.upcoming-copy span {
  margin-top: 2px;
  color: #8e948f;
  font-size: 9px;
}

.team-table {
  min-width: 620px;
}

.annual-goal-table {
  min-width: 620px;
}

.annual-goal-table td {
  font-size: 10px;
}

.annual-goal-table td strong {
  color: #35433d;
  font-size: 10px;
}

.annual-goal-progress {
  width: min(180px, 100%);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #efeee8;
}

.annual-goal-progress > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d9586, #27665a);
}

.annual-goal-empty {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: #8c948f;
  background: #fbfaf7;
  font-size: 9px;
  text-align: center;
}

.consultant-goal-table {
  min-width: 850px;
}

.consultant-goal-table td {
  vertical-align: top;
}

.consultant-goal-cell {
  display: flex;
  min-width: 145px;
  flex-direction: column;
  gap: 3px;
  color: #808782;
  font-size: 8px;
  line-height: 1.5;
}

.consultant-goal-cell b {
  color: #3f4d46;
  font-weight: 700;
}

.consultant-goal-cell .goal-rate {
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: Georgia, serif;
  font-weight: 700;
}

.followup-watch-table {
  min-width: 1000px;
}

.followup-watch-table td {
  font-size: 9px;
}

.followup-watch-row.overdue {
  background: #fffafa;
}

.followup-watch-row.never {
  background: #fffdf8;
}

.followup-watch-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #52615a;
  background: #eef1ed;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.followup-watch-status.overdue {
  color: var(--danger);
  background: var(--danger-soft);
}

.followup-watch-status.due {
  color: #9a5c2c;
  background: var(--accent-soft);
}

.followup-watch-status.never {
  color: #275f83;
  background: #e7f2f9;
}

.stale-requirement-table {
  min-width: 900px;
}

.stale-requirement-table td {
  font-size: 9px;
}

.stale-requirement-row {
  background: #fffdf9;
}

.stale-days {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 管理看板 */
.management-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 24px 27px;
  border-radius: var(--radius);
  color: #f4f1e9;
  background:
    radial-gradient(circle at 88% 5%, rgba(210, 165, 99, 0.23), transparent 33%),
    linear-gradient(125deg, #162f29, #234f43);
  box-shadow: var(--shadow-sm);
}

.management-header h3 {
  margin: 3px 0 4px;
  font-family: STSong, SimSun, serif;
  font-size: 25px;
  font-weight: 600;
}

.management-header p {
  color: #b8cac4;
  font-size: 10px;
}

.management-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.management-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.management-controls label span {
  color: #aec2bb;
  font-size: 8px;
  font-weight: 700;
}

.management-controls input,
.management-controls select {
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  outline: none;
  color: #eef3f1;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
}

.management-controls input {
  width: 90px;
}

.management-controls select {
  width: 82px;
}

.management-controls option {
  color: var(--ink);
}

.management-target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.target-board {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.target-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.target-board h4 {
  font-family: STSong, SimSun, serif;
  font-size: 17px;
}

.target-board-head span {
  color: #8b928e;
  font-size: 9px;
}

.target-overall {
  min-width: 55px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.target-metric {
  margin-top: 12px;
}

.target-metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: #68736d;
  font-size: 9px;
}

.target-metric-label strong {
  color: #33433c;
  font-family: Georgia, serif;
  font-size: 10px;
}

.target-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #efeee8;
}

.target-track > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d8a7c, #256355);
}

.target-metric:nth-child(3n) .target-track > span {
  background: linear-gradient(90deg, #d9a06c, #bd7545);
}

.target-metric:nth-child(3n + 1) .target-track > span {
  background: linear-gradient(90deg, #6b99bd, #3f6e95);
}

.target-unset {
  padding: 16px;
  border: 1px dashed #d9d6cc;
  border-radius: 9px;
  color: #8a918c;
  background: #faf9f6;
  font-size: 10px;
  line-height: 1.75;
  text-align: center;
}

.management-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.management-stat {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.management-stat span {
  color: #7d857f;
  font-size: 9px;
  font-weight: 700;
}

.management-stat strong {
  display: block;
  margin: 4px 0 3px;
  color: #27352f;
  font-family: Georgia, serif;
  font-size: 25px;
}

.management-stat small {
  color: #929993;
  font-size: 8px;
}

.management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.daily-bars {
  height: 155px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-top: 13px;
}

.daily-bar-item {
  height: 100%;
  display: flex;
  align-items: center;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-width: 3px;
}

.daily-bar-item i {
  width: 100%;
  min-height: 3px;
  display: block;
  border-radius: 3px 3px 1px 1px;
  background: #5d9586;
}

.daily-bar-item span {
  color: #a0a59f;
  font-size: 7px;
  transform: rotate(-55deg);
  white-space: nowrap;
}

.management-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.management-status-row {
  display: grid;
  grid-template-columns: 82px 1fr 25px;
  align-items: center;
  gap: 9px;
  color: #657069;
  font-size: 9px;
}

.management-status-row .target-track > span {
  background: #5a9282;
}

.management-status-row strong {
  color: #34423c;
  font-family: Georgia, serif;
  text-align: right;
}

.consultant-work-table {
  min-width: 900px;
}

.consultant-work-table td {
  font-size: 9px;
}

.consultant-completion {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
}

.target-edit-btn {
  color: var(--primary);
}

/* ---------------------------------------------------------------- 日程提醒 */
.reminder-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 22px 26px;
  border-radius: var(--radius);
  color: #f3f0e8;
  background:
    radial-gradient(circle at 88% 4%, rgba(215, 164, 103, 0.23), transparent 34%),
    linear-gradient(125deg, #17382f, #244f43);
  box-shadow: var(--shadow-sm);
}

.reminder-hero h3 {
  position: relative;
  z-index: 1;
  margin: 3px 0 4px;
  font-family: STSong, SimSun, serif;
  font-size: 23px;
  font-weight: 600;
}

.reminder-hero p {
  position: relative;
  z-index: 1;
  color: #b9cac4;
  font-size: 10px;
}

.reminder-hero-mark {
  color: rgba(255, 255, 255, 0.08);
  font-family: STSong, SimSun, serif;
  font-size: 110px;
  line-height: 1;
}

.reminder-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.reminder-stat {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.reminder-stat span {
  color: #7d857f;
  font-size: 9px;
  font-weight: 700;
}

.reminder-stat strong {
  display: block;
  margin-top: 4px;
  color: #26342e;
  font-family: Georgia, serif;
  font-size: 24px;
}

.reminder-stat.overdue strong {
  color: var(--danger);
}

.reminder-stat.due strong {
  color: #a46a25;
}

.reminder-stat.upcoming strong {
  color: var(--schedule-confirmed);
}

.reminder-panel {
  overflow: hidden;
}

.reminder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #faf9f6;
}

.reminder-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.reminder-tab {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #777f7a;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.reminder-tab:hover {
  background: #f2f1ec;
}

.reminder-tab.active {
  color: var(--primary);
  border-color: #d7e5df;
  background: var(--primary-soft);
}

.reminder-refresh-note {
  font-size: 8px;
}

.reminder-list {
  padding: 0 17px;
}

.reminder-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
}

.reminder-item:last-child {
  border-bottom: none;
}

.reminder-item.overdue {
  box-shadow: inset 3px 0 0 var(--danger);
}

.reminder-item.due {
  box-shadow: inset 3px 0 0 var(--accent);
}

.reminder-item.completed {
  opacity: 0.68;
}

.reminder-date-box {
  align-self: start;
  padding: 9px;
  border-radius: 9px;
  text-align: center;
  background: #f5f4ef;
}

.reminder-date-box b {
  display: block;
  color: #4a5650;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.2;
}

.reminder-date-box span {
  display: block;
  margin-top: 2px;
  color: #919792;
  font-size: 8px;
}

.reminder-item.overdue .reminder-date-box {
  background: var(--danger-soft);
}

.reminder-item.overdue .reminder-date-box b {
  color: var(--danger);
}

.reminder-item.due .reminder-date-box {
  background: var(--accent-soft);
}

.reminder-item.due .reminder-date-box b {
  color: #9a5c2c;
}

.reminder-main {
  min-width: 0;
}

.reminder-status-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 5px;
}

.reminder-status {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 999px;
  color: #796b58;
  background: #f2eee6;
  font-size: 8px;
  font-weight: 800;
}

.reminder-status.overdue {
  color: var(--danger);
  background: var(--danger-soft);
}

.reminder-status.due {
  color: #9a5c2c;
  background: var(--accent-soft);
}

.reminder-status.completed {
  color: var(--primary);
  background: var(--primary-soft);
}

.reminder-timing {
  color: #8b918d;
  font-size: 8px;
}

.reminder-main h3 {
  color: #2b3731;
  font-size: 13px;
}

.reminder-main > p {
  margin-top: 5px;
  color: #757e78;
  font-size: 10px;
  line-height: 1.65;
}

.reminder-course-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 9px;
  color: #8c928e;
  font-size: 9px;
}

.reminder-course-meta strong {
  color: #4c5a53;
  font-weight: 700;
}

.reminder-action {
  align-self: center;
}

.reminder-action .btn {
  white-space: nowrap;
}

.reminder-detail-empty {
  padding: 65px 20px;
  color: #8d948f;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

/* ---------------------------------------------------------------- 需求登记 */
.requirement-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 23px 26px;
  border-radius: var(--radius);
  color: #f3f0e8;
  background:
    radial-gradient(circle at 87% 4%, rgba(215, 164, 103, 0.2), transparent 34%),
    linear-gradient(125deg, #193a31, #28594a);
  box-shadow: var(--shadow-sm);
}

.requirement-hero h3 {
  margin: 3px 0 4px;
  font-family: STSong, SimSun, serif;
  font-size: 23px;
  font-weight: 600;
}

.requirement-hero p {
  color: #b8cac3;
  font-size: 10px;
}

.requirement-today {
  position: relative;
  z-index: 1;
  min-width: 120px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e8efec;
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.requirement-today b {
  color: #f3d8ae;
  font-family: Georgia, serif;
  font-size: 15px;
}

.requirement-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.requirement-stat {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.requirement-stat span {
  display: block;
  color: #7d857f;
  font-size: 9px;
  font-weight: 700;
}

.requirement-stat strong {
  display: block;
  margin-top: 4px;
  color: #26342e;
  font-family: Georgia, serif;
  font-size: 24px;
}

.requirement-toolbar {
  flex-wrap: wrap;
}

.requirement-customer-search {
  position: relative;
}

#req-institution[readonly] {
  color: #56645e;
  background: #f5f4ef;
}

.requirement-suggestions {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 140;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(24, 37, 31, 0.16);
}

.requirement-suggestion {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.requirement-suggestion:hover {
  background: var(--primary-soft);
}

.requirement-suggestion .institution-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.requirement-suggestion-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.requirement-suggestion-copy strong {
  overflow: hidden;
  color: #34423c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-suggestion-copy span {
  overflow: hidden;
  margin-top: 2px;
  color: #909691;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-suggestions-empty {
  padding: 14px 10px;
  color: #8c938e;
  font-size: 9px;
  text-align: center;
}

.requirement-teacher-picker {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfaf7;
}

.requirement-teacher-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.requirement-teacher-search span {
  color: #8c948f;
  font-size: 16px;
}

.requirement-teacher-search input {
  width: 100%;
  height: 39px;
  border: none;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
}

.requirement-teacher-options {
  max-height: 190px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow-y: auto;
  padding: 10px;
}

.requirement-teacher-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid #e2e0d8;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.requirement-teacher-option:has(input:checked) {
  border-color: #a8cbbf;
  background: var(--primary-soft);
}

.requirement-teacher-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.requirement-teacher-option span {
  overflow: hidden;
  color: #47534d;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-teacher-option-empty {
  grid-column: 1 / -1;
  padding: 14px;
  color: #929893;
  font-size: 9px;
  text-align: center;
}

.requirement-teacher-summary {
  padding: 8px 11px;
  border-top: 1px solid var(--line);
  color: #5b766b;
  background: #f4f8f6;
  font-size: 9px;
}

.requirement-followup-hint {
  margin-top: 5px;
  color: #68897d;
  font-size: 8px;
  font-weight: 600;
}

.requirement-followup-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfaf7;
}

.requirement-followup-list {
  max-height: 230px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.requirement-followup-list .empty-mini {
  padding: 17px 8px;
}

.requirement-followup-item {
  position: relative;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #e7e4dc;
  border-left: 3px solid #73a99a;
  border-radius: 8px;
  background: #fff;
}

.requirement-followup-item:last-child {
  margin-bottom: 0;
}

.requirement-followup-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #929893;
  font-size: 8px;
}

.requirement-followup-meta strong {
  color: #4b675e;
  font-size: 9px;
}

.requirement-followup-content {
  margin-top: 5px;
  color: #525e58;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.requirement-followup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.requirement-followup-actions > span {
  color: #8d948f;
  font-size: 8px;
}

.requirement-followup-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.compact-filter-input {
  width: 132px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid #dfded7;
  border-radius: 9px;
  outline: none;
  color: #495650;
  background: #fff;
  font-size: 10px;
}

.compact-filter-input:focus {
  border-color: #73a598;
  box-shadow: 0 0 0 3px rgba(39, 102, 90, 0.09);
}

.text-link-btn {
  padding: 0;
  border: none;
  color: #71807a;
  background: transparent;
  font-size: 9px;
  font-weight: 600;
}

.text-link-btn:hover {
  color: var(--primary);
}

.requirement-table {
  min-width: 1080px;
}

.requirement-institution {
  max-width: 210px;
}

.requirement-topic {
  max-width: 230px;
  overflow: hidden;
  color: #37443e;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-schedule {
  color: #747e78;
  font-size: 9px;
  line-height: 1.7;
}

.requirement-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.requirement-status.new {
  color: #255f84;
  background: #e6f2f9;
}

.requirement-status.following {
  color: #966224;
  background: var(--gold-soft);
}

.requirement-status.matched {
  color: #286657;
  background: var(--primary-soft);
}

.requirement-status.quoted {
  color: #92562f;
  background: var(--accent-soft);
}

.requirement-status.won {
  color: #fff;
  background: var(--primary);
}

.requirement-status.closed {
  color: #737a76;
  background: #eeeeeb;
}

.requirement-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.requirement-row-actions .text-link-btn {
  color: var(--primary);
}

.requirement-row-actions .text-link-btn.danger {
  color: var(--danger);
}

.requirement-teacher-cell {
  max-width: 150px;
  color: #3c5f54;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- 客户模块 */
.customer-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px 25px;
  border: 1px solid #e4dfd3;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 94% 18%, rgba(199, 120, 70, 0.09), transparent 30%),
    #fbf8f1;
}

.customer-intro h3 {
  font-family: STSong, SimSun, serif;
  font-size: 22px;
  font-weight: 600;
}

.customer-intro p {
  margin-top: 4px;
  color: #777e78;
  font-size: 10px;
}

.process-steps {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #6a716d;
  font-size: 9px;
}

.process-steps span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.process-steps b {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
  background: #e5efeb;
  font-family: Georgia, serif;
  font-size: 9px;
}

.process-steps i {
  width: 15px;
  height: 1px;
  background: #d7d2c8;
}

.customer-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.customer-toolbar > select {
  width: auto;
  min-width: 115px;
  min-height: 38px;
}

.search-box {
  min-width: 260px;
  max-width: 390px;
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 12px;
  border: 1px solid #dfded7;
  border-radius: 9px;
  background: #fff;
}

.search-box:focus-within {
  border-color: #73a598;
  box-shadow: 0 0 0 3px rgba(39, 102, 90, 0.09);
}

.search-box > span {
  color: #8b938e;
  font-size: 17px;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: none;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.search-box input::-webkit-search-cancel-button {
  opacity: 0.55;
}

.customer-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 9px;
  color: #4d5954;
  font-size: 10px;
  font-weight: 700;
}

.customer-list-head .muted {
  font-weight: 400;
}

.customer-table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: #8b908c;
  background: #faf9f6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid #efede7;
  color: #49534e;
  font-size: 11px;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 120ms ease;
}

.table tbody tr:hover {
  background: #fcfbf8;
}

.customer-table {
  min-width: 850px;
}

.customer-row {
  cursor: pointer;
}

.institution-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 185px;
}

.institution-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: STSong, SimSun, serif;
  font-size: 14px;
  font-weight: 700;
}

.institution-copy {
  min-width: 0;
}

.institution-copy strong {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: #26342e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.institution-copy span {
  display: block;
  max-width: 220px;
  overflow: hidden;
  margin-top: 2px;
  color: #919692;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.mini-tag,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  color: #5f6a64;
  background: #f1f2ee;
  font-size: 8px;
  font-weight: 600;
}

.status-chip,
.level-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.lead {
  color: #4d6d82;
  background: var(--blue-soft);
}

.status-chip.following {
  color: #9c651d;
  background: var(--gold-soft);
}

.status-chip.cooperation {
  color: #27665a;
  background: var(--primary-soft);
}

.status-chip.inactive {
  color: #787d79;
  background: #efefec;
}

.level-chip {
  min-width: 20px;
  min-height: 20px;
  justify-content: center;
  padding: 2px 6px;
  color: #fff;
  background: var(--accent);
}

.level-chip.B {
  background: #a48a63;
}

.level-chip.C {
  background: #999e9a;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #52615b;
  background: #eff1ee;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.role-chip.teacher {
  color: #326d5f;
  background: var(--primary-soft);
}

.role-chip.marketing {
  color: #966027;
  background: var(--gold-soft);
}

.role-chip.admin {
  color: #9e4b45;
  background: var(--danger-soft);
}

.stage-with-level {
  display: flex;
  align-items: center;
  gap: 5px;
}

.date-cell {
  color: #656f69;
  white-space: nowrap;
}

.date-cell.overdue {
  color: var(--danger);
  font-weight: 700;
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.owner-mini {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #426157;
  background: #e9efeb;
  font-family: STSong, SimSun, serif;
  font-size: 9px;
  font-weight: 700;
}

.row-arrow {
  color: #b0b5b1;
  font-size: 15px;
}

.customer-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.customer-row-actions .btn {
  color: var(--primary);
}

.followup-customer-context {
  margin-bottom: 15px;
  padding: 10px 12px;
  border: 1px solid #dce9e3;
  border-radius: 9px;
  color: #3b6659;
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 700;
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: STSong, SimSun, serif;
  font-size: 22px;
}

.empty-state h4 {
  margin-top: 14px;
  font-family: STSong, SimSun, serif;
  font-size: 17px;
}

.empty-state p {
  margin-top: 5px;
  color: #888f8a;
  font-size: 10px;
}

/* ---------------------------------------------------------------- 弹窗与客户详情 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(16, 29, 25, 0.54);
  backdrop-filter: blur(3px);
  animation: fade-in 140ms ease;
}

.modal {
  width: min(530px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 22, 18, 0.28);
  animation: modal-up 180ms ease;
}

.modal-wide {
  width: min(760px, 100%);
}

.modal-detail {
  width: min(940px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-family: STSong, SimSun, serif;
  font-size: 21px;
}

.modal-close {
  width: 33px;
  height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #7b827d;
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.modal-body {
  overflow-y: auto;
  padding: 21px 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fcfbf8;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.detail-avatar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: STSong, SimSun, serif;
  font-size: 20px;
  font-weight: 700;
}

.detail-identity h3 {
  font-family: STSong, SimSun, serif;
  font-size: 24px;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 5px;
  color: #7d857f;
  font-size: 10px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab {
  position: relative;
  padding: 14px 10px 12px;
  border: none;
  color: #7d857f;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 999px;
  color: #668078;
  background: #eff2ef;
  font-size: 8px;
}

.tab.active {
  color: var(--primary);
}

.tab.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.detail-body {
  min-height: 390px;
  overflow-y: auto;
  padding: 20px 24px 24px;
  background: #fcfbf8;
}

.detail-tab-panel {
  min-height: 320px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.info-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.info-card.wide {
  grid-column: 1 / -1;
}

.info-card h4,
.panel-action-row h4 {
  margin-bottom: 12px;
  font-family: STSong, SimSun, serif;
  font-size: 15px;
}

.info-list {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 10px;
}

.info-list dt {
  color: #949a96;
}

.info-list dd {
  overflow-wrap: anywhere;
  color: #46524c;
}

.long-copy {
  color: #505b55;
  font-size: 10px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.panel-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-action-row h4 {
  margin-bottom: 2px;
}

.panel-action-row p {
  font-size: 9px;
}

.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 12px;
  left: 5px;
  width: 1px;
  background: #d9e1dc;
}

.timeline-item {
  position: relative;
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -17px;
  width: 8px;
  height: 8px;
  border: 2px solid #fcfbf8;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.timeline-head strong {
  color: #34413b;
  font-size: 10px;
}

.timeline-head span {
  color: #9aa09c;
  font-size: 9px;
}

.timeline-content {
  color: #59635e;
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.timeline-next {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #557267;
  background: #f0f5f2;
  font-size: 9px;
  line-height: 1.7;
}

.timeline-delete {
  margin-top: 8px;
  padding: 0;
  border: none;
  color: #a1a5a1;
  background: transparent;
  font-size: 8px;
  text-decoration: underline;
}

.timeline-delete:hover {
  color: var(--danger);
}

.opportunity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.opportunity-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.opportunity-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.opportunity-card h5 {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-stage {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #8d5c26;
  background: var(--gold-soft);
  font-size: 8px;
  font-weight: 700;
}

.opportunity-stage.won {
  color: var(--primary);
  background: var(--primary-soft);
}

.opportunity-stage.lost {
  color: #777c78;
  background: #efefed;
}

.opportunity-topic {
  margin-top: 7px;
  color: #737c77;
  font-size: 9px;
}

.opportunity-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #efede7;
  color: #8b918d;
  font-size: 8px;
}

.opportunity-facts b {
  color: #48564f;
  font-size: 10px;
}

.opportunity-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.link-btn {
  padding: 0;
  border: none;
  color: var(--primary);
  background: transparent;
  font-size: 8px;
  font-weight: 700;
}

.link-btn.danger {
  color: var(--danger);
}

.detail-empty {
  padding: 60px 20px;
  color: #929994;
  font-size: 10px;
  text-align: center;
}

/* ---------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 300;
  max-width: min(430px, calc(100vw - 28px));
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #fff;
  background: #233a33;
  box-shadow: 0 10px 30px rgba(10, 20, 17, 0.24);
  font-size: 11px;
  transform: translateX(-50%);
  animation: toast-in 180ms ease;
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: #2f725f;
}

/* ---------------------------------------------------------------- 动效 */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1240px) {
  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
  }

  .cal-day {
    min-height: 102px;
    padding: 6px;
  }

  .cal-event {
    padding: 3px 4px;
  }

  .process-steps i {
    width: 8px;
  }
}

@media (max-width: 1080px) {
  .sidebar {
    width: 78px;
    flex-basis: 78px;
    padding: 20px 10px 16px;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 0 0 24px;
  }

  .brand-copy,
  .nav-label,
  .user-copy,
  .icon-text-btn span:first-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 9px;
  }

  .nav-item.active {
    box-shadow: inset 0 -2px 0 #d2a563;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .sidebar-footer {
    align-items: center;
    padding: 13px 0 0;
  }

  .user-badge {
    justify-content: center;
  }

  .icon-text-btn {
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
  }

  .main {
    width: calc(100% - 78px);
  }

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .agenda-panel {
    display: none;
  }

  .customer-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 880px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    background:
      radial-gradient(circle at 90% 0%, rgba(199, 120, 70, 0.12), transparent 28%),
      #f6f3ed;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .reminder-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .requirement-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .management-target-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .management-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reminder-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .reminder-action {
    grid-column: 2;
  }

  .dashboard-panel.wide {
    grid-column: 1;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .info-card.wide {
    grid-column: 1;
  }

  .customer-toolbar {
    flex-wrap: wrap;
  }

  .search-box {
    max-width: none;
    flex-basis: 100%;
  }

  .customer-toolbar > select {
    flex: 1;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 67px;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 67px;
    flex-basis: auto;
    flex-direction: row;
    padding: 7px 9px;
    background: var(--sidebar);
    box-shadow: 0 -8px 25px rgba(16, 29, 25, 0.16);
  }

  .sidebar-brand,
  .sidebar-footer {
    display: none;
  }

  .nav {
    flex-direction: row;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    font-size: 8px;
  }

  .nav-item.active {
    box-shadow: none;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
    background: transparent;
    font-size: 11px;
  }

  .nav-item.active .nav-icon {
    background: rgba(216, 178, 124, 0.15);
  }

  .nav-label {
    display: inline;
  }

  .main {
    width: 100%;
    padding: 22px 14px 26px;
  }

  .topbar {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .topbar h2 {
    font-size: 23px;
  }

  .today-chip {
    display: none;
  }

  .permission-chip {
    max-width: 150px;
    min-height: 28px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reminder-hero {
    padding: 20px;
  }

  .requirement-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .management-header {
    padding: 20px;
  }

  .management-controls {
    width: 100%;
  }

  .management-controls label {
    flex: 1;
  }

  .management-controls input,
  .management-controls select {
    width: 100%;
  }

  .requirement-today {
    min-width: 0;
  }

  .reminder-hero h3 {
    font-size: 20px;
  }

  .reminder-hero-mark {
    display: none;
  }

  .reminder-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reminder-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .reminder-refresh-note {
    display: none;
  }

  .reminder-list {
    padding: 0 12px;
  }

  .reminder-item {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 11px;
  }

  .reminder-date-box {
    padding: 7px;
  }

  .reminder-date-box b {
    font-size: 17px;
  }

  .reminder-action {
    grid-column: 2;
  }

  .calendar-layout {
    margin-right: -14px;
    margin-left: -14px;
  }

  .section-toolbar > .toolbar-actions,
  .section-toolbar .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-teacher-filter,
  .calendar-month-filter,
  .calendar-year-filter {
    flex: 1;
  }

  .calendar-teacher-filter select,
  .calendar-month-filter select,
  .calendar-year-filter input {
    max-width: none;
    flex: 1;
  }

  .legend-list {
    display: none;
  }

  .month-switcher {
    width: 100%;
  }

  .month-switcher .btn-ghost {
    margin-left: auto;
  }

  .calendar-shell {
    border-right: none;
    border-left: none;
    border-radius: 0;
  }

  .cal-weekday {
    padding: 8px 1px;
    font-size: 8px;
  }

  .cal-day {
    min-height: 82px;
    padding: 4px;
  }

  .cal-event {
    min-height: 22px;
    padding: 2px 3px;
    border: none;
    border-radius: 3px;
    font-size: 7px;
  }

  .cal-event.status-reserved {
    background: var(--schedule-reserved);
  }

  .cal-event.status-confirmed {
    background: var(--schedule-confirmed);
  }

  .cal-event.status-other {
    background: var(--schedule-other);
  }

  .event-main {
    display: block;
    font-size: 7px;
    line-height: 1.25;
  }

  .event-teacher {
    display: block;
  }

  .event-city {
    max-width: 100%;
    display: block;
    margin-top: 1px;
    padding: 0;
    border: none;
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    font-size: 6px;
  }

  .event-sub {
    display: none;
  }

  .cal-more {
    font-size: 7px;
  }

  .summary-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .summary-scope-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-scope-switch {
    width: 100%;
  }

  .summary-scope-switch button {
    flex: 1;
  }

  .summary-hero h3 {
    font-size: 23px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-value {
    font-size: 24px;
  }

  .upcoming-list,
  .opportunity-list {
    grid-template-columns: 1fr;
  }

  .customer-intro {
    gap: 18px;
    padding: 19px;
  }

  .process-steps {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .customer-intro h3 {
    font-size: 19px;
  }

  .customer-list-head .muted {
    display: none;
  }

  .customer-toolbar > select {
    min-width: 0;
  }

  .customer-toolbar #btn-add-customer {
    width: 100%;
  }

  .requirement-toolbar #btn-add-requirement {
    width: 100%;
  }

  .requirement-teacher-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-head {
    padding: 16px 17px;
  }

  .modal-head h3 {
    font-size: 19px;
  }

  .modal-body {
    padding: 18px 17px;
  }

  .modal-foot {
    padding: 12px 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .span-2 {
    grid-column: 1;
  }

  .detail-head {
    padding: 17px;
  }

  .detail-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .detail-identity {
    align-items: flex-start;
  }

  .detail-identity h3 {
    font-size: 20px;
  }

  .detail-toolbar {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 0;
    padding: 10px 17px 0;
  }

  .detail-toolbar .toolbar-actions {
    align-self: flex-end;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    padding: 12px 5px 10px;
    font-size: 9px;
  }

  .detail-body {
    min-height: 390px;
    padding: 16px 17px 20px;
  }

  .panel-action-row {
    align-items: flex-start;
  }

  .toast {
    top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
