:root {
  color-scheme: light;
  --nav: #14263b;
  --nav-current: #233d50;
  --ink: #17273b;
  --muted: #59697b;
  --subtle: #edf1f4;
  --line: #dfe6ec;
  --canvas: #f4f7f9;
  --white: #fff;
  --accent: #106b56;
  --accent-dark: #0a5544;
  --mint: #e6f5ef;
  --radius: 14px;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', 'WenQuanYi Zen Hei', system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #199b80; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 1.5rem + .75vw, 2.25rem); letter-spacing: -.025em; line-height: 1.25; }
h2 { font-size: 1.15rem; line-height: 1.35; }
h3 { font-size: 1.04rem; }
.muted { color: var(--muted); }
.skip, .sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip:focus { clip-path: none; width: auto; height: auto; z-index: 10; padding: 10px; background: var(--white); }
.icon { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; font: 1.15em/1 system-ui, sans-serif; flex: none; }
.dot { background: currentColor; flex: none; width: 7px; height: 7px; border-radius: 50%; }

.with-sidebar { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--nav); color: #d4e2ec; display: flex; flex-direction: column; padding: 29px 15px 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; font-size: 1.16rem; color: #fff; line-height: 1.2; }
.sidebar .brand { margin: 0 10px 43px; }
.brand small { display: block; margin-top: 5px; color: #aec1d1; font-size: .75rem; font-weight: 450; }
.brand-mark { width: 39px; height: 39px; border-radius: 10px; background: #a4eacf; display: flex; align-items: end; justify-content: center; padding-bottom: 10px; gap: 3px; flex: none; }
.brand-mark i { display: block; width: 4px; border-radius: 1px; background: #114837; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 19px; }
.nav-label { margin: 0 11px 10px; font-size: .8rem; color: #a1b4c5; }
.nav-label-spaced { margin-top: 29px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; margin: 3px 0; padding: 10px 11px; border-radius: 8px; font-size: .95rem; min-height: 45px; }
.sidebar nav a:hover { background: #1d344c; color: #fff; }
.sidebar nav a[aria-current="page"] { background: var(--nav-current); color: #b1f5dd; font-weight: 700; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; color: #abbfce; font-size: .78rem; border-top: 1px solid #34485b; margin-top: auto; padding: 15px 8px 0; }
.sidebar-footer .dot { color: #83d3bc; }
.topbar { height: 65px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(18px, 2.8vw, 39px); gap: 14px; }
.topbar-section { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.topbar-section span { color: #7d8996; padding-inline: 4px; }
.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; cursor: pointer; list-style: none; gap: 9px; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; background: #dbece9; color: #245244; font-weight: 750; border-radius: 50%; width: 35px; height: 35px; flex: none; }
.user-info { max-width: 14rem; overflow-wrap: anywhere; font-size: .88rem; font-weight: 700; line-height: 1.3; }
.user-info small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; }
.chevron { width: 7px; height: 7px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); margin: -4px 0 0 5px; }
.user-actions { position: absolute; right: 0; top: calc(100% + 12px); background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #14263b15; min-width: 138px; padding: 4px; z-index: 4; }
.user-actions a, .user-actions button { display: block; width: 100%; border: 0; color: var(--ink); background: transparent; text-align: left; padding: 8px 10px; border-radius: 5px; font-size: .9rem; }
.user-actions a:hover, .user-actions button:hover { background: var(--canvas); }
.content { max-width: 1470px; margin: auto; padding: 31px clamp(18px, 2.8vw, 39px) 65px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title p { color: var(--muted); margin-top: 7px; }
.button, .user-actions button { transition: background-color .15s ease, border-color .15s ease; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; white-space: nowrap; min-height: 41px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-weight: 650; font-size: .9rem; line-height: 1.3; }
.button:hover { background: #eef3f6; border-color: #c2d0d9; }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { background: #e6f4ee; color: #0b614b; border-color: #cce4d9; }
.button.secondary:hover { background: #d5eee3; }
.button.small { padding: 7px 12px; min-height: 35px; font-size: .875rem; }
.button-group { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.button[aria-current="date"] { background: var(--mint); color: var(--accent-dark); border-color: #cbe3d8; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; min-width: 0; box-shadow: 0 1px 2px #17273b06; }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--subtle); }
.card-header p, .export-sheets p { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.card-body, .form-card { padding: 21px 22px; }
.form-card { max-width: 870px; }
.grid-header, .week-header, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.stat-grid.two-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
.stat { display: grid; grid-template-columns: min-content 1fr; column-gap: 12px; row-gap: 2px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.stat > span:nth-child(2) { color: var(--muted); font-size: .86rem; }
.stat-icon { display: grid; place-items: center; grid-row: span 2; height: 39px; width: 39px; border-radius: 9px; color: var(--accent-dark); background: var(--mint); flex: none; }
.stat-icon.sand { background: #fff2d9; color: #875900; }
.stat-icon.blue { background: #e9f0fe; color: #2d57a5; }
.stat-icon.rose { background: #fcebf0; color: #a33356; }
.stat strong { font-size: 1.48rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat small { font-size: .77rem; font-weight: 500; color: var(--muted); }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; padding: 15px 22px 19px; }
.calendar-day { display: grid; gap: 3px; padding: 10px 11px; min-width: 0; border: 1px solid var(--subtle); border-radius: 9px; font-variant-numeric: tabular-nums; }
.calendar-day span { color: var(--muted); font-size: .875rem; }
.calendar-day strong { font-size: 1.12rem; line-height: 1.25; }
.calendar-day small { color: var(--muted); font-size: .8rem; }
.calendar-day.weekend { background: #f6f8fa; }
.calendar-day.today { background: #e8f6ef; border-color: #addfcb; color: #135a45; }
.calendar-day.today span, .calendar-day.today small { color: #306451; }
.week-jump { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 0 22px 14px; }
.week-jump input[type="date"] { width: auto; min-height: 35px; padding: 5px 8px; }
.count-label { vertical-align: .13em; margin-left: 4px; display: inline-block; background: var(--subtle); color: var(--muted); border-radius: 20px; min-width: 25px; text-align: center; padding: 1px 7px; font-size: .78rem; }
.summary-pill { display: flex; align-items: center; gap: 6px; background: #fff2d9; color: #744e06; border-radius: 22px; padding: 6px 12px; font-size: .875rem; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--subtle); vertical-align: top; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
th { background: #f6f8fa; font-weight: 650; white-space: nowrap; color: #42556d; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfd; }
td small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.nowrap { white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; }
.project-cell { min-width: 134px; overflow-wrap: anywhere; white-space: pre-line; }
.description { min-width: 135px; max-width: 390px; overflow-wrap: anywhere; white-space: pre-wrap; }
.return-note { color: #9c3c57; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; color: #556575; background: #edf1f4; padding: 3px 8px; white-space: nowrap; font-size: .8rem; }
.badge .dot { width: 6px; height: 6px; }
.badge.pending { color: #755005; background: #fff2d9; }.badge.approved { color: #0b5d47; background: #e6f4ec; }.badge.returned { color: #962f50; background: #fbeaf0; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 3px 11px; min-width: 75px; }
.inline-actions a, .link-button, .text-link { color: var(--accent-dark); font-size: .875rem; font-weight: 650; white-space: nowrap; }
.inline-actions a:hover, .link-button:hover, .text-link:hover { text-decoration: underline; }
.link-button { border: 0; background: transparent; padding: 0; }
.danger-link { color: #a13451; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 33px 17px 36px; text-align: center; }
.empty p { color: var(--muted); font-size: .9rem; }
.empty .button { margin-top: 5px; }
.empty-icon { display: grid; place-items: center; height: 44px; width: 44px; border-radius: 12px; background: var(--mint); color: var(--accent-dark); margin-bottom: 3px; font-size: 1.25rem; }
.notice { padding: 10px 13px; border: 1px solid; margin-bottom: 18px; border-radius: 8px; font-size: .9rem; }
.notice.error { color: #83233b; border-color: #efc5d0; background: #fdf0f4; }
.notice.success { color: #0a5941; border-color: #b6dfce; background: #e9f8f0; }
.stack { display: grid; gap: 16px; }
label, legend { font-weight: 650; font-size: .9rem; color: #344862; }
label > :is(input,select,textarea) { margin-top: 6px; }
label small { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: 5px; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid #cdd8e0; border-radius: 7px; background: var(--white); color: var(--ink); font-size: .92rem; font-weight: 450; }
input[readonly] { background: var(--canvas); color: var(--muted); }
input::placeholder, textarea::placeholder { color: #6b7989; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 2px 0; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 30px; background: linear-gradient(45deg, transparent 48%, #516176 50%) calc(100% - 16px) 50%/5px 5px no-repeat, linear-gradient(135deg, #516176 48%, transparent 50%) calc(100% - 11px) 50%/5px 5px no-repeat, var(--white); text-overflow: ellipsis; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { margin-bottom: 7px; }
.entry-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.entry-days label > span { font-weight: 400; color: var(--muted); white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 18px; }
.form-grid.export-grid { grid-template-columns: minmax(86px,.65fr) minmax(92px,.65fr) minmax(160px,2fr); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-actions > span { margin-right: auto; font-size: .9rem; }
.form-card.narrow { max-width: 490px; }
.required { color: #a13451; margin-left: 4px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; min-width: 0; }
.filter-card { padding: 16px 22px; }
.filters label { min-width: 0; }
.filters .filter-project { flex: 1 1 170px; max-width: 300px; }
.filters input[type="date"] { width: auto; }
.filters input[type="search"] { min-width: 150px; }
.filters.compact { flex-wrap: nowrap; }
.review-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--subtle); }
.review-actions label { flex: 1 1 220px; }
.review-actions > span { align-self: end; padding-bottom: 9px; font-size: .88rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 22px; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--subtle); }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; margin-bottom: 0; }
.detail-grid .wide { grid-column: 1/-1; }
dt { color: var(--muted); font-size: .875rem; } dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 15px 0 0; }
.timeline li { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--subtle); }
.timeline-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: none; }
.timeline small { display: block; color: var(--muted); font-size: .8rem; margin: 2px 0; }
.timeline p { margin-top: 4px; }
.export-sheets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.export-sheets > div { display: flex; align-items: start; gap: 13px; padding: 20px 22px; }
.export-sheets > div + div { border-left: 1px solid var(--line); }

.public-content { min-height: 100vh; display: grid; place-content: center; padding: 28px 18px; }
.login-shell { display: grid; grid-template-columns: 1.12fr 1fr; width: min(850px, 92vw); border: 1px solid var(--line); background: var(--white); border-radius: 21px; overflow: hidden; box-shadow: 0 18px 48px #17273b16; }
.login-visual { position: relative; display: grid; align-content: space-between; gap: 38px; background: var(--nav); color: white; min-height: 460px; padding: 35px; }
.login-visual h1 { font-size: clamp(2.15rem, 4.5vw, 3rem); }
.login-visual p { margin-top: 15px; color: #bfceda; max-width: 21rem; }
.login-pattern { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 5px; height: 76px; }
.login-pattern i { border-radius: 6px 6px 0 0; background: #2b5865; height: 35%; }
.login-pattern i:nth-child(3n) { height: 55%; background: #397c82; }
.login-pattern i:nth-child(4n) { height: 75%; background: #5aa698; }
.login-pattern i:nth-child(7n) { height: 90%; background: #87cbb1; }
.login-pattern i:last-child { height: 100%; background: #a4eacf; }
.login-form { align-self: center; padding: 32px clamp(24px,4vw,45px); }
.login-form h2 { font-size: 1.55rem; }
.login-form p { margin: 6px 0 24px; font-size: .9rem; }
.login-form button { margin-top: 5px; }
@media (max-width: 1060px) {
  .with-sidebar { grid-template-columns: 190px minmax(0,1fr); }
  .stat { padding: 12px; column-gap: 7px; }
  .stat-icon { width: 32px; height: 32px; }
  .filters.compact { flex-wrap: wrap; }
  .filters.compact > :is(input,select) { width: auto; }
}
@media (max-width: 760px) {
  .with-sidebar { display: block; }
  .sidebar { position: static; height: auto; padding: 10px 14px 7px; }
  .sidebar .brand { margin: 0 0 6px; }
  .brand-mark { width: 34px; height: 34px; padding-bottom: 7px; }
  .sidebar .brand small, .sidebar-footer, .nav-label { display: none; }
  .sidebar nav { display: flex; gap: 3px; flex-wrap: wrap; }
  .sidebar nav a { margin: 0; padding: 5px 7px; min-height: 34px; font-size: .875rem; gap: 3px; }
  .sidebar nav a .icon { width: 1em; }
  .topbar { height: 53px; }
  .content { padding-top: 19px; }
  .page-title { margin-bottom: 16px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .card-header, .card-body, .form-card, .filter-card { padding: 14px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
  .week-grid { padding: 10px 14px 14px; gap: 4px; }
  .calendar-day { padding: 6px 3px; text-align: center; }
  .calendar-day span, .calendar-day small { font-size: .75rem; }
  .calendar-day strong { font-size: .94rem; }
  .entry-days { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .login-shell { grid-template-columns: 1fr; max-width: 470px; }
  .login-visual { min-height: 0; padding: 20px 24px 24px; gap: 14px; }
  .login-visual h1 { font-size: 1.8rem; }
  .login-visual br { display: none; }
  .login-visual p { margin-top: 7px; }
  .login-pattern { display: none; }
}
@media (max-width: 460px) {
  .page-title, .grid-header, .week-header { align-items: flex-start; flex-wrap: wrap; }
  .topbar-section { font-size: .82rem; }
  .user-info { max-width: 6rem; }
  .week-grid { padding-inline: 8px; gap: 3px; }
  .form-grid.export-grid, .export-sheets { grid-template-columns: 1fr; }
  .export-sheets > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .filters.compact { flex-wrap: wrap; }
  .filters.compact > input { width: min(100%, 193px); }
}
