:root {
  color-scheme: light;
  --forest: #244b3c;
  --forest-deep: #173a2d;
  --leaf: #d8e6c0;
  --orange: #b96932;
  --ink: #28372f;
  --muted: #7b857c;
  --line: #e8eae3;
  --canvas: #f6f7f2;
  --white: #fff;
  --radius: 16px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, a, input, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid #a8b975; }
a { color: var(--forest); text-decoration: none; }
svg { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
button { transition: background .16s ease, border-color .16s ease, transform .16s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 36px 22px 22px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 24px; font-weight: 650; letter-spacing: 2px; padding: 0 12px; }
.sidebar .brand { color: #fff; font-size: 22px; white-space: nowrap; }
.sidebar > .role-label { margin: 15px 12px 0; }
.brand small, .auth-brand small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 3px; font-weight: 400; opacity: .58; margin-top: 2px; }
.brand-icon { width: 37px; height: 37px; background: var(--leaf); color: var(--forest); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.brand-icon { flex-shrink: 0; }
.brand-icon svg { width: 23px; height: 23px; }
.nav-list { display: flex; flex-direction: column; gap: 8px; margin-top: 58px; }
.nav-item { border: 0; background: transparent; display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; color: #bdcfc3; padding: 14px 17px; font-size: 14px; border-radius: 10px; }
.nav-item.active { background: #f0f4e9; color: var(--forest); font-weight: 600; }
.nav-item:hover:not(.active) { background: #ffffff0c; color: #fff; }
.nav-icon { width: 22px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-footer { margin-top: auto; padding: 22px 7px 0; border-top: 1px solid #ffffff20; display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.icp-link { width: 100%; color: #bdd1c3; font-size: 10px; text-decoration: none; }
.icp-link:hover, .auth-footer a:hover { text-decoration: underline; }
.auth-footer a { color: inherit; }
.user-avatar { height: 36px; width: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #e3e9d5; color: var(--forest); font-weight: 650; }
.user-info { min-width: 0; flex: 1; font-size: 13px; }
.user-info strong { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-label { color: #bdd1c3; font-size: 11px; }
.logout-btn { color: #bad0c1; background: transparent; border: 0; padding: 5px; display: inline-flex; }
.logout-btn:hover { color: #fff; }
.main-content { min-width: 0; padding: 0 42px 36px; max-width: 1650px; width: 100%; margin: 0 auto; }
.topbar { height: 81px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.breadcrumb { color: #92988f; font-size: 12px; display: flex; align-items: center; gap: 10px; }
.breadcrumb strong { color: #4f6055; font-weight: 400; }
.breadcrumb svg { width: 16px; height: 16px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.clock-chip { color: #6f7c70; font-size: 11px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.clock-chip svg { width: 14px; height: 14px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #78a375; box-shadow: 0 0 0 3px #78a37512; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 30px 0 23px; }
.eyebrow { color: #85917d; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 7px; }
.page-title { font-size: clamp(23px, 2.25vw, 30px); font-weight: 650; line-height: 1.35; letter-spacing: .2px; margin: 0 0 8px; }
.page-description { color: var(--muted); font-size: 12px; margin: 0; }
.button { min-height: 39px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 550; line-height: 1.45; white-space: nowrap; }
.button svg { width: 16px; height: 16px; }
.button.primary { background: var(--forest); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--forest-deep); }
.button.secondary { color: var(--forest); background: #fff; border-color: #dfe4d8; }
.button.secondary:hover:not(:disabled) { background: #f1f5e9; border-color: #b6c6a6; }
.button.ghost { background: transparent; color: var(--forest); }
.button.ghost:hover:not(:disabled) { background: #e9eee0; }
.button.danger { background: #fff5f0; color: #b55737; border-color: #f0d5c8; }
.button.small { min-height: 31px; padding: 6px 11px; font-size: 11px; }

.hero-banner { background: #e7eddb; border: 1px solid #dfe7d2; border-radius: var(--radius); min-height: 191px; padding: 28px 32px; position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden; isolation: isolate; }
.hero-copy { position: relative; z-index: 2; max-width: 72%; }
.hero-copy h2 { font-size: 23px; line-height: 1.45; font-weight: 650; color: var(--forest); margin: 11px 0 9px; }
.hero-copy p { color: #6f7d64; font-size: 12px; margin: 0; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; color: #627553; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.hero-tag svg { height: 14px; width: 14px; }
.hero-stats { display: block; text-align: center; margin-top: 12px; font-size: 11px; color: #66765d; }
.hero-stats strong { color: var(--forest); font-size: 13px; margin-right: 4px; }
.hero-graphic { position: absolute; right: 24px; width: 202px; height: 176px; display: grid; place-items: center; transform: rotate(-9deg); z-index: 1; }
.hero-graphic::before { content: ''; width: 147px; height: 147px; border-radius: 50%; border: 1px solid #bac8a3; position: absolute; }
.hero-graphic::after { content: ''; width: 177px; height: 177px; border: 1px solid #c6d1b1; border-radius: 50%; position: absolute; }
.meal-plate { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: #f9faf0; border: 10px solid #f2f5e7; box-shadow: 8px 13px 0 #7d906c16, inset 0 0 0 1px #dbe2ce; position: relative; color: #8aa575; }
.meal-plate svg { width: 46px; height: 46px; stroke-width: 1.4; }
.meal-plate::before { content: ''; position: absolute; height: 65px; width: 6px; background: #6a8456; border-radius: 4px; left: -25px; top: 20px; }
.meal-plate::after { content: ''; position: absolute; height: 65px; width: 6px; background: #6a8456; border-radius: 9px 9px 3px 3px; right: -25px; top: 20px; }
.week-control { display: flex; align-items: center; gap: 10px; }
.week-label { font-size: 12px; white-space: nowrap; color: #65715f; }
.week-label small { display: block; font-size: 10px; margin-top: 2px; color: var(--muted); }
.icon-button { border: 1px solid #dfe4d8; border-radius: 7px; background: #fff; color: #7b8675; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button:hover:not(:disabled) { background: #edf2e5; color: var(--forest); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 19px 20px 17px; min-width: 0; }
.stat-label { color: #83907f; font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.stat-label svg { width: 16px; height: 16px; color: #a8b29f; }
.stat-value { color: var(--forest); font-size: 31px; font-weight: 600; line-height: 1.25; margin: 10px 0 7px; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.stat-value small { font-size: 11px; color: #949c8f; font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.stat-footnote { color: #9aA18f; font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 286px; align-items: start; gap: 22px; }
.section-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.section-card + .section-card { margin-top: 20px; }
.content-grid > .section-card + .section-card { margin-top: 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 21px; }
.section-title { font-size: 15px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-title svg { width: 17px; height: 17px; color: #6f8562; }
.section-header > p, .section-header > span { font-size: 11px; color: var(--muted); margin: 0; }
.day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.day-card { border: 1px solid #e6e9df; border-radius: 12px; background: #fff; padding: 19px; }
.day-card.enrolled { background: #fafcf5; border-color: #bbcca7; }
.day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.day-date { font-size: 13px; color: #64745c; font-weight: 500; }
.day-weekday { font-size: 20px; line-height: 1.4; font-weight: 600; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 5px; font-size: 10px; font-weight: 400; padding: 4px 7px; white-space: nowrap; line-height: 1.35; }
.badge.green { background: #eaf1df; color: #62844a; }
.badge.orange { background: #f8ede0; color: #b88143; }
.badge.gray { background: #f0f1ec; color: #8a9283; }
.badge svg { width: 11px; height: 11px; }
.day-number { margin-top: 22px; display: flex; align-items: baseline; gap: 5px; color: #84907c; font-size: 11px; }
.day-number strong { font-size: 30px; font-weight: 600; color: var(--forest); line-height: 1.25; font-variant-numeric: tabular-nums; }
.day-number .badge { margin-left: auto; font-size: 10px; }
.progress-track { height: 5px; border-radius: 9px; background: #eef1e7; overflow: hidden; margin: 11px 0 16px; }
.progress-fill { height: 100%; background: #a7bd80; border-radius: 9px; min-width: 0; max-width: 100%; transition: width .3s; }
.day-deadline { display: flex; align-items: flex-start; gap: 5px; color: #909988; font-size: 10px; min-height: 31px; line-height: 1.6; }
.day-deadline svg { width: 12px; height: 12px; margin-top: 2px; }
.day-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.day-actions > .button { width: 100%; }
.day-actions .summary-note { margin: 3px 0; }
.day-actions > div > .button { flex: 1; padding-left: 6px; padding-right: 6px; }
.empty-state { padding: 44px 18px; color: #95a08d; text-align: center; font-size: 12px; }
.empty-state svg { display: block; width: 31px; height: 31px; margin: 0 auto 12px; color: #bac5ad; }
.rule-list { display: flex; flex-direction: column; gap: 21px; padding: 0; margin: 0; list-style: none; }
.rule-item { display: flex; align-items: flex-start; gap: 11px; font-size: 11px; color: #8b9583; line-height: 1.75; }
.rule-item strong { display: block; color: #596c50; font-weight: 550; font-size: 12px; margin-bottom: 3px; }
.rule-item p { margin: 0; }
.rule-number { flex-shrink: 0; height: 23px; width: 23px; display: grid; place-items: center; background: #f0f3e8; border-radius: 7px; color: #8d9c76; font-size: 10px; margin-top: 1px; }
.notice-banner, .inline-alert { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 9px; background: #f7f3e8; border: 1px solid #ede4cf; color: #9c885f; font-size: 11px; line-height: 1.8; }
.notice-banner { margin-top: 20px; }
.notice-banner svg, .inline-alert svg { width: 15px; height: 15px; margin-top: 2px; }
.notice-banner p, .inline-alert p { margin: 0; }
.inline-alert { margin: 0 0 20px; }
.summary-note { color: #8c9782; font-size: 10px; margin: 16px 0 0; display: flex; align-items: center; gap: 5px; }
.summary-note svg { width: 12px; height: 12px; }

.table-wrap { overflow-x: auto; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 12px; }
.data-table th { color: #929b89; background: #f8f9f4; font-size: 10px; font-weight: 500; padding: 12px 14px; border-bottom: 1px solid #eaede2; }
.data-table th:first-child { border-radius: 7px 0 0 0; }
.data-table th:last-child { border-radius: 0 7px 0 0; }
.data-table td { padding: 14px; border-bottom: 1px solid #eef0e8; color: #66745f; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcf8; }
.avatar-cell { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.table-avatar { width: 31px; height: 31px; border-radius: 50%; background: #edf0e6; display: grid; place-items: center; color: #7a8b6e; font-size: 11px; }
.table-subtext { display: block; font-size: 10px; color: #a1a896; margin-top: 2px; }
.select, .input { width: 100%; min-height: 43px; border: 1px solid #dfe4d9; background: #fff; border-radius: 8px; padding: 11px 12px; color: #44563c; transition: border-color .15s, box-shadow .15s; font-size: 12px; }
.select { padding-right: 28px; }
.select:focus, .input:focus { outline: 0; border-color: #839b6c; box-shadow: 0 0 0 3px #aabb8226; }
.select:disabled, .input:disabled { background: #f4f5ef; color: #9ba591; cursor: not-allowed; }
.input::placeholder { color: #b0b6a7; }
.field { display: block; margin-bottom: 17px; }
.field-label { display: block; font-size: 12px; font-weight: 500; color: #5b6c51; margin-bottom: 8px; }
.field small { display: block; color: #98a18c; font-size: 10px; margin-top: 7px; }
.form-error { background: #fff2ea; color: #b56245; border-radius: 7px; font-size: 11px; padding: 10px 12px; margin-bottom: 16px; }
.form-error:empty { display: none; }
.roster-heading { margin-top: 27px; }
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar .select { width: auto; min-width: 130px; }
.search-input { position: relative; max-width: 340px; flex: 1; min-width: 200px; }
.search-input svg { position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; color: #a3ad97; }
.search-input .input { padding-left: 37px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-grid .field { margin-bottom: 0; }
.settings-grid + .button { margin-top: 22px; }

.auth-shell { display: grid; grid-template-columns: 48% 52%; min-height: 100vh; background: #fafbf7; }
.auth-art { min-height: 100vh; position: relative; display: flex; flex-direction: column; padding: 45px 56px; overflow: hidden; background: #e4ead7; isolation: isolate; }
.auth-brand { display: flex; align-items: center; gap: 11px; color: var(--forest); font-weight: 650; font-size: 24px; letter-spacing: 2px; }
.auth-brand .brand-icon { background: var(--forest); color: #e4ead7; }
.auth-art-content { margin: auto 0; padding: 61px 0 33px; position: relative; z-index: 1; }
.auth-title { font-size: clamp(32px, 3.5vw, 49px); line-height: 1.45; font-weight: 550; letter-spacing: 1px; margin: 0 0 22px; color: #2b513d; }
.auth-description { font-size: 13px; color: #7f8d6e; line-height: 1.95; max-width: 340px; margin: 0; }
.auth-feature { display: inline-flex; align-items: center; gap: 8px; color: #6f825e; font-size: 11px; margin-top: 27px; border: 1px solid #bdcaae; border-radius: 20px; padding: 7px 12px; }
.feature-dot { height: 5px; width: 5px; border-radius: 50%; background: #8c9e63; }
.auth-illustration { width: 250px; height: 205px; position: relative; margin: 30px auto 0; display: grid; place-items: center; transform: rotate(-9deg); }
.auth-illustration::before { content: ''; position: absolute; width: 232px; height: 156px; background: #bfceab; border: 6px solid #cfdbc0; box-shadow: inset 0 0 0 1px #a9bd91, 12px 20px 0 #687c4810; border-radius: 32px; }
.auth-illustration .meal-plate { width: 136px; height: 136px; background: #fcfcee; border-color: #eff2e2; margin-right: 38px; }
.auth-illustration .meal-plate::before { left: auto; right: -40px; width: 8px; height: 78px; top: 22px; background: #738d57; }
.auth-illustration .meal-plate::after { right: -55px; width: 5px; height: 78px; top: 22px; background: #738d57; }
.auth-art::after { content: ''; position: absolute; width: 390px; height: 390px; bottom: -260px; right: -140px; border: 1px solid #acbd9369; border-radius: 50%; box-shadow: 0 0 0 38px #bccaa322, 0 0 0 78px #bccaa316; z-index: -1; }
.auth-art > small { font-size: 10px; color: #94a082; letter-spacing: .8px; }
.auth-panel { display: flex; justify-content: center; align-items: center; padding: 56px 48px; }
.auth-card { max-width: 366px; width: 100%; }
.auth-tabs { border-bottom: 1px solid #e6eadd; display: flex; gap: 31px; margin-bottom: 34px; }
.auth-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 12px; padding: 0 2px 12px; color: #a0a994; position: relative; bottom: -1px; }
.auth-tab.active { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }
.auth-tab:hover { color: var(--forest); }
.auth-heading { font-size: 28px; font-weight: 600; letter-spacing: .5px; margin: 0 0 10px; }
.auth-intro { font-size: 12px; line-height: 1.8; color: #9aa38d; margin: 0 0 30px; }
.auth-form .input { background: #fff; min-height: 47px; padding: 12px 14px; }
.auth-form .field { margin-bottom: 20px; }
.auth-form .button { width: 100%; min-height: 47px; margin-top: 8px; font-size: 12px; letter-spacing: 1px; }
.auth-footer { border-top: 1px solid #e9ecdf; padding-top: 20px; margin-top: 28px; color: #a0a991; font-size: 10px; line-height: 1.9; }
.auth-footer strong { color: #839375; font-weight: 500; }
.dev-login { margin-top: 24px; border: 1px solid #e5d9ba; border-radius: 11px; background: #faf7ee; overflow: hidden; }
.dev-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 15px 13px; border: 0; background: transparent; color: #786644; text-align: left; }
.dev-toggle strong { font-size: 13px; white-space: nowrap; }
.dev-toggle > span { font-size: 11px; flex: 1; }
.dev-toggle > svg { width: 16px; height: 16px; }
.dev-toggle[aria-expanded="true"] > svg:last-child { transform: rotate(90deg); }
#dev-body { border-top: 1px solid #e9e0cc; padding: 15px; }
.dev-hint { font-size: 12px; color: #7d755e; line-height: 1.75; margin: 0 0 14px; }
#dev-unlock-form .button { width: 100%; }
#dev-unlock-form .field { margin-bottom: 0; }
.dev-unlocked { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 12px; font-size: 11px; color: var(--forest); }
.dev-unlocked svg { width: 14px; height: 14px; }
.dev-filters { display: flex; gap: 7px; }
.dev-filters .input { min-width: 0; flex: 1; font-size: 12px; }
.dev-filters .select { width: 101px; min-width: 0; font-size: 12px; padding: 9px 5px; }
.dev-count { font-size: 11px; color: #837c69; margin: 10px 0; }
.dev-accounts { max-height: 272px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 7px; }
.dev-account { border: 1px solid #e9e4d7; border-radius: 8px; background: #fff; padding: 10px; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--forest); width: 100%; }
.dev-account:hover:not(:disabled) { border-color: #a4b897; background: #f3f7ed; }
.dev-account .table-avatar { width: 29px; height: 29px; font-size: 12px; flex-shrink: 0; }
.dev-account-info { min-width: 0; flex: 1; }
.dev-account-info strong { display: block; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-account-info small { display: block; color: #8a9384; font-size: 11px; margin-top: 2px; }
.dev-account > svg { width: 13px; height: 13px; }
#dev-error:empty { display: none; }
.mobile-brand { display: none; }
.toast { position: fixed; left: 50%; bottom: 29px; transform: translateX(-50%); z-index: 100; padding: 13px 22px; max-width: calc(100vw - 32px); background: var(--forest-deep); color: #fff; border-radius: 10px; box-shadow: 0 7px 24px #132a2522; font-size: 12px; animation: toast-enter .2s ease-out; }
.toast.error { background: #9b513b; }
.loading-state { min-height: 65vh; display: flex; justify-content: center; align-items: center; color: #829173; font-size: 13px; gap: 10px; }
.loading-state::before { content: ''; width: 17px; height: 17px; border: 2px solid #d7e1c9; border-top-color: #79965d; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-enter { from { opacity: 0; bottom: 21px; } to { opacity: 1; bottom: 29px; } }

@media (min-width: 1500px) {
  .main-content { padding-left: 52px; padding-right: 52px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .hero-banner { min-height: 207px; }
  .day-card { padding: 24px; }
}

@media (max-width: 1170px) {
  .app-shell { grid-template-columns: 202px minmax(0, 1fr); }
  .sidebar { padding: 31px 16px 20px; }
  .main-content { padding: 0 28px 30px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .content-grid > .section-card:last-child .rule-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .hero-graphic { right: 7px; transform: scale(.85) rotate(-9deg); }
  .stat-card { padding: 17px; }
  .auth-art { padding: 35px 39px; }
  .auth-panel { padding: 42px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 16px 20px 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
  .brand { padding: 0; font-size: 20px; gap: 9px; }
  .brand-icon { width: 31px; height: 31px; border-radius: 9px; }
  .brand small { font-size: 7px; letter-spacing: 2.5px; }
  .nav-list { order: 3; margin: 0; flex-direction: row; width: 100%; gap: 6px; overflow-x: auto; padding-bottom: 12px; }
  .nav-item { width: auto; flex-shrink: 0; padding: 9px 14px; gap: 8px; font-size: 12px; border-radius: 7px; }
  .nav-icon, .nav-icon svg { width: 17px; height: 17px; }
  .sidebar-footer { border: 0; padding: 0; margin: 0 0 0 auto; flex-wrap: nowrap; gap: 8px; }
  .user-avatar { width: 29px; height: 29px; font-size: 12px; }
  .user-info { font-size: 11px; max-width: 75px; }
  .role-label { font-size: 9px; }
  .logout-btn svg { height: 17px; width: 17px; }
  .main-content { padding: 0 20px 26px; }
  .topbar { height: 54px; gap: 8px; }
  .breadcrumb { font-size: 10px; gap: 6px; }
  .clock-chip { font-size: 9px; gap: 5px; }
  .topbar-right { gap: 8px; }
  .page-heading { margin: 25px 0 19px; align-items: flex-start; }
  .page-title { font-size: 24px; }
  .page-description { font-size: 11px; max-width: 270px; }
  .eyebrow { font-size: 9px; }
  .hero-banner { min-height: 180px; padding: 25px 22px; }
  .hero-copy { max-width: 75%; }
  .hero-copy h2 { font-size: 20px; }
  .hero-copy p { font-size: 11px; }
  .hero-graphic { opacity: .55; right: -23px; transform: scale(.73) rotate(-9deg); }
  .hero-stats { gap: 15px; font-size: 10px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 17px 0; }
  .stat-card { padding: 16px 18px; }
  .stat-value { font-size: 29px; margin-top: 8px; }
  .content-grid { gap: 17px; }
  .section-card { padding: 19px; }
  .content-grid > .section-card:last-child .rule-list { display: flex; gap: 19px; }
  .day-grid { gap: 12px; }
  .day-card { padding: 16px; }
  .day-weekday { font-size: 18px; }
  .day-date { font-size: 11px; }
  .day-number { margin-top: 19px; }
  .day-number strong { font-size: 28px; }
  .day-number span:last-child { font-size: 9px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { min-height: auto; padding: 27px 29px 24px; }
  .auth-art-content { padding: 28px 0 0; }
  .auth-title { font-size: 28px; margin-bottom: 10px; max-width: 75%; }
  .auth-description { font-size: 11px; max-width: 75%; }
  .auth-feature { margin-top: 17px; font-size: 9px; padding: 5px 9px; }
  .auth-brand { font-size: 21px; }
  .auth-illustration { position: absolute; right: -72px; bottom: -40px; transform: scale(.58) rotate(-9deg); opacity: .8; margin: 0; }
  .auth-art > small { display: none; }
  .auth-panel { padding: 32px 28px 40px; align-items: flex-start; }
  .auth-card { max-width: 420px; }
  .auth-tabs { margin-bottom: 25px; }
  .auth-heading { font-size: 25px; }
  .auth-intro { margin-bottom: 23px; }
  .auth-footer { margin-top: 22px; }
}

@media (max-width: 450px) {
  .main-content { padding-left: 16px; padding-right: 16px; }
  .topbar-right > .badge { display: none; }
  .page-heading { flex-wrap: wrap; gap: 12px; }
  .page-heading .week-control { width: 100%; justify-content: flex-start; }
  .day-grid { grid-template-columns: 1fr; }
  .day-card { padding: 19px; }
  .day-deadline { min-height: 0; }
  .day-number { margin-top: 17px; }
  .hero-copy { max-width: 89%; }
  .hero-copy h2 { font-size: 19px; }
  .hero-graphic { right: -47px; opacity: .3; }
  .hero-stats { gap: 10px; }
  .section-header { flex-wrap: wrap; gap: 10px; }
  .settings-grid { grid-template-columns: 1fr; }
  .stat-label { font-size: 10px; }
  .stat-footnote { font-size: 9px; }
  .auth-illustration { right: -84px; opacity: .45; }
  .auth-title { max-width: 90%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.calendar-live { display: flex; align-items: center; gap: 6px; color: #86917e; font-size: 10px; white-space: nowrap; }
.calendar-live svg { width: 14px; height: 14px; }
.calendar-intro { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px 29px; border: 1px solid #dce6ce; border-radius: 15px; background: linear-gradient(110deg, #e8eedf, #f0f4e9); }
.calendar-intro h2 { font-size: 21px; font-weight: 550; color: var(--forest); margin: 7px 0 8px; }
.calendar-intro p { font-size: 12px; color: #748568; margin: 0; line-height: 1.9; }
.calendar-intro p strong { font-weight: 600; color: #456540; }
.intro-leaf { width: 80px; height: 80px; flex-shrink: 0; border: 1px solid #cbd9bb; border-radius: 50%; display: grid; place-items: center; background: #f6f9ef99; transform: rotate(-14deg); box-shadow: 0 0 0 14px #dce7ce50, 0 0 0 28px #dce7ce25; margin-right: 18px; }
.intro-leaf svg { width: 38px; height: 38px; color: #7a9469; }
.calendar-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; padding: 17px 0; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.calendar-stats > div { padding: 0 24px; border-right: 1px solid var(--line); }
.calendar-stats > div:last-child { border: 0; }
.calendar-stats > div > span { display: block; color: #7d8c74; font-size: 11px; }
.calendar-stats strong { display: block; margin-top: 5px; font-size: 28px; line-height: 1.25; font-weight: 600; color: var(--forest); font-variant-numeric: tabular-nums; }
.calendar-stats small { font-size: 10px; color: #8e9985; font-weight: 400; margin-left: 7px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 20px; align-items: start; }
.calendar-layout > .section-card { margin: 0; }
.month-card { padding: 24px 20px 17px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.calendar-header h2 { font-size: 18px; font-weight: 550; margin: 0 0 4px; white-space: nowrap; color: #536a49; }
.calendar-header h2 > span { color: var(--forest); }
.calendar-header p { font-size: 10px; color: #97a08e; margin: 0; }
.month-control { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.previous-arrow { display: flex; transform: rotate(180deg); }
.month-picker input { color-scheme: light; width: 134px; border: 0; border-radius: 5px; background: #f7f9f2; padding: 7px 5px 7px 8px; font-size: 11px; color: #536849; min-height: 32px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: 11px; color: #8d9885; padding: 0 0 12px; }
.weekend-label { color: #b78064; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-day { position: relative; min-width: 0; height: 113px; border: 1px solid #edf0e8; border-radius: 9px; background: #fff; padding: 9px 8px 7px; color: #55684c; text-align: left; display: flex; flex-direction: column; overflow: hidden; }
.calendar-day:hover { border-color: #aabb91; background: #f5f8ee; z-index: 1; }
.calendar-day.kind-weekend { background: #f7f9f1; }
.calendar-day.kind-holiday { background: #fdf7f1; border-color: #f0e7da; }
.calendar-day.kind-makeup { background: #f4f6f2; }
.calendar-day.outside { opacity: .48; }
.calendar-day.outside:hover, .calendar-day.outside.selected { opacity: 1; }
.calendar-day.selected { background: #edf3e4; border-color: #648451; box-shadow: inset 0 0 0 1px #648451; }
.calendar-day.is-today .solar-day { background: var(--forest); color: #fff; border-radius: 50%; }
.calendar-day-top { display: flex; justify-content: space-between; align-items: center; min-height: 24px; gap: 2px; }
.solar-day { display: inline-grid; place-items: center; min-width: 24px; height: 24px; font-size: 16px; font-weight: 550; font-variant-numeric: tabular-nums; margin-left: -3px; }
.day-kind { font-size: 9px; line-height: 17px; width: 17px; height: 17px; text-align: center; border-radius: 4px; }
.day-kind.holiday, .legend-holiday { background: #f6e9dc; color: #b5764a; }
.day-kind.makeup, .legend-makeup { background: #e5eae1; color: #6e7e65; }
.today-label { font-size: 9px; color: #6b825d; }
.lunar-day { display: block; font-size: 10px; color: #9ba48f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; min-height: 16px; }
.holiday-name { color: #af7a56; }
.cell-count { display: flex; align-items: center; gap: 3px; font-size: 9px; color: #88977a; margin-top: auto; white-space: nowrap; }
.cell-count strong { font-size: 12px; font-weight: 500; color: #6c805d; }
.mine-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #538047; display: inline-block; }
.cell-count .mine-dot { margin-left: auto; }
.cell-status { display: flex; align-items: center; gap: 2px; font-size: 9px; color: #9ca390; line-height: 1.5; white-space: nowrap; }
.cell-status svg { width: 9px; height: 9px; }
.cell-status.open { color: #38734e; font-weight: 550; }
.meal-open::after { content: ''; position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: #77a27a; }
.cell-workday { color: #b1b8a8; font-size: 9px; margin-top: auto; }
.calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 17px; margin-top: 17px; font-size: 9px; color: #849179; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-size: 9px; font-weight: 400; }
.legend-weekend { width: 9px; height: 9px; background: #ecf0e3; border: 1px solid #d7e0ca; border-radius: 3px; }
.legend-open { width: 10px; height: 3px; background: #77a27a; border-radius: 2px; }
.calendar-footnote { margin: 12px 0 0; color: #a0a996; font-size: 9px; }
.calendar-detail { padding: 24px 22px 18px; position: sticky; top: 20px; }
.detail-date-header { border-bottom: 1px solid #e9ede3; padding-bottom: 20px; }
.detail-date-header > p { font-size: 11px; color: #8b987e; margin: 6px 0 13px; }
.detail-date-line { display: flex; align-items: baseline; gap: 11px; margin-top: 6px; }
.detail-date-line h2 { font-size: 25px; color: var(--forest); font-weight: 550; margin: 0; }
.detail-date-line > span { font-size: 12px; color: #7d8c71; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.holiday { color: #b17d51; background: #f9eee1; }
.detail-count { display: flex; align-items: baseline; gap: 9px; margin-top: 24px; }
.detail-count strong { font-size: 45px; color: var(--forest); font-weight: 550; line-height: 1.15; font-variant-numeric: tabular-nums; }
.detail-count > span { font-size: 11px; color: #8f9d82; }
.detail-threshold { font-size: 11px; color: #779060; margin: 0 0 24px; }
.detail-threshold svg { width: 13px; height: 13px; }
.detail-fact { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; }
.detail-fact > svg { color: #94a281; width: 15px; height: 15px; margin-top: 2px; }
.detail-fact strong { display: block; font-size: 11px; color: #677b5d; font-weight: 500; }
.detail-fact span { display: block; font-size: 10px; color: #a0a992; margin-top: 4px; line-height: 1.8; }
.detail-actions { border-top: 1px solid #e9ede3; padding-top: 21px; margin-top: 23px; display: flex; flex-direction: column; gap: 9px; }
.detail-actions > .button { width: 100%; }
.detail-actions .button > span { margin-left: auto; font-size: 10px; font-weight: 400; }
.detail-note { font-size: 10px; color: #96a089; line-height: 1.9; margin: 2px 0 0; }
.kitchen-actions { display: flex; gap: 7px; }
.kitchen-actions > .button { min-width: 0; flex: 1; padding-left: 5px; padding-right: 5px; }
.detail-rest { text-align: center; padding: 40px 0 12px; color: #8b9b79; }
.detail-rest > svg { display: block; width: 32px; height: 32px; margin: 0 auto 16px; color: #a3b78c; }
.detail-rest strong { font-weight: 500; font-size: 13px; display: block; }
.detail-rest p { font-size: 11px; line-height: 1.9; margin: 9px 0 0; }
.calendar-unknown { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.8; padding: 10px 12px; border: 1px solid #ecdec1; border-radius: 7px; background: #fbf7ed; color: #a18b5e; margin: 0 0 17px; }
.calendar-unknown svg { width: 14px; height: 14px; margin-top: 3px; }
.calendar-unknown.compact { margin: 15px 0 0; font-size: 10px; padding: 9px; }
.holiday-section { margin-top: 20px; }
.holiday-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.holiday-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 7px; padding: 13px; text-align: left; border: 1px solid #e6eadf; border-radius: 8px; background: #fbfcf8; color: #617957; }
.holiday-item:hover { background: #f0f5e8; border-color: #c2d0b4; }
.holiday-item > span { font-size: 12px; grid-column: 1; }
.holiday-item small { font-size: 9px; color: #97a08b; grid-column: 1; white-space: nowrap; }
.holiday-item svg { width: 12px; height: 12px; grid-column: 2; grid-row: 1 / 3; align-self: center; color: #9dae8e; }
.calendar-source { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #eef0e8; font-size: 10px; line-height: 1.9; color: #9aa390; overflow-wrap: anywhere; }
.calendar-source a { color: #708665; text-decoration: underline; text-underline-offset: 3px; }
.holiday-empty { margin: 0; font-size: 12px; color: #9a9b85; }
.roster-date { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #7b8a72; }
.roster-date .input { width: 164px; }
.roster-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 17px; color: #93a088; font-size: 11px; }
.roster-pagination > div { display: flex; gap: 8px; }
@media (max-width: 1250px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .calendar-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .calendar-detail { padding: 21px 18px 17px; }
  .calendar-day { padding: 8px 5px 7px; }
  .holiday-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-header { flex-direction: row; align-items: center; }
  .calendar-detail { position: static; }
  .calendar-day { padding: 9px 9px 7px; }
}
@media (max-width: 600px) {
  .calendar-live { display: none; }
  .calendar-intro { padding: 20px; }
  .calendar-intro h2 { font-size: 18px; }
  .calendar-intro p { font-size: 11px; }
  .intro-leaf { width: 47px; height: 47px; margin-right: 0; box-shadow: 0 0 0 10px #dce7ce50; }
  .intro-leaf svg { width: 25px; height: 25px; }
  .calendar-stats { padding: 14px 0; margin: 16px 0; }
  .calendar-stats > div { padding: 0 11px; }
  .calendar-stats > div > span { font-size: 9px; }
  .calendar-stats strong { font-size: 24px; }
  .calendar-stats small { margin-left: 3px; font-size: 9px; }
  .month-card { padding: 18px 12px 15px; }
  .calendar-header { flex-wrap: wrap; gap: 13px; margin-bottom: 19px; }
  .calendar-header h2 { font-size: 17px; }
  .calendar-header p { display: none; }
  .month-control { gap: 6px; }
  .month-picker input { width: 129px; }
  .calendar-grid { gap: 3px; }
  .calendar-day { height: 103px; padding: 7px 4px 6px; border-radius: 6px; }
  .solar-day { font-size: 15px; min-width: 22px; height: 22px; margin-left: -2px; }
  .day-kind { font-size: 8px; height: 14px; line-height: 14px; width: 14px; }
  .calendar-day-top { gap: 0; }
  .lunar-day { font-size: 9px; }
  .cell-status { font-size: 8px; letter-spacing: -.2px; gap: 1px; }
  .cell-status svg { display: none; }
  .cell-count strong { font-size: 11px; }
  .calendar-legend { gap: 9px 13px; margin-top: 14px; }
  .calendar-detail { padding: 23px; }
  .holiday-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .holiday-item { padding: 12px 10px; }
  .holiday-item small { white-space: normal; }
  .roster-tools { align-items: flex-start; flex-direction: column; }
  .roster-date { gap: 10px; }
}
@media (max-width: 380px) {
  .calendar-intro { padding: 18px 16px; }
  .intro-leaf { display: none; }
  .calendar-stats > div { padding: 0 8px; }
  .calendar-stats > div > span { font-size: 8px; }
  .calendar-day { padding-left: 3px; padding-right: 3px; }
  .solar-day { min-width: 18px; height: 20px; font-size: 13px; margin-left: -1px; }
  .day-kind { width: 11px; height: 13px; line-height: 13px; }
  .lunar-day { font-size: 8px; }
  .cell-count { font-size: 8px; gap: 2px; }
  .calendar-stats small { margin-left: 2px; }
}
