:root {
  --ink: #101a2b;
  --muted: #718096;
  --line: #e8eeec;
  --surface: #ffffff;
  --page: #f6f9f8;
  --green: #168f73;
  --green-dark: #07584d;
  --green-soft: #e8f7f1;
  --orange: #ff8a1d;
  --orange-soft: #fff2e4;
  --danger: #d94c4c;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.mobile-shell { max-width: 390px; margin: 0 auto; min-height: 100vh; background: #fbfdfc; padding-bottom: 92px; }
.mobile-main { padding: 12px 14px 14px; }
.mobile-header { height: 46px; display: grid; grid-template-columns: minmax(0, 1.25fr) auto auto; align-items: center; gap: 12px; margin-bottom: 8px; }
.mobile-header .logo { font-size: clamp(21px, 6vw, 29px); font-weight: 850; letter-spacing: -.04em; white-space: nowrap; }
.mobile-header .date, .mobile-header .name { color: #263448; font-weight: 650; white-space: nowrap; font-size: 14px; }
.hero-card { background: linear-gradient(145deg, #f0fbf7, #e9f8f2); border-radius: 18px; padding: 17px 16px 14px; margin-bottom: 10px; box-shadow: 0 10px 26px rgba(21, 78, 66, .05); }
.status-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 850; }
.status-dot { width: 13px; height: 13px; border-radius: 99px; background: var(--orange); box-shadow: 0 0 0 6px var(--orange-soft); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 15px 0 13px; }
.timer { color: var(--green-dark); font-size: 43px; line-height: .95; font-weight: 800; letter-spacing: -.055em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer-caption { color: #5d6f82; margin-top: 10px; font-size: 14px; }
.scene { border-left: 1px solid #cfe3dd; padding-left: 12px; text-align: center; min-width: 72px; }
.scene .material-icons-round { font-size: 29px; }
.scene small { display: block; color: #617083; margin-top: 5px; }
.scene strong { display: block; margin-top: 3px; font-size: 17px; }
.primary-button { display: inline-flex; width: 100%; min-height: 47px; border: 0; border-radius: 999px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; background: var(--green); color: white; font-weight: 750; font-size: 16px; box-shadow: 0 9px 22px rgba(22,143,115,.15); }
.primary-button:hover { background: #117d65; }
.primary-button:focus-visible, .secondary-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(22,143,115,.25); outline-offset: 2px; }
.hero-footnote { text-align: center; color: #617083; margin: 8px 0 0; font-size: 12px; }
.section-card { background: var(--surface); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 7px 24px rgba(24, 51, 44, .045); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.section-head a, .section-head span { color: #718096; font-size: 13px; }
.timeline { position: relative; display: grid; gap: 12px; }
.timeline:before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 13px; width: 1px; background: #dbe6e2; }
.timeline-row { position: relative; display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: start; }
.timeline-dot { width: 14px; height: 14px; border: 3px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--green-soft); z-index: 1; margin-top: 3px; }
.timeline-dot.live { background: var(--orange); box-shadow: 0 0 0 2px #ffe4c7; }
.timeline-main strong { font-size: 15px; }
.timeline-main span { color: #47566a; margin-left: 8px; font-variant-numeric: tabular-nums; }
.timeline-main small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.status-pill { padding: 6px 11px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.live { background: var(--orange-soft); color: var(--orange); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric { padding: 0 8px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 0; }
.metric:last-child { border: 0; padding-right: 0; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; font-size: 18px; margin: 5px 0 3px; letter-spacing: -.04em; white-space: nowrap; }
.simple-row { display: flex; align-items: center; gap: 14px; }
.simple-row .material-icons-round { width: 36px; height: 36px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border-radius: 50%; }
.simple-row .grow { flex: 1; }
.simple-row strong, .simple-row small { display: block; }
.simple-row small { color: var(--muted); margin-top: 4px; }
.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 390px); height: calc(74px + env(safe-area-inset-bottom)); padding: 8px 18px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid #e6ecea; backdrop-filter: blur(14px); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #718096; gap: 2px; font-size: 12px; }
.bottom-nav a.active { color: var(--green); font-weight: 700; }
.bottom-nav .material-icons-round { font-size: 25px; }
.page-title { margin: 6px 0 4px; font-size: 28px; }
.page-subtitle { color: var(--muted); margin: 0 0 20px; }
.back-link { display: inline-flex; align-items: center; gap: 3px; min-height: 36px; color: var(--green-dark); font-size: 14px; font-weight: 700; }
.back-link .material-icons-round { font-size: 20px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.add-button { display: inline-flex; align-items: center; gap: 3px; padding: 7px 12px; border-radius: 999px; background: var(--green); color: white; font-size: 14px; font-weight: 700; white-space: nowrap; }
.add-button .material-icons-round { font-size: 20px; }
.work-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.work-totals > div { min-width: 0; border-radius: 13px; background: var(--green-soft); padding: 12px; }
.work-totals span, .work-totals strong { display: block; }
.work-totals span { color: #557166; font-size: 12px; }
.work-totals strong { margin-top: 5px; color: var(--green-dark); font-size: clamp(14px,4vw,18px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.work-totals-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-weight: 650; }
.settings-row .material-icons-round { color: var(--muted); }
.form-stack { display: grid; gap: 14px; }
.form-stack label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #dce6e3; border-radius: 13px; background: white; padding: 13px 14px; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
.file-input { border: 1.5px dashed #bcd6ce; background: #f7fcfa; padding: 20px; text-align: center; border-radius: 16px; }
.file-input input { border: 0; padding: 0; margin-top: 10px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 1px solid #bed5ce; border-radius: 999px; background: white; color: var(--green-dark); font-weight: 700; }
.danger-button { border-color: #f0c1c1; color: var(--danger); }
.record-list { display: grid; gap: 10px; }
.record { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record strong, .record small { display: block; }
.record small { color: var(--muted); margin-top: 4px; }
.empty-state { padding: 30px 15px; text-align: center; color: var(--muted); }
.flash { position: fixed; z-index: 50; top: 14px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 28px), 480px); padding: 13px 16px; border-radius: 13px; background: #173f37; color: white; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.flash-error, .inline-error { background: #fff0f0; color: #a63131; }
.pwa-update { position: fixed; z-index: 70; left: 50%; bottom: 105px; transform: translateX(-50%); width: min(360px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; color: white; background: #102f29; box-shadow: 0 12px 30px #102f2940; }
.pwa-update[hidden] { display: none; }
.pwa-update button { border: 0; border-radius: 99px; padding: 8px 13px; color: #07584d; background: #e8f7f1; font: inherit; font-weight: 700; }
.inline-error { border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at top, #eaf8f2, transparent 46%), #f5f8f7; }
.login-card { width: min(100%, 420px); background: white; border-radius: 26px; padding: 30px; box-shadow: 0 24px 70px rgba(15, 76, 62, .11); }
.brand-mark { color: var(--green); font-weight: 850; font-size: 18px; }
.login-card h1 { margin: 20px 0 6px; font-size: 30px; }
.muted { color: var(--muted); }
.demo-note { margin-top: 18px; padding: 12px; border-radius: 12px; background: #fff8e9; color: #71552a; font-size: 13px; line-height: 1.65; }
.desktop-shell { background: #f3f6f5; min-height: 100vh; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.admin-sidebar { background: #102f29; color: white; padding: 26px 18px; }
.admin-brand { font-weight: 850; font-size: 22px; margin: 0 10px 28px; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { padding: 11px 12px; border-radius: 10px; color: #c5d8d3; }
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,.1); color: white; }
.admin-main { padding: 30px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-topbar h1 { margin: 0; font-size: 28px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.admin-card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 6px 24px rgba(24,51,44,.04); }
.admin-card h2 { margin: 0 0 16px; font-size: 18px; }
.admin-card .big-number { font-size: 32px; font-weight: 800; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; }
.admin-form-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; }
.cleanup-form { display: grid; grid-template-columns: minmax(220px,280px) 170px 180px; gap: 12px; align-items: end; }
.notification-table { min-width: 940px; table-layout: fixed; }
.notification-table th:nth-child(1) { width: 90px; }
.notification-table th:nth-child(2) { width: 145px; }
.notification-table th:nth-child(3) { width: 340px; }
.notification-bind-form { display: flex; align-items: end; gap: 10px; }
.notification-bind-form label { flex: 1; min-width: 260px; }
.notification-bind-form input { width: 100%; }
.notification-bind-form button { white-space: nowrap; }
.admin-form-row .primary-button { min-height: 47px; font-size: 14px; }
.leave-date-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 10px; }
.leave-date-grid label, .leave-date-grid input, .leave-date-grid select { min-width: 0; max-width: 100%; }
.leave-check { display: flex !important; align-items: center; gap: 9px !important; }
.leave-check input { width: auto; }
.leave-preview { border-radius: 14px; background: var(--green-soft); padding: 15px; margin-top: 16px; }
.leave-preview p { margin: 8px 0; color: #375d52; font-size: 14px; }
.leave-preview form { margin-top: 14px; }
.leave-record { padding: 13px 0; border-bottom: 1px solid var(--line); }
.leave-record:last-child { border-bottom: 0; }
.leave-record > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.leave-record small { display: block; color: var(--muted); margin: 6px 0; line-height: 1.5; }
.leave-record form { margin-top: 10px; }
.leave-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.leave-actions .primary-button { width: auto; flex: 1; }
.leave-actions form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.leave-actions form input { min-width: 160px; flex: 1; }
.leave-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.table-wrap { overflow-x: auto; }
.approval-form { display: grid; gap: 8px; min-width: 180px; margin-top: 9px; }
@media (max-width: 820px) {
  .cleanup-form { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; padding: 16px; }
  .admin-brand { margin: 0 0 12px; }
  .admin-nav { grid-template-columns: repeat(3, 1fr); }
  .admin-nav a { text-align: center; padding: 8px; font-size: 13px; }
  .admin-main { padding: 18px 14px; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .span-4 { grid-column: 1 / -1; }
  .admin-form-row { grid-template-columns: 1fr 1fr; }
  .leave-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .leave-form-grid { grid-template-columns: 1fr; }
  .mobile-shell .leave-date-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 390px) {
  .mobile-header { gap: 9px; }
  .mobile-header .logo { font-size: 20px; }
  .mobile-header .date, .mobile-header .name { font-size: 12px; }
  .hero-grid { grid-template-columns: 1fr; }
  .scene { border-left: 0; border-top: 1px solid #cfe3dd; padding: 13px 0 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
  .scene small, .scene strong { display: inline; margin: 0; }
}
