:root {
  --ink: #172e2b;
  --muted: #506963;
  --green: #235d4b;
  --green-dark: #143c33;
  --lime: #d5ee9e;
  --line: #dfe9e4;
  --bg: #f4f7f6;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); letter-spacing: -.045em; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { line-height: 1.5; }
button, input { font: inherit; }
button, input:not([type="checkbox"]) { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); }
input:not([type="checkbox"]) { width: 100%; padding: .65rem .8rem; color: var(--ink); }
input[type="checkbox"] { accent-color: var(--green); width: 1.2rem; height: 1.2rem; }
button { background: white; color: var(--green-dark); padding: .65rem 1rem; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:hover { background: #edf5ef; }
:focus-visible { outline: 3px solid #87b854; outline-offset: 2px; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover { background: var(--green-dark); color: white; }
.subtle { background: transparent; border-color: transparent; }
.masthead { background: var(--green-dark); color: white; padding: .8rem clamp(1rem, 4vw, 3rem); min-height: 68px; display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.brand { color: var(--lime); font-size: 1.6rem; letter-spacing: -.04em; font-weight: 650; display: flex; align-items: center; gap: .65rem; }
.brand-mark { width: 29px; display: grid; justify-items: end; gap: 3px; transform: rotate(-7deg); }
.brand-mark i { background: currentColor; width: 28px; height: 5px; border-radius: 4px; }
.brand-mark i:nth-child(2) { width: 21px; }
.brand-mark i:nth-child(3) { width: 14px; }
.session { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; text-align: end; min-width: 0; }
.session button { border-color: #adc7ba; color: white; font-size: .9rem; }
.session button:hover { color: var(--ink); }
main { max-width: 76rem; margin: 0 auto; padding: clamp(1rem, 5vw, 3.5rem); }
.frame { max-width: 60rem; margin: 2rem auto; display: grid; grid-template-columns: 1fr 1fr; }
.intro { background: var(--green-dark); color: white; border-radius: 18px 0 0 18px; padding: clamp(1.5rem, 5vw, 3.5rem); display: flex; align-items: center; }
.intro p { font-size: clamp(1.4rem, 3vw, 2.5rem); font-weight: 550; letter-spacing: -.04em; line-height: 1.2; }
.panel { background: white; border: 1px solid var(--line); border-radius: 18px; }
.auth { padding: clamp(1rem, 5vw, 2.75rem); border-radius: 0 18px 18px 0; }
form { display: grid; gap: 1rem; }
label:not(.checkbox) { display: grid; gap: .4rem; font-weight: 550; }
.checkbox { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; }
.message { color: var(--muted); margin: .7rem 0; }
.message:empty { margin: 0 0 .5rem; }
#secret { display: block; overflow-wrap: anywhere; background: #edf5ef; padding: .75rem; border-radius: 10px; }
#recovery-codes { font-family: ui-monospace, monospace; padding-inline-start: 1.4rem; line-height: 1.65; }
.section-header, .actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.section-header { justify-content: space-between; margin-bottom: .5rem; }
.member-list { display: grid; gap: .75rem; }
.member-card { display: grid; grid-template-columns: 1.3fr 1fr .6fr auto; align-items: center; gap: 1rem; padding: 1rem; }
.member-card p { color: var(--muted); overflow-wrap: anywhere; }
.profile { padding: 1.25rem; }
dialog { border: 1px solid var(--line); color: var(--ink); border-radius: 18px; width: min(100% - 2rem, 35rem); }
dialog::backdrop { background: #0d2924a0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; }
.week { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 805px) {
  .member-card { grid-template-columns: 1fr 1fr; }
  .member-card .actions { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .frame { grid-template-columns: minmax(0, 1fr); margin-top: .35rem; }
  .intro { border-radius: 18px 18px 0 0; }
  .auth { border-radius: 0 0 18px 18px; }
  .member-card { grid-template-columns: 1fr; gap: .65rem; }
  .session { gap: .4rem; }
  .session button { padding-inline: .6rem; }
}


#workspace-navigation { margin-bottom: 1rem; }
select { color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; padding: .65rem; font: inherit; min-height: 44px; max-width: 100%; }
.calendar-toolbar { margin: .75rem 0; }
#calendar-month { width: auto; max-width: 100%; }
#calendar-month-title { margin: .85rem 0; text-transform: capitalize; }
.calendar-balances { display: flex; gap: .85rem; flex-wrap: wrap; padding: .85rem 1rem; margin: .7rem 0; }
.calendar-balances span { color: var(--muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.weekday { min-width: 0; overflow-wrap: anywhere; padding-block: .25rem; color: var(--muted); font-size: .875rem; }
.day { background: white; border: 1px solid var(--line); border-radius: 9px; padding: .35rem; min-width: 0; }
.day-number { display: block; margin: 0 0 .2rem; font-weight: 600; }
.half-day { width: 100%; min-height: 29px; padding: .15rem; border-radius: 5px; margin-top: .2rem; font-size: .8rem; }
.half-day[data-kind="off"] { background: #f1f3f2; color: var(--muted); }
.half-day[data-kind="LEAVE"] { background: #d5ee9e; }
.half-day[data-kind="RECOVERY"] { background: #eae5f8; }
.half-day[data-kind="REINFORCEMENT"] { background: #e5effa; }
.half-day[data-kind="SICKNESS"] { background: #fff0db; }
.half-day[data-state="PENDING"] { border-style: dashed; border-color: #94652b; }
.half-label { margin-left: .25rem; }
.request-list { margin: .85rem 0; display: grid; gap: .5rem; }
.request-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; background: white; border: 1px solid var(--line); border-radius: 9px; padding: .55rem .75rem; }
.request-row small { display: block; color: var(--muted); }
.event-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 805px) { .half-label { display: none; } }
@media (max-width: 440px) { .calendar-grid { gap: .2rem; } .day { padding: .2rem; } .calendar-toolbar { gap: .35rem; } }
.half-day[data-kind='closure'] { background: #f2ede2; }


.record-controls { margin: .8rem 0; }
#records-month { width: auto; max-width: 100%; }
.record-controls input[type="number"] { max-width: 8rem; }
.record-list { display: grid; gap: .7rem; }
.record-card { padding: 1rem; display: grid; gap: .7rem; }
.record-card .actions { justify-content: flex-start; }
.record-card button { justify-self: start; }
.upload-form, .approval-form { align-items: end; display: flex; gap: .65rem; flex-wrap: wrap; }
.upload-form label, .approval-form label { min-width: 0; }
.upload-form input { max-width: 100%; }
.text-link { display: inline-block; padding: .55rem 0; color: var(--green-dark); font-weight: 600; }
#preview-dialog { width: min(100% - 2rem, 52rem); }
#preview-image { display: block; max-width: 100%; max-height: 65vh; margin: .8rem auto; object-fit: contain; }
#preview-page { margin-bottom: .5rem; }
.payroll-day > span { display: block; background: #eff5ea; padding: .2rem; margin-top: .25rem; font-size: .875rem; overflow-wrap: anywhere; }
.demo-qr { width: 12rem; max-width: 100%; }
.report-card summary { cursor: pointer; font-weight: 650; }
.table-scroll { overflow: auto; margin-top: 1rem; max-width: 100%; }
.table-scroll table { width: 100%; min-width: 43rem; border-collapse: collapse; text-align: left; }
.table-scroll th, .table-scroll td { padding: .55rem; border-bottom: 1px solid var(--line); }
.plain-list { margin-top: 0; }
#current-user { overflow-wrap: anywhere; }
#rotation-secret, #rotation-codes { overflow-wrap: anywhere; }
