:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f6f7f9;
  --brand: #0b6bcb;
  --line: #d8dee6;
  --good: #12805c;
  --bad: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { border: 0; border-radius: 6px; padding: 10px 13px; background: var(--brand); color: #fff; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px; background: #fff; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 650; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: 0; }
.dropdown-checks { position: relative; }
.dropdown-checks summary { list-style: none; width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px; background: #fff; cursor: pointer; }
.dropdown-checks summary::-webkit-details-marker { display: none; }
.dropdown-checks summary::after { content: "v"; float: right; color: #667385; }
.dropdown-checks[open] summary::after { content: "^"; }
.dropdown-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 2px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 14px 34px #15203324; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; font-weight: 600; }
.check-row:hover { background: #eef6ff; }
.check-row input { width: auto; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.panel, .card { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.panel { padding: 18px; box-shadow: 0 10px 28px #15203314; }
.login .panel { width: min(430px, 100%); }
.app { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.top { height: 56px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.shell { display: grid; grid-template-columns: 1fr; }
.nav { position: fixed; top: 56px; bottom: 0; left: 0; z-index: 15; width: min(82vw, 280px); display: grid; align-content: start; gap: 6px; overflow: auto; padding: 12px; background: #fff; border-right: 1px solid var(--line); box-shadow: 18px 0 45px #11182722; transform: translateX(-105%); transition: transform .18s ease; }
.menu-open .nav { transform: translateX(0); }
.nav-backdrop { display: none; position: fixed; inset: 56px 0 0; z-index: 14; background: #11182755; }
.menu-open .nav-backdrop { display: block; }
.nav button { display: flex; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; background: #fff; color: #1d2733; border: 1px solid transparent; white-space: nowrap; text-align: left; }
.nav button.active { color: var(--brand); border-color: var(--brand); background: #eef6ff; }
.user-button { max-width: min(52vw, 320px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar { display: flex; gap: 6px; overflow: auto; align-items: flex-end; min-height: 48px; max-height: 48px; border-bottom: 1px solid var(--line); }
.tabbar button { height: 48px; min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; color: #1d2733; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; white-space: nowrap; }
.tabbar button.active { color: var(--brand); background: #eef6ff; border-color: var(--brand); }
.main { padding: 14px; display: grid; gap: 14px; align-content: start; }
.grid, .cards { display: grid; gap: 12px; align-content: start; }
.cols { display: grid; gap: 12px; align-content: start; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule-list { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.holiday-lists { display: grid; gap: 12px; align-content: start; }
.vacation-history { display: grid; gap: 8px; margin-top: 12px; }
.vacation-history > div { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.vacation-history strong { font-size: 1.2rem; }
.vacation-history small { grid-column: 2 / -1; color: #667385; }
.card { padding: 12px; }
.panel > .card + .card { margin-top: 10px; }
.muted { color: #667385; }
.hidden { display: none !important; }
.ghost { background: #eef2f7; color: #17202a; }
.icon-only { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; }
.ok { background: var(--good); }
.danger { background: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: .82rem; background: #fff; }
.template-locale { width: auto; background: #fff; color: #17202a; font-weight: 650; }
.template-locale.has-template { background: #effaf4; border-color: #8fd6a6; color: #0f6b47; }
.rule-pill { gap: 8px; }
.pill-x { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 999px; background: #eef2f7; color: #17202a; font-size: .75rem; line-height: 1; }
.pill-x:hover { background: var(--bad); color: #fff; }
.msg { padding: 10px; border-radius: 6px; background: #effaf4; border: 1px solid #b7ebc6; }
.msg.warn { background: #fff8e6; border-color: #ffd666; }
.msg.bad { background: #fff1f0; border-color: #ffa39e; }
.calendar { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px; }
.months { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 0 12px 14px; }
.month h3 { text-align: center; font-size: 1rem; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.day, .weekday { aspect-ratio: 1; display: grid; place-items: center; border-radius: 999px; }
.weekday { font-weight: 700; font-size: .8rem; }
.day { background: #fff; color: #111; padding: 0; }
.day.range { background: #e8f2ff; }
.day.sel { outline: 2px solid #086fff; color: #086fff; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 14px; background: #11182799; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 24px 70px #11182755; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }
.profile-password { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (min-width: 860px) {
  .shell { grid-template-columns: 220px 1fr; }
  .menu-toggle, .nav-backdrop { display: none; }
  .nav { position: sticky; top: 56px; bottom: auto; left: auto; z-index: auto; width: auto; transform: none; box-shadow: none; display: grid; align-content: start; border-right: 1px solid var(--line); border-bottom: 0; min-height: calc(100vh - 56px); }
  .main { padding: 22px; }
  .cols { grid-template-columns: 1.1fr .9fr; }
  .holiday-lists { grid-template-columns: 1fr 1fr; }
  .months { grid-template-columns: 1fr 1fr; }
}
