/* Glovis HR Documentation Hub — base styles */

:root {
  --navy: #0b2d5b;
  --navy-2: #123e7a;
  --blue: #1f63c6;
  --blue-soft: #e8f0fc;
  --bg: #ffffff;
  --surface: #ffffff;
  --hover: #f5f8fc;
  --head: #f7f9fc;
  --border: #e4e9f1;
  --text: #0f1b2d;
  --muted: #5f6f84;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --success: #067647;
  --radius: 10px;
  --shadow: none;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #1853a8; }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.form { display: grid; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 500; font-size: 13px; }
.field input {
  height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); background: #fff;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.alert { padding: 10px 12px; border-radius: 8px; margin-top: 16px; font-size: 13px; }
.alert--error { background: var(--danger-soft); color: var(--danger); }

/* Sign-in page */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth__brand {
  background: radial-gradient(circle at 20% 10%, var(--navy-2), var(--navy) 60%);
  color: #fff; display: flex; align-items: center; padding: 48px;
}
.auth__brand-inner { max-width: 420px; margin: 0 auto; }
.auth__brand h1 { font-size: 32px; margin-top: 24px; }
.auth__brand p { color: #c5d3ea; font-size: 16px; margin: 12px 0 28px; }
.auth__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #dbe5f5; }
.auth__points li::before { content: "✓"; color: #7fb2ff; font-weight: 700; margin-right: 10px; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--surface); }
.auth__card { width: 100%; max-width: 360px; }
.auth__logo { height: 44px; margin-bottom: 32px; }
.auth__card h2 { font-size: 24px; margin-bottom: 4px; }
.auth__foot { font-size: 13px; margin-top: 20px; text-align: center; }

.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--blue); color: #fff; font-weight: 700;
}
.brand-mark--light { width: 48px; height: 48px; font-size: 22px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }

/* App shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c5d3ea; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; text-decoration: none; }
.brand-title { display: block; font-weight: 600; font-size: 14px; }
.brand-sub { display: block; font-size: 12px; color: #8ea5c8; }
.nav { display: grid; gap: 2px; }
.nav__section { margin: 18px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7d93b6; }
.nav__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: inherit; text-decoration: none; font-weight: 500;
}
.nav__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__item.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.nav__item.is-disabled { opacity: .55; cursor: default; }
.nav__item.is-disabled:hover { background: none; color: inherit; }
.badge-soon { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 32px; background: var(--navy); color: #fff; border-bottom: 1px solid var(--navy);
}
.topbar__title { font-weight: 600; font-size: 15px; color: #fff; }
.topbar .avatar { background: rgba(255, 255, 255, .14); color: #fff; }
.topbar .user-role, .topbar .muted { color: #a9bcd8; }
.topbar .btn--ghost { color: #c5d3ea; border-color: rgba(255, 255, 255, .22); }
.topbar .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.topbar__user { display: flex; align-items: center; gap: 12px; }
.topbar__user form { margin: 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.user-name { display: block; font-weight: 600; line-height: 1.2; }
.user-role { display: block; font-size: 12px; color: var(--muted); }
.content { padding: 28px 32px 40px; max-width: 1240px; display: grid; gap: 22px; }
/* A wide table scrolls inside its own box instead of pushing the whole page sideways. */
.content > * { min-width: 0; }

/* Cards and dashboard */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.card--flush .results-head { background: var(--head); border-bottom: 1px solid var(--border); }
.card__title { font-size: 15px; margin-bottom: 14px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero h1 { font-size: 24px; margin-bottom: 4px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.stats > .card { border: 0; border-right: 1px solid var(--border); border-radius: 0; }
.stats > .card:last-child { border-right: 0; }
.stat { display: grid; gap: 4px; }
.stat__label {
  color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.stat__value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat__hint { font-size: 12px; color: var(--muted); }
.roadmap { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: step; }
.roadmap li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.roadmap li::before { content: "○"; color: var(--border); }
.roadmap li.is-done { color: var(--text); }
.roadmap li.is-done::before { content: "●"; color: var(--success); }
.roadmap strong { min-width: 64px; color: var(--text); }

/* Page structure */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin-bottom: 4px; }
.back-link { color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: -12px; }
.back-link:hover { color: var(--blue); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.narrow { max-width: 520px; width: 100%; }
.card.narrow h1 { font-size: 22px; }
.center-card { margin: 24px auto 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
.card--flush { padding: 0; overflow: hidden; }
.messages { display: grid; gap: 8px; }
.messages .alert, .card .alert { margin-top: 0; }
.card .form { margin-top: 16px; }
.alert--success { background: #ecfdf3; color: var(--success); }
.alert--info { background: var(--blue-soft); color: #1a4f9c; }
.alert a { color: inherit; font-weight: 600; }
.topbar__link { color: #c5d3ea; text-decoration: none; font-weight: 500; font-size: 13px; margin-right: 8px; }
.topbar__link:hover { color: #fff; }
/* The language switch sits on the navy bar. */
.topbar .lang { border-color: rgba(255, 255, 255, .22); }
.topbar .lang__option { color: #c5d3ea; }
.topbar .lang__option.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
.topbar .lang__option:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; padding: 9px 16px; background: var(--head);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
.table td {
  padding: 8px 16px; border-bottom: 1px solid var(--border); vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hover); }
.table tr.is-muted td { color: var(--muted); }
.table .empty { text-align: center; color: var(--muted); padding: 40px; }
/* The same empty line outside a table: a card with nothing to list yet. */
p.empty { text-align: center; color: var(--muted); padding: 34px 16px; margin: 0; }
.person { display: flex; align-items: center; gap: 10px; }
.avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.changes { margin-top: 4px; font-size: 12.5px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--green { background: #ecfdf3; color: var(--success); }
.badge--amber { background: #fff6e5; color: #b54708; }
.badge--red { background: var(--danger-soft); color: var(--danger); }

/* Form details */
.field select {
  height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); background: #fff;
}
.field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input:disabled, .field select:disabled { background: var(--hover); color: var(--muted); }
.field__help { font-size: 12px; color: var(--muted); }
.field__help ul { margin: 4px 0 0; padding-left: 18px; }
.field__error { font-size: 12.5px; color: var(--danger); }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.req { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.card__title.spaced { margin: 28px 0 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.side-card { display: grid; gap: 16px; }
.side-card .card__title { margin-bottom: 0; }
.action { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--border); justify-items: start; }
.action p, .action form { margin: 2px 0 0; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.btn--small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--danger { background: #fff; color: var(--danger); border-color: #f3c4bf; }
.btn--danger:hover { background: var(--danger-soft); }

/* Temporary password card */
.credentials {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; text-align: left; margin: 8px 0; width: 100%;
  padding: 16px 20px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
}
.credentials dt { color: var(--muted); }
.credentials dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.success-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #ecfdf3; color: var(--success); font-size: 22px; font-weight: 700; }

@media (max-width: 900px) {
  .form-grid, .layout-2col { grid-template-columns: 1fr; }
  .topbar__link { display: none; }
}

/* Employees */
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px; }
.search { position: relative; flex: 1 1 320px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--text); }
.filters select { height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
.search input:focus, .filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.results-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.results-head.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__title.flat { margin: 0; }
.table--clickable tbody tr[data-href] { cursor: pointer; }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--blue); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.stack { display: grid; gap: 24px; align-content: start; }
.avatar--lg { width: 52px; height: 52px; font-size: 22px; }
.person--lg { gap: 14px; }
.details { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; }
.subhead { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 10px; }
.form-grid--1 { grid-template-columns: 1fr; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-stack { display: grid; gap: 16px; }
.narrow-lg { max-width: 760px; width: 100%; }
.field input[type="checkbox"] { width: 18px; height: 18px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.error-list { margin: 0; padding-left: 16px; color: var(--danger); }
.import-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.import-actions p { margin: 0 auto 0 0; }
.dropzone {
  display: grid; justify-items: center; gap: 8px; margin: 14px 0 10px; padding: 28px 16px;
  border: 2px dashed var(--border); border-radius: 10px; background: #f8fafc; text-align: center; cursor: pointer;
}
.dropzone:hover { border-color: var(--blue); }
.dropzone svg { width: 28px; height: 28px; color: var(--blue); }
.dropzone input { max-width: 100%; }
.column-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.stat__hint a { color: var(--blue); text-decoration: none; font-weight: 500; }

@media (max-width: 900px) {
  .details { grid-template-columns: 1fr; gap: 2px; }
  .details dd { margin-bottom: 10px; }
  .form-grid--3, .summary { grid-template-columns: 1fr; }
}

/* Documents */
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; margin-top: 12px; padding-right: 4px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: #b9c6d8; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice input { margin-top: 3px; accent-color: var(--blue); }
.choice--row { padding: 10px 14px; }
.card__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
#template-options { max-height: 420px; overflow-y: auto; padding-right: 2px; }
.choice__body { display: grid; gap: 2px; }
.form-actions--flat { margin-top: 0; padding-top: 0; border-top: 0; }
.form-grid .field:has([data-wide]) { grid-column: 1 / -1; }
.auto-list { display: grid; margin: 0; font-size: 13px; }
.auto-list dt { color: var(--muted); font-size: 12px; margin-top: 10px; }
.auto-list dt:first-child { margin-top: 0; }
.auto-list dd { margin: 0; font-weight: 500; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.btn--large { height: 46px; padding: 0 22px; font-size: 15px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

@media (max-width: 900px) {
  .choice-grid { grid-template-columns: 1fr; }
}

/* Calendar */
input[data-datepicker] {
  padding-right: 38px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6f84' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
.datepicker {
  position: absolute; z-index: 100; width: 292px; padding: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 27, 45, .16);
}
.datepicker__head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.datepicker__head select {
  height: 32px; padding: 0 4px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; font-size: 13px; color: var(--text); background: #fff;
}
.datepicker__month { flex: 1; min-width: 0; }
.datepicker__nav {
  width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 6px; background: transparent;
  font-size: 20px; line-height: 1; color: var(--text); cursor: pointer;
}
.datepicker__nav:hover { background: var(--hover); }
.datepicker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datepicker__weekday { padding: 4px 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.datepicker__day {
  height: 34px; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 13px; color: var(--text); cursor: pointer;
}
.datepicker__day:hover { background: var(--blue-soft); }
.datepicker__day.is-weekend { color: var(--danger); }
.datepicker__day.is-today { box-shadow: inset 0 0 0 1px var(--blue); }
.datepicker__day.is-selected { background: var(--blue); color: #fff; }
.datepicker__day:disabled { color: #c7cfdb; background: transparent; cursor: default; }
.datepicker__foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.datepicker__link { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--blue); cursor: pointer; }

/* Templates */
.alert--warning { background: #fff6e5; color: #93370d; }
.field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input[type="file"] { height: auto; padding: 8px; background: #f8fafc; }
.field.is-disabled { opacity: .55; }
.field.is-disabled input { background: #f1f5f9; cursor: not-allowed; }
.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.guide-list, .check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guide-list li, .check-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guide-list--stacked { gap: 14px; }
.guide-list--stacked li { display: grid; gap: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; cursor: copy;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--navy);
}
.chip:hover { border-color: var(--blue); background: var(--blue-soft); }
.people-list { list-style: none; margin: 8px 0 0; padding: 0; }
.people-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.people-list li:last-child { border-bottom: 0; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.check-list code { font-size: 12.5px; }
.table--form td { vertical-align: top; }
.table--form td:nth-child(2) input { min-width: 280px; }
.table--form td:nth-child(5) input { min-width: 220px; }
.table--form input[type="text"], .table--form select {
  width: 100%; min-width: 140px; height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; color: var(--text); background: #fff;
}
.table--form input:focus, .table--form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.table--form input[type="checkbox"] { width: 18px; height: 18px; margin-top: 9px; accent-color: var(--blue); }
.center { text-align: center; }
.results-foot { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.pad { margin: 0; padding: 16px; }
.steps { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.steps a { color: var(--blue); }

@media (max-width: 900px) {
  .guide, .check-grid { grid-template-columns: 1fr; }
}

/* Dashboard and charts */
:root {
  --series-1: #2a78d6;        /* chart palette, slot 1 */
  --series-1-hover: #3987e5;  /* one lighter step: the hovered mark lifts */
  --chart-grid: #e8ebf0;      /* hairline gridlines */
  --chart-axis: #c9d1dc;      /* baseline */
  --chart-muted: #6b7a8f;     /* axis labels */
}
.stats--4 { grid-template-columns: repeat(4, 1fr); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head p { margin: 2px 0 0; }
.tabular { font-variant-numeric: tabular-nums; }

.column-chart {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: 200px auto; column-gap: 10px; margin-top: 24px;
}
.column-chart__axis { position: relative; grid-row: 1; grid-column: 1; }
.column-chart__axis span {
  position: absolute; right: 0; transform: translateY(50%);
  font-size: 11px; color: var(--chart-muted); font-variant-numeric: tabular-nums;
}
.column-chart__plot {
  position: relative; grid-row: 1; grid-column: 2;
  display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; border-bottom: 1px solid var(--chart-axis);
}
.column-chart__gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--chart-grid); pointer-events: none; }
.column-chart__slot {
  position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center;
  border-radius: 6px; outline: none;
}
.column-chart__slot:focus-visible { box-shadow: inset 0 0 0 2px var(--blue-soft); }
.column-chart__bar {
  position: relative; width: min(24px, 60%); background: var(--series-1);
  border-radius: 4px 4px 0 0; transition: background .15s;
}
.column-chart__slot:hover .column-chart__bar,
.column-chart__slot:focus-visible .column-chart__bar { background: var(--series-1-hover); }
.column-chart__value {
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px);
  font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.column-chart__labels {
  grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(12, 1fr);
  padding-top: 6px; text-align: center; font-size: 11px; color: var(--chart-muted);
}
.column-chart__labels small { display: block; font-size: 10px; }
.chart-tooltip {
  position: absolute; z-index: 5; transform: translate(-50%, -100%); pointer-events: none;
  display: grid; gap: 1px; padding: 6px 10px; white-space: nowrap;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 27, 45, .12);
  font-size: 12px; color: var(--muted);
}
.chart-tooltip strong { font-size: 14px; color: var(--text); }
.table--compact td, .table--compact th { padding: 8px 12px; }
#monthly-table { margin-top: 16px; }

.bar-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.bar-list__name { margin-bottom: 6px; font-size: 13px; }
.bar-list__track { display: flex; align-items: center; gap: 8px; }
.bar-list__bar { height: 16px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-list__value { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.activity { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.activity li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 13px; }
.activity__time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.activity__change { display: block; }
.side-card .activity li { grid-template-columns: 1fr; gap: 2px; }

.date-range { display: inline-flex; align-items: center; gap: 6px; }
.filters input[data-datepicker] {
  width: 150px; height: 40px; padding-left: 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text);
}
.filters input[data-datepicker]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

@media (max-width: 1100px) {
  .stats--4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  /* Wrapped into two rows: the line goes under the first row instead of beside it. */
  .stats--4 > .card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stats--4 > .card:nth-child(2n) { border-right: 0; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .stats > .card { border-right: 0; border-bottom: 1px solid var(--border); }
  .stats > .card:last-child { border-bottom: 0; }
  .column-chart__labels span small { display: none; }
}

/* Birthdays */
.birthday-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; }
.birthday-list li { display: grid; gap: 2px; }
.birthday-list__name {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--text); text-decoration: none;
}
.birthday-list__name:hover { color: var(--blue); }
.birthday-list__name svg { width: 15px; height: 15px; color: var(--blue); }

/* Language switch */
.lang { display: inline-flex; margin: 0 4px 0 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang__option {
  padding: 6px 10px; border: 0; background: #fff; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
}
.lang__option:hover { background: var(--hover); color: var(--text); }
.lang__option.is-active { background: var(--blue); color: #fff; }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
.auth__top .auth__logo { margin-bottom: 0; }

/* Narrow screens */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; }
  .sidebar { position: static; height: auto; }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .nav__section, .badge-soon { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: 1fr; }
  .user-meta { display: none; }
}

/* About this app */
.nav__item--foot { margin-top: auto; }
.nav { display: grid; gap: 2px; align-content: start; }
.spaced-p { margin-top: 10px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: flow; }
.flow li { display: grid; grid-template-columns: 26px 1fr; gap: 4px 12px; align-items: baseline; }
.flow li::before {
  counter-increment: flow; content: counter(flow);
  grid-row: span 2; align-self: start; justify-self: start;
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 12.5px;
}
.flow strong { font-size: 14px; }
.flow span { color: var(--muted); grid-column: 2; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.rules li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; color: var(--muted); }
.rules li::before { content: "—"; color: var(--blue); }
.stack--tight { gap: 8px; }
.details--tight { grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13px; }
.credits .card__title { margin-bottom: 4px; }

/* Labour agreements waiting for a decision */
.badge-due {
  margin-left: auto; min-width: 20px; text-align: center; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px; background: var(--danger); color: #fff;
}
.notice { border-left: 3px solid #b54708; background: #fffaf2; }
.notice.card--flush, .notice .table-wrap { margin-top: 10px; }
.notice__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.notice .card__title { color: #93370d; }

.options { display: grid; gap: 12px; margin-top: 14px; }
.option { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.option.is-chosen { border-color: var(--blue); background: var(--blue-soft); }
.option__head { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.option__head input { margin: 2px 0 0; }
.option__title { font-weight: 600; display: block; }
.option__hint { display: block; margin-top: 2px; }
.option__fields { margin-left: 30px; }
.option__fields .form-grid { margin-top: 12px; }
/* Inside a narrow card the boxes shrink to fit instead of pushing past its edge. */
.option__fields .field { min-width: 0; }
.option__fields .field input { width: 100%; box-sizing: border-box; }
.option.is-chosen .field input { background: #fff; }

.choices { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 12px; }
.check input { width: 16px; height: 16px; }

/* A copy of the app that is not the real one */
.test-copy {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  margin-bottom: 18px; padding: 9px 14px; border-radius: 8px;
  background: repeating-linear-gradient(135deg, #fff6e5, #fff6e5 12px, #fdf0d8 12px, #fdf0d8 24px);
  border: 1px solid #f0c98a; color: #93370d; font-size: 12.5px;
}
.test-copy strong { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.auth__card .test-copy { margin: 0 0 16px; }
.danger-card { border-color: #f3b9b3; }
.danger-card .card__title { color: var(--danger); }
.danger-card input[type="file"] { font-size: 12.5px; }

/* The daily timesheet */
.day-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.day-head__date { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-head__date h1 { margin: 0; font-size: 28px; font-variant-numeric: tabular-nums; }
.open-days { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.day-chip {
  padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none; background: #fff; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.day-chip:hover { border-color: var(--blue); }
.day-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.head-push { margin-left: auto; }
.day-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.day-tools__count { margin-left: auto; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented a { padding: 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.segmented a + a { border-left: 1px solid var(--border); }
.segmented a.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.inline-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-filters select, .day-table select, .day-table input {
  height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px;
  font: inherit; font-size: 13px; background: #fff; color: var(--text);
}
.day-table select { max-width: 190px; }
.day-table input { width: 70px; font-variant-numeric: tabular-nums; }
.day-table .second-part { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.day-table .second-part select { max-width: 150px; }
.day-table td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
.day-table th { font-size: 12px; }
.day-row__name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.day-row__meta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.day-row__warn { color: #b54708; }
.day-row__hours { white-space: nowrap; }
.day-row__overtime { text-align: right; }
.day-table + .save-bar, form#day-form { padding-bottom: 4px; }
#day-form .card:last-of-type { margin-bottom: 88px; }
/* Shift and type as buttons: one tap each */
.taps { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
.tap { position: relative; display: inline-flex; }
.tap input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tap span {
  display: inline-grid; place-items: center; min-width: 36px; height: 34px; padding: 0 9px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--text);
  user-select: none;
}
.tap:hover span { border-color: var(--blue); }
.tap input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.tap input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.tap input[value=""] + span { color: var(--muted); font-weight: 400; }
.tap input[value=""]:checked + span { background: #eef1f5; border-color: #cfd6e0; color: var(--text); }
.tap-more { position: relative; }
#day-form .card--flush, #day-form .table-wrap { overflow: visible; } /* so the "More" list is never cut off */
.tap-more summary {
  list-style: none; display: inline-flex; align-items: center; gap: 3px; height: 34px; padding: 0 10px; border-radius: 7px;
  border: 1px dashed #c3ccd8; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
  white-space: nowrap;
}
.tap-more summary::-webkit-details-marker { display: none; }
.tap-more summary::after { content: "▾"; font-size: 10px; }
.tap-more.is-chosen summary { background: var(--blue); border: 1px solid var(--blue); color: #fff; font-weight: 600; }
.tap-menu {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; gap: 2px; min-width: 230px;
  padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 8px 24px rgba(15, 27, 45, .12);
}
.tap-menu .tap span { justify-content: start; width: 100%; height: 32px; border-color: transparent; font-weight: 500; place-items: center start; }
.tap-menu .tap:hover span { background: var(--hover); }
.day-row.is-suggested .tap input:checked + span { background: var(--blue-soft); border: 1px dashed var(--blue); color: var(--blue); }
.day-row.is-readonly .tap:not(:has(input:checked)), .day-row.is-readonly .tap-more:not(.is-chosen) { display: none; }
.day-row.is-readonly .tap input:checked + span { background: transparent; border-color: transparent; color: var(--text); }
.link-button { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; color: var(--blue); cursor: pointer; white-space: nowrap; }
.link-button:hover { text-decoration: underline; }
.day-row.is-suggested td { background: #f7f9fc; }
.day-row.is-suggested select, .day-row.is-suggested input[type=number] { color: var(--muted); border-style: dashed; }
.day-row.has-error td { background: var(--danger-soft); }
.day-row.is-readonly select, .day-row.is-readonly input { background: transparent; border-color: transparent; appearance: none; }
.suggest-note { font-size: 11px; color: var(--blue); margin-top: 3px; }
.split-toggle { white-space: nowrap; }
.day-table td:first-child { min-width: 220px; }
.over-norm { font-size: 11px; color: #b54708; margin-top: 3px; max-width: 120px; }
.save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; box-shadow: 0 -4px 14px rgba(15, 27, 45, .06);
}
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulk select { height: 32px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; }
.row--todo td { background: #fffaf2; }
.tick { width: 34px; }
.pad { padding: 0 16px; }
.off-shift .results-head { background: #f4f5f7; }
.off-shift .card__title { color: var(--muted); }

/* The month grid: every row the same height, every day the same width, content centred */
.month-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.month-head__title { display: grid; gap: 6px; }
.month-head__status { min-height: 22px; }
.month-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.month-switch { display: flex; align-items: center; gap: 6px; }
.month-switch h1 { margin: 0; font-size: 26px; line-height: 1.2; min-width: 9ch; text-align: center; }
.month-switch__arrow {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 16px;
}
.month-switch__arrow:hover { background: var(--hover); border-color: var(--blue); }
.month-switch__arrow.is-off { color: #c3ccd8; }
.month-wrap { overflow-x: auto; max-height: 72vh; }
.month { border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.month th, .month td { border-bottom: 1px solid var(--border); border-right: 1px solid #eef1f5; padding: 0; }
.month thead th {
  position: sticky; top: 0; z-index: 2; background: var(--head); font-weight: 600; text-align: center;
  padding: 6px 0; line-height: 1.25; color: var(--text);
}
.month thead th a { color: var(--text); text-decoration: none; display: block; font-size: 13px; }
.month thead th a:hover { color: var(--blue); }
.month thead th span { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted); text-transform: lowercase; }
.month thead th.is-today { background: #d9e6fa; }
.month thead th.is-today a, .month thead th.is-today span { color: var(--blue); }
.month .month__name {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; padding: 0 12px;
  width: 230px; min-width: 230px; max-width: 230px; border-right: 1px solid var(--border);
}
.month thead .month__name { z-index: 3; background: var(--head); vertical-align: middle; font-size: 12px; color: var(--muted); }
.month__person { display: block; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month__dept { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; min-height: 1.3em;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.month tbody tr { height: 46px; }
.month tbody td {
  width: 40px; min-width: 40px; max-width: 40px; height: 46px; text-align: center; vertical-align: middle;
  white-space: nowrap; position: relative; line-height: 1.15;
}
.month tbody td b { display: block; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.month tbody td i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.month tbody tr:hover > td:not(.editable), .month tbody tr:hover > .month__name { background-color: #f8fafd; }
.month .month__total {
  background: #f8fafc; width: auto; min-width: 48px; max-width: none; padding: 0 8px; font-weight: 600;
  text-align: right; font-size: 12.5px;
}
.month thead .month__total { text-align: right; vertical-align: bottom; }
.month .group-start { border-left: 2px solid var(--border); }
.month .over-limit { color: var(--danger); }
/* Days off: a quiet grey. Red is kept for what needs attention. */
.month .day-off, .swatch.day-off { background-color: #f1f3f6; }
.month thead th.day-off { background: #e9edf2; }
.month .today, .swatch.today { background-color: #edf3fd; }
.month .future { background-color: #fcfcfd; }
.month .future.day-off { background-color: #f6f7f9; }
.month .not-yet { background: repeating-linear-gradient(135deg, #f4f5f7, #f4f5f7 4px, #fff 4px, #fff 8px); }
/* A working day nobody filled in: a pale tint and a small red dot, no heavy box. */
.month .is-missing, .swatch.is-missing { background-color: #fff6f5; }
.month td.is-missing::after, .swatch.is-missing::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: #e5534b;
}
.month .is-overtime, .swatch.is-overtime { background-color: #ffe699; }
.month .is-leave, .swatch.is-leave { background-color: #dbe8fb; }
.month .is-official { background-color: #e6f4ea; }
.month .is-discipline, .swatch.is-discipline { background-color: #ffc7ce; color: #9c0006; }
.month .is-discipline i { color: #9c0006; }
.month .is-terminated, .swatch.is-terminated { background-color: #d0cece; color: #555; }
.month .shift-n, .swatch.shift-n { background-color: #d9d2e9; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); margin: 12px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch {
  position: relative; display: inline-grid; place-items: center; width: 24px; height: 20px; border-radius: 4px;
  border: 1px solid var(--border); font-style: normal; font-size: 11px; color: var(--text);
}
.swatch b { font-weight: 700; }
/* Totals: three groups, short headings, quiet empty cells */
.month thead th.month__group { height: 29px; box-sizing: border-box; padding: 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-left: 2px solid var(--border); }
.month thead tr + tr th { top: 29px; height: 24px; }
.month--totals thead th.month__total { min-width: 58px; white-space: nowrap; font-size: 11.5px; padding: 6px 8px; cursor: help; }
.month--totals tbody td.month__total { background: transparent; font-weight: 500; }
.month--totals tbody tr:nth-child(even) > td, .month--totals tbody tr:nth-child(even) > th { background-color: #fafbfd; }
.month--totals tfoot th, .month--totals tfoot td { position: sticky; bottom: 0; background: var(--head); font-weight: 700; border-top: 2px solid var(--border); height: 40px; }
.month--totals tfoot .month__name { font-size: 13px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.bulk-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.bulk-bar select, .bulk-bar input { height: 32px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; background: #fff; }
.bulk-bar input { width: 70px; padding: 0 6px; }

/* The day screen on a phone: one card per person, the boxes the full width of the finger */
/* The day screen on a narrower screen (a tablet, a half-width window): one card per person */
@media (max-width: 1180px) {
  .day-table thead { display: none; }
  .day-table, .day-table tbody { display: block; }
  .day-table tr.day-row {
    display: grid; grid-template-columns: auto auto 1fr; gap: 8px 16px; padding: 12px 16px; align-items: end;
    border-bottom: 1px solid var(--border);
  }
  .day-table tr.day-row > td { display: block; padding: 0; border: 0; background: transparent; }
  .day-table tr.day-row > td:first-child { grid-column: 1 / -1; min-width: 0; }
  .day-table tr.day-row > td.day-table__split { grid-column: 1 / 3; }
  .day-table tr.day-row > td.day-row__overtime { grid-column: 3; text-align: right; }
  .day-table tr.day-row > td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: .04em;
  }
  .day-table tr.day-row > td.day-row__overtime::before { display: inline; margin-right: 6px; }
}

@media (max-width: 720px) {
  .content { padding: 16px 12px 90px; }
  .day-table tr.day-row { grid-template-columns: 1fr auto; }
  .day-table tr.day-row > td:nth-child(2), .day-table tr.day-row > td:nth-child(3),
  .day-table tr.day-row > td.day-table__split { grid-column: 1 / -1; }
  .day-table tr.day-row > td.day-row__hours { grid-column: 1; }
  .day-table tr.day-row > td.day-row__overtime { grid-column: 2; }
  .day-table select, .day-table input, .day-table .second-part select { width: 100%; max-width: none; height: 44px; font-size: 15px; }
  .day-table .second-part { display: grid; grid-template-columns: 2fr 1fr; }
  .day-table input[type=number] { width: 120px; }
  .tap span, .tap-more summary { height: 42px; font-size: 15px; }
  .taps { width: 100%; }
  .taps > .tap { flex: 1 1 0; min-width: 0; }
  .taps > .tap span { width: 100%; min-width: 0; padding: 0 4px; }
  .tap-menu .tap span { height: 40px; }
  .tap-menu { left: auto; right: 0; }
  #day-form .card:last-of-type { margin-bottom: 20px; }
  .day-row.is-suggested { background: #f7f9fc; }
  .save-bar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0;
              padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .save-bar .btn { width: 100%; height: 46px; font-size: 15px; }
  .save-bar .muted { display: none; }
  .day-head h1, .day-head__date h1 { font-size: 22px; }
  .month-switch h1 { font-size: 20px; }
  .open-days { flex-wrap: wrap; }
  .open-days > .muted { flex-basis: 100%; }
  .day-chip { padding: 6px 10px; }
}
/* Changing one day right in the month grid */
.month td.editable { cursor: pointer; }
.month td.editable:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
.cell-editor {
  position: absolute; z-index: 50; width: 360px; max-width: calc(100vw - 24px); padding: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 27, 45, .18); display: grid; gap: 10px;
}
.cell-editor__title { font-weight: 600; }
.cell-editor__grid { display: grid; grid-template-columns: 1fr 1.4fr 0.7fr; gap: 8px; }
.cell-editor label { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); }
.cell-editor select, .cell-editor input { height: 36px; border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 13px; padding: 0 6px; min-width: 0; }
.cell-editor__actions { display: flex; gap: 8px; align-items: center; }
.cell-editor .grow { flex: 1; }

/* The managers' dashboard */
.stats--5 { grid-template-columns: repeat(5, 1fr); }
.stat__value small { font-size: 15px; font-weight: 600; color: var(--muted); }
.stat__hint.is-bad { color: var(--danger); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; align-items: start; }
.dash-table td, .dash-table th { padding-top: 9px; padding-bottom: 9px; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table td a { color: var(--blue); text-decoration: none; font-weight: 600; }
.dash-table td a:hover { text-decoration: underline; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.hbars { display: grid; gap: 10px; margin-bottom: 12px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; }
.hbar__code { font-weight: 700; }
.hbar__track { height: 10px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.hbar__fill { display: block; height: 100%; background: #8aa9d6; border-radius: 99px; }
.hbar__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 1100px) {
  .stats--5 { grid-template-columns: repeat(3, 1fr); }
  .stats--5 > .card { border-bottom: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .stats--5 { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
