:root {
  color-scheme: light;
  --ink: #172b24;
  --muted: #52685e;
  --green: #135946;
  --green-hover: #0c4938;
  --mint: #e9f5ef;
  --bg: #f3f7f5;
  --line: #dce7e0;
  --white: #fff;
  --red: #992b2b;
  --shadow: 0 16px 50px #123e2d12;
  font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, dl { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--green); }
:focus-visible { outline: 3px solid #269281; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 3; top: .5rem; left: .5rem; background: white; padding: .5rem; }
h1 { line-height: 1.1; font-size: clamp(1.8rem, 4vw, 2.55rem); letter-spacing: -.045em; font-weight: 730; }
h2 { line-height: 1.2; font-size: 1.2rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.eyebrow { font-size: .74rem; text-transform: uppercase; font-weight: 750; letter-spacing: .1em; color: var(--green); }
label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 650; }
input:not([type="checkbox"]), select, textarea {
  border: 1px solid #c9d9d0;
  border-radius: .55rem;
  min-width: 0;
  padding: .62rem .7rem;
  min-height: 2.6rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 400;
}
input[type="checkbox"] { accent-color: var(--green); width: 1rem; height: 1rem; }
input[readonly] { background: var(--bg); }
textarea { min-height: 6rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: .65rem; font-weight: 710; }
.field-hint { font-weight: 400; color: var(--muted); font-size: .83rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  padding: .57rem .9rem;
  min-height: 2.5rem;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: .87rem;
  cursor: pointer;
}
.button:disabled { opacity: .54; cursor: not-allowed; }
.primary { color: var(--white); background: var(--green); }
.primary:hover:not(:disabled) { background: var(--green-hover); }
.outline { color: var(--green); border-color: #cdded4; }
.outline:hover:not(:disabled), .quiet:hover:not(:disabled) { background: var(--mint); }
.quiet { color: var(--green); background: transparent; }
.danger { background: #fff7f5; color: var(--red); border-color: #f2d2ca; }
.danger:hover:not(:disabled) { background: #fce9e6; }
.link-button { padding: 0; border: 0; background: none; color: var(--green); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; text-align: left; font-weight: 680; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(ellipse at 10% 15%, #d9eee2, transparent 65%), var(--bg); }
.login-card { width: min(100%, 32rem); background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 1.3rem; padding: clamp(1.35rem, 6vw, 2.8rem); }
.login-card h1 { font-size: clamp(1.65rem, 5vw, 2.15rem); margin-bottom: .6rem; }
.login-brand { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; padding-bottom: 1.4rem; margin-bottom: 1.45rem; border-bottom: 1px solid var(--line); }
.login-brand img:first-child { width: min(45%, 10rem); }
.login-brand img:last-child { width: min(36%, 6rem); }
.login-card form { display: grid; gap: .95rem; margin: 1.5rem 0 1.1rem; }
.login-help { font-size: .85rem; color: var(--muted); }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner, .workspace { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; min-height: 4.7rem; }
.topbar-actions, .brand, .actions, .inline, .heading, .panel-head { display: flex; align-items: center; gap: .65rem; }
.topbar-actions, .actions, .inline { flex-wrap: wrap; }
.brand img { display: block; width: auto; max-width: 9rem; height: 1.7rem; object-fit: contain; }
.brand img[src="/assets/dgs.png"] { height: 2.4rem; }
.brand-name { border-left: 1px solid var(--line); padding-left: .7rem; font-weight: 690; white-space: nowrap; }
.workspace { padding-block: 2.5rem 3rem; }
.heading { justify-content: space-between; align-items: end; margin-bottom: 1.8rem; gap: 1rem; }
.heading .eyebrow { margin-bottom: .4rem; }
.heading .muted { margin-top: .48rem; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: 1.3rem; border-bottom: 1px solid #cdded4; }
.tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: .75rem .9rem; white-space: nowrap; font-weight: 650; color: var(--muted); cursor: pointer; }
.tabs button[aria-current] { border-color: var(--green); color: var(--green); }
.tabs button:hover { background: var(--mint); }
.tabs button:focus-visible { outline-offset: -3px; }
.notice, .form-error { padding: .7rem .9rem; font-size: .89rem; border-radius: .55rem; }
.notice { background: var(--mint); color: #1b503e; margin-bottom: 1rem; }
.notice.error, .form-error { background: #fdeceb; color: #8f2929; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: .95rem; padding: 1.2rem; box-shadow: 0 4px 16px #123e2d06; margin-bottom: 1rem; }
.panel-head { justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head .muted { margin-top: .3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { display: grid; align-content: start; gap: .35rem; border-radius: .8rem; padding: 1rem; background: var(--white); border: 1px solid var(--line); text-align: left; color: var(--ink); }
button.stat { cursor: pointer; }
button.stat:hover { background: #fafffc; border-color: #8db9ab; }
.stat-title { font-size: .83rem; font-weight: 690; color: var(--muted); }
.stat strong { color: var(--green); font-size: 1.6rem; line-height: 1.1; letter-spacing: -.035em; }
.stat small { font-size: .74rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(8rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.filters.people-filters { grid-template-columns: minmax(12rem, 24rem) 10rem; }
.panel .actions { margin-bottom: .85rem; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; text-align: left; font-size: .87rem; }
th, td { padding: .7rem .63rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); background: #f5f8f6; font-weight: 650; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: .3rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: .7rem; }
.badge { display: inline-block; padding: .18rem .55rem; font-size: .75rem; font-weight: 680; border-radius: 20rem; white-space: nowrap; background: #edf1ef; color: #415b51; }
.badge.pending { background: #fff1d6; color: #735013; }
.badge.approved, .badge.active { background: #e4f4ec; color: #205a46; }
.badge.rejected, .badge.ended { background: #fdeceb; color: #942e2e; }
.badge.manager { background: #e7efff; color: #314d86; }
dialog { border: 1px solid var(--line); border-radius: 1rem; padding: 0; color: var(--ink); background: var(--white); box-shadow: var(--shadow); width: min(46rem, calc(100% - 1.5rem)); max-height: calc(100% - 2rem); }
dialog::backdrop { background: #132d25a0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); }
.dialog-content { padding: 1.1rem 1.15rem; }
.dialog-content > * + *, form.stack > * + * { margin-top: .75rem; }
.close { min-width: 2.3rem; padding: 0; font-size: 1.45rem; }
.form-grid, .details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.form-grid .wide { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; gap: .45rem; }
.details > div { padding: .6rem .7rem; border-radius: .55rem; background: var(--bg); overflow-wrap: anywhere; }
.details dt { font-size: .76rem; font-weight: 670; color: var(--muted); }
.details dd { margin: .2rem 0 0; white-space: pre-wrap; }
.details.no-fill > div { background: transparent; padding: .15rem 0; }
.section-list { display: grid; gap: .75rem; }
.section-list details, .policy-item { border: 1px solid var(--line); border-radius: .65rem; padding: .75rem; }
summary, .policy-item strong { font-weight: 670; }
summary { cursor: pointer; }
summary + * { margin-top: .65rem; }
.log { list-style: none; padding: 0; margin-bottom: 0; }
.log li { padding-block: .55rem; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar .weekday { text-align: center; font-size: .75rem; font-weight: 670; color: var(--muted); }
.calendar .day { min-height: 3.7rem; border-radius: .3rem; background: var(--bg); padding: .3rem; font-size: .72rem; overflow-wrap: anywhere; }
.calendar .day strong { display: block; margin-bottom: .2rem; }
.calendar .on-leave { display: block; padding: .065rem .18rem; margin: .1rem 0; background: #daeee3; border-radius: .2rem; }
.calendar-people { max-height: 9rem; overflow: auto; }
@media (max-width: 860px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 580px) {
  .topbar-inner, .workspace { width: calc(100% - 1.5rem); }
  .topbar-inner, .heading { align-items: start; flex-direction: column; }
  .topbar-actions { gap: .35rem; }
  .workspace { padding-top: 1.3rem; }
  .panel { padding: .83rem; }
  .tabs { flex-wrap: wrap; gap: .1rem; }
  .tabs button { padding: .55rem .48rem; font-size: .84rem; }
  .filters, .filters.people-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters > label:first-child { grid-column: 1 / -1; }
  .stat strong { font-size: 1.4rem; }
  .form-grid, .details { grid-template-columns: 1fr; }
}
