:root {
  --bg: #f4f6f3; --card: #fff; --ink: #1c2420; --mute: #66726b; --line: #dfe5df;
  --brand: #2f7d4f; --brand-ink: #fff; --brand-soft: #e6f2ea;
  --warn: #b25c00; --warn-soft: #fff3e0; --bad: #b3261e; --bad-soft: #fdecea; --ok: #1e6b3c; --ok-soft: #e3f4e8;
  --info-soft: #e8eef9; --info: #2a4d8f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif; }
#app { max-width: 720px; margin: 0 auto; padding: 12px 16px 96px; min-height: 100vh; }
h1 { font-size: 20px; margin: 0; } h2 { font-size: 17px; margin: 20px 0 8px; } h3 { font-size: 15px; margin: 0 0 4px; }
p { margin: 6px 0; } small, .mute { color: var(--mute); font-size: 13px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 12px; }
.top .who { min-width: 0; } .top .who div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; }
.row { display: flex; gap: 10px; align-items: center; } .row > * { min-width: 0; } .grow { flex: 1; } .wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--brand-soft); border-radius: 12px; padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 24px; line-height: 1.1; } .stat span { font-size: 12px; color: var(--mute); }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 14px; min-height: 48px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.danger { color: var(--bad); border-color: #e9b8b4; } .wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; font-weight: 600; }
.block { width: 100%; } .small { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.link { border: 0; background: none; color: var(--brand); padding: 8px 4px; min-height: 44px; text-decoration: underline; }
label { display: block; font-size: 14px; color: var(--mute); margin: 12px 0 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 12px; min-height: 48px; border: 1px solid #c9d2ca; border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 84px; resize: vertical; } input[type=file] { padding: 10px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #9fd0b3; outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types button { flex-direction: column; align-items: flex-start; text-align: left; min-height: 64px; }
.types button small { font-size: 12px; } .types button.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; } .seg button.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.pending { background: var(--warn-soft); color: var(--warn); } .chip.approved, .chip.auto_recorded { background: var(--ok-soft); color: var(--ok); }
.chip.rejected { background: var(--bad-soft); color: var(--bad); } .chip.cancelled { background: #eceeec; color: var(--mute); }
.chip.type { background: var(--info-soft); color: var(--info); }
.note { border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.note.warn { background: var(--warn-soft); color: #6b3a00; } .note.bad { background: var(--bad-soft); color: #7a1a14; }
.note.ok { background: var(--ok-soft); color: #14502b; } .note.info { background: var(--info-soft); color: #1d3766; }
.list > .item { padding: 12px 0; border-top: 1px solid var(--line); } .list > .item:first-child { border-top: 0; }
.days { width: 100%; border-collapse: collapse; font-size: 14px; } .days td { padding: 5px 0; border-top: 1px dashed var(--line); } .days td:last-child { text-align: right; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs button { border: 0; border-radius: 10px; min-height: 52px; font-size: 13px; flex-direction: column; gap: 2px; padding: 4px 2px; color: var(--mute); position: relative; }
.tabs button.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; } .tabs .ico { font-size: 20px; line-height: 1; }
.badge { position: absolute; top: 4px; right: 18%; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; padding: 0 5px; line-height: 18px; }
.modal { position: fixed; inset: 0; background: rgba(20, 30, 24, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.modal > div { background: #fff; width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.toast { position: fixed; left: 16px; right: 16px; bottom: 84px; margin: 0 auto; max-width: 480px; background: #1c2420; color: #fff; padding: 12px 14px; border-radius: 12px; z-index: 30; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; } .cal div { text-align: center; font-size: 13px; padding: 7px 0; border-radius: 8px; min-height: 38px; }
.cal .h { color: var(--mute); font-size: 12px; min-height: 0; } .cal .off { color: #b5bdb7; } .cal .has { background: var(--warn-soft); font-weight: 700; } .cal .hol { background: var(--bad-soft); } .cal .today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal button { all: unset; display: block; width: 100%; cursor: pointer; }
.login { max-width: 420px; margin: 8vh auto 0; }
.center { text-align: center; } .right { text-align: right; } .mt { margin-top: 12px; } .hide { display: none !important; }
.scroll-x { overflow-x: auto; } table.grid { width: 100%; border-collapse: collapse; font-size: 14px; } table.grid th, table.grid td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; } table.grid th { color: var(--mute); font-weight: 500; font-size: 12px; }
img.proof { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
@media (min-width: 560px) { .modal { align-items: center; } .modal > div { border-radius: 18px; } }
.two > div, .stats > div, .types > button { min-width: 0; }
input[type=date], input[type=time], input[type=month] { min-width: 0; max-width: 100%; padding-left: 8px; padding-right: 6px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 46px; height: auto; flex: none; }
.login .logo { width: 64px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions > button { width: 100%; height: 100%; min-height: 56px; }
.actions > button:only-child { grid-column: 1 / -1; }
