.brand {
  display: grid;
  gap: 14px;
  padding: 10px 12px 22px;
}

.brand-logo-frame {
  display: flex;
  width: 174px;
  height: auto;
  min-height: 64px;
  align-items: center;
  overflow: visible;
}

.brand-logo-frame.is-login {
  width: 118px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
  transform: none;
}

.brand-copy small {
  color: rgba(255, 252, 246, 0.64);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 0 12px;
  color: rgba(255, 252, 246, 0.78);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-link:hover {
  color: #fffaf2;
  border-color: rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-link.is-active {
  color: #fffaf2;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(var(--blur-md));
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.page-title h1,
.login-panel h1,
.page-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.page-title {
  min-width: 0;
}

.page-title h1 {
  font-size: 34px;
  line-height: 1.02;
  overflow-wrap: normal;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-bar {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 36px;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--color-muted);
  background: var(--glass-bg-light);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(var(--blur-md));
}

.command-bar > span:not(.command-key),
.command-palette-input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-palette-input {
  width: 100%;
  min-height: 32px;
  border: 0;
  padding: 0 10px;
  color: var(--color-text);
  background: transparent;
  box-shadow: none;
  outline: none;
  font: inherit;
  font-weight: 650;
  cursor: text;
}

.command-palette-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.command-key {
  display: inline-grid;
  min-width: 38px;
  min-height: 22px;
  place-items: center;
  border: 1px solid rgba(31, 38, 40, 0.12);
  border-radius: 8px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -1px 0 rgba(31, 38, 40, 0.06);
  font-size: 12px;
  font-weight: 800;
}

.command-palette-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  left: 0;
  width: min(520px, max(100%, 420px));
  max-height: min(460px, calc(100dvh - 160px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  padding: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.68), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(246, 243, 236, 0.62)),
    rgba(255, 255, 255, 0.62);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--blur-lg));
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1), transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.command-bar.is-open .command-palette-panel {
  opacity: 1;
  transform: translateY(0);
}

.command-palette-panel[hidden] {
  display: none;
}

.command-palette-list {
  display: grid;
  gap: 4px;
}

.command-palette-item {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 10px;
  color: var(--color-text);
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.command-palette-item:hover,
.command-palette-item.is-selected {
  border-color: rgba(184, 135, 70, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 242, 0.46)),
    rgba(184, 135, 70, 0.1);
  box-shadow: 0 10px 24px rgba(31, 38, 40, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transform: translateY(-1px);
}

.command-palette-item[hidden] {
  display: none;
}

.command-palette-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--color-sidebar);
  background: rgba(16, 36, 44, 0.08);
}

.command-palette-icon .nav-icon {
  width: 19px;
  height: 19px;
}

.command-palette-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.command-palette-copy strong,
.command-palette-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-palette-copy strong {
  font-size: 14px;
  font-weight: 850;
}

.command-palette-copy small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 650;
}

.command-palette-empty {
  margin: 4px;
  border-radius: 16px;
  padding: 14px;
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.34);
  font-size: 13px;
  font-weight: 700;
}

.topbar-actions {
  --topbar-control-height: 50px;
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.field,
input,
select,
textarea {
  min-height: 42px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0 36px 0 14px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.4);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(var(--blur-sm));
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

textarea {
  min-height: 110px;
  padding-block: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(184, 135, 70, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.12);
}

.form-select {
  min-height: 46px;
  appearance: none;
  border-color: rgba(184, 135, 70, 0.18);
  border-radius: 18px;
  padding: 0 44px 0 16px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(31, 38, 40, 0.72) 50%) right 20px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(31, 38, 40, 0.72) 50%, transparent 50%) right 14px center / 7px 7px no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 250, 242, 0.44)),
    rgba(255, 255, 255, 0.48);
  font-weight: 720;
  line-height: 1;
}

.company-switcher {
  position: relative;
  z-index: 70;
  width: min(292px, 100%);
}

.company-switcher-button {
  display: grid;
  width: 100%;
  min-height: var(--topbar-control-height);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 5px 11px 5px 5px;
  color: var(--color-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 252, 246, 0.32)),
    rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(var(--blur-md));
  cursor: pointer;
  outline: none;
  text-align: left;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.company-switcher.has-company-name .company-switcher-button {
  min-height: var(--topbar-control-height);
}

.company-switcher-button:hover,
.company-switcher-button:focus-visible,
.company-switcher.is-open .company-switcher-button {
  border-color: rgba(184, 135, 70, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 252, 246, 0.4)),
    rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.12), var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.company-switcher-button:active {
  transform: translateY(1px);
}

.company-switcher-icon,
.company-switcher-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(184, 135, 70, 0.18);
  border-radius: 999px;
  color: var(--color-accent);
  background: rgba(184, 135, 70, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.company-switcher-icon svg,
.company-switcher-item-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-switcher-copy,
.company-switcher-item-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  justify-content: start;
}

.company-switcher-copy strong,
.company-switcher-item-copy strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-copy small,
.company-switcher-item-copy small {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 640;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-copy small.is-empty {
  display: none;
}

.company-switcher-arrow {
  display: flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: rgba(31, 38, 40, 0.62);
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), color var(--transition-fast);
}

.company-switcher-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-switcher.is-open .company-switcher-arrow {
  color: var(--color-accent);
  transform: rotate(180deg);
}

.company-switcher-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: min(360px, calc(100vw - 44px));
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  padding: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.82), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(246, 243, 236, 0.48));
  box-shadow: 0 26px 70px rgba(31, 38, 40, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(var(--blur-lg));
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 200ms ease;
  visibility: hidden;
}

.company-switcher.is-open .company-switcher-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.company-switcher-search {
  display: block;
  margin-bottom: 8px;
}

.company-switcher-search input {
  width: 100%;
  min-height: 40px;
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.44);
  font-weight: 620;
}

.company-switcher-list {
  display: grid;
  max-height: 286px;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.company-switcher-item {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 17px;
  padding: 8px 9px;
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.company-switcher-item:hover,
.company-switcher-item:focus-visible {
  border-color: rgba(184, 135, 70, 0.22);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.company-switcher-item:active {
  transform: translateY(1px);
}

.company-switcher-item.is-active {
  border-color: rgba(184, 135, 70, 0.26);
  background: rgba(184, 135, 70, 0.1);
}

.company-switcher-item.is-hidden {
  display: none;
}

.company-switcher-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
}

.company-switcher-item.is-active .company-switcher-check {
  opacity: 1;
}

.company-switcher-create {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-top: 1px solid rgba(31, 38, 40, 0.08);
  padding-top: 8px;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.company-switcher-create:hover,
.company-switcher-create:focus-visible {
  color: #8f642c;
}

.user-menu {
  position: relative;
  z-index: 120;
  flex: 0 0 auto;
}

.user-menu summary {
  display: flex;
  width: 100%;
  min-width: 176px;
  min-height: var(--topbar-control-height);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  background: var(--glass-bg-light);
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(var(--blur-md));
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.user-menu summary:hover,
.user-menu summary:focus-visible {
  border-color: rgba(184, 135, 70, 0.34);
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.12), var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fffaf2;
  background: linear-gradient(135deg, var(--color-sidebar), #254852);
  font-size: 12px;
  font-weight: 800;
}

.user-meta {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.user-meta strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.12;
  text-transform: capitalize;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  z-index: 130;
  min-width: 224px;
  margin-top: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 10px;
  background:
    var(--ambient-light),
    rgba(255, 250, 242, 0.72);
  box-shadow: 0 22px 60px rgba(31, 38, 40, 0.14);
  backdrop-filter: blur(var(--blur-lg));
}

.user-menu-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
}

.user-menu-card strong,
.user-menu-card small {
  display: block;
}

.user-menu-card small {
  margin-top: 2px;
  color: var(--color-muted);
}

.user-menu-username {
  color: var(--color-accent) !important;
  font-weight: 800;
}

.menu-separator {
  display: block;
  height: 1px;
  margin: 2px 4px 8px;
  background: var(--color-line);
}

.user-menu-panel .button {
  width: 100%;
  justify-content: flex-start;
}

@media (min-width: 961px) and (max-width: 1509px) {
  .page-title h1 {
    font-size: clamp(28px, 2.35vw, 32px);
  }

  .command-bar {
    gap: 9px;
    padding-inline: 10px;
  }

  .command-key {
    min-width: 34px;
  }

  .topbar-actions {
    --topbar-control-height: 48px;
    gap: 8px;
  }

  .topbar .company-switcher {
    width: clamp(220px, 23vw, 268px);
    flex: 1 1 220px;
    min-width: 0;
  }

  .topbar .company-switcher-button {
    gap: 8px;
    padding-right: 9px;
  }

  .topbar .company-switcher-icon,
  .topbar .avatar {
    width: 32px;
    height: 32px;
  }

  .topbar .company-switcher-arrow {
    width: 18px;
  }

  .topbar .user-menu summary {
    min-width: 150px;
    padding-right: 10px;
  }
}

@media (min-width: 961px) and (max-width: 1180px) {
  .command-bar {
    min-height: 34px;
    font-size: 13px;
  }

  .topbar .company-switcher {
    width: 220px;
    flex-basis: 220px;
  }

  .topbar .company-switcher-copy small,
  .topbar .user-meta small {
    display: none;
  }

  .topbar .company-switcher-copy,
  .topbar .user-meta {
    gap: 0;
  }

  .topbar .user-menu summary {
    min-width: 134px;
  }
}

.surface-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background:
    var(--ambient-light),
    var(--surface-tint),
    var(--glass-bg-light);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--blur-md));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header .eyebrow {
  margin: 0;
  line-height: 26px;
}

.surface-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.metric-card {
  display: grid;
  min-height: 174px;
  align-content: space-between;
  gap: 16px;
  padding: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.52), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.17)),
    rgba(255, 255, 255, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.metric-card:hover {
  background:
    var(--ambient-light),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.5);
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-2px);
}

.system-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 24px;
  border-radius: var(--radius-2xl);
  padding: 32px;
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 255, 255, 0.82), transparent 34%),
    radial-gradient(circle at 95% 10%, rgba(184, 135, 70, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.24)),
    rgba(255, 255, 255, 0.42);
}

.system-status-copy {
  display: grid;
  gap: 18px;
}

.company-inline-label {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.company-inline-label strong {
  color: var(--color-text);
  font-weight: 850;
}

.company-inline-label span {
  font-weight: 650;
}

.system-status-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
}

.system-status-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.65;
}

.system-status-stats {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 12px;
}

.status-stat-card {
  display: grid;
  min-height: 104px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
  padding: 20px;
  color: var(--color-muted);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.58), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 250, 242, 0.24)),
    rgba(255, 255, 255, 0.28);
  box-shadow:
    0 16px 42px rgba(31, 38, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--blur-md));
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.status-stat-card:hover {
  box-shadow:
    0 20px 48px rgba(31, 38, 40, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  transform: translateY(-2px);
}

.status-stat-card span {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--color-text);
  font-size: clamp(28px, 2.45vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.status-stat-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(184, 135, 70, 0.18);
  border-radius: 18px;
  color: var(--color-accent);
  background: rgba(184, 135, 70, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.status-stat-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.status-stat-card-ok {
  color: rgba(255, 250, 242, 0.72);
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(16, 36, 44, 0.95), rgba(20, 55, 64, 0.86));
  box-shadow:
    0 18px 48px rgba(16, 36, 44, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.status-stat-card-ok strong,
.status-stat-card-alert strong {
  color: #fffaf2;
}

.status-stat-card-ok .status-stat-icon {
  border-color: rgba(255, 250, 242, 0.18);
  color: #fffaf2;
  background: rgba(255, 255, 255, 0.12);
}

.status-stat-card-alert {
  color: rgba(255, 250, 242, 0.76);
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(92, 37, 45, 0.96), rgba(126, 50, 55, 0.86));
  box-shadow:
    0 18px 48px rgba(92, 37, 45, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.status-stat-card-alert .status-stat-icon {
  border-color: rgba(255, 250, 242, 0.16);
  color: #fffaf2;
  background: rgba(255, 255, 255, 0.11);
}

.metric-main {
  display: grid;
  gap: 8px;
}

.metric-value {
  color: var(--color-text);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.16;
  word-break: break-word;
}
.metric-value span{
  font-weight: 400;
}
.metric-value .company-inline-label {
  display: inline;
}

.metric-value .company-inline-label strong {
  font-weight: 850;
}

.metric-value .company-inline-label span {
  color: var(--color-muted);
  font-weight: 650;
}

.metric-detail {
  color: var(--color-muted);
  line-height: 1.5;
}

.card-link {
  width: fit-content;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 800;
}

.page-intro {
  max-width: 820px;
  padding: 30px;
}

.page-intro p {
  color: var(--color-muted);
  line-height: 1.6;
}

.company-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.34);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.company-row:hover {
  background: rgba(255, 255, 255, 0.54);
  transform: translateY(-1px);
}

.button,
.primary-button,
.button-primary,
.button-secondary,
.button-ghost,
.button-danger {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.primary-button,
.button-primary {
  color: #fffaf2;
  background: linear-gradient(135deg, var(--color-sidebar), #244a54);
  box-shadow: 0 12px 28px rgba(16, 36, 44, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button-hero {
  min-height: 52px;
  width: fit-content;
  padding-inline: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 32px rgba(16, 36, 44, 0.22),
    0 0 28px rgba(184, 135, 70, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-secondary {
  color: var(--color-text);
  background: rgba(184, 135, 70, 0.13);
  border: 1px solid rgba(184, 135, 70, 0.18);
}

.button-ghost {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.26);
}

.button-danger {
  color: #fffaf2;
  background: var(--color-error);
}

.button-quiet-danger {
  color: var(--color-error);
  border: 1px solid rgba(162, 58, 45, 0.18);
  background: rgba(162, 58, 45, 0.08);
}

.button:hover,
.primary-button:hover,
.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-danger:hover {
  transform: translateY(-1px);
}

.badge {
  display: inline-flex;
  flex-shrink: 0;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(var(--blur-sm));
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.card-header-actions .button {
  min-height: 34px;
  padding-inline: 14px;
}

.badge-ok {
  color: var(--color-ok);
  background: rgba(47, 122, 85, 0.12);
}

.badge-warning {
  color: var(--color-warning);
  background: rgba(165, 106, 22, 0.13);
}

.badge-error {
  color: var(--color-error);
  background: rgba(162, 58, 45, 0.13);
}

.badge-info {
  color: var(--color-info);
  background: rgba(63, 111, 143, 0.13);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(var(--blur-md));
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  text-align: left;
}

.data-table th {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tr {
  border-bottom: 1px solid var(--color-line);
}

.data-table tbody tr:hover {
  background: rgba(184, 135, 70, 0.07);
}

.login-body {
  display: grid;
  position: relative;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(184, 135, 70, 0.1), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(16, 36, 44, 0.42), rgba(16, 36, 44, 0.72)),
    url("../assets/bg-desktop.jpg") center / cover no-repeat fixed,
    var(--color-sidebar);
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(456px, 100%);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 32px;
  background:
    var(--ambient-light),
    rgba(246, 243, 236, 0.62);
  box-shadow: 0 26px 70px rgba(12, 23, 27, 0.26);
  backdrop-filter: blur(var(--blur-lg));
}

.login-panel .brand-logo-frame {
  filter: invert(1) brightness(0.22) sepia(0.25) saturate(1.4);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-panel .login-form .form-field input[type="text"],
.login-panel .login-form .form-field input[type="email"],
.login-panel .login-form .form-field input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(16, 36, 44, 0.14);
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 15px;
  font-weight: 720;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--color-text);
  font-weight: 750;
}

.form-error {
  margin: 20px 0 0;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--color-error);
  background: rgba(162, 58, 45, 0.11);
}

.operation-form {
  display: grid;
  gap: 24px;
}

.generate-page {
  display: grid;
  width: 100%;
  gap: 30px;
}

.generate-workspace {
  display: grid;
  gap: 30px;
}

.generate-main-column {
  display: grid;
  min-width: 0;
  gap: 30px;
}

.generate-intro-card,
.generate-form-card,
.generate-result-card,
.generate-error-card,
.recent-generations-card {
  display: grid;
  gap: 26px;
  padding: clamp(24px, 3vw, 34px);
}

.generate-intro-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 148px;
}

.operation-intro-card {
  width: 100%;
}

.generate-intro-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.generate-section-heading h3,
.generate-result-card h3,
.generate-error-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 24px;
  line-height: 1.06;
}

.generate-section-heading .eyebrow {
  font-size: 11px;
}

.generate-intro-card p,
.generate-section-heading p,
.generate-error-card > p {
  max-width: 62ch;
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 16.5px;
  line-height: 1.55;
}

.generate-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.generate-context {
  display: grid;
  max-width: 260px;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.operation-intro-context {
  align-content: center;
}

.operation-intro-company,
.operation-intro-badges {
  display: contents;
}

.generate-context strong {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.25;
}

.generate-form-card {
  width: 100%;
}

.generate-form-card.is-secondary {
  margin-top: 2px;
  opacity: 0.92;
}

.generate-result-card {
  border-color: rgba(47, 122, 85, 0.18);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.7), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(246, 243, 236, 0.48));
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.field-helper,
.field-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.field-label {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 750;
}

.form-field input[type="text"],
.form-field input[type="month"] {
  min-height: 50px;
  border-radius: 18px;
  padding-inline: 16px;
  font-size: 15px;
  font-weight: 720;
}

.form-field input[type="month"] {
  position: relative;
  cursor: pointer;
}

.form-field input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
  opacity: 0.72;
  background-position: right 14px center;
  background-size: 18px 18px;
  filter: sepia(0.28) saturate(1.4) hue-rotate(350deg);
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-dropzone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 144px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  padding: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.62), transparent 38%),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.upload-dropzone:hover,
.upload-dropzone:focus-within,
.upload-dropzone.has-file,
.upload-dropzone.is-dragging {
  border-color: rgba(184, 135, 70, 0.34);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.72), transparent 38%),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.1), var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.upload-dropzone.is-dragging {
  border-style: dashed;
  background:
    radial-gradient(circle at 10% 0%, rgba(184, 135, 70, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.5);
}

.upload-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(184, 135, 70, 0.2);
  border-radius: 18px;
  color: var(--color-accent);
  background: rgba(184, 135, 70, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.upload-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.upload-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.upload-copy strong {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.2;
}

.upload-copy small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-filename {
  overflow: hidden;
  margin-top: 4px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-button {
  flex: 0 0 auto;
  pointer-events: none;
}

.recent-generations-card {
  align-content: start;
}

.recent-generations-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.55;
}

.recent-generations-list {
  display: grid;
  gap: 12px;
}

.recent-generation-item {
  display: grid;
  min-width: 0;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 250, 242, 0.3)),
    rgba(255, 255, 255, 0.36);
  box-shadow:
    0 14px 34px rgba(31, 38, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.recent-generation-item:hover {
  border-color: rgba(184, 135, 70, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.78), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 250, 242, 0.36)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    0 18px 42px rgba(31, 38, 40, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.recent-generation-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.recent-generation-main strong {
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.recent-generation-main span {
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
}

.recent-generation-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.recent-generation-meta div {
  display: grid;
  gap: 2px;
}

.recent-generation-meta dt {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.recent-generation-meta dd {
  margin: 0;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.employees-page {
  display: grid;
  width: 100%;
  gap: 24px;
}

.employees-intro-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
}

.employees-intro-card h2,
.employees-list-card h3,
.employee-edit-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.employees-intro-card p {
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.employees-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metrics-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employees-list-card,
.employee-edit-card {
  display: grid;
  min-width: 0;
  gap: 24px;
  padding: clamp(22px, 3vw, 32px);
}

.employees-list-header {
  align-items: start;
}

.mappings-page .employees-list-header {
  flex-wrap: wrap;
}

.mappings-page .employees-list-header > :first-child {
  min-width: 0;
  flex: 1 1 320px;
}

.mappings-page .employees-list-header .card-header-actions {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.employees-new-button {
  white-space: nowrap;
}

.employees-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.employee-search {
  position: relative;
  display: grid;
  gap: 8px;
}

.employee-search input {
  min-height: 46px;
  border-color: rgba(184, 135, 70, 0.22);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--color-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 242, 0.48)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    0 12px 28px rgba(31, 38, 40, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 720;
}

.employee-search input::placeholder {
  color: rgba(31, 38, 40, 0.48);
  font-weight: 650;
}

.employee-search input:focus {
  border-color: rgba(184, 135, 70, 0.54);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 242, 0.56)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    0 0 0 4px rgba(184, 135, 70, 0.12),
    0 14px 30px rgba(31, 38, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.employee-search span,
.employee-edit-form .form-field span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.employee-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.employee-filter-pill {
  min-height: 38px;
  border: 1px solid rgba(184, 135, 70, 0.16);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-weight: 850;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.employee-filter-pill:hover,
.employee-filter-pill.is-active {
  border-color: rgba(184, 135, 70, 0.36);
  background: rgba(184, 135, 70, 0.14);
}

.employee-filter-pill.is-active {
  box-shadow: inset 0 0 0 1px rgba(184, 135, 70, 0.16), 0 8px 18px rgba(184, 135, 70, 0.08);
}

.employees-table {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 10px 18px;
  margin: -10px -10px -18px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.employees-table-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
  isolation: isolate;
}

.employees-table-shell::before,
.employees-table-shell::after {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 54px;
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity var(--transition-fast);
}

.employees-table-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(246, 243, 236, 0.92), rgba(246, 243, 236, 0));
}

.employees-table-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(246, 243, 236, 0.92), rgba(246, 243, 236, 0));
}

.employees-table-shell.can-scroll-left::before,
.employees-table-shell.can-scroll-right::after {
  opacity: 1;
}

.employees-scroll-hint {
  position: absolute;
  z-index: 4;
  top: -46px;
  right: 8px;
  display: none;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(184, 135, 70, 0.18);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--color-accent);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 242, 0.48)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 20px rgba(16, 36, 44, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.employees-table-shell.has-horizontal-overflow.can-scroll-right .employees-scroll-hint {
  display: inline-flex;
  opacity: 0.88;
  transform: translateY(-95px);
}

.employees-table-shell.has-started-scroll .employees-scroll-hint {
  opacity: 0;
  transform: translateY(3px);
}

.employees-table-head,
.employee-row {
  display: grid;
  width: max(100%, 1120px);
  grid-template-columns: minmax(220px, 1.5fr) 118px 82px 128px minmax(160px, 1fr) 190px;
  align-items: center;
  gap: 10px;
}

.employees-table-head {
  padding: 0 14px 8px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.employees-table-body {
  display: grid;
  width: max(100%, 1120px);
  gap: 10px;
}

.employee-row {
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 22px;
  padding: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.58), transparent 38%),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.employee-row:hover {
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.68), transparent 38%),
    rgba(255, 255, 255, 0.42);
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-1px);
}

.employee-row[hidden],
.employees-filter-empty[hidden] {
  display: none !important;
}

.employee-main-cell {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.employee-main-cell strong {
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 850;
}

.employee-main-cell span,
.employee-detail-cell,
.employee-action-muted {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.employee-pt-cell {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 850;
}

.employee-detail-cell {
  line-height: 1.35;
}

.employee-action-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.employee-action-cell .button {
  min-height: 38px;
  padding-inline: 13px;
}

.mappings-count-badge {
  white-space: nowrap;
}

.mapping-row {
  grid-template-columns: minmax(220px, 1.55fr) 118px minmax(210px, 1.1fr) 132px minmax(170px, 0.9fr) 180px;
}

.mappings-table-head {
  grid-template-columns: minmax(220px, 1.55fr) 118px minmax(210px, 1.1fr) 132px minmax(170px, 0.9fr) 180px;
}

.mapping-payroll-code-cell {
  letter-spacing: 0.04em;
}

.mapping-payroll-description-cell {
  color: var(--color-text);
  font-weight: 760;
}

.mapping-status-cell {
  display: flex;
  justify-content: flex-start;
}

.mapping-detail-cell {
  color: var(--color-muted);
}

.mapping-compact-relation {
  display: none;
}

.payroll-code-row,
.payroll-codes-table-head {
  grid-template-columns: minmax(120px, 0.45fr) minmax(260px, 1.7fr) minmax(170px, 0.7fr) 180px;
}

.payroll-code-description-cell {
  color: var(--color-text);
  font-weight: 720;
  overflow-wrap: anywhere;
}

.payroll-code-usage-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.payroll-code-action-cell {
  justify-content: flex-end;
}

.payroll-description-preview {
  min-height: 1.2em;
  color: var(--color-accent);
}

.mapping-form-grid {
  align-items: start;
}

.mapping-form-field {
  grid-template-rows: auto minmax(2.5em, auto) auto auto;
  align-content: start;
}

.company-form-grid {
  align-items: start;
}

.company-form-grid .form-field {
  grid-template-rows: auto minmax(1.5em, auto) auto;
  align-content: start;
}

.mapping-field-description {
  max-width: 46ch;
  line-height: 1.25;
}

.mapping-bulk-form {
  gap: 24px;
}

.mapping-bulk-list {
  display: grid;
  gap: 14px;
}

.mapping-bulk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-soft);
}

.mapping-bulk-row.has-error {
  border-color: rgba(162, 58, 45, 0.28);
}

.mapping-row-error {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 760;
}

.companies-list {
  display: grid;
  gap: 14px;
}

.users-list {
  display: grid;
  gap: 14px;
}

.company-row-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.company-row-card:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 135, 70, 0.26);
  background: rgba(255, 255, 255, 0.44);
}

.company-row-card.is-active {
  border-color: rgba(58, 125, 95, 0.42);
  box-shadow:
    inset 4px 0 0 rgba(58, 125, 95, 0.42),
    var(--shadow-soft);
}

.company-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.company-row-main strong {
  display: block;
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.2;
}

.company-row-main span:not(.badge) {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 720;
}

.company-row-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.company-row-metrics div {
  border: 1px solid rgba(31, 38, 40, 0.07);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.company-row-metrics dt {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.company-row-metrics dd {
  margin: 5px 0 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.company-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.user-form-grid {
  align-items: start;
}

.delete-policy-note {
  margin: 0;
  border: 1px solid rgba(162, 58, 45, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--color-text);
  background: rgba(162, 58, 45, 0.08);
  font-size: 13px;
  font-weight: 760;
}

.technical-logs-page {
  display: grid;
  width: 100%;
  gap: 24px;
}

.technical-logs-card {
  display: grid;
  gap: 24px;
}

.technical-logs-toolbar {
  grid-template-columns: 1fr;
}

.technical-log-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, 180px) minmax(150px, 190px) auto;
  align-items: end;
  gap: 12px;
}

.technical-log-filter-field {
  display: grid;
  gap: 8px;
}

.technical-log-filter-field > span,
.technical-log-search > span {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 760;
}

.technical-log-select {
  width: 100%;
}

.technical-log-table-shell {
  min-width: 0;
}

.technical-log-table-body {
  width: 100%;
  min-width: 960px;
  gap: 13px;
}

.technical-log-row {
  display: grid;
  width: 100%;
  grid-template-columns: 132px 78px 86px minmax(120px, 0.75fr) minmax(180px, 1.4fr) minmax(150px, 1fr) 102px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(31, 38, 40, 0.075);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 5% 0%, rgba(255, 255, 255, 0.74), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(246, 243, 236, 0.2)),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.technical-log-row:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 135, 70, 0.24);
  background:
    radial-gradient(circle at 5% 0%, rgba(255, 255, 255, 0.82), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(246, 243, 236, 0.26)),
    rgba(255, 255, 255, 0.42);
}

.technical-log-row > span {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.technical-log-row > span::before {
  content: attr(data-label);
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.technical-log-row code {
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.technical-log-action {
  justify-items: end;
}

.technical-log-detail-card {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
}

.technical-log-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.technical-log-json-block {
  display: grid;
  gap: 10px;
}

.technical-log-json-block > span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.technical-log-json-block pre {
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(31, 38, 40, 0.08);
  border-radius: 18px;
  padding: 16px;
  color: rgba(31, 38, 40, 0.88);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  white-space: pre-wrap;
  word-break: break-word;
}

.technical-log-summary-card-error {
  border-color: rgba(116, 45, 58, 0.26);
}

.technical-log-summary-card-error::before {
  background: rgba(116, 45, 58, 0.82);
}

.technical-log-summary-card-error::after {
  background: radial-gradient(circle at 0% 18%, rgba(116, 45, 58, 0.18), transparent 42%);
}

.technical-log-summary-card-error strong {
  color: var(--color-error);
}

.technical-log-summary-card-info {
  border-color: rgba(63, 111, 143, 0.22);
}

.technical-log-summary-card-info::before {
  background: rgba(63, 111, 143, 0.7);
}

.technical-log-summary-card-info::after {
  background: radial-gradient(circle at 0% 18%, rgba(63, 111, 143, 0.18), transparent 42%);
}

.technical-log-summary-card-info strong {
  color: var(--color-info);
}

.technical-log-summary-card-success {
  border-color: rgba(47, 122, 85, 0.22);
}

.technical-log-summary-card-success::before {
  background: rgba(47, 122, 85, 0.72);
}

.technical-log-summary-card-success::after {
  background: radial-gradient(circle at 0% 18%, rgba(47, 122, 85, 0.18), transparent 42%);
}

.technical-log-summary-card-success strong {
  color: var(--color-ok);
}

.technical-logs-empty {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(31, 38, 40, 0.07);
  border-radius: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.34);
}

.technical-logs-empty strong {
  color: var(--color-text);
  font-size: 17px;
}

.technical-logs-empty span {
  color: var(--color-muted);
}

.settings-page {
  display: grid;
  width: 100%;
  gap: 24px;
}

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

.settings-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.settings-metrics-grid-operator {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-section-card {
  display: grid;
  min-width: 0;
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
}

.settings-section-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 400;
  line-height: 1.06;
}

.settings-definition-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.settings-definition-list div,
.settings-status-row,
.settings-diagnostic-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(31, 38, 40, 0.07);
  border-radius: 18px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.settings-definition-list dt,
.settings-status-row > span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-definition-list dd,
.settings-status-row strong {
  min-width: 0;
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.settings-status-row {
  justify-items: start;
  min-height: 58px;
}

.settings-status-row strong {
  justify-self: start;
  text-align: left;
}

.settings-status-row .badge {
  justify-self: end;
  white-space: nowrap;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 150px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(31, 38, 40, 0.07);
  border-radius: 18px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.info-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info-value {
  min-width: 0;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.info-status {
  display: inline-flex;
  justify-content: flex-end;
  white-space: nowrap;
}

.info-status .badge {
  white-space: nowrap;
}

.settings-diagnostics-list,
.settings-status-list {
  display: grid;
  gap: 12px;
}

@media (min-width: 1181px) and (max-width: 1349px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-definition-list div,
  .settings-status-row {
    grid-template-columns: 1fr auto;
  }

  .settings-definition-list dt,
  .settings-status-row > span {
    grid-column: 1 / -1;
  }

  .settings-definition-list dd,
  .settings-status-row strong,
  .settings-diagnostic-row span:not(.badge),
  .settings-filename {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .info-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }

  .info-label {
    grid-column: 1;
  }

  .info-value {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .info-status {
    grid-column: 2;
    grid-row: 1;
  }
}

.settings-diagnostic-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-diagnostic-row div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.settings-diagnostic-row strong {
  color: var(--color-text);
  font-size: 14px;
}

.settings-diagnostic-row span:not(.badge) {
  color: var(--color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.settings-empty-state {
  justify-content: flex-start;
  text-align: left;
}

.settings-filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px !important;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.settings-database-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.backup-list-modal[hidden] {
  display: none;
}

.backup-list-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.backup-list-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 33, 43, 0.78);
  backdrop-filter: blur(8px);
}

.backup-list-modal-dialog {
  position: relative;
  display: grid;
  width: min(720px, 100%);
  max-height: min(80dvh, 760px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  background:
    var(--ambient-light),
    linear-gradient(145deg, rgba(248, 246, 240, 0.96), rgba(238, 241, 238, 0.92));
  box-shadow: 0 28px 80px rgba(3, 22, 29, 0.34);
  backdrop-filter: blur(var(--blur-md));
}

.backup-list-modal-header,
.backup-list-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.backup-list-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.06;
}

.backup-list-modal-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

.backup-list-item {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(31, 38, 40, 0.08);
  border-radius: 16px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.backup-list-item-heading strong {
  color: var(--color-text);
  font-size: 14px;
}

.backup-list-item-size {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 750;
}

.backup-list-modal-state {
  min-height: 140px;
}

html.has-backup-modal-open,
html.has-backup-modal-open body {
  overflow: hidden;
}

.settings-maintenance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-maintenance-list span {
  border: 1px solid rgba(184, 135, 70, 0.16);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--color-text);
  background: rgba(184, 135, 70, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.card-header-actions .button-compact {
  white-space: nowrap;
}

.employee-action-muted {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
}

.employee-edit-form {
  display: grid;
  gap: 22px;
}

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

.employee-edit-form .form-field {
  display: grid;
  gap: 8px;
}

.employee-active-check {
  max-width: 420px;
}

.schedules-page {
  display: grid;
  width: 100%;
  gap: 24px;
}

.breadcrumb-link {
  width: fit-content;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 850;
}

.schedules-intro-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
}

.schedules-intro-card h2,
.schedules-table-card h3,
.schedule-edit-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.schedules-intro-card p,
.schedule-summary-card p,
.empty-state {
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.app-error-page {
  display: grid;
  min-height: min(620px, calc(100dvh - 180px));
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.app-error-card {
  display: grid;
  justify-items: center;
  width: min(100%, 560px);
  gap: 18px;
  padding: clamp(28px, 4vw, 44px);
  text-align: center;
}

.app-error-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 20px 44px rgba(38, 48, 49, 0.12);
  color: var(--color-accent);
}

.app-error-icon .nav-icon {
  width: 32px;
  height: 32px;
}

.app-error-copy {
  display: grid;
  gap: 10px;
}

.app-error-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  line-height: 1;
}

.app-error-copy p {
  max-width: 44ch;
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.6;
}

.schedules-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.schedule-summary-card {
  position: relative;
  display: grid;
  min-height: 118px;
  gap: 8px;
  padding: 22px 22px 20px 24px;
  overflow: hidden;
  border-color: rgba(89, 112, 120, 0.18);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.76), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(246, 243, 236, 0.18)),
    rgba(255, 255, 255, 0.34);
}

.schedule-summary-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 999px;
  background: rgba(82, 105, 116, 0.58);
  content: "";
}

.schedule-summary-card::after {
  position: absolute;
  inset: 0;
  opacity: 0.58;
  pointer-events: none;
  content: "";
}

.schedule-summary-card-neutral::after {
  background: radial-gradient(circle at 0% 18%, rgba(82, 105, 116, 0.16), transparent 42%);
}

.schedule-summary-card-warning {
  border-color: rgba(165, 106, 22, 0.24);
}

.schedule-summary-card-warning::before {
  background: rgba(165, 106, 22, 0.82);
}

.schedule-summary-card-warning::after {
  background: radial-gradient(circle at 0% 18%, rgba(184, 135, 70, 0.2), transparent 42%);
}

.schedule-summary-card-error {
  border-color: rgba(116, 45, 58, 0.26);
}

.schedule-summary-card-error::before {
  background: rgba(116, 45, 58, 0.82);
}

.schedule-summary-card-error::after {
  background: radial-gradient(circle at 0% 18%, rgba(116, 45, 58, 0.18), transparent 42%);
}

.schedule-summary-card-ok {
  border-color: rgba(47, 122, 85, 0.22);
}

.schedule-summary-card-ok::before {
  background: rgba(47, 122, 85, 0.72);
}

.schedule-summary-card-ok::after {
  background: radial-gradient(circle at 0% 18%, rgba(47, 122, 85, 0.18), transparent 42%);
}

.schedule-summary-card .eyebrow {
  position: relative;
  z-index: 1;
  margin: 0;
}

.schedule-summary-card strong {
  position: relative;
  z-index: 1;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 0.94;
}
.companies-page .schedule-summary-card:nth-child(2) strong {
  font-size: clamp(22px, 4vw, 30px);
}
.schedule-summary-card-warning strong {
  color: var(--color-warning);
}

.schedule-summary-card-error strong {
  color: var(--color-error);
}

.schedule-summary-card-ok strong {
  color: var(--color-ok);
}

.schedule-summary-card p {
  position: relative;
  z-index: 1;
}

.schedules-table-card,
.schedule-edit-card,
.schedule-actions-card,
.schedule-reset-card,
.schedule-warning-card {
  min-width: 0;
  display: grid;
  gap: 24px;
  padding: clamp(22px, 3vw, 32px);
}

.schedule-actions-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.schedule-actions-card h3,
.schedule-reset-card h2,
.schedule-warning-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.05;
}

.schedule-actions-card p,
.schedule-reset-card p,
.schedule-warning-card p,
.schedule-success-card p {
  margin: 8px 0 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.schedule-success-card {
  border-color: rgba(47, 122, 85, 0.18);
  padding: 18px 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.68), transparent 38%),
    rgba(47, 122, 85, 0.09);
}

.schedule-success-card p {
  margin: 0;
  color: var(--color-ok);
  font-weight: 850;
}

.schedule-warning-card {
  border-color: rgba(165, 106, 22, 0.18);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.7), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(184, 135, 70, 0.12));
}

.schedules-table {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 10px 18px;
  margin: -10px -10px -18px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.schedules-table-shell {
  position: relative;
  min-width: 0;
  max-width: 100%;
  isolation: isolate;
}

.schedules-table-shell::before,
.schedules-table-shell::after {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 54px;
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity var(--transition-fast);
}

.schedules-table-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(246, 243, 236, 0.92), rgba(246, 243, 236, 0));
}

.schedules-table-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(246, 243, 236, 0.92), rgba(246, 243, 236, 0));
}

.schedules-table-shell.can-scroll-left::before,
.schedules-table-shell.can-scroll-right::after {
  opacity: 1;
}

.schedules-scroll-hint {
  position: absolute;
  z-index: 4;
  top: -46px;
  right: 8px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(184, 135, 70, 0.18);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--color-accent);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 242, 0.48)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 20px rgba(16, 36, 44, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.schedules-table-shell.can-scroll-right .schedules-scroll-hint {
  opacity: 0.88;
  transform: translateY(0);
}

.schedules-table-shell.has-started-scroll .schedules-scroll-hint {
  opacity: 0;
  transform: translateY(3px);
}

.schedules-table-head,
.schedule-row {
  display: grid;
  width: max(100%, 1160px);
  grid-template-columns: minmax(220px, 1.4fr) 120px repeat(7, minmax(46px, 0.38fr)) minmax(96px, 0.62fr) 152px;
  align-items: center;
  gap: 8px;
}

.schedules-table-head {
  padding: 0 14px 8px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.schedules-table-body {
  display: grid;
  width: max(100%, 1160px);
  gap: 10px;
}

.schedule-row {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 22px;
  padding: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.58), transparent 38%),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.schedule-row:hover {
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.68), transparent 38%),
    rgba(255, 255, 255, 0.42);
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-1px);
}

.schedule-employee-cell {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.schedule-employee-cell strong {
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 850;
}

.schedule-employee-cell span,
.schedule-total-cell span,
.schedule-edit-employee small,
.schedule-edit-total small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-day-cell {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
  text-align: start;
}

.muted-dash {
  color: var(--color-muted);
}

.schedule-total-cell {
  display: grid;
  gap: 3px;
}

.schedule-total-cell strong {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 900;
}

.schedule-difference {
  color: var(--color-warning) !important;
  font-weight: 850 !important;
}

.schedule-action-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.schedule-action-cell .button {
  min-height: 38px;
  padding-inline: 13px;
}

.schedule-edit-employee,
.schedule-edit-total {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.schedule-edit-employee span,
.schedule-edit-total span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.schedule-edit-employee strong,
.schedule-edit-total strong {
  color: var(--color-text);
  font-size: 20px;
  font-weight: 850;
}

.schedule-edit-form {
  display: grid;
  gap: 22px;
}

.schedule-edit-form .form-actions,
.employee-edit-form .form-actions,
.schedule-reset-form .form-actions {
  gap: 14px;
}

.schedule-edit-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.schedule-day-field {
  display: grid;
  gap: 8px;
}

.schedule-day-field span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule-day-field input {
  width: 100%;
  min-height: 48px;
  padding-inline: 12px;
  font-weight: 800;
}

.schedule-reset-form {
  display: grid;
  gap: 20px;
}

.confirm-check {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-text);
  font-weight: 750;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.confirm-check:hover,
.confirm-check:focus-within {
  border-color: rgba(184, 135, 70, 0.34);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.confirm-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.confirm-check-mark {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(184, 135, 70, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 242, 0.32)),
    rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.confirm-check-mark::after {
  content: "";
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #fffaf2;
  border-left: 2px solid #fffaf2;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0.86);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.confirm-check input:checked + .confirm-check-mark {
  border-color: rgba(184, 135, 70, 0.72);
  background: linear-gradient(135deg, var(--color-accent), #9c6e35);
}

.confirm-check input:checked + .confirm-check-mark::after {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.confirm-check input:focus-visible + .confirm-check-mark {
  box-shadow: 0 0 0 4px rgba(184, 135, 70, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.result-item {
  display: grid;
  min-width: 0;
  gap: 5px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.result-item span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.result-item strong {
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
}

.technical-detail {
  overflow: auto;
  max-height: 220px;
  margin: 0;
  border: 1px solid rgba(162, 58, 45, 0.16);
  border-radius: 16px;
  padding: 14px;
  color: var(--color-error);
  background: rgba(162, 58, 45, 0.08);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.generate-error-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.generate-error-list li {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(162, 58, 45, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.28);
  font-weight: 750;
}

.generate-error-inline-action {
  width: fit-content;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 850;
}

.mapping-prefill-note {
  margin: 0;
  border: 1px solid rgba(184, 135, 70, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--color-text);
  background: rgba(184, 135, 70, 0.08);
  font-size: 13px;
  font-weight: 760;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.button:disabled,
.button.is-loading {
  cursor: wait;
  opacity: 0.82;
  transform: none;
}

.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 250, 242, 0.38);
  border-top-color: #fffaf2;
  border-radius: 999px;
  animation: button-spinner-rotate 780ms linear infinite;
}

@keyframes button-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1440px) {
  .recent-generations-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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

  .upload-dropzone {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

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

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

  .employees-toolbar {
    grid-template-columns: 1fr;
  }

  .employee-filter-pills {
    justify-content: flex-start;
  }

  .employees-table-shell::before,
  .employees-table-shell::after,
  .employees-scroll-hint {
    display: none;
  }

  .employees-table {
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 0;
    padding-inline: 0;
    margin: 0;
  }

  .employees-table-head {
    display: none;
  }

  .employees-table-body {
    width: 100%;
  }

  .employee-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .employee-main-cell,
  .employee-detail-cell,
  .employee-action-cell {
    grid-column: 1 / -1;
  }

  .employee-action-cell {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mapping-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .mapping-main-cell {
    grid-column: 1;
  }

  .mapping-main-cell strong {
    font-size: 15px;
  }

  .mapping-status-cell {
    grid-column: 2;
    justify-content: flex-end;
  }

  .mapping-payroll-code-cell,
  .mapping-payroll-description-cell {
    display: none;
  }

  .mapping-compact-relation {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 7px 10px;
    border: 1px solid rgba(184, 135, 70, 0.18);
    border-radius: 16px;
    padding: 12px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 250, 242, 0.28)),
      rgba(184, 135, 70, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  }

  .mapping-compact-relation span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mapping-compact-relation strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 850;
  }

  .mapping-relation-source {
    grid-column: 1 / -1;
  }

  .mapping-relation-arrow {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    color: var(--color-accent) !important;
    background: rgba(184, 135, 70, 0.14);
  }

  .mapping-detail-cell {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .mapping-action-cell {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .payroll-code-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .payroll-code-main-cell {
    grid-column: 1;
  }

  .payroll-code-usage-cell {
    grid-column: 2;
    justify-content: flex-end;
  }

  .payroll-code-description-cell,
  .payroll-code-action-cell {
    grid-column: 1 / -1;
  }

  .payroll-code-action-cell {
    justify-content: flex-start;
  }

  .schedules-table-shell::before,
  .schedules-table-shell::after,
  .schedules-scroll-hint {
    display: none;
  }

  .schedules-table {
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 0;
    padding-inline: 0;
    margin: 0;
  }

  .schedules-table-body {
    width: 100%;
  }

  .schedules-table-head {
    display: none;
  }

  .schedule-row {
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
  }

  .schedule-employee-cell,
  .schedule-row > [role="cell"]:nth-child(2),
  .schedule-total-cell,
  .schedule-action-cell {
    grid-column: 1 / -1;
  }

  .schedule-day-cell {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(184, 135, 70, 0.16);
    border-radius: 14px;
    padding: 10px 6px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 250, 242, 0.3)),
      rgba(184, 135, 70, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 8px 18px rgba(16, 36, 44, 0.05);
    text-align: center;
  }

  .schedule-day-cell::before {
    content: attr(data-label);
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .schedule-action-cell {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .technical-log-table-body {
    width: 100%;
    min-width: 0;
  }

  .technical-log-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .technical-log-row > span {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(92px, max-content) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    overflow-wrap: anywhere;
  }

  .technical-log-row > span::before {
    min-width: 0;
    white-space: nowrap;
  }

  .technical-log-action {
    justify-items: start;
  }

  .schedule-edit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .technical-log-filters {
    grid-template-columns: 1fr 1fr;
  }

  .technical-log-search,
  .technical-log-filters .button {
    grid-column: 1 / -1;
  }

  .technical-log-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
    justify-items: start;
  }

  .technical-log-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .settings-definition-list div,
  .settings-status-row {
    grid-template-columns: 1fr auto;
  }

  .info-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }

  .info-label {
    grid-column: 1;
  }

  .info-value {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .info-status {
    grid-column: 2;
    grid-row: 1;
  }

  .settings-definition-list dt,
  .settings-status-row > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .upload-dropzone {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .upload-button {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

@media (max-width: 760px) {
  .command-palette-panel {
    position: fixed;
    top: 86px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: min(70dvh, 520px);
  }

  .login-body {
    background:
      radial-gradient(circle at 20% 0%, rgba(184, 135, 70, 0.12), transparent 30%),
      linear-gradient(180deg, rgba(16, 36, 44, 0.34), rgba(16, 36, 44, 0.72)),
      url("../assets/bg-mobile.jpg") center / cover no-repeat fixed,
      var(--color-sidebar);
  }

  .generate-page,
  .generate-form-card {
    width: 100%;
  }

  .form-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .technical-log-filters {
    grid-template-columns: 1fr;
  }

  .settings-definition-list div,
  .settings-status-row,
  .settings-diagnostic-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .settings-database-actions,
  .settings-database-actions form,
  .settings-database-actions .button {
    width: 100%;
  }

  .backup-list-modal {
    align-items: end;
    padding: 12px;
  }

  .backup-list-modal-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
    padding: 18px;
  }

  .backup-list-modal-header {
    align-items: flex-start;
  }

  .backup-list-modal-close {
    width: auto;
  }

  .upload-dropzone {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .upload-button,
  .form-actions .button,
  .result-actions .button {
    width: 100%;
  }

  .result-actions {
    display: grid;
  }

  .company-row-main,
  .company-row-actions {
    display: grid;
  }

  .company-row-actions .button {
    width: 100%;
  }

  .schedule-actions-card,
  .schedule-row,
  .mapping-bulk-row,
  .company-row-metrics,
  .schedule-edit-grid,
  .employee-edit-grid {
    grid-template-columns: 1fr;
  }

  .schedule-day-cell {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: right;
  }

  .schedule-day-cell::before {
    text-align: left;
  }

  .schedule-action-cell .button,
  .schedule-actions-card .button,
  .card-header-actions .button-compact,
  .schedule-edit-form .form-actions .button,
  .employee-edit-form .form-actions .button,
  .schedule-reset-form .form-actions .button {
    width: 100%;
  }

  .card-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .mappings-page .card-header-actions {
    flex-wrap: wrap;
  }

  .card-header-actions .mappings-count-badge {
    width: fit-content;
  }

}

@media (max-width: 960px) {
  .metric-card {
    min-width: 0;
  }

  .card-header {
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
  }

  .card-header .eyebrow {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .badge {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .metric-main,
  .metric-value,
  .metric-detail {
    min-width: 0;
  }

  .metric-value {
    overflow-wrap: anywhere;
  }
  .topbar .user-menu summary {
    min-height: 42px;
  }

  .button,
  .primary-button,
  .button-primary,
  .button-secondary,
  .button-ghost,
  .button-danger {
    min-height: 44px;
  }

  .surface-card {
    border-radius: 18px;
  }

  .employees-page,
  .mappings-page,
  .companies-page,
  .users-page,
  .schedules-page,
  .technical-logs-page,
  .settings-page,
  .generate-page,
  .generate-workspace,
  .generate-main-column {
    gap: 12px;
  }

  [data-operation-intro] {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    padding: 4px 1px 6px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  [data-operation-intro]::before {
    display: none;
  }

  [data-operation-intro] .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
  }

  [data-operation-intro] h2,
  .employees-list-card h3,
  .schedules-table-card h3 {
    font-size: 24px;
    line-height: 1.05;
  }

  [data-operation-intro] p {
    max-width: 620px;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.38;
  }

  .operation-intro-context {
    width: auto;
    max-width: 100%;
    justify-items: start;
    border: 0;
    padding: 0;
    text-align: left;
  }

  .operation-intro-company {
    display: none;
  }

  .operation-intro-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .dashboard-grid,
  .schedules-summary-grid,
  .settings-metrics-grid,
  .settings-metrics-grid-operator,
  .metrics-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .employees-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .employees-page > [data-operation-intro] p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .system-status-card {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 20px;
    padding: 16px;
  }

  .system-status-copy {
    gap: 9px;
  }

  .system-status-copy > .cluster {
    gap: 7px;
  }

  .system-status-copy > .cluster .company-inline-label,
  .system-status-copy > div > .eyebrow {
    display: none;
  }

  .system-status-copy h2 {
    font-size: 27px;
    line-height: 1;
  }

  .system-status-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .system-status-copy .button-hero {
    width: fit-content;
    min-height: 42px;
    padding-inline: 16px;
  }

  .system-status-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(184, 135, 70, 0.16);
    padding-top: 10px;
  }

  .system-status-stats .status-stat-card,
  .system-status-stats .status-stat-card:last-child {
    min-height: 54px;
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 0;
    border: 0;
    border-right: 1px solid rgba(184, 135, 70, 0.13);
    border-radius: 0;
    padding: 2px 8px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .system-status-stats .status-stat-card:last-child {
    border-right: 0;
  }

  .status-stat-card > div > span {
    display: block;
    color: var(--color-muted);
    font-size: 8px;
    opacity: 1;
  }

  .status-stat-card strong {
    margin-top: 5px;
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.1;
  }

  .status-stat-icon {
    display: none;
  }

  .metric-card {
    min-height: 105px;
    gap: 7px;
    padding: 12px;
  }

  .metric-card .card-header {
    gap: 5px;
  }

  .metric-card .card-header .eyebrow {
    font-size: 8px;
    line-height: 1.15;
  }

  .metric-card .badge {
    min-height: 20px;
    padding-inline: 7px;
    font-size: 8px;
  }

  .metric-value {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.12;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .metric-detail {
    display: none;
  }

  .metric-footer {
    margin-top: 0;
    font-size: 10px;
  }

  .employees-summary-grid .schedule-summary-card,
  .schedules-summary-grid .schedule-summary-card {
    min-height: 72px;
    gap: 2px;
    padding: 10px 11px 9px 13px;
  }

  .employees-summary-grid .schedule-summary-card strong,
  .schedules-summary-grid .schedule-summary-card strong {
    font-size: 25px;
    line-height: 1;
  }

  .employees-summary-grid .schedule-summary-card > p:last-child,
  .schedules-summary-grid .schedule-summary-card > p:last-child {
    display: none;
  }

  .employees-summary-grid .schedule-summary-card .eyebrow,
  .schedules-summary-grid .schedule-summary-card .eyebrow {
    font-size: 8px;
    line-height: 1.2;
  }

  .employees-list-card {
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    padding: 4px 0 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .employees-list-card::before {
    display: none;
  }

  .employees-list-header {
    gap: 8px;
  }

  .employees-list-header .eyebrow {
    font-size: 9px;
    line-height: 1.2;
  }

  .employees-list-header .cluster {
    gap: 6px;
  }

  .employees-list-header .badge-info {
    display: none;
  }

  .employees-new-button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .employees-toolbar,
  .technical-log-filters {
    min-width: 0;
    gap: 8px;
  }

  .employee-search {
    gap: 5px;
  }

  .employee-search input,
  .form-field input,
  .form-field select,
  .form-field textarea,
  .form-select {
    min-height: 48px;
    font-size: 16px;
  }

  .employee-filter-pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1px 0 4px;
    scroll-padding-inline: 0 12px;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .employee-filter-pills::after {
    width: 12px;
    min-width: 12px;
    height: 1px;
    content: "";
  }

  .employee-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .employee-filter-pill {
    min-height: 36px;
    flex: 0 0 auto;
    padding-inline: 10px;
    font-size: 10px;
  }

  .employee-row,
  .mapping-row,
  .schedule-row,
  .technical-log-row,
  .company-row-card,
  .user-row-card,
  .mapping-bulk-row {
    gap: 9px;
    border-radius: 16px;
    padding: 12px;
  }

  .employees-table-body {
    gap: 7px;
  }

  .employee-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity status"
      "type percentage"
      "detail actions";
    align-items: center;
    gap: 6px 10px;
    padding: 10px 11px;
  }

  .employee-main-cell {
    grid-area: identity;
    gap: 1px;
  }

  .employee-main-cell strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .employee-main-cell span {
    font-size: 10px;
    line-height: 1.25;
  }

  .employee-row > [role="cell"]:nth-child(2) {
    grid-area: type;
    justify-self: start;
  }

  .employee-pt-cell {
    grid-area: percentage;
    justify-self: end;
    font-size: 12px;
  }

  .employee-row > [role="cell"]:nth-child(4) {
    grid-area: status;
    justify-self: end;
  }

  .employee-detail-cell {
    display: -webkit-box;
    min-width: 0;
    grid-area: detail;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .employee-action-cell {
    grid-area: actions;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .employee-action-muted {
    display: none;
  }

  .mapping-row.employee-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main status"
      "relation relation"
      "detail detail"
      "actions actions";
    align-items: start;
    height: auto;
  }

  .mapping-row > .mapping-main-cell {
    grid-area: main;
  }

  .mapping-row > .mapping-status-cell {
    grid-area: status;
    justify-self: end;
  }

  .mapping-row > .mapping-payroll-code-cell,
  .mapping-row > .mapping-payroll-description-cell {
    display: none;
  }

  .mapping-row > .mapping-compact-relation {
    min-width: 0;
    grid-area: relation;
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas:
      "arrow target"
      "arrow label";
    gap: 2px 9px;
    padding: 9px 10px;
  }

  .mapping-row .mapping-relation-source {
    display: none;
  }

  .mapping-row .mapping-relation-arrow {
    grid-area: arrow;
    align-self: center;
  }

  .mapping-row .mapping-compact-relation strong {
    grid-area: target;
    line-height: 1.25;
  }

  .mapping-row .mapping-compact-relation > span:last-child {
    grid-area: label;
    line-height: 1.2;
  }

  .mapping-row > .mapping-detail-cell {
    display: block;
    min-width: 0;
    grid-area: detail;
    overflow: visible;
    -webkit-line-clamp: unset;
    overflow-wrap: anywhere;
  }

  .mapping-row > .mapping-action-cell {
    grid-area: actions;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .payroll-code-row.employee-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "code usage"
      "description description"
      "actions actions";
    align-items: start;
    height: auto;
  }

  .payroll-code-row > .payroll-code-main-cell {
    grid-area: code;
  }

  .payroll-code-row > .payroll-code-description-cell {
    display: block;
    min-width: 0;
    grid-area: description;
    overflow: visible;
    -webkit-line-clamp: unset;
    overflow-wrap: anywhere;
  }

  .payroll-code-row > .payroll-code-usage-cell {
    grid-area: usage;
    justify-self: end;
  }

  .payroll-code-row > .payroll-code-action-cell {
    grid-area: actions;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .employee-detail-cell,
  .mapping-detail-cell {
    font-size: 11px;
    line-height: 1.35;
  }

  .employee-action-cell .button,
  .mapping-action-cell .button,
  .schedule-action-cell .button {
    min-height: 36px;
    width: auto;
    padding-inline: 11px;
    font-size: 10px;
  }

  .generate-form-card,
  .generate-result-card,
  .generate-error-card,
  .recent-generations-card,
  .employee-edit-card,
  .schedules-table-card,
  .schedule-edit-card,
  .schedule-actions-card,
  .schedule-reset-card,
  .schedule-warning-card,
  .settings-section-card,
  .technical-log-detail-card {
    gap: 14px;
    padding: 16px;
  }

  .form-grid,
  .employee-edit-grid,
  .company-form-grid,
  .mapping-form-grid,
  .user-form-grid {
    gap: 14px;
  }

  .upload-dropzone {
    gap: 10px;
    border-radius: 16px;
    padding: 14px;
  }

  .upload-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .technical-log-row > span {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .technical-log-row > span::before {
    font-size: 9px;
  }

  .technical-log-json-block pre,
  .technical-detail {
    max-width: 100%;
    overflow-x: auto;
    overflow-wrap: normal;
  }

  .generate-error-list li {
    padding: 10px;
    font-size: 12px;
    line-height: 1.4;
  }

  .app-error-page {
    min-height: calc(100dvh - 100px);
    padding: 12px;
  }

  .app-error-card {
    gap: 14px;
    padding: 22px 18px;
  }
}

@media (max-width: 430px) {
  [data-operation-intro] h2,
  .employees-list-card h3,
  .schedules-table-card h3 {
    font-size: 22px;
  }

  .system-status-card {
    padding: 14px;
  }

  .system-status-copy h2 {
    font-size: 25px;
  }

  .company-inline-label {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 359px) {
  .system-status-stats .status-stat-card {
    padding-inline: 5px;
  }

  .status-stat-card strong {
    font-size: 15px;
  }

  .mobile-navigation-item {
    font-size: 8px;
  }
}
