:root {
  --bg: #f6fbff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.5);
  --line: rgba(16, 85, 104, 0.16);
  --line-strong: rgba(16, 85, 104, 0.26);
  --text: #0b1524;
  --muted: #526577;
  --accent: #0ea5e9;
  --accent-dark: #3b5bdb;
  --brand-teal: #19d3c5;
  --brand-cyan: #0ea5e9;
  --brand-blue: #3b5bdb;
  --indigo: #3b5bdb;
  --green: #168a4a;
  --amber: #b76b04;
  --red: #be3d3d;
  --rose: #c04b70;
  --shadow: 0 20px 60px rgba(14, 165, 233, 0.14), 0 8px 28px rgba(11, 21, 36, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 14% 12%, rgba(25, 211, 197, 0.22) 0%, transparent 35%),
    radial-gradient(circle at 88% 18%, rgba(14, 165, 233, 0.18) 0%, transparent 38%),
    radial-gradient(circle at 60% 88%, rgba(59, 91, 219, 0.11) 0%, transparent 42%),
    linear-gradient(135deg, #f8fbff 0%, #eef9fb 52%, #f7fbff 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

body::before {
  background:
    radial-gradient(circle at 28% 76%, rgba(25, 211, 197, 0.12), transparent 36%),
    radial-gradient(circle at 76% 58%, rgba(245, 158, 11, 0.09), transparent 34%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 650;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.text-button {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--accent-dark);
  min-height: 34px;
  padding-inline: 4px;
}

.auth-side-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 12px;
  padding: 14px;
}

button:hover,
.button-link:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.13);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[contenteditable="true"]:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(25, 123, 143, 0.22);
  outline-offset: 2px;
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #3b4856;
  font-size: 0.84rem;
  font-weight: 700;
}

.primary {
  background: var(--brand-cyan);
  border-color: rgba(14, 165, 233, 0.68);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: #fff;
}

.primary:hover {
  background: var(--brand-blue);
  border-color: rgba(59, 91, 219, 0.7);
}

.wide-button {
  width: 100%;
}

.login-page {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(248, 253, 255, 0.84), rgba(248, 253, 255, 0.38)),
    url("/assets/workhub-login-bg.svg") center / cover no-repeat;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(340px, 500px) minmax(300px, 520px);
  min-height: 100vh;
  padding: clamp(20px, 5vw, 70px);
}

.login-panel,
.login-preview,
.panel,
.side-card,
.metric,
.sub-panel,
.doc-card,
.qr-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-panel {
  background: rgba(255, 255, 255, 0.86);
  padding: clamp(24px, 4vw, 42px);
}

.brand-row {
  align-items: center;
  display: flex;
  gap: 13px;
}

.login-brand {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-row.compact {
  margin-bottom: 22px;
}

.brand-row.compact strong,
.brand-row.compact span {
  display: block;
}

.brand-row.compact div:last-child {
  min-width: 0;
}

.brand-logo,
.brand-icon {
  display: block;
  flex: 0 0 auto;
}

.brand-logo {
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-login {
  width: min(286px, 100%);
}

.brand-icon {
  height: 46px;
  width: 46px;
}

.brand-mark {
  align-items: center;
  background: #17202a;
  border-radius: 8px;
  color: #fff;
  display: grid;
  flex: 0 0 auto;
  font-weight: 800;
  height: 44px;
  place-items: center;
  width: 44px;
}

.eyebrow {
  color: var(--muted);
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0;
  margin-bottom: 4px;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

h3 {
  font-size: 1.05rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 18px 0 24px;
}

.login-hint {
  background: rgba(25, 211, 197, 0.1);
  border: 1px solid rgba(25, 211, 197, 0.28);
  border-radius: 12px;
  color: var(--accent-dark);
  margin-bottom: 16px;
  padding: 11px 13px;
}

.login-separator {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  letter-spacing: 0.08em;
  margin: 18px 0;
  text-transform: uppercase;
}

.login-separator::before,
.login-separator::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.badge-login-card {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 13px;
  padding: 14px;
}

.badge-login-card strong,
.badge-login-card p {
  margin: 0;
}

.badge-login-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.badge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-actions button {
  flex: 1 1 148px;
}

.badge-camera {
  background: #0b1524;
  border-radius: 16px;
  color: #fff;
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
}

.badge-camera video {
  aspect-ratio: 16 / 10;
  background: #0b1524;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
}

.badge-camera span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  text-align: center;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
}

label span,
.muted,
.doc-meta {
  color: var(--muted);
}

label span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wide {
  grid-column: 1 / -1;
}

.form-error {
  color: var(--red);
  margin: 0;
  min-height: 1.2em;
}

.demo-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
}

.login-preview {
  align-self: stretch;
  display: grid;
  gap: 18px;
  padding: 30px;
}

.preview-head {
  display: grid;
  gap: 5px;
}

.preview-head strong {
  font-size: 1.4rem;
}

.module-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-list span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 48px;
  padding: 13px;
}

.account-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.mini-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
}

.mini-chip.ok {
  background: rgba(22, 138, 74, 0.1);
  color: var(--green);
}

.mini-chip.warn {
  background: rgba(183, 107, 4, 0.1);
  color: var(--amber);
}

.badge-result {
  display: grid;
  gap: 18px;
}

.badge-result h3 {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0.04em;
}

.badge-result p {
  color: var(--muted);
  margin: 8px 0 0;
}

.badge-qr {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: inline-grid;
  justify-self: start;
  padding: 12px;
}

.badge-qr svg {
  display: block;
  height: auto;
  max-width: min(280px, 100%);
}

.portal-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-appbar,
.mobile-nav-backdrop,
.side-close,
.mobile-quickbar {
  display: none;
}

.mobile-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.mobile-brand strong,
.mobile-brand span {
  display: block;
}

.mobile-brand span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-button {
  align-items: center;
  display: none;
  flex: 0 0 auto;
  gap: 4px;
  height: 42px;
  padding: 0;
  width: 42px;
}

.mobile-menu-button span {
  background: var(--text);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 18px;
}

.side {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
  position: sticky;
  top: 0;
}

.nav {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  color: #7a8794;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 4px 0;
  text-transform: uppercase;
}

.nav-item {
  justify-content: flex-start;
  min-height: 42px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  width: 100%;
}

.nav-item span {
  min-width: 0;
}

.nav-item.active {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: inset 3px 0 0 var(--brand-cyan);
  color: var(--brand-blue);
  font-weight: 700;
}

.side-card {
  box-shadow: none;
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding: 14px;
}

.side-card strong {
  font-size: 1rem;
}

.side-card span:last-child {
  color: var(--muted);
}

.main {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 48px) 48px;
}

.topbar,
.panel-head,
.modal-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.topbar {
  margin-bottom: 22px;
}

.top-actions,
.modal-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  align-items: center;
  background: var(--brand-cyan);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.global-search {
  flex: 1 1 360px;
  max-width: 520px;
  position: relative;
}

.global-search label span {
  position: absolute;
  transform: translateY(-999px);
}

.global-search input {
  min-height: 44px;
}

.search-popover {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  left: 0;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
}

.search-popover button {
  align-items: stretch;
  display: grid;
  gap: 3px;
  justify-content: stretch;
  min-height: 0;
  padding: 10px 12px;
  text-align: left;
}

.search-popover small,
.search-popover span {
  color: var(--muted);
}

.toast-stack {
  display: grid;
  gap: 10px;
  position: fixed;
  right: 22px;
  top: 22px;
  width: min(360px, calc(100vw - 32px));
  z-index: 100;
}

.toast {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(22, 138, 74, 0.25);
  box-shadow: var(--shadow);
  justify-content: flex-start;
  min-height: 46px;
}

.toast.danger {
  border-color: rgba(190, 61, 61, 0.32);
  color: var(--red);
}

.help-tip {
  align-items: center;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 999px;
  color: var(--brand-blue);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  position: relative;
  width: 28px;
}

.help-tip:hover::after,
.help-tip:focus::after {
  background: #0b1524;
  border-radius: 10px;
  color: #fff;
  content: attr(aria-label);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  padding: 9px 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  z-index: 80;
}

.toolbar-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  margin-bottom: 14px;
}

.segmented {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
}

.segmented button {
  border-color: transparent;
  min-height: 34px;
}

.segmented button.active {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
  color: var(--brand-blue);
}

.grid {
  display: grid;
  gap: 14px;
}

.skeleton-shell .side,
.skeleton-card,
.skeleton {
  overflow: hidden;
  position: relative;
}

.skeleton::after,
.skeleton-card::after {
  animation: skeleton-shine 1.25s infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

.logo-line,
.nav-line,
.title-line,
.action-line,
.block-line,
.block-box {
  background: rgba(14, 165, 233, 0.12);
  border-radius: 14px;
}

.logo-line {
  height: 54px;
  margin-bottom: 26px;
}

.nav-line {
  height: 42px;
  margin-bottom: 10px;
}

.nav-line.short {
  width: 72%;
}

.title-line {
  height: 58px;
  width: min(360px, 70vw);
}

.action-line {
  height: 42px;
  width: 180px;
}

.block-line {
  height: 22px;
  margin-bottom: 12px;
}

.block-line.short {
  width: 65%;
}

.block-box {
  height: 180px;
}

@keyframes skeleton-shine {
  to {
    transform: translateX(100%);
  }
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  box-shadow: none;
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.metric strong {
  color: var(--text);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 350;
  line-height: 1;
}

.metric strong {
  font-size: 2rem;
}

.metric small {
  color: var(--muted);
}

.two-col {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 18px;
}

.small-gap {
  gap: 12px;
  margin-top: 12px;
}

.panel {
  box-shadow: none;
  margin-bottom: 18px;
  padding: 20px;
}

.panel-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.stack,
.task-list,
.list,
.cards,
.qr-grid {
  display: grid;
  gap: 10px;
}

.task,
.notice,
.list-item,
.quick-card,
.info-box,
.signature-preview {
  background: var(--surface-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.task {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto auto;
  padding: 12px;
}

.task.slim {
  grid-template-columns: 1fr;
}

.task span,
.quick-card span,
.list-item span,
.list-item small {
  color: var(--muted);
}

.notice {
  padding: 13px;
}

.notice.high {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.notice p {
  margin: 6px 0 0;
}

.quick-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.quick-card {
  align-items: stretch;
  color: var(--text);
  display: grid;
  gap: 8px;
  justify-content: stretch;
  min-height: 118px;
  padding: 16px;
  text-align: left;
  text-decoration: none;
}

.quick-card:visited {
  color: var(--text);
}

.quick-card.passive {
  cursor: default;
}

.quick-card.compact-card {
  min-height: 104px;
}

.quick-card .big {
  color: var(--text);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 350;
}

.split-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 18px;
}

.search-input {
  margin-bottom: 12px;
}

.list-item {
  align-items: stretch;
  display: grid;
  gap: 6px;
  justify-content: stretch;
  min-height: 86px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.list-item.active {
  background: rgba(25, 211, 197, 0.12);
  border-color: rgba(14, 165, 233, 0.36);
}

.reader-panel {
  min-height: 60vh;
}

.document-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.document-head h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  margin-top: 12px;
}

.document-head p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.tag,
.status {
  align-items: center;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #415163;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 24px;
  padding: 2px 9px;
}

.tag.warn,
.status.pending,
.status.submitted,
.status.needs_review,
.status.review,
.status.screening,
.status.interview,
.status.trial,
.status.offer {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.32);
  color: var(--amber);
}

.tag.ok,
.status.approved,
.status.paid,
.status.published,
.status.complete,
.status.hired {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.28);
  color: var(--green);
}

.status.rejected,
.status.incomplete {
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--red);
}

.status.in_progress,
.status.due,
.status.medium,
.status.high,
.status.normal {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.32);
  color: var(--amber);
}

.status.ready,
.status.done,
.status.checked,
.status.effective,
.status.closed,
.status.low,
.status.archived {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.28);
  color: var(--green);
}

.status.blocked,
.status.disposed,
.status.critical,
.status.ineffective {
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--red);
}

.status.restricted {
  background: #eef1ff;
  border-color: rgba(83, 103, 166, 0.25);
  color: var(--indigo);
}

.status.replaced {
  background: #eef1ff;
  border-color: rgba(83, 103, 166, 0.25);
  color: var(--indigo);
}

.rich {
  font-size: 1rem;
  line-height: 1.7;
}

.rich h2,
.rich h3,
.editor h2,
.editor h3 {
  margin: 1.1em 0 0.4em;
}

.rich p,
.rich ul,
.rich ol {
  margin: 0 0 1em;
}

.rich table,
.editor table {
  border-collapse: collapse;
  margin: 16px 0;
  width: 100%;
}

.rich th,
.rich td,
.editor th,
.editor td {
  border: 1px solid var(--line-strong);
  padding: 9px;
}

.rich th,
.editor th {
  background: #eef5f7;
}

.calendar-wrap,
.table-wrap {
  border-radius: 16px;
  overflow-x: auto;
}

.calendar-table {
  min-width: 980px;
}

.calendar-table th:first-child {
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 1;
}

.calendar-table th:first-child,
.calendar-table td:first-child {
  background: rgba(255, 255, 255, 0.92);
}

.calendar-table th small {
  color: var(--muted);
  display: block;
  font-weight: 500;
}

.calendar-table td,
.calendar-table th {
  min-width: 34px;
  padding: 8px;
  text-align: center;
}

.vac-cell {
  color: #fff;
  font-weight: 800;
  position: relative;
}

.vac-cell.pending {
  background: var(--amber);
}

.vac-cell.approved {
  background: var(--green);
}

.vac-cell.rejected {
  background: var(--red);
}

.vac-cell.cat-U {
  background: var(--green);
}

.vac-cell.cat-K {
  background: var(--red);
}

.vac-cell.cat-S {
  background: var(--amber);
}

.vac-cell.cat-E,
.vac-cell.cat-H {
  background: var(--indigo);
}

.vac-cell.portion-morning,
.vac-cell.portion-afternoon,
.vac-cell.portion-half {
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
  color: var(--green);
}

.vac-cell.portion-afternoon {
  background: linear-gradient(90deg, transparent 0 50%, currentColor 50% 100%);
}

.vac-cell.portion-half {
  background: linear-gradient(135deg, currentColor 0 48%, transparent 48% 52%, currentColor 52% 100%);
}

.weekend-head,
.weekend-cell {
  background: rgba(238, 242, 245, 0.7);
}

.holiday-head,
.holiday-cell {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

.vacation-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: max-content 120px minmax(180px, 260px) max-content;
  justify-content: start;
  margin-bottom: 12px;
}

.vacation-toolbar button {
  min-width: 112px;
}

.vacation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.vacation-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
}

.vac-badge {
  align-items: center;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-style: normal;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
}

.vac-badge.U {
  background: var(--green);
}

.vac-badge.K {
  background: var(--red);
}

.vac-badge.S {
  background: var(--amber);
}

.vac-badge.E,
.vac-badge.H {
  background: var(--indigo);
}

.half-demo {
  background: linear-gradient(90deg, var(--green) 0 50%, #fff 50% 100%);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  height: 22px;
  width: 28px;
}

.vacation-estimate {
  background: #eef5f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.vacation-estimate span {
  color: var(--muted);
}

.ocr-result {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.warn-text {
  color: var(--amber) !important;
  font-weight: 800;
}

.profile-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-box {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.info-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.sub-panel {
  box-shadow: none;
  padding: 15px;
}

.sub-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.mini-head {
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.sub-panel.private {
  background: #fff7fb;
  border-color: rgba(192, 75, 112, 0.22);
}

.hr-doc-center .task {
  align-items: center;
}

.section-title {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.employee-check-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.info-strip,
.inspection-progress {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  color: var(--muted);
  line-height: 1.45;
  padding: 12px;
}

.info-strip.warn-strip {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: var(--amber);
  margin: 12px 0;
}

.info-strip.ok-strip {
  background: rgba(34, 197, 94, 0.11);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--green);
  margin: 12px 0;
}

.inline-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.search-hero-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) max-content;
  margin-bottom: 16px;
}

.search-hero-form input {
  min-height: 50px;
}

.search-result-list {
  display: grid;
  gap: 10px;
}

.search-result-row {
  align-items: start;
  display: grid;
  gap: 5px;
  justify-content: stretch;
  min-height: 94px;
  padding: 14px;
  text-align: left;
}

.search-result-row small {
  color: var(--muted);
}

.pipeline-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipeline-column {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 420px;
  padding: 12px;
}

.pipeline-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pipeline-head span {
  background: rgba(14, 165, 233, 0.12);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 800;
  min-width: 28px;
  padding: 3px 8px;
  text-align: center;
}

.candidate-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.candidate-card span,
.candidate-card small,
.candidate-card p {
  color: var(--muted);
}

.candidate-card p {
  margin: 0;
}

.inspection-progress {
  display: grid;
  gap: 8px;
}

.inspection-progress strong {
  color: var(--text);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  gap: 10px;
  grid-template-columns: 100px minmax(0, 1fr);
}

.timeline-item time {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline-item div {
  border-left: 2px solid rgba(14, 165, 233, 0.22);
  display: grid;
  gap: 3px;
  padding-left: 12px;
}

.timeline-item span {
  color: var(--muted);
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.doc-card {
  box-shadow: none;
  display: grid;
  gap: 11px;
  padding: 16px;
}

.doc-card p {
  color: var(--muted);
  line-height: 1.52;
  margin: 0;
}

.qr-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.role-card-grid {
  display: grid;
  gap: 12px;
}

.role-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.role-card > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.role-card > div:first-child span {
  color: var(--muted);
  font-size: 0.82rem;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qr-card {
  box-shadow: none;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px;
  text-align: center;
}

.qr-card img {
  height: 190px;
  max-width: 100%;
  object-fit: contain;
}

.empty {
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  padding: 18px;
}

.empty-rich {
  display: grid;
  gap: 5px;
}

.empty-rich strong {
  color: var(--text);
}

dialog {
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 860px;
  padding: 0;
  width: calc(100vw - 32px);
}

dialog.drawer-dialog {
  border-radius: 24px 0 0 24px;
  height: 100dvh;
  margin: 0 0 0 auto;
  max-height: 100dvh;
  max-width: 760px;
  width: min(760px, calc(100vw - 18px));
}

dialog::backdrop {
  backdrop-filter: blur(8px);
  background: rgba(11, 21, 36, 0.34);
}

.modal-shell {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(34px);
  max-height: inherit;
  overflow-y: auto;
  padding: 22px;
}

.drawer-dialog .modal-shell {
  min-height: 100dvh;
  padding-bottom: 42px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.icon-button {
  border-radius: 999px;
  font-size: 1.35rem;
  height: 38px;
  padding: 0;
  width: 38px;
}

.modal-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.primary.danger {
  background: var(--red);
  border-color: rgba(190, 61, 61, 0.54);
}

.primary.warn {
  background: var(--amber);
  border-color: rgba(183, 107, 4, 0.54);
}

.primary.success {
  background: var(--green);
  border-color: rgba(22, 138, 74, 0.54);
}

.confirm-body {
  display: grid;
  gap: 16px;
}

.confirm-body p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.check,
.check-grid {
  align-items: center;
}

.check {
  display: flex;
  gap: 8px;
}

.check input {
  min-height: auto;
  width: auto;
}

.check-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-toolbar {
  align-items: center;
  background: #edf2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px;
}

.editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.65;
  min-height: 280px;
  padding: 18px;
}

.signature-preview {
  padding: 14px;
}

.signature-preview p {
  color: var(--muted);
  line-height: 1.55;
}

.process-card,
.org-row {
  background: var(--surface-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.process-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.process-head strong,
.process-head span {
  display: block;
}

.process-head p {
  color: var(--muted);
  line-height: 1.45;
  margin: 6px 0 0;
}

.progress {
  background: #dfe8ee;
  border-radius: 999px;
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.progress span {
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-cyan), var(--brand-blue));
  display: block;
  height: 100%;
}

.checklist {
  display: grid;
  gap: 8px;
}

.checkline {
  align-items: center;
  display: flex;
  gap: 9px;
}

.checkline input {
  min-height: auto;
  width: auto;
}

.safety-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(234, 244, 247, 0.64)),
    radial-gradient(circle at 12% 18%, rgba(25, 211, 197, 0.16), transparent 40%);
}

.safety-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.safety-tabs button {
  min-height: 36px;
}

.safety-tabs button.active {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.34);
  color: var(--brand-blue);
  font-weight: 800;
}

.workflow-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.workflow-strip span,
.step-chip,
.risk-pill {
  border-radius: 8px;
}

.workflow-strip span {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid var(--line);
  color: #3b4856;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 48px;
  padding: 10px;
}

.assessment-card {
  background: var(--surface-soft);
}

.safety-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 13px 0;
}

.step-chip {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.62);
  display: grid;
  gap: 5px;
  justify-content: stretch;
  min-height: 66px;
  padding: 10px;
  text-align: left;
}

.step-chip.done {
  border-color: rgba(40, 122, 91, 0.26);
}

.step-chip.in_progress {
  border-color: rgba(168, 102, 20, 0.28);
}

.step-chip small {
  color: var(--muted);
}

.hazard-list {
  display: grid;
  gap: 8px;
}

.hazard-list > div {
  align-items: center;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 0.6fr) minmax(200px, 1fr) auto;
  padding: 10px;
}

.hazard-list span {
  color: var(--muted);
}

.risk-pill {
  border: 1px solid var(--line);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 28px;
  padding: 5px 9px;
  white-space: nowrap;
}

.risk-pill.low {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.28);
  color: var(--green);
}

.risk-pill.medium,
.risk-pill.high {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.32);
  color: var(--amber);
}

.risk-pill.critical {
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--red);
}

.ladder-card {
  background: var(--surface-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 160px;
  padding: 16px;
}

.ladder-card.active {
  border-color: var(--accent);
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.qr-mini {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px;
  text-align: center;
}

.qr-mini img {
  height: 132px;
  max-width: 100%;
}

.calendar-list {
  display: grid;
  gap: 9px;
}

.calendar-item {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  padding: 12px;
}

.calendar-item time {
  color: var(--accent-dark);
  font-weight: 800;
}

.calendar-item span {
  color: var(--muted);
  display: block;
}

.org-row {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 18px 1fr auto;
}

.org-row > span {
  border-radius: 999px;
  height: 18px;
  width: 18px;
}

.org-row small {
  color: var(--muted);
}

.expense-lines {
  display: grid;
  gap: 12px;
}

.expense-line {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 12px;
}

.inline-form {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-strip,
  .hazard-list > div,
  .ladder-card,
  .compact-grid,
  .pipeline-board {
    grid-template-columns: 1fr;
  }

  .pipeline-column {
    min-height: auto;
  }
}

@media (max-width: 780px) {
  .login-page,
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .login-page {
    align-items: start;
    gap: 18px;
    padding: 18px;
  }

  .login-panel,
  .login-preview {
    border-radius: 16px;
    width: 100%;
  }

  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-shell {
    padding-bottom: 86px;
    padding-top: 74px;
  }

  .mobile-appbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    height: 74px;
    justify-content: space-between;
    left: 0;
    padding: 12px 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 70;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu-button span {
    grid-column: 1;
    grid-row: 1;
  }

  .mobile-menu-button span:first-child {
    transform: translateY(-6px);
  }

  .mobile-menu-button span:last-child {
    transform: translateY(6px);
  }

  .mobile-nav-backdrop {
    background: rgba(11, 21, 36, 0.26);
    backdrop-filter: blur(8px);
    border: 0;
    border-radius: 0;
    display: block;
    inset: 0;
    min-height: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 50;
  }

  .side {
    border-radius: 0 22px 22px 0;
    box-shadow: 0 24px 72px rgba(11, 21, 36, 0.22);
    height: 100dvh;
    left: 0;
    max-width: min(340px, calc(100vw - 34px));
    overscroll-behavior: contain;
    padding: 22px;
    position: fixed;
    top: 0;
    transform: translateX(-110%);
    transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    z-index: 60;
  }

  .portal-shell.nav-open .side {
    transform: translateX(0);
  }

  .side-close {
    display: inline-grid;
    margin-left: auto;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav-group {
    align-content: start;
  }

  .nav-item {
    min-height: 38px;
  }

  .side-card {
    margin-top: 12px;
  }

  .main {
    min-width: 0;
    overflow-x: clip;
    padding: 14px;
  }

  .metrics {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    padding: 14px;
  }

  .metric span {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
  }

  .metric strong {
    font-size: 1.62rem;
  }

  .topbar,
  .panel-head,
  .modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .modal-actions {
    justify-content: flex-start;
  }

  .top-actions {
    display: none;
  }

  .panel,
  .metric,
  .doc-card,
  .qr-card,
  .quick-card {
    border-radius: 14px;
  }

  button,
  .button-link,
  input,
  textarea,
  select {
    min-height: 44px;
  }

  .table-wrap {
    margin-inline: -6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  th,
  td {
    padding: 10px 9px;
    white-space: nowrap;
  }

  .global-search {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .toolbar-row,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    top: 86px;
    width: auto;
  }

  .mobile-quickbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: 22px;
    bottom: 12px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 12px;
    padding: 8px;
    position: fixed;
    right: 12px;
    z-index: 65;
  }

  .mobile-quickbar button {
    border-radius: 16px;
    font-size: 0.82rem;
    min-height: 42px;
    padding: 0 8px;
  }

  dialog.drawer-dialog {
    border-radius: 22px 22px 0 0;
    height: calc(100dvh - 24px);
    margin: auto 0 0;
    max-width: none;
    width: 100vw;
  }

  .form-grid,
  .demo-grid,
  .module-list,
  .profile-grid,
  .check-grid,
  .expense-line,
  .vacation-toolbar,
  .search-hero-form {
    grid-template-columns: 1fr;
  }

  .task {
    grid-template-columns: 1fr;
  }

  .notice .process-head {
    align-items: stretch;
    flex-direction: column;
  }

  .notice .process-head button {
    width: 100%;
  }

  .role-card > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .calendar-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}
