:root {
  --ink: #19302e;
  --muted: #75817e;
  --line: #e5ebe8;
  --soft: #f3f6f4;
  --paper: #ffffff;
  --green: #173f3b;
  --green-2: #2d6c62;
  --mint: #e2f0ea;
  --yellow: #f4c969;
  --blue: #dcebf4;
  --danger: #b9574f;
  --shadow: 0 18px 44px rgba(31, 61, 56, 0.08);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #edf2ef;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #edf2ef; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 238px; flex: 0 0 238px; padding: 28px 18px 24px; background: var(--green);
  color: #dceae5; display: flex; flex-direction: column; min-height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 10px 42px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  background: #e7f0e9; color: var(--green); font-weight: 800; font-size: 20px;
}
.brand strong { display: block; color: #fff; font-size: 16px; letter-spacing: .04em; }
.brand span { display: block; margin-top: 5px; color: #98b4ac; font-size: 11px; }
.side-nav { display: grid; gap: 7px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: #9db5af;
  padding: 12px 13px; border-radius: 9px; text-align: left; transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { color: #fff; background: rgba(232, 244, 238, .13); }
.nav-icon { width: 19px; font-size: 18px; text-align: center; opacity: .85; }
.sidebar-footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sync-chip { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #d6e6df; }
.sync-dot { width: 8px; height: 8px; border-radius: 99px; background: #8cd7a3; box-shadow: 0 0 0 4px rgba(140,215,163,.12); }
.sidebar-footer p { color: #7f9f97; font-size: 11px; line-height: 1.6; margin: 10px 0 0; }

.main-content { flex: 1; min-width: 0; padding: 34px 52px 54px; max-width: 1500px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.eyebrow, .section-kicker { margin: 0; color: var(--green-2); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin: 5px 0 0; font-size: 29px; letter-spacing: -.03em; }
h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.topbar-actions, .profile-chip { display: flex; align-items: center; gap: 10px; }
.profile-chip { padding: 5px 12px 5px 5px; border: 1px solid var(--line); background: rgba(255,255,255,.65); border-radius: 99px; color: #51615e; font-size: 12px; }
.profile-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-weight: 800; }
.icon-button, .today-button, .month-label {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); height: 38px; min-width: 38px;
  border-radius: 8px; display: inline-grid; place-items: center; transition: .18s ease;
}
.icon-button:hover, .today-button:hover, .month-label:hover { border-color: #bdcbc5; background: #f7faf8; }
.icon-button.small { width: 30px; height: 30px; min-width: 30px; }
.view { display: none; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 20px; }
.welcome-panel {
  min-height: 290px; padding: 34px 38px; color: #f5fbf8; background: var(--green); border-radius: 10px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.welcome-panel::after { content: ""; position: absolute; width: 250px; height: 250px; right: -82px; bottom: -110px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.025); }
.welcome-panel .section-kicker { color: #9ac2b5; }
.today-date { font-size: 36px; font-weight: 650; margin: 17px 0 3px; letter-spacing: -.04em; }
.today-time { font-size: 17px; color: #b8d0c8; margin-bottom: 10px; }
.hero-note { color: #a9c3ba; font-size: 13px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 11px; position: relative; z-index: 1; }
.primary-button, .secondary-button, .outline-button, .text-button {
  border-radius: 8px; padding: 11px 16px; border: 1px solid transparent; font-weight: 700; transition: .18s ease;
}
.primary-button { color: #173f3b; background: #e7f1e9; }
.primary-button:hover { background: #fff; transform: translateY(-1px); }
.secondary-button { color: var(--ink); border-color: var(--line); background: #fff; }
.secondary-button:hover, .outline-button:hover { border-color: #abc1b9; background: #f5faf7; }
.outline-button { color: var(--green); border-color: #bfd0ca; background: transparent; }
.text-button { padding: 5px 0; color: var(--green-2); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--ink); }
.button-symbol { font-size: 18px; vertical-align: -1px; margin-right: 5px; }

.today-summary, .panel { background: var(--paper); border: 1px solid rgba(222, 232, 227, .88); border-radius: 10px; box-shadow: var(--shadow); }
.today-summary { padding: 26px 28px; }
.panel-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.date-pill, .panel-mark { color: var(--green-2); background: var(--mint); border-radius: 99px; padding: 6px 9px; white-space: nowrap; font-size: 11px; }
.summary-number { padding: 42px 0 27px; font-size: 67px; line-height: .9; letter-spacing: -.07em; font-weight: 700; }
.summary-number small { font-size: 16px; letter-spacing: 0; margin-left: 9px; color: var(--muted); font-weight: 500; }
.summary-bottom { display: flex; justify-content: space-between; gap: 10px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.summary-bottom strong { color: var(--ink); }
.summary-bottom span:last-child { text-align: right; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; margin-top: 20px; }
.panel { padding: 25px 28px; }
.records-panel, .quick-panel { min-height: 300px; }
.record-list { margin-top: 22px; display: grid; gap: 10px; }
.record-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.record-item:last-child { border-bottom: 0; }
.record-time { width: 70px; color: var(--green-2); font-size: 12px; font-weight: 700; }
.record-subject { flex: 1; min-width: 0; }
.record-subject strong { display: block; font-size: 14px; }
.record-subject span { color: var(--muted); font-size: 11px; display: block; margin-top: 4px; }
.record-hours { color: var(--ink); font-size: 13px; white-space: nowrap; }
.record-action { color: var(--danger); border: 0; background: transparent; padding: 5px; font-size: 12px; }
.record-action:hover { text-decoration: underline; }
.empty-state { padding: 38px 10px 28px; color: var(--muted); text-align: center; font-size: 13px; }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 7px; font-size: 14px; }
.mini-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 27px 0 22px; }
.mini-stat { padding: 15px; background: var(--soft); border-radius: 8px; }
.mini-stat span { display: block; color: var(--muted); font-size: 11px; }
.mini-stat strong { display: block; margin-top: 9px; font-size: 25px; letter-spacing: -.04em; }
.subject-bars { display: grid; gap: 14px; margin-bottom: 22px; }
.bar-row { display: grid; grid-template-columns: 42px 1fr 35px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 7px; border-radius: 99px; background: #edf1ef; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--green-2); min-width: 4px; }
.bar-row:nth-child(2) .bar-fill { background: #d7a849; }
.full-width { width: 100%; }

.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.page-intro h2 { font-size: 28px; margin-top: 7px; }
.page-intro p:last-child { color: var(--muted); margin: 9px 0 0; font-size: 13px; }
.calendar-controls { display: flex; align-items: center; gap: 7px; }
.month-label { min-width: 114px; font-weight: 700; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .6fr); gap: 20px; align-items: start; }
.calendar-panel { padding: 20px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekdays { color: var(--muted); text-align: center; font-size: 11px; padding: 0 3px 11px; }
.calendar-grid { grid-auto-rows: minmax(95px, 1fr); }
.calendar-cell { min-width: 0; border: 1px solid transparent; background: #f7faf8; border-radius: 8px; padding: 10px; text-align: left; color: var(--ink); transition: .18s ease; }
.calendar-cell:hover { border-color: #b7cbc3; background: #f0f7f3; }
.calendar-cell.outside { background: transparent; color: #aab5b1; }
.calendar-cell.today { border-color: #7bafa0; background: #eaf4ef; }
.calendar-cell.selected { box-shadow: inset 0 0 0 2px var(--green); }
.cell-date { font-size: 16px; font-weight: 700; }
.cell-label { display: block; margin-top: 12px; color: var(--green-2); font-size: 11px; line-height: 1.45; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cell-count { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.day-detail-panel { padding: 25px 24px; min-height: 360px; }
.day-detail-summary { margin: 25px 0 18px; padding: 16px; background: var(--soft); border-radius: 8px; display: flex; justify-content: space-between; align-items: end; }
.day-detail-summary strong { font-size: 27px; letter-spacing: -.04em; }
.day-detail-summary span { display: block; color: var(--muted); font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 21px 22px; box-shadow: var(--shadow); }
.stat-card.accent { color: #f5fbf8; background: var(--green); border-color: var(--green); }
.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card.accent span { color: #b1cfc3; }
.stat-card strong { display: block; margin: 13px 0 4px; font-size: 34px; letter-spacing: -.07em; }
.stat-card small { color: var(--muted); font-size: 11px; }
.stat-card.accent small { color: #9dc0b4; }
.stats-content { margin-top: 0; }
.large-bars { display: grid; gap: 19px; margin-top: 28px; }
.large-bars .bar-row { grid-template-columns: 50px 1fr 48px; }
.large-bars .bar-track { height: 11px; }
.large-bars .bar-row strong { text-align: right; font-size: 13px; }
.record-list.compact { margin-top: 12px; }
.record-list.compact .record-item { padding: 10px 0; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 20px; align-items: start; }
.schedule-list { display: grid; gap: 1px; margin-top: 18px; }
.schedule-item { display: grid; grid-template-columns: 45px 1fr auto; gap: 13px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.schedule-item:last-child { border-bottom: 0; }
.schedule-day { color: var(--green-2); font-weight: 800; font-size: 13px; }
.schedule-main strong { display: block; font-size: 14px; }
.schedule-main span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.schedule-actions { display: flex; gap: 4px; }
.small-action { background: transparent; border: 0; color: var(--green-2); padding: 5px 6px; font-size: 12px; }
.small-action.danger { color: var(--danger); }
.settings-card { display: grid; gap: 14px; }
.field-label { color: var(--muted); font-size: 12px; margin-top: 11px; }
.range-line { display: grid; grid-template-columns: 1fr 45px; gap: 12px; align-items: center; }
input[type=range] { width: 100%; accent-color: var(--green-2); }
output { color: var(--ink); font-weight: 700; font-size: 13px; text-align: right; }
.local-note { display: flex; gap: 10px; margin-top: 10px; padding: 13px; border-radius: 8px; background: #fff8e5; color: #795f23; }
.note-icon { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.local-note p { margin: 0; font-size: 11px; line-height: 1.6; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(21, 43, 39, .42); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(100%, 480px); max-height: calc(100vh - 40px); overflow: auto; padding: 25px 27px; border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(13,38,33,.25); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 11px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 10px 11px; color: var(--ink); background: #fbfdfc; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6f9d90; box-shadow: 0 0 0 3px rgba(111,157,144,.13); }
.field textarea { min-height: 72px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal-actions .primary-button { background: var(--green); color: #fff; }
.candidate-list { display: grid; gap: 8px; margin-top: 9px; }
.candidate-option { text-align: left; border: 1px solid var(--line); background: #fbfdfc; padding: 12px; border-radius: 8px; }
.candidate-option:hover, .candidate-option.selected { border-color: #6f9d90; background: #eff7f3; }
.candidate-option strong { display: block; }
.candidate-option span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.confirm-box { background: var(--soft); border-radius: 8px; padding: 15px; display: grid; gap: 8px; }
.confirm-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.confirm-line span:first-child { color: var(--muted); }
.confirm-line strong { text-align: right; }
.danger-box { padding: 12px; background: #fff2f0; color: var(--danger); border-radius: 8px; font-size: 12px; line-height: 1.6; }

@media (max-width: 1000px) {
  .sidebar { width: 76px; flex-basis: 76px; padding: 23px 10px; }
  .brand { justify-content: center; padding: 0 0 35px; }
  .brand > div:last-child, .nav-item span:last-child, .sidebar-footer p, .sync-chip span:last-child { display: none; }
  .nav-item { justify-content: center; padding: 12px 8px; }
  .sidebar-footer { padding-left: 8px; padding-right: 8px; }
  .sync-chip { justify-content: center; }
  .main-content { padding: 28px 28px 45px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; height: 67px; padding: 9px 14px; flex-direction: row; align-items: center; justify-content: space-between; }
  .brand { padding: 0; justify-content: flex-start; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .side-nav { display: flex; gap: 2px; }
  .nav-item { padding: 8px; border-radius: 7px; }
  .nav-icon { font-size: 17px; }
  .sidebar-footer { display: none; }
  .main-content { padding: 23px 15px 35px; }
  .topbar { margin-bottom: 23px; }
  .topbar h1 { font-size: 25px; }
  .profile-chip { display: none; }
  .hero-grid, .content-grid, .calendar-layout, .settings-layout, .stats-content { grid-template-columns: 1fr; }
  .welcome-panel { min-height: 265px; padding: 27px 25px; }
  .today-date { font-size: 31px; }
  .today-summary { padding: 23px 25px; }
  .summary-number { padding: 30px 0 23px; }
  .panel { padding: 21px 19px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-intro h2 { font-size: 25px; }
  .calendar-controls { width: 100%; }
  .calendar-controls .month-label { flex: 1; }
  .calendar-panel { padding: 10px; }
  .calendar-weekdays, .calendar-grid { gap: 4px; }
  .calendar-grid { grid-auto-rows: minmax(72px, 1fr); }
  .calendar-cell { padding: 7px; }
  .cell-date { font-size: 14px; }
  .cell-label { margin-top: 8px; font-size: 9px; }
  .cell-count { font-size: 9px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 29px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .brand > div:last-child { display: block; }
  .brand span { display: none; }
  .nav-item span:last-child { display: none; }
  .today-date { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .summary-bottom { display: block; }
  .summary-bottom span:last-child { text-align: left; display: block; margin-top: 8px; }
  .calendar-cell { min-height: 64px; }
  .cell-label { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Minimal premium visual pass */
:root {
  --ink: #1f2c2a;
  --muted: #7b8783;
  --line: #e5ebe8;
  --soft: #f5f8f6;
  --paper: #ffffff;
  --green: #234e47;
  --green-2: #41766a;
  --mint: #eaf3ee;
  --yellow: #e1b85e;
  --shadow: 0 8px 24px rgba(30, 61, 54, 0.045);
}

body { background: #f7f9f8; }
.sidebar {
  width: 216px;
  flex-basis: 216px;
  padding: 28px 16px 22px;
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.brand { padding: 0 10px 45px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
}
.brand strong { color: var(--ink); font-size: 15px; }
.brand span { color: var(--muted); }
.nav-item { color: #899691; padding: 11px 12px; border-radius: 7px; }
.nav-item:hover { background: #f4f7f5; color: var(--ink); }
.nav-item.active { color: var(--green); background: var(--mint); }
.sidebar-footer { border-top-color: var(--line); }
.sync-chip { color: var(--green-2); }
.sidebar-footer p { color: var(--muted); }

.main-content { padding: 38px 58px 60px; }
.topbar { margin-bottom: 36px; }
h1 { font-size: 28px; font-weight: 650; }
.profile-chip { background: #fff; }
.icon-button, .today-button, .month-label { border-radius: 7px; }
.welcome-panel {
  min-height: 278px;
  padding: 34px 36px;
  color: var(--ink);
  background: #e9f2ed;
  border: 1px solid #d9e8df;
  border-radius: 8px;
  box-shadow: none;
}
.welcome-panel::after { display: none; }
.welcome-panel .section-kicker { color: var(--green-2); }
.today-time { color: #66857b; }
.hero-note { color: #6f857d; }
.primary-button { background: var(--green); color: #fff; }
.primary-button:hover { background: #315f56; }
.welcome-panel .secondary-button { background: transparent; border-color: #bfd3c9; color: var(--green); }
.welcome-panel .secondary-button:hover { background: rgba(255,255,255,.55); }

.today-summary, .panel { border-radius: 8px; box-shadow: var(--shadow); }
.today-summary { padding: 25px 27px; }
.panel { padding: 24px 27px; }
.summary-number { padding: 38px 0 24px; }
.calendar-panel { padding: 18px; }
.calendar-cell { border-radius: 6px; background: #fafcfb; }
.calendar-cell:hover { background: #f1f7f3; }
.calendar-cell.today { background: #eef6f1; border-color: #9dc1b1; }
.calendar-cell.selected { box-shadow: inset 0 0 0 1.5px var(--green); }
.stat-card { border-radius: 8px; box-shadow: var(--shadow); }
.stat-card.accent { background: var(--green); }
.modal { border-radius: 9px; }
.secondary-button, .outline-button { border-radius: 7px; }
.page-intro h2 { font-weight: 650; }

@media (max-width: 1000px) {
  .sidebar { width: 70px; flex-basis: 70px; padding: 23px 9px; }
  .main-content { padding: 30px 30px 48px; }
}

@media (max-width: 760px) {
  .sidebar {
    width: 100%;
    height: 64px;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .main-content { padding: 23px 15px 35px; }
  .brand-mark { width: 32px; height: 32px; }
}
