:root {
  --ink: #15251f;
  --muted: #68746f;
  --line: #dce4df;
  --paper: #ffffff;
  --canvas: #f4f7f5;
  --forest: #123c2d;
  --green: #207c4f;
  --lime: #b9d53f;
  --soft-green: #eaf5ed;
  --soft-lime: #f2f7dc;
  --weekend: #f1f3f2;
  --orange: #df7b3d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0;
}
.auth-page {
  min-height: 100vh;
  padding: 0;
  color: var(--ink);
  background: white;
  border-top: 6px solid var(--lime);
}
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); }
.auth-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 110px);
  color: white;
  background: var(--forest);
}
.auth-brand-lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 54px; }
.auth-monogram { width: 64px; height: 64px; display: grid; place-items: center; flex: 0 0 64px; color: var(--forest); background: var(--lime); font: 800 28px "Manrope", sans-serif; }
.auth-brand-lockup > span:last-child { display: grid; gap: 5px; }
.auth-brand-lockup strong { color: white; font: 800 31px/1 "Manrope", sans-serif; }
.auth-brand-lockup small { color: #c8d7d1; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.auth-brand-panel .eyebrow { color: var(--lime); }
.auth-brand-panel h1 { max-width: 540px; font-size: 46px; line-height: 1.12; }
.auth-brand-panel > p:last-child { max-width: 480px; margin: 20px 0 0; color: #c8d7d1; font-size: 16px; line-height: 1.55; }
.auth-login-panel { width: min(100%, 520px); align-self: center; justify-self: center; padding: 48px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.auth-tabs button { min-height: 44px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.auth-tabs button.active { color: var(--green); border-bottom-color: var(--green); }
.auth-forms { min-height: 350px; }
.auth-form { min-width: 0; }
.auth-form h2 { font-size: 25px; }
.auth-form > p:not(.form-error) { min-height: 36px; margin: 8px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.auth-form label { margin-bottom: 17px; }
.auth-form input { min-height: 46px; }
.auth-form .primary-button { width: 100%; min-height: 46px; margin-top: 4px; }
.auth-form .form-error { min-height: 18px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.topbar {
  height: 78px;
  padding: 0 max(28px, calc((100vw - 1420px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--forest);
  color: white;
  border-bottom: 3px solid var(--lime);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}
.brand > span:last-child { display: grid; }
.brand strong { font: 800 21px/1 "Manrope", sans-serif; }
.brand small { margin-top: 5px; color: #c9d7d1; font-size: 11px; text-transform: uppercase; }
.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  background: white;
}
.brand-logo-crop { width: 44px; height: 44px; position: relative; display: block; overflow: hidden; flex: 0 0 44px; background: white; }
.brand-logo-crop img { width: 56px; height: auto; position: absolute; left: -6px; top: 0; }
.brand-mark {
  width: 39px;
  height: 39px;
  position: relative;
  border-radius: 50%;
  background: var(--lime);
}
.leaf { position: absolute; width: 9px; height: 18px; background: var(--forest); border-radius: 100% 0 100% 0; }
.leaf-one { left: 13px; top: 8px; transform: rotate(-25deg); }
.leaf-two { left: 20px; top: 13px; transform: rotate(54deg) scale(.75); }
.brand-mark::after { content: ""; position: absolute; width: 2px; height: 15px; background: var(--forest); left: 19px; top: 19px; transform: rotate(-12deg); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.timezone { color: #cbd8d2; font-size: 13px; margin-right: 8px; }
.icon-button, .edit-button, .leave-button, .requests-button, .admin-login-button {
  height: 40px;
  border: 1px solid #456458;
  background: transparent;
  color: white;
}
.session-button { height: 40px; padding: 0 14px; color: var(--ink); background: white; border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.icon-button { width: auto; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.edit-button, .leave-button, .requests-button, .admin-login-button { padding: 0 16px; display: flex; align-items: center; gap: 9px; font-weight: 600; }
.icon-button:hover, .edit-button:hover { background: #214d3d; }
.calendar-icon { width: 16px; height: 15px; border: 2px solid currentColor; position: relative; }
.calendar-icon::before { content: ""; position: absolute; height: 2px; background: currentColor; left: 0; right: 0; top: 3px; }
.lock-icon { display: inline-block; width: 12px; height: 10px; border: 1.5px solid currentColor; position: relative; }
.lock-icon::before { content: ""; position: absolute; width: 7px; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; left: 1px; top: -7px; }
main { max-width: 1420px; margin: auto; padding: 46px 28px 30px; }
.role-entry {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.role-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}
.role-panel + .role-panel { border-top: 1px solid var(--line); }
.role-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
  font: 800 16px "Manrope", sans-serif;
}
.admin-role .role-mark { color: var(--forest); background: var(--lime); }
.role-copy h2 { font-size: 17px; }
.role-copy .eyebrow { margin-bottom: 4px; font-size: 9px; }
.role-copy > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.role-actions { display: flex; align-items: center; gap: 8px; }
.role-actions .leave-button,
.role-actions .admin-login-button,
.role-actions .requests-button,
.role-actions .edit-button { height: 40px; }
.role-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.role-actions .edit-button { color: var(--green); background: white; border-color: var(--line); }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1.3px; }
h1, h2 { font-family: "Manrope", sans-serif; margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(31px, 4vw, 48px); line-height: 1.1; }
.intro-copy { color: var(--muted); margin: 10px 0 0; font-size: 16px; }
.year-control, .month-control { display: flex; align-items: center; }
.year-control { gap: 17px; padding: 6px; background: var(--paper); border: 1px solid var(--line); }
.year-control strong { width: 55px; text-align: center; font: 700 17px "Manrope", sans-serif; }
.year-control button, .month-control button {
  width: 34px; height: 34px; background: transparent; color: var(--ink); border: 0; font-size: 26px;
}
.year-control button:hover, .month-control button:hover { background: var(--soft-green); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 34px 0 22px; background: var(--paper); border: 1px solid var(--line); }
.stat { display: flex; align-items: center; min-height: 90px; padding: 18px 25px; gap: 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat > div { display: grid; gap: 2px; }
.stat strong { font: 700 20px/1.2 "Manrope", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 245px; }
.stat span:last-child { color: var(--muted); font-size: 13px; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; color: var(--green); background: var(--soft-green); font-weight: 800; }
.primary-stat .stat-icon { color: var(--forest); background: var(--soft-lime); }
.weekend-icon::before { content: ""; width: 17px; height: 15px; border: 2px solid currentColor; box-shadow: inset 0 4px currentColor; }
.regional-stat-icon { color: #296a71; background: #e8f2f2; font-size: 10px; }
.it-saturday-icon { color: #285f82; background: #e8f1f7; font-size: 10px; }
.religious-stat-icon { color: #765694; background: #f1ebf6; }
.optional-stat-icon { color: #a45125; background: #fff0e6; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 345px; border: 1px solid var(--line); background: var(--paper); }
.calendar-panel { min-width: 0; padding: 25px; }
.calendar-toolbar { min-height: 52px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.month-control { gap: 7px; }
.month-control h2 { width: 175px; text-align: center; font-size: 22px; }
.legend { display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 11px; padding-top: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.company-dot, .national-dot { background: #237a4b; }
.regional-dot { background: #21808a; }
.religious-dot { background: #79559a; }
.optional-dot { background: #d66c35; }
.weekend-dot { background: #bdc5c1; }
.saturday-dot { background: #397aa3; }
.today-dot { border: 2px solid var(--orange); }
.passed-dot { background: #aeb7b2; }
.upcoming-dot { background: var(--lime); box-shadow: 0 0 0 2px var(--forest); }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { margin-top: 11px; border-bottom: 1px solid var(--line); }
.weekday-row span { padding: 9px 8px 11px; color: #78847f; font-size: 10px; font-weight: 800; }
.weekday-row .weekend-label { color: #9a7362; background: #faf8f7; }
.calendar-grid { border-left: 1px solid var(--line); }
.day-cell {
  min-height: 106px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  position: relative;
  overflow: hidden;
}
.day-cell.outside { background: #fafbfa; color: #aeb6b2; }
.day-cell.weekend { background: var(--weekend); }
.day-cell.saturday { background: #eef4f8; }
.day-cell.saturday .weekend-tag { color: #397293; }
.day-cell.sunday .weekend-tag { color: #7d8882; }
.day-number {
  display: inline-grid; place-items: center; width: 27px; height: 27px; font-size: 12px; font-weight: 700;
}
.day-cell.today .day-number { border: 2px solid var(--orange); border-radius: 50%; color: #a64d1e; }
.holiday-chip {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 7px;
  border: 0;
  border-left: 3px solid var(--green);
  background: var(--soft-green);
  color: #145536;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.holiday-chip:hover { background: #daedde; }
.holiday-chip.national-chip { border-left-color: #237a4b; background: #e8f3ec; color: #185c38; }
.holiday-chip.regional-chip { border-left-color: #21808a; background: #e7f3f4; color: #17626a; }
.holiday-chip.religious-chip { border-left-color: #79559a; background: #f1ebf6; color: #5e407c; }
.holiday-chip.company-chip { border-left-color: #356fa3; background: #eaf1f8; color: #28587f; }
.holiday-chip.optional-chip { border-left-color: #d66c35; background: #fff0e6; color: #91451e; }
.holiday-chip.national-chip:hover { background: #d8ebdf; }
.holiday-chip.regional-chip:hover { background: #d7ebed; }
.holiday-chip.religious-chip:hover { background: #e7ddef; }
.holiday-chip.company-chip:hover { background: #dce9f4; }
.holiday-chip.optional-chip:hover { background: #ffe4d2; }
.holiday-chip.passed-chip { filter: saturate(.35); opacity: .55; }
.holiday-chip.upcoming-chip {
  border-left-width: 4px;
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  box-shadow: 0 3px 10px #173e2e20;
  opacity: 1;
}
.holiday-chip.admin-chip { cursor: pointer; }
.weekend-tag { position: absolute; right: 8px; bottom: 7px; color: #9aa39f; font-size: 9px; text-transform: uppercase; }
.holiday-panel { border-left: 1px solid var(--line); padding: 28px 24px; display: flex; flex-direction: column; }
.aside-heading { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 19px; }
.aside-heading h2 { font-size: 19px; }
.aside-heading > span { padding: 5px 8px; color: var(--green); background: var(--soft-green); font-size: 11px; font-weight: 700; }
.automation-status { min-height: 16px; margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.holiday-list { min-height: 240px; max-height: 650px; overflow-y: auto; padding-right: 5px; }
.holiday-group { margin-top: 14px; }
.holiday-group:first-child { margin-top: 8px; }
.holiday-group-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 9px;
  border-left: 3px solid currentColor;
  background: var(--canvas);
  font-size: 10px;
  text-transform: uppercase;
}
.holiday-group-heading span { display: flex; align-items: center; gap: 7px; font-weight: 800; }
.holiday-group-heading i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.holiday-group-heading strong { min-width: 22px; padding: 3px 5px; text-align: center; color: currentColor; background: white; font-size: 10px; }
.national-group .holiday-group-heading { color: #237a4b; }
.general-group .holiday-group-heading { color: #237a4b; }
.regional-group .holiday-group-heading { color: #21808a; }
.religious-group .holiday-group-heading { color: #79559a; }
.optional-group .holiday-group-heading { color: #d66c35; }
.optional-group .holiday-group-heading span { text-transform: none; }
.company-group .holiday-group-heading { color: #356fa3; }
.holiday-item { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.holiday-date { text-align: center; border-right: 1px solid var(--line); }
.holiday-date strong { display: block; font: 700 22px/1 "Manrope", sans-serif; }
.holiday-date span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.holiday-info strong { display: block; font-size: 14px; margin-bottom: 5px; }
.optional-badge { display: inline-block; margin-left: 7px; padding: 2px 5px; color: #965025; background: #fff0e5; font-size: 8px; font-style: normal; text-transform: uppercase; vertical-align: 2px; }
.date-status-badge { display: inline-block; margin-left: 6px; padding: 2px 5px; font-size: 8px; font-style: normal; text-transform: uppercase; vertical-align: 2px; }
.passed-badge { color: #68736d; background: #e8ecea; }
.upcoming-badge { color: #173e2e; background: var(--lime); }
.holiday-item.passed-item { opacity: .55; }
.holiday-item.upcoming-item { margin: 4px 0; padding-left: 6px; border-left: 3px solid var(--lime); background: #f8faec; opacity: 1; }
.holiday-info span { color: var(--muted); font-size: 11px; }
.type-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.regional-item .type-dot { background: #21808a; }
.religious-item .type-dot { background: #79559a; }
.company-item .type-dot { background: #356fa3; }
.optional-item .type-dot { background: #d66c35; }
.national-item .holiday-date { color: #185c38; }
.regional-item .holiday-date { color: #17626a; }
.religious-item .holiday-date { color: #5e407c; }
.company-item .holiday-date { color: #28587f; }
.optional-item .holiday-date { color: #91451e; }
.empty-state { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }
.weekend-note { margin-top: auto; padding: 16px; display: grid; grid-template-columns: 35px 1fr; gap: 11px; background: var(--weekend); }
.weekend-note-icon { width: 35px; height: 35px; display: grid; place-items: center; background: #d8dedb; color: #53615b; font-weight: 800; }
.weekend-note strong { font-size: 12px; }
.weekend-note p { color: var(--muted); font-size: 11px; line-height: 1.4; margin: 3px 0 0; }
.calendar-note { margin: 14px 2px 0; color: var(--muted); font-size: 11px; }
dialog { border: 0; padding: 0; box-shadow: 0 24px 80px #0c241b40; width: min(92vw, 470px); }
#editorDialog { width: min(92vw, 560px); }
dialog::backdrop { background: #0d261da6; backdrop-filter: blur(3px); }
.dialog-card { padding: 32px; position: relative; }
.dialog-card h2 { font-size: 24px; }
.dialog-card > p:not(.eyebrow):not(.form-error) { color: var(--muted); font-size: 13px; margin: 7px 0 22px; }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 21px; background: var(--soft-green); color: var(--green); }
label { display: grid; gap: 7px; color: #435149; font-size: 12px; font-weight: 700; }
input, select { height: 44px; width: 100%; padding: 0 12px; border: 1px solid #cbd5d0; border-radius: 0; color: var(--ink); background: white; outline: 0; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #207c4f1c; }
.form-error { color: #a63832; min-height: 17px; margin: 6px 0; font-size: 11px; }
.primary-button, .secondary-button, .danger-button { min-height: 42px; padding: 0 17px; border: 1px solid; font-weight: 700; font-size: 12px; }
.primary-button { color: white; background: var(--green); border-color: var(--green); }
#loginForm .primary-button { width: 100%; }
.secondary-button { color: var(--ink); background: white; border-color: var(--line); }
.danger-button { color: #9d332f; background: #fff; border-color: #e3b8b6; }
.form-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(160px, 1fr); gap: 12px; margin-bottom: 14px; }
.editor-card > label { margin-bottom: 18px; }
.optional-control { grid-template-columns: 18px 1fr; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--canvas); cursor: pointer; }
.optional-control input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--green); }
.optional-control span { display: grid; min-width: 0; gap: 3px; }
.optional-control strong { font-size: 12px; }
.optional-control small { color: var(--muted); font-weight: 400; line-height: 1.35; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 22px; right: 22px; max-width: 320px; padding: 12px 16px; color: white; background: var(--forest); font-size: 12px; box-shadow: 0 10px 30px #0b291d3d; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .workspace { grid-template-columns: 1fr; }
  .holiday-panel { border-left: 0; border-top: 1px solid var(--line); }
  .holiday-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
}
@media (max-width: 720px) {
  .auth-layout { min-height: 100vh; grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 250px; padding: 32px 24px; }
  .auth-brand-lockup { margin-bottom: 26px; }
  .auth-monogram { width: 56px; height: 56px; flex-basis: 56px; font-size: 24px; }
  .auth-brand-lockup strong { font-size: 26px; }
  .auth-brand-panel h1 { font-size: 30px; }
  .auth-brand-panel > p:last-child { display: none; }
  .auth-login-panel { width: 100%; padding: 32px 24px 48px; }
  .auth-product { margin-bottom: 26px; }
  .auth-forms { min-height: 340px; }
  html, body { max-width: 100%; overflow-x: hidden; }
  .topbar { height: 68px; padding: 0 16px; }
  .timezone, .icon-button { display: none; }
  .edit-button { padding: 0 12px; }
  .edit-button span:last-child { font-size: 0; }
  .edit-button span:last-child::after { content: "Edit"; font-size: 12px; }
  main { width: 100%; max-width: 100%; padding: 30px 14px 20px; overflow: hidden; }
  .intro { align-items: flex-start; flex-direction: column; }
  .intro, .stats, .workspace { width: 100%; min-width: 0; }
  h1 { max-width: 100%; }
  .year-control { align-self: stretch; justify-content: space-between; }
  .stats { grid-template-columns: 1fr; }
  .stat { min-height: 74px; border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .stat:nth-child(2) { border-top: 1px solid var(--line); }
  .calendar-panel { width: 100%; min-width: 0; padding: 14px 8px; overflow-x: auto; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .month-control { justify-content: center; }
  .legend { justify-content: center; flex-wrap: wrap; padding: 0 0 5px; }
  .weekday-row, .calendar-grid { min-width: 630px; }
  .day-cell { min-height: 94px; }
  .holiday-panel { padding: 22px 16px; }
  .holiday-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions span { display: none; }
  .dialog-actions button { width: 100%; }
}

/* 2026 workspace refresh */
:root {
  --ink: #17201c;
  --muted: #66716c;
  --line: #dfe5e1;
  --paper: #ffffff;
  --canvas: #f2f5f3;
  --forest: #153e2e;
  --green: #237a4b;
  --lime: #c9df45;
  --soft-green: #e9f3ed;
  --soft-lime: #f2f7d9;
  --weekend: #f3f4f3;
  --orange: #d66c35;
}

.topbar {
  height: 66px;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); }
.brand small { color: var(--muted); }
.brand-mark { width: 36px; height: 36px; }
.topbar .timezone { color: var(--muted); }
.topbar .icon-button { color: var(--ink); border-color: var(--line); }
.topbar .session-button { color: #963d36; border-color: #dfb8b4; }
.topbar .edit-button { color: white; background: var(--forest); border-color: var(--forest); }
.topbar .icon-button:hover { background: var(--canvas); }
.topbar .edit-button:hover { background: #20513e; }

main { padding-top: 24px; }
.intro {
  min-height: 178px;
  padding: 32px 36px;
  align-items: center;
  color: white;
  background: var(--forest);
  border-bottom: 4px solid var(--lime);
}
.intro .eyebrow { color: var(--lime); }
.intro h1 { max-width: 720px; font-size: clamp(30px, 3.5vw, 46px); }
.intro-copy { color: #c9d8d1; }
.year-control { color: var(--ink); border: 0; box-shadow: 0 8px 24px #0a241a2e; }

.stats {
  margin: 0;
  border-top: 0;
}
.stat { min-height: 82px; }
.stat-icon { border-radius: 4px; }

.month-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin: 18px 0;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.month-strip button {
  height: 37px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.month-strip button:hover { color: var(--green); background: var(--soft-green); }
.month-strip button.active { color: white; background: var(--green); }

.workspace { border: 0; gap: 18px; background: transparent; }
.calendar-panel, .holiday-panel { border: 1px solid var(--line); background: var(--paper); }
.calendar-panel { padding: 22px; }
.holiday-panel { border-left: 1px solid var(--line); }
.calendar-toolbar { align-items: center; }
.month-control h2 { font-size: 20px; }
.weekday-row { margin-top: 7px; background: #fafbfa; border: 1px solid var(--line); border-bottom: 0; }
.weekday-row span { text-align: center; }
.weekday-row .weekend-label { background: #f4f1ef; }
.calendar-grid { border-top: 1px solid var(--line); }
.day-cell { min-height: 96px; }
.day-cell:hover { background: #fbfdfb; }
.day-cell.weekend:hover { background: #ecefed; }
.day-cell.saturday:hover { background: #e4eef4; }
.holiday-chip { border-radius: 3px; }
.aside-heading { align-items: center; }
.holiday-list { scrollbar-width: thin; scrollbar-color: #bbc5c0 transparent; }
.holiday-item { transition: background .15s ease; }
.holiday-item[role="button"]:hover { background: var(--soft-green); }
.weekend-note { border-left: 3px solid #b2bbb6; }
.calendar-note { text-align: right; }

dialog { border-radius: 6px; }
.primary-button, .secondary-button, .danger-button, input, select { border-radius: 4px; }
.toast { border-radius: 4px; }

@media (max-width: 980px) {
  .month-strip { grid-template-columns: repeat(6, 1fr); }
  .workspace { gap: 14px; }
  .holiday-panel { border-left: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .topbar { height: 62px; }
  main { padding-top: 14px; }
  .intro { min-height: 0; padding: 24px 20px; }
  .intro h1 { font-size: 30px; line-height: 1.15; }
  .year-control { width: 100%; margin-top: 8px; }
  .month-strip {
    display: flex;
    gap: 3px;
    margin: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .month-strip::-webkit-scrollbar { display: none; }
  .month-strip button { min-width: 54px; flex: 0 0 54px; }
  .workspace { gap: 12px; }
  .calendar-panel { padding: 13px 8px; }
  .calendar-toolbar { padding: 0 5px; }
  .calendar-note { text-align: left; line-height: 1.45; }
}

/* Leave request workflow */
.leave-button { color: var(--forest); background: var(--lime); border-color: var(--lime); }
.requests-button { color: var(--forest); background: white; border-color: var(--line); }
.admin-login-button { color: white; background: var(--forest); border-color: var(--forest); }
.requests-button strong { min-width: 19px; padding: 2px 5px; color: white; background: var(--orange); font-size: 10px; text-align: center; }
.leave-icon { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid currentColor; font-size: 15px; line-height: 1; }
textarea { width: 100%; padding: 11px 12px; resize: vertical; border: 1px solid #cbd5d0; border-radius: 4px; color: var(--ink); background: white; font: inherit; outline: 0; }
textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #207c4f1c; }
#leaveDialog { width: min(92vw, 620px); }
.leave-card { width: 100%; }
.leave-card > label { margin-bottom: 14px; }
.leave-card label { min-width: 0; }
.leave-card select, .leave-card input { width: 100%; }
.leave-card #employeeDepartment { color: #53615a; background: #f5f7f6; }
.leave-date-row { grid-template-columns: 1fr 1fr; }
.leave-actions { grid-template-columns: 1fr auto auto; }
.website-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#requestsDialog { width: min(94vw, 1040px); }
.requests-card { min-height: 480px; }
.requests-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.requests-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.requests-title-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-view-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 8px; border: 1px solid var(--line); }
.admin-view-tabs button { min-height: 39px; border: 0; color: var(--muted); background: white; font-size: 11px; font-weight: 800; }
.admin-view-tabs button.active { color: white; background: var(--forest); }
.request-filters { display: flex; gap: 4px; margin: 22px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.request-filters button { min-height: 34px; padding: 0 13px; border: 0; color: var(--muted); background: var(--canvas); font-size: 11px; font-weight: 700; }
.request-filters button.active { color: white; background: var(--green); }
.request-list { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.request-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px; border: 1px solid var(--line); }
.request-person { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.request-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--forest); font-weight: 800; text-transform: uppercase; }
.request-person strong, .request-person span { display: block; }
.request-person span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.request-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: 11px; }
.request-reason { margin: 10px 0 0; color: #44514b; font-size: 12px; line-height: 1.45; }
.request-side { min-width: 165px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; }
.request-status { padding: 4px 7px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.request-status.pending { color: #8a571b; background: #fff0cf; }
.request-status.approved { color: #17613a; background: #e3f2e8; }
.request-status.declined { color: #963d36; background: #f9e7e5; }
.request-actions { display: flex; gap: 6px; }
.request-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); background: white; font-size: 10px; font-weight: 700; }
.request-actions .approve-request { color: #17613a; border-color: #acd1ba; }
.request-actions .decline-request { color: #963d36; border-color: #dfb8b4; }
.request-empty { padding: 70px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.request-person .department-label { display: inline-block; margin-top: 4px; padding: 2px 5px; color: #285f82; background: #e8f1f7; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.employee-list { display: grid; gap: 16px; max-height: 560px; overflow-y: auto; padding-top: 10px; }
.employee-department { border: 1px solid var(--line); }
.employee-department-heading { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 0 13px; color: white; background: var(--forest); font-size: 11px; text-transform: uppercase; }
.employee-department-heading strong { padding: 3px 6px; color: var(--forest); background: var(--lime); font-size: 10px; }
.employee-department-empty { padding: 18px 13px; color: var(--muted); font-size: 11px; text-align: center; }
.employee-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, 95px) auto; align-items: center; gap: 12px; padding: 13px; border-top: 1px solid var(--line); }
.employee-row:first-of-type { border-top: 0; }
.employee-identity strong, .employee-identity span { display: block; }
.employee-identity span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.employee-metric { text-align: center; }
.employee-metric strong { display: block; font: 700 18px "Manrope", sans-serif; }
.employee-metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.employee-edit { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); color: var(--green); background: white; font-size: 10px; font-weight: 800; }
.inactive-employee { opacity: .5; }
#employeeDialog { width: min(92vw, 500px); }
#departmentDialog { width: min(92vw, 460px); }
#departmentForm > label { margin: 18px 0 14px; }
#employeeForm > label { margin-bottom: 14px; }
.employee-active-control { margin-top: 4px; }
.employee-form-actions { grid-template-columns: 1fr auto auto; }

@media (max-width: 1100px) {
  .role-entry { grid-template-columns: 1fr; }
  .role-panel + .role-panel { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .role-entry { grid-template-columns: 1fr; margin-bottom: 18px; }
  .role-panel { grid-template-columns: 40px minmax(0, 1fr); padding: 16px; }
  .role-panel + .role-panel { border-left: 0; border-top: 1px solid var(--line); }
  .role-mark { width: 40px; height: 40px; }
  .role-actions { grid-column: 1 / -1; }
  .role-actions button, .role-actions .role-link { flex: 1; justify-content: center; }
  .leave-button { padding: 0 10px; }
  .leave-button span:last-child { font-size: 0; }
  .leave-button span:last-child::after { content: "Leave"; font-size: 12px; }
  .requests-button { position: static; box-shadow: none; }
  .admin-login-button { padding: 0 10px; }
  .admin-login-button span:last-child { font-size: 0; }
  .admin-login-button span:last-child::after { content: "Admin"; font-size: 12px; }
  .leave-date-row { grid-template-columns: 1fr; }
  .leave-actions { grid-template-columns: 1fr 1fr; }
  .leave-actions span { display: none; }
  .request-item { grid-template-columns: 1fr; }
  .request-side { min-width: 0; align-items: flex-start; }
  .requests-title { align-items: stretch; flex-direction: column; }
  .requests-title-actions { width: 100%; }
  .requests-title-actions button { flex: 1 1 calc(50% - 7px); }
  .employee-row { grid-template-columns: 1fr 70px 70px; }
  .employee-edit { grid-column: 1 / -1; }
}
