:root {
  color-scheme: light;
  --paper: #f5f6f1;
  --surface: #fff;
  --ink: #1c2b24;
  --muted: #58655c;
  --line: #dce3dc;
  --deep: #19342b;
  --green: #215a44;
  --green-dark: #184733;
  --mint: #e6efe6;
  --lime: #d6e7ae;
  --warm: #f9ecd6;
  --warn: #874e17;
  --rose: #f9e7e2;
  --danger: #9a392c;
  --sidebar: 238px;
  --radius: 12px;
  font: 15px/1.6 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #799a58; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; text-wrap: pretty; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); letter-spacing: -.045em; }
h2 { font-size: 1.17rem; }
h3 { font-size: 1rem; }
p, td, dd { overflow-wrap: anywhere; }
.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; padding: 10px; background: white; z-index: 9; }
.muted { color: var(--muted); }
.mobile-bar { display: none; }
.sidebar {
  background: var(--deep);
  color: #edf4ed;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 29px 17px 19px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  z-index: 2;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px; color: white;
  font-weight: 700; font-size: 1.12rem; text-decoration: none; line-height: 1.3;
}
.brand:hover { color: white; }
.desktop-brand { margin: 0 8px 33px; }
.brand small { display: block; color: #b9cec2; font-size: .72rem; font-weight: 400; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 10px; background: var(--lime); color: var(--deep); }
.brand-mark .icon { width: 25px; height: 25px; }
.company-logo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.brand-copy { min-width: 0; }
.company-name { display: block; font-size: .89rem; line-height: 1.5; overflow-wrap: anywhere; text-wrap: balance; }
.nav-caption { color: #b3c8b9; font-size: .72rem; letter-spacing: .12em; margin: 10px 11px 7px; }
.nav-caption:not(:first-child) { margin-top: 23px; }
.sidebar nav a {
  min-height: 42px; display: flex; align-items: center; gap: 11px; color: #e4eee7;
  border-radius: 8px; padding: 7px 10px; margin: 3px 0; text-decoration: none;
}
.sidebar nav a:hover { background: #244639; }
.sidebar nav a[aria-current] { color: #f8fbf3; background: #315443; font-weight: 700; }
.nav-count { font-size: .72rem; color: var(--deep); background: var(--lime); border-radius: 9px; padding: 0 6px; margin-left: auto; }
.sidebar-footer { margin-top: auto; padding: 23px 7px 0; }
.account-card { display: flex; gap: 9px; align-items: center; padding-top: 13px; border-top: 1px solid #446256; }
.account-card .avatar { width: 34px; height: 34px; font-size: .9rem; background: #365845; color: #e6f1e9; }
.account-card strong { display: block; overflow-wrap: anywhere; }
.account-card small { color: #b9cec2; display: block; }
.account-actions { margin-top: 9px; display: flex; gap: 11px; flex-wrap: wrap; align-items: center; font-size: .78rem; }
.account-actions a, .account-actions button { color: #d5e3d9; }
.account-actions button { padding: 0; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.main { margin-left: var(--sidebar); padding: clamp(24px, 4vw, 56px); max-width: calc(1480px + var(--sidebar)); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head > :first-child { min-width: 0; }
.eyebrow { margin-bottom: 8px; color: var(--green); letter-spacing: .09em; font-size: .76rem; font-weight: 700; }
.eyebrow > span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; background: #719357; border-radius: 100%; }
.intro { color: var(--muted); margin-top: 7px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.button {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px;
  border-radius: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--surface);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--mint); color: var(--green-dark); border-color: #cbd9ce; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.small { min-height: 35px; padding: 5px 10px; font-size: .88rem; }
.button.danger { color: var(--danger); }
.button.danger:hover { background: var(--rose); border-color: #eed2cb; }
.button-row, .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  min-height: 62px; padding: 12px 19px; border-bottom: 1px solid var(--line);
}
.list-header p { font-size: .83rem; margin-top: 3px; }
.tabs { display: flex; align-items: center; gap: 4px; }
.tabs a { padding: 7px 11px; text-decoration: none; border-radius: 7px; color: var(--muted); }
.tabs a[aria-current] { background: var(--mint); color: var(--green-dark); font-weight: 700; }
.tabs a:hover { background: var(--paper); }
input:not([type="hidden"]), select, textarea {
  min-width: 0; max-width: 100%; min-height: 37px; padding: 6px 9px; border: 1px solid #cfd9d0; border-radius: 7px;
  color: var(--ink); background: var(--surface);
}
input::placeholder { color: var(--muted); }
input[type="search"] { width: min(240px, 100%); }
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: .82rem; color: var(--muted); background: #f6f8f4; font-weight: 600; }
th, td { padding: 13px 19px; border-bottom: 1px solid #e7ede7; }
th:not(:first-child) { white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.row-title { font-weight: 700; color: var(--ink); }
.row-title[href]:hover { color: var(--green); }
.badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 20px; background: var(--mint); color: var(--green-dark); font-size: .76rem; }
.badge.done { background: #e2eedf; }
.badge.open { background: #eef2eb; color: #465b4c; }
.badge.cancelled { background: #f0f0ed; color: #62645d; }
.badge.new { background: var(--warm); color: var(--warn); }
.due-label { display: block; font-size: .78rem; color: var(--warn); }
.due-label.overdue { color: var(--danger); }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 50px 16px; }
.empty p { color: var(--muted); }
.empty .button { margin-top: 6px; }
.empty-icon {
  display: inline-grid; place-items: center; width: 37px; height: 37px; flex: none; border-radius: 9px;
  background: var(--mint); color: var(--green);
}
.empty-icon .icon { width: 20px; height: 20px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 15px; color: var(--muted); }
.back { display: inline-block; margin-bottom: 13px; font-size: .88rem; }
.detail, .editor { max-width: 830px; padding: clamp(16px, 3vw, 29px); }
.detail h2:not(:first-child) { margin-top: 16px; }
.detail p, .detail .button-row { margin-top: 10px; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 13px; margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: .82rem; }
dd { font-weight: 600; margin: 3px 0 0; }
.prose { white-space: pre-wrap; }
.flash-list { margin-bottom: 15px; }
.flash-list p { padding: 8px 13px; border-radius: 8px; background: var(--mint); color: var(--green-dark); }









.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(225px, 100%), 1fr)); gap: 10px; padding: 15px; }
.person { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
.person > div { min-width: 0; }
.person p, .person a { font-size: .85rem; overflow-wrap: anywhere; }
.person p { color: var(--muted); margin-top: 4px; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--mint); color: var(--green-dark); font-weight: 700; }
.member-kpi + .member-kpi { margin-top: 12px; }
.member-kpi-empty { padding: 12px 19px; }
.week-panel { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 17px 19px; background: #edf2e9; }
.week-panel h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
.week-controls { display: grid; justify-items: end; align-content: center; gap: 6px; }
.library-filter { margin-bottom: 15px; padding: 12px 14px; }
.library-filter input[type="search"] { width: min(325px, 100%); }
.clear-link { margin: 0 5px; font-size: .85rem; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 13px; }
.resource-card { display: flex; flex-direction: column; padding: 14px; gap: 8px; min-height: 155px; }
.card-top, .card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-top .badge { overflow-wrap: anywhere; min-width: 0; }
.resource-card h2 a { color: var(--ink); }
.card-description { color: var(--muted); font-size: .85rem; }
.card-foot { margin-top: auto; padding-top: 7px; font-size: .83rem; }
.card-foot a { white-space: nowrap; }
.fields { display: grid; gap: 15px; }
.fields > div:not(.button-row) { display: grid; gap: 4px; }
.fields label { font-size: .88rem; font-weight: 700; }
.fields input, .fields textarea, .fields select { width: 100%; }
.fields .helptext { color: var(--muted); font-size: .8rem; }
.helptext ul { padding-left: 19px; margin: 4px 0; }
.errorlist, .form-alert { color: var(--danger); margin: 0; font-size: .88rem; }
.errorlist { padding-left: 18px; }
.standalone .main { margin: 0 auto; max-width: 930px; }
.standalone-exit { margin-top: 10px; }
.login-shell { margin-top: clamp(12px, 9vh, 90px); display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: white; }
.login-brand { position: relative; overflow: hidden; display: grid; align-content: center; gap: 7px; min-height: 370px; padding: 28px; background: var(--deep); color: white; }
.login-brand > :not(.login-motif) { position: relative; z-index: 1; }
.login-brand .eyebrow { color: var(--lime); margin: 11px 0 0; }
.login-brand .brand-mark { width: 64px; height: 64px; }
.login-brand h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: 0; line-height: 1.45; text-wrap: balance; }
.login-brand p:last-of-type { color: #c6d7cb; }
.login-motif { position: absolute; width: 205px; height: 205px; right: -75px; bottom: -72px; border: 1px solid #6e9377; border-radius: 35px; transform: rotate(-20deg); box-shadow: 0 0 0 21px #284a3c, 0 0 0 42px #244134; }
.login-form { padding: 32px 24px; align-self: center; }
.login-form h2 { font-size: 1.65rem; }
.login-form .fields { margin-top: 18px; }
.login-form .form-alert { margin-top: 10px; }
@media (max-width: 900px) {
  :root { --sidebar: 193px; }
  .main { padding: 27px 20px; }

}
@media (max-width: 700px) {
  .mobile-bar { display: flex; justify-content: space-between; align-items: center; background: var(--deep); padding: 8px 13px; gap: 10px; }
  .mobile-bar .brand { font-size: 1rem; }
  .mobile-bar .brand-mark { width: 33px; height: 33px; }
  .menu-toggle { color: white; background: transparent; border: 1px solid #527363; border-radius: 7px; padding: 4px 8px; }
  .sidebar { display: none; position: static; width: auto; padding: 2px 13px 14px; }
  .sidebar.menu-open { display: flex; }
  .desktop-brand { display: none; }
  .sidebar-footer { padding-top: 8px; }
  .main { margin: 0; padding: 19px 12px 34px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 11px; margin-bottom: 15px; }

  .list-header { padding: 9px 10px; }
  th, td { padding: 9px 10px; }
  .week-controls { justify-items: start; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 0; padding: 19px; }
  .login-form { padding: 21px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  :root { view-transition-name: none; }
  body:not(.standalone) > .main { view-transition-name: workspace-content; }
  ::view-transition { pointer-events: none; }
  ::view-transition-group(workspace-content) { animation: none; }
  ::view-transition-old(workspace-content) {
    animation: workspace-content-out 110ms ease-out both;
    mix-blend-mode: normal;
  }
  ::view-transition-new(workspace-content) {
    animation: workspace-content-in 180ms cubic-bezier(.2, .7, .3, 1) both;
    mix-blend-mode: normal;
  }
  .button, .sidebar nav a, .menu-toggle {
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 100ms ease;
  }
  .button:active, .sidebar nav a:active, .menu-toggle:active { transform: translateY(1px); }
}
@keyframes workspace-content-out {
  to { opacity: 0; }
}
@keyframes workspace-content-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
