:root {
  --bg: #eef8ff;
  --surface: #ffffff;
  --surface-soft: #f4fbff;
  --ink: #102033;
  --muted: #5d7591;
  --line: #cfe3f5;
  --primary: #2aa3ee;
  --primary-strong: #168bd6;
  --primary-soft: #e5f6ff;
  --accent: #19a7e8;
  --accent-soft: #e7f8ff;
  --danger: #b43b4a;
  --danger-soft: #f0f8ff;
  --sidebar: #e8f6ff;
  --sidebar-soft: #d7efff;
  --shadow: 0 18px 45px rgba(42, 163, 238, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(42, 163, 238, 0.18), transparent 30%),
    linear-gradient(180deg, #f8fdff 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body.auth-locked .app {
  display: none;
}

body:not(.auth-locked) .login-screen {
  display: none;
}

button,
input,
select {
  font: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 78% 18%, rgba(42, 163, 238, 0.22), transparent 32%),
    linear-gradient(180deg, #f8fdff, #dff3ff);
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(42, 163, 238, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(42, 163, 238, 0.16);
}

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

.login-card h1 {
  font-size: 28px;
  color: #103f64;
}

.login-card span,
.login-status {
  color: var(--muted);
  font-size: 13px;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.login-card input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-brand {
  display: flex;
  justify-content: center;
  padding-bottom: 6px;
}

.login-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.login-copy .eyebrow {
  color: #4f6f8d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-copy h1 {
  line-height: 1.12;
}

.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-soft) 100%);
  color: #173f63;
  padding: 12px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid #bfe0f6;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.72);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding: 0 6px 14px;
  border-bottom: 1px solid rgba(42, 163, 238, 0.18);
}

.topbar h2,
.topbar p {
  margin: 0;
}

.brand-logo {
  width: 196px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.brand-logo img {
  width: 56px;
  height: auto;
  display: block;
}

.brand-logo-text {
  display: grid;
  gap: 2px;
  line-height: 1;
  color: #27a9ff;
}

.brand-logo-text strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo-text em {
  display: block;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 163, 238, 0.52) rgba(255, 255, 255, 0.6);
}

.nav::-webkit-scrollbar {
  width: 6px;
}

.nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(42, 163, 238, 0.58);
}

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

.nav-group-title {
  padding: 10px 14px 4px;
  color: #5d7f9b;
  font-size: 12px;
  font-weight: 900;
}

.nav-item {
  position: relative;
  min-height: 40px;
  border: 0;
  color: #315c7c;
  background: transparent;
  text-align: left;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px 0 44px;
  font-size: 14px;
}

.nav-item.hidden {
  display: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #103f64;
  box-shadow: inset 0 0 0 1px rgba(42, 163, 238, 0.14);
}

.nav-item.active {
  background: linear-gradient(135deg, #32adf0 0%, #168bd6 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(42, 163, 238, 0.22);
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #168bd6;
  background: rgba(42, 163, 238, 0.12);
  font-size: 12px;
  font-weight: 900;
  transform: translateY(-50%);
}

.nav-item.active::before {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.nav-icon-employee::before { content: "人"; }
.nav-icon-calendar::before { content: "日"; }
.nav-icon-attendance::before { content: "勤"; }
.nav-icon-distribution::before { content: "发"; }
.nav-icon-allowance::before { content: "补"; }
.nav-icon-salary::before { content: "薪"; }
.nav-icon-slip::before { content: "单"; }
.nav-icon-settings::before { content: "设"; }

.summary {
  margin-top: auto;
  display: grid;
  gap: 7px;
  border-top: 1px solid rgba(42, 163, 238, 0.18);
  padding-top: 22px;
}

.summary span {
  color: var(--muted);
  font-size: 13px;
}

.summary strong {
  font-size: 26px;
  letter-spacing: 0;
  color: #123e63;
}

.workspace {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: 34px 42px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 26px;
}

.auth-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #315c7c;
  font-size: 13px;
  font-weight: 900;
}

.auth-actions.hidden {
  display: none;
}

.account-menu {
  position: relative;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(42, 163, 238, 0.18);
  border-radius: 999px;
  color: #184f77;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(38, 129, 190, 0.12);
  font-size: 14px;
  font-weight: 900;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  border-color: rgba(42, 163, 238, 0.34);
  background: #ffffff;
}

.account-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9fd2ff 0%, #5fb3f0 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.66);
}

.account-avatar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
}

.account-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 22px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 14px 14px 4px 4px;
  transform: translateX(-50%);
}

.account-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #477493;
  border-bottom: 2px solid #477493;
  transform: rotate(45deg) translateY(-2px);
}

.account-trigger[aria-expanded="true"] .account-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  width: 340px;
  padding: 18px 22px;
  border: 1px solid rgba(42, 163, 238, 0.16);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(22, 72, 112, 0.18);
}

.account-dropdown.hidden {
  display: none;
}

.account-dropdown-head {
  padding: 4px 0 16px;
  border-bottom: 1px solid #e7eef5;
  color: #1c3346;
  font-size: 16px;
  font-weight: 900;
}

.account-dropdown-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.account-menu-item {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #304c62;
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.account-menu-item:hover {
  border-color: rgba(42, 163, 238, 0.2);
  color: #126ca3;
  background: #f1f9ff;
}

.notification-entry-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid rgba(42, 163, 238, 0.24);
  border-radius: 10px;
  color: #116799;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(38, 129, 190, 0.1);
  font-size: 14px;
  font-weight: 900;
}

.notification-entry-btn:hover,
.notification-entry-btn.has-pending {
  border-color: rgba(42, 163, 238, 0.42);
  background: #f4fbff;
}

.notification-entry-btn strong {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #2b6b91;
  background: #e7f5ff;
  font-size: 11px;
  line-height: 1;
}

.notification-entry-btn.has-pending strong {
  color: #ffffff;
  background: #ef4444;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 900;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.18;
  margin-top: 8px;
}

.actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.table-actions {
  margin-bottom: 16px;
}

button,
.file-import,
.more-actions summary {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(42, 163, 238, 0.22);
}

.primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 12px 26px rgba(42, 163, 238, 0.28);
}

.ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.ghost:hover {
  background: var(--surface-soft);
  border-color: #c7d4e5;
}

.danger {
  color: #fff;
  background: var(--danger);
}

.file-import {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  gap: 0;
  align-items: center;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  line-height: 1;
}

.table-actions .primary,
.table-actions .file-import {
  min-height: 40px;
}

.file-import input {
  display: none;
}

.import-status {
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-width: 220px;
}

.workflow-hint {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(42, 163, 238, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: var(--primary-soft);
  font-size: 14px;
  line-height: 1.6;
}

.import-breakdown {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.import-breakdown-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.import-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.import-breakdown article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-breakdown article.has-overlap {
  border-color: rgba(42, 163, 238, 0.28);
  background: #f0f8ff;
}

.import-breakdown strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-breakdown span {
  color: var(--muted);
  font-size: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  min-width: 0;
}

body.module-view-active .workspace {
  padding-top: 22px;
  padding-bottom: 28px;
}

body.module-view-active .topbar {
  margin-bottom: 14px;
}

body.module-view-active .eyebrow {
  font-size: 12px;
}

body.module-view-active .topbar h2 {
  margin-top: 2px;
  font-size: 28px;
}

body.module-view-active .view.active {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body.distribution-view-active {
  overflow: hidden;
}

body.distribution-view-active .workspace {
  height: 100vh;
  overflow: hidden;
  padding-top: 16px;
  padding-bottom: 12px;
}

body.distribution-view-active .topbar {
  margin-bottom: 8px;
}

body.distribution-view-active #attendanceDistribution {
  height: calc(100vh - 112px);
  min-height: 0;
}

body.module-view-active .panel {
  padding: 16px 18px;
}

body.module-view-active .panel-title {
  align-items: center;
  margin-bottom: 12px;
}

body.module-view-active .panel-title h3,
body.module-view-active .section-heading {
  font-size: 18px;
}

body.module-view-active .panel-title span {
  font-size: 12px;
}

body.module-view-active .workspace label {
  gap: 4px;
  font-size: 11px;
}

body.module-view-active .workspace input,
body.module-view-active .workspace select {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
}

body.module-view-active .workspace button,
body.module-view-active .workspace .file-import,
body.module-view-active .workspace .more-actions summary {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

body.module-view-active .table-actions {
  gap: 8px;
  margin-bottom: 10px;
}

.hidden {
  display: none !important;
}

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

.panel {
  min-width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.profile-editor,
.payslip {
  margin-bottom: 20px;
}

.payslip {
  margin-top: 20px;
}

.payslip-preview-panel {
  max-width: 980px;
  margin: 0 auto 20px;
}

.span-7 {
  grid-column: span 7;
}

.span-5 {
  grid-column: span 5;
}

.span-12 {
  grid-column: 1 / -1;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 22px;
}

.panel-title h3,
.section-heading {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.settings-location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 22px;
  padding: 12px 16px;
  border: 1px solid rgba(94, 164, 214, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, #eef8ff, #f8fcff);
}

.settings-location-bar div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.settings-location-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-location-bar strong {
  color: var(--primary-strong);
  font-size: 18px;
}

#socialInsurancePanel .panel-title {
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

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

.span-form {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  background: #fbfdff;
  font-weight: 700;
}

input:focus,
select:focus {
  outline: 3px solid rgba(42, 163, 238, 0.18);
  border-color: var(--primary);
}

input:disabled,
input[readonly] {
  color: #5b6678;
  background: #f2f5f9;
}

.field-warning {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.settings-actions {
  margin-top: 18px;
}

.result-list {
  margin: 0;
  display: grid;
  gap: 2px;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.result-list dt,
.result-list dd {
  margin: 0;
}

.result-list dt {
  color: var(--muted);
}

.result-list dd {
  font-weight: 900;
}

.more-actions {
  position: relative;
}

.more-actions summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  cursor: pointer;
}

.more-actions summary::-webkit-details-marker {
  display: none;
}

.more-actions[open] summary {
  border-color: #c7d4e5;
  background: var(--surface-soft);
}

.more-actions div {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 190px;
  margin-top: 8px;
  padding: 8px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.more-actions div button {
  justify-content: center;
  width: 100%;
}

.result-list .net {
  border-bottom: 0;
  padding-top: 18px;
}

.result-list .net dd {
  color: var(--accent);
  font-size: 30px;
}

.payslip-grid,
.rules-grid,
.attendance-summary {
  display: grid;
  gap: 12px;
}

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

.payslip-sheet {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payslip-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
}

.payslip-header div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.payslip-header div:last-child {
  border-right: 0;
}

.payslip-header span,
.payslip-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.payslip-header strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

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

.payslip-columns section {
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.payslip-columns section:last-child {
  border-right: 0;
}

.payslip-columns h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.payslip-lines {
  margin: 0;
}

.payslip-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.payslip-lines div:last-child {
  border-bottom: 0;
}

.payslip-lines dt,
.payslip-lines dd {
  margin: 0;
}

.payslip-lines dt {
  color: var(--muted);
}

.payslip-lines dd {
  font-weight: 800;
  text-align: right;
}

.payslip-lines .subtotal {
  margin-top: 4px;
  padding-top: 12px;
}

.payslip-lines .subtotal dt,
.payslip-lines .subtotal dd {
  color: var(--ink);
  font-weight: 900;
}

.payslip-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--accent-soft);
}

.payslip-total strong {
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

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

.attendance-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.payslip-grid div,
.rules-grid article,
.attendance-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  background: var(--surface-soft);
}

.payslip-grid span,
.attendance-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}

.payslip-grid strong {
  font-size: 17px;
}

.attendance-summary strong {
  font-size: 24px;
}

.compact-title {
  margin-bottom: 14px;
}

.compact-title h3 {
  font-size: 18px;
}

.exemption-panel {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.exemption-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.exemption-table {
  background: #fff;
}

.module-filters {
  display: grid;
  grid-template-columns: minmax(180px, 280px);
  gap: 14px;
  margin-bottom: 18px;
}

body.module-view-active .workflow-hint {
  margin: 6px 0 10px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.45;
}

body.module-view-active .module-filters {
  width: min(240px, 100%);
  margin-bottom: 10px;
}

body.module-view-active .import-status {
  flex: 1 1 auto;
  min-width: 160px;
  font-size: 12px;
}

body.module-view-active .import-breakdown {
  max-height: 130px;
  overflow: auto;
  margin: 8px 0 10px;
  padding: 10px;
}

body.module-view-active .import-breakdown-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

body.module-view-active .import-breakdown article {
  padding: 8px;
}

body.module-view-active .attendance-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  padding: 20px 28px;
}

body.module-view-active #attendanceManagement.active {
  overflow: auto;
  align-content: start;
}

body.module-view-active .attendance-command-main {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(620px, 1fr);
  align-items: end;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

body.module-view-active .attendance-command-panel .attendance-month-filter {
  width: 100%;
  margin-bottom: 0;
}

body.module-view-active .attendance-command-panel .attendance-month-filter label {
  gap: 4px;
  color: #416986;
  font-size: 12px;
  font-weight: 900;
}

body.module-view-active .attendance-command-panel .attendance-month-filter input {
  max-width: 320px;
  min-height: 36px;
  height: 36px;
  border-color: #bdddf3;
  background: #f9fdff;
  font-size: 16px;
}

body.module-view-active .attendance-command-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-width: 0;
}

body.module-view-active .attendance-actions {
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

body.module-view-active .attendance-command-tools > .import-status {
  display: none;
}

body.module-view-active .attendance-command-panel > .import-status {
  width: fit-content;
  max-width: 100%;
  min-width: 96px;
  padding: 5px 10px;
  border: 1px solid #d2e6f7;
  border-radius: 999px;
  background: #f6fbff;
  color: #55738d;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

body.module-view-active .attendance-actions .file-import,
body.module-view-active .attendance-actions button,
body.module-view-active .attendance-actions summary {
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 8px;
  font-size: 14px;
}

body.module-view-active .attendance-command-panel > .import-breakdown,
body.module-view-active .attendance-command-panel > .review-distribution,
body.module-view-active .attendance-command-panel > .attendance-review-history,
body.module-view-active .attendance-command-panel > .exemption-panel,
body.module-view-active .attendance-command-panel > .attendance-table {
  grid-column: 1 / -1;
}

body.module-view-active .attendance-review-history .compact-title {
  margin-bottom: 8px;
  padding: 0 2px;
}

body.module-view-active .attendance-review-history .compact-title h3 {
  font-size: 16px;
}

body.module-view-active .attendance-review-history .compact-title span {
  font-size: 12px;
}

body.module-view-active #calculator {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 92px);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

body.module-view-active #companyAllowance {
  grid-template-columns: minmax(0, 1fr);
}

body.module-view-active .allowance-command {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  align-items: end;
  gap: 8px 14px;
  margin-bottom: 0;
  padding: 10px 14px 12px;
  border-color: #bfe0f7;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
}

body.module-view-active .allowance-filters {
  width: 100%;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-bottom: 0;
}

body.module-view-active .allowance-filters label {
  gap: 4px;
  font-size: 12px;
}

body.module-view-active .allowance-filters input[type="month"] {
  height: 34px;
  padding: 0 10px;
  font-size: 15px;
}

body.module-view-active .allowance-command .workflow-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 6px 10px;
  border-color: #c9e7fb;
  background: #f1f9ff;
  color: #456783;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.module-view-active .allowance-command .settings-actions {
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  gap: 6px;
  flex-wrap: nowrap;
}

body.module-view-active .allowance-command .settings-actions .import-status {
  flex: 1 1 auto;
  min-width: 120px;
  white-space: nowrap;
}

body.module-view-active .allowance-command .settings-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

body.module-view-active .allowance-rules-panel {
  padding: 12px 14px;
  border-color: #bfe0f7;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcff 100%);
}

body.module-view-active .allowance-rules-table {
  max-height: none;
  overflow: visible;
}

body.module-view-active .allowance-rules-table table {
  min-width: 0;
  table-layout: fixed;
}

body.module-view-active .allowance-rules-table th,
body.module-view-active .allowance-rules-table td {
  height: 30px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

body.module-view-active .table-number-input {
  width: min(86px, 100%);
  height: 26px;
  padding: 0 5px;
  text-align: center;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #f8fbff;
  color: #0f172a;
}

body.module-view-active .allowance-rule-actions {
  align-items: center;
  justify-content: flex-end;
  margin: 6px 0 0;
  gap: 8px;
}

body.module-view-active .allowance-rule-actions button {
  min-height: 32px;
  padding: 0 12px;
}

body.module-view-active .allowance-rule-note {
  margin: 5px 0 0;
  color: #55738d;
  font-size: 11.5px;
  line-height: 1.3;
}

body.module-view-active .allowance-summary {
  align-self: stretch;
  margin-bottom: 0;
  gap: 8px;
}

body.module-view-active .allowance-summary div {
  min-height: 0;
  padding: 8px 10px;
  border-color: #c8e4f8;
  background: linear-gradient(180deg, #f7fcff 0%, #edf8ff 100%);
}

body.module-view-active .allowance-summary span {
  margin-bottom: 2px;
  font-size: 11px;
}

body.module-view-active .allowance-summary strong {
  font-size: 18px;
  line-height: 1.15;
}

body.module-view-active .allowance-table {
  max-height: none;
  overflow: visible;
  border-color: #bdddf3;
  border-radius: 10px;
}

body.module-view-active .allowance-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body.module-view-active .allowance-table th,
body.module-view-active .allowance-table td {
  height: 42px;
  padding: 8px 7px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  word-break: keep-all;
}

body.module-view-active .allowance-table th {
  position: static;
  color: #214e72;
  background: #eaf5ff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

body.module-view-active .allowance-table th:nth-child(1),
body.module-view-active .allowance-table td:nth-child(1) {
  width: 8%;
}

body.module-view-active .allowance-table th:nth-child(2),
body.module-view-active .allowance-table td:nth-child(2),
body.module-view-active .allowance-table th:nth-child(4),
body.module-view-active .allowance-table td:nth-child(4) {
  width: 7%;
}

body.module-view-active .allowance-table th:nth-child(3),
body.module-view-active .allowance-table td:nth-child(3),
body.module-view-active .allowance-table th:nth-child(6),
body.module-view-active .allowance-table td:nth-child(6) {
  width: 10%;
}

body.module-view-active .allowance-table th:nth-child(5),
body.module-view-active .allowance-table td:nth-child(5),
body.module-view-active .allowance-table th:nth-child(7),
body.module-view-active .allowance-table td:nth-child(7),
body.module-view-active .allowance-table th:nth-child(8),
body.module-view-active .allowance-table td:nth-child(8),
body.module-view-active .allowance-table th:nth-child(9),
body.module-view-active .allowance-table td:nth-child(9),
body.module-view-active .allowance-table th:nth-child(10),
body.module-view-active .allowance-table td:nth-child(10),
body.module-view-active .allowance-table th:nth-child(12),
body.module-view-active .allowance-table td:nth-child(12) {
  width: 8%;
}

body.module-view-active .allowance-table th:nth-child(11),
body.module-view-active .allowance-table td:nth-child(11) {
  width: 8%;
}

body.module-view-active .allowance-main-row:nth-child(4n + 1) td {
  background: #fbfdff;
}

body.module-view-active .allowance-main-row:hover td {
  background: #f0f9ff;
}

body.module-view-active .allowance-table td strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

body.module-view-active .allowance-table td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.2;
}

body.module-view-active .allowance-name-toggle {
  display: inline-flex;
  width: 100%;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #12649b;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body.module-view-active .allowance-name-toggle::after {
  content: "+";
  width: 16px;
  height: 16px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #dff2ff;
  color: #168bd6;
  font-size: 12px;
  line-height: 1;
}

body.module-view-active .allowance-name-toggle.is-open,
body.module-view-active .allowance-name-toggle:hover {
  background: #e8f6ff;
}

body.module-view-active .allowance-name-toggle.is-open::after {
  content: "-";
}

body.module-view-active .allowance-detail-row td {
  padding: 10px 12px 12px;
  background: #f2f9ff;
}

body.module-view-active .allowance-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  text-align: left;
}

body.module-view-active .allowance-detail-grid div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cfe5f7;
  border-radius: 8px;
  background: #ffffff;
}

body.module-view-active .allowance-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: #5b7892;
  font-size: 11px;
  font-weight: 800;
}

body.module-view-active .allowance-detail-grid strong {
  display: block;
  color: #102033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.module-view-active .allowance-detail-note {
  grid-column: 1 / -1;
}

body.module-view-active #companyAllowance > .panel + .panel {
  margin-top: 8px;
}

body.module-view-active #companyAllowance .compact-title {
  margin-bottom: 7px;
  align-items: center;
}

body.module-view-active .payroll-command {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 14px 20px 16px;
}

body.module-view-active .payroll-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

body.module-view-active .payroll-command-head h3 {
  margin: 0;
  color: #123e63;
  font-size: 18px;
  line-height: 1.2;
}

body.module-view-active .payroll-command-head span:not(.import-status) {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

body.module-view-active .payroll-command-row.compact {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(320px, auto) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 0;
}

body.module-view-active .payroll-command-row.compact label {
  gap: 6px;
}

body.module-view-active .payroll-command-actions {
  align-items: end;
  gap: 8px;
}

body.module-view-active .payroll-command-actions .file-import,
body.module-view-active .payroll-command-actions .primary {
  min-height: 38px;
  padding: 0 16px;
}

body.module-view-active .payroll-import-status {
  max-width: 420px;
  align-self: center;
  padding: 7px 10px;
  border: 1px solid #bfe0f6;
  border-radius: 999px;
  color: #2f6286;
  background: #f4fbff;
  font-size: 12px;
  font-weight: 800;
}

body.module-view-active .review-inactive-panel {
  border: 1px solid #bfe0f6;
  border-radius: 8px;
  background: #f6fbff;
}

body.module-view-active .review-inactive-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 12px;
  color: #174c78;
  cursor: pointer;
  font-weight: 900;
}

body.module-view-active .review-inactive-panel summary small {
  color: #5d7f98;
  font-size: 12px;
  font-weight: 700;
}

body.module-view-active .review-inactive-table {
  max-height: 220px;
  margin: 0 10px 10px;
  overflow: auto;
}

body.module-view-active .review-inactive-table table {
  min-width: 760px;
}

body.module-view-active .review-inactive-table th,
body.module-view-active .review-inactive-table td {
  height: 28px;
  padding: 4px 8px;
  text-align: center;
  white-space: nowrap;
}

body.module-view-active .review-inactive-table th:nth-child(5),
body.module-view-active .review-inactive-table td:nth-child(5) {
  text-align: left;
  white-space: normal;
}

body.module-view-active .payroll-dashboard-title {
  align-self: end;
  margin: 0;
  padding: 0 0 3px;
  border-top: 0;
}

body.module-view-active .payroll-dashboard-title h4 {
  margin: 0;
  color: #123e63;
  font-size: 16px;
}

body.module-view-active .payroll-dashboard-title p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.25;
}

body.module-view-active .payroll-kpi-grid {
  gap: 10px;
}

body.module-view-active .payroll-kpi-grid div {
  min-height: 82px;
  padding: 12px 14px;
  border-color: #bfe0f6;
  background: linear-gradient(180deg, #f8fcff 0%, #eef8ff 100%);
}

body.module-view-active .payroll-kpi-grid strong {
  font-size: 22px;
  line-height: 1.15;
}

body.module-view-active #calculator .payslip {
  margin-top: 0;
  margin-bottom: 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.module-view-active #calculator .payroll-detail-panel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.module-view-active #calculator .payroll-detail-panel > * {
  min-width: 0;
  max-width: 100%;
}

body.module-view-active .payroll-detail-panel summary {
  min-height: 46px;
  padding: 0 4px;
  color: #123e63;
}

body.module-view-active .payroll-detail-panel[open] summary {
  margin-bottom: 8px;
}

body.module-view-active .payroll-detail-panel[open] {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100%;
  width: 100%;
  min-height: 0;
  min-width: 0;
}

body.module-view-active .payroll-preview-table {
  height: min(100%, calc(100vh - 470px));
  min-height: 380px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 4px;
}

body.module-view-active .payroll-preview-table table {
  min-width: 1960px;
  border-collapse: separate;
  border-spacing: 0;
}

body.module-view-active .payroll-preview-table thead th {
  position: sticky;
  background: #eef8ff;
  z-index: 6;
  height: 34px;
  box-shadow: inset 0 -1px 0 var(--line);
}

body.module-view-active .payroll-preview-table thead th small {
  display: block;
  margin-top: 3px;
  color: #42677d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

body.module-view-active .payroll-preview-table thead tr:first-child th {
  top: 0;
}

body.module-view-active .payroll-preview-table thead tr:nth-child(2) th {
  top: 34px;
  z-index: 7;
}

body.module-view-active .payroll-preview-table thead th[rowspan="2"] {
  top: 0;
  z-index: 8;
}

body.module-view-active .payroll-preview-table th:first-child,
body.module-view-active .payroll-preview-table td:first-child {
  position: sticky;
  left: 0;
  min-width: 86px;
  width: 86px;
  max-width: 86px;
  background: #ffffff;
  box-shadow: 1px 0 0 #cfe3f5;
}

body.module-view-active .payroll-preview-table thead th:first-child {
  z-index: 12;
  background: #eef8ff;
}

body.module-view-active .payroll-preview-table tbody td:first-child {
  z-index: 5;
  font-weight: 800;
  color: #123e63;
}

body.module-view-active .payroll-preview-table tbody tr:nth-child(even) td:first-child {
  background: #f7fbff;
}

body.module-view-active .payroll-preview-scrollbar {
  height: 16px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #cfe6f8;
  border-radius: 999px;
  background: #f2f9ff;
}

body.module-view-active .payroll-preview-scrollbar > div {
  height: 1px;
}

body.module-view-active .payroll-preview-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 6px 8px;
  border: 1px solid #cfe6f8;
  border-radius: 10px;
  color: #42677d;
  background: #f4fbff;
  font-size: 12px;
  font-weight: 800;
}

body.module-view-active .payroll-preview-tools > div {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

body.module-view-active .payroll-preview-tools > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.module-view-active .payroll-preview-tools .small {
  min-height: 28px;
  padding: 0 10px;
}

body.module-view-active .payroll-detail-panel.is-fullscreen {
  position: fixed;
  inset: 8px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  min-height: 0;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(94, 164, 214, 0.34);
  border-radius: 16px;
  background: #f8fcff;
  box-shadow: 0 28px 80px rgba(16, 74, 118, 0.28);
}

body.module-view-active .payroll-detail-panel.is-fullscreen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(11, 44, 70, 0.26);
  backdrop-filter: blur(3px);
}

body.module-view-active .payroll-detail-panel.is-fullscreen summary {
  flex: 0 0 auto;
  min-height: 36px;
}

body.module-view-active .payroll-detail-panel.is-fullscreen .payroll-preview-table {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  min-width: 0;
  width: calc(100vw - 50px);
  max-width: calc(100vw - 50px);
  max-height: none;
  overflow: auto;
}

body.module-view-active .payroll-detail-panel.is-fullscreen .payroll-preview-tools,
body.module-view-active .payroll-detail-panel.is-fullscreen .payroll-preview-scrollbar {
  flex: 0 0 auto;
  min-width: 0;
  width: calc(100vw - 50px);
  max-width: calc(100vw - 50px);
}

body.module-view-active .payroll-preview-scrollbar::-webkit-scrollbar,
body.module-view-active .payroll-preview-table::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.module-view-active .payroll-preview-scrollbar::-webkit-scrollbar-track,
body.module-view-active .payroll-preview-table::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eaf6ff;
}

body.module-view-active .payroll-preview-scrollbar::-webkit-scrollbar-thumb,
body.module-view-active .payroll-preview-table::-webkit-scrollbar-thumb {
  border: 2px solid #eaf6ff;
  border-radius: 999px;
  background: #62b6ea;
}

@media (max-width: 1280px) {
  body.module-view-active .payroll-command-row.compact {
    grid-template-columns: minmax(170px, 230px) minmax(300px, 1fr);
  }

  body.module-view-active .payroll-dashboard-title {
    grid-column: 1 / -1;
  }

  body.module-view-active .allowance-command {
    grid-template-columns: minmax(0, 1fr);
  }

  body.module-view-active .allowance-filters {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  }

  body.module-view-active .attendance-command-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  body.module-view-active .attendance-command-main {
    grid-template-columns: minmax(220px, 320px) minmax(560px, 1fr);
  }

  body.workday-view-active #workdaySettings .module-filters {
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  }
}

body.module-view-active .compact-table th,
body.module-view-active .compact-table td {
  padding: 8px 10px;
}

body.module-view-active .attendance-summary {
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

body.module-view-active .attendance-summary div {
  padding: 10px 12px;
}

body.module-view-active .attendance-summary span {
  margin-bottom: 4px;
}

body.module-view-active .attendance-summary strong {
  font-size: 20px;
}

body.module-view-active .exemption-panel {
  margin: 8px 0;
  padding: 10px 12px;
  min-width: 0;
  overflow: hidden;
}

body.module-view-active .compact-title {
  margin-bottom: 10px;
}

body.module-view-active .compact-title h3 {
  font-size: 15px;
}

body.module-view-active .attendance-summary.allowance-summary {
  gap: 8px;
  margin-bottom: 0;
}

body.module-view-active .attendance-summary.allowance-summary div {
  min-height: 0;
  padding: 8px 10px;
}

body.module-view-active .attendance-summary.allowance-summary span {
  margin-bottom: 2px;
  font-size: 11px;
}

body.module-view-active .attendance-summary.allowance-summary strong {
  font-size: 18px;
  line-height: 1.15;
}

body.module-view-active .compact-table.allowance-rules-table th,
body.module-view-active .compact-table.allowance-rules-table td {
  height: 30px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.2;
}

body.module-view-active .exemption-form {
  grid-template-columns: minmax(0, 1.05fr) minmax(78px, 0.72fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}

body.module-view-active .exemption-table {
  max-height: none;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

body.module-view-active .exemption-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body.module-view-active .exemption-table th,
body.module-view-active .exemption-table td {
  padding: 8px 14px;
  white-space: nowrap;
}

body.module-view-active .exemption-table th:nth-child(1),
body.module-view-active .exemption-table td:nth-child(1) {
  width: 16%;
}

body.module-view-active .exemption-table th:nth-child(2),
body.module-view-active .exemption-table td:nth-child(2) {
  width: 16%;
}

body.module-view-active .exemption-table th:nth-child(3),
body.module-view-active .exemption-table td:nth-child(3),
body.module-view-active .exemption-table th:nth-child(4),
body.module-view-active .exemption-table td:nth-child(4) {
  width: 28%;
}

body.module-view-active .exemption-table th:nth-child(5),
body.module-view-active .exemption-table td:nth-child(5) {
  width: 12%;
  min-width: 92px;
  padding-right: 18px;
  text-align: center;
}

body.module-view-active .attendance-table {
  max-height: min(520px, calc(100vh - 260px));
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}

body.module-view-active .attendance-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body.module-view-active .attendance-table input {
  width: 100%;
  min-width: 0;
}

body.module-view-active .attendance-table th,
body.module-view-active .attendance-table td {
  padding: 8px 12px;
}

body.module-view-active .attendance-table th:nth-child(1),
body.module-view-active .attendance-table td:nth-child(1) {
  width: 22%;
}

body.module-view-active .attendance-table th:nth-child(2),
body.module-view-active .attendance-table td:nth-child(2),
body.module-view-active .attendance-table th:nth-child(3),
body.module-view-active .attendance-table td:nth-child(3) {
  width: 19%;
}

body.module-view-active .attendance-table th:nth-child(4),
body.module-view-active .attendance-table td:nth-child(4),
body.module-view-active .attendance-table th:nth-child(5),
body.module-view-active .attendance-table td:nth-child(5) {
  width: 14%;
  text-align: center;
}

body.module-view-active .attendance-table th:nth-child(6),
body.module-view-active .attendance-table td:nth-child(6) {
  width: 12%;
  min-width: 90px;
  text-align: center;
}

body.module-view-active .row-actions {
  gap: 6px;
}

body.module-view-active .row-actions button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

body.module-view-active #workdaySettings .settings-actions {
  align-items: center;
  margin-top: 0;
}

body.module-view-active #workdaySettings .module-filters {
  width: 100%;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}

body.module-view-active #workdaySettings .settings-actions {
  margin-bottom: 0;
}

body.module-view-active #workdaySettings .settings-actions .import-status {
  flex: 1 1 160px;
}

body.module-view-active .work-calendar {
  gap: 8px;
}

body.module-view-active .calendar-week-header,
body.module-view-active .calendar-grid {
  gap: 7px;
}

body.module-view-active .calendar-week-header div {
  padding: 4px 0;
  font-size: 12px;
}

body.module-view-active .calendar-day {
  min-height: 92px;
  padding: 9px;
  gap: 4px;
}

body.module-view-active .calendar-day-number {
  font-size: 20px;
}

body.module-view-active .calendar-weekday,
body.module-view-active .calendar-day small {
  font-size: 11px;
}

body.module-view-active .calendar-day strong {
  font-size: 13px;
}

body.module-view-active .calendar-tag {
  padding: 2px 7px;
  font-size: 10px;
}

body.module-view-active #settings {
  grid-template-columns: minmax(0, 1fr);
}

body.module-view-active #settings .settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(94, 164, 214, 0.24);
  border-radius: 14px;
  background: rgba(239, 249, 255, 0.88);
  box-shadow: 0 10px 28px rgba(22, 72, 112, 0.08);
}

body.module-view-active #settings .settings-subnav-btn {
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(94, 164, 214, 0.28);
  border-radius: 10px;
  color: #245c89;
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

body.module-view-active #settings .settings-subnav-btn:hover {
  border-color: rgba(42, 163, 238, 0.48);
  color: var(--primary-strong);
  background: #f6fbff;
}

body.module-view-active #settings .settings-subnav-btn.active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(42, 163, 238, 0.22);
}

body.module-view-active #settings .panel {
  margin: 0;
}

body.workday-view-active {
  overflow: hidden;
}

body.workday-view-active .workspace {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  overflow: hidden;
}

body.workday-view-active .topbar {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

body.workday-view-active .eyebrow {
  font-size: 11px;
}

body.workday-view-active .topbar h2 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.12;
}

body.workday-view-active #workdaySettings {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

body.workday-view-active #workdaySettings > .panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.98);
}

body.workday-view-active #workdaySettings .module-filters {
  flex: 0 0 auto;
  grid-template-columns: minmax(240px, 360px) minmax(0, auto);
  gap: 10px 14px;
  align-items: center;
  min-width: 0;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid #c8e4f8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3faff 100%);
}

body.workday-view-active #workdaySettings label {
  gap: 4px;
  color: #416986;
  font-size: 12px;
  font-weight: 900;
}

body.workday-view-active #workdaySettings input {
  width: 100%;
  max-width: 360px;
  min-height: 36px;
  border-color: #bdddf3;
  background: #f9fdff;
  font-size: 16px;
}

body.workday-view-active #workdaySettings .settings-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  white-space: nowrap;
}

body.workday-view-active #workdaySettings .settings-actions {
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

body.workday-view-active #workdaySettings .settings-actions .import-status {
  display: none;
}

body.workday-view-active #workdaySettings .workday-status {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #cfe3f5;
  border-radius: 10px;
  color: #4b6e88;
  background: #f6fbff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.workday-view-active #workdaySettings .workflow-hint {
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-color: #b8def8;
  border-radius: 10px;
  color: #416986;
  background: #edf9ff;
  font-size: 12px;
  line-height: 1.35;
}

body.workday-view-active .work-calendar-history {
  flex: 0 0 auto;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #bfe0f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fdff 0%, #f1f9ff 100%);
}

body.workday-view-active .work-calendar-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
  color: #0d3b5a;
}

body.workday-view-active .work-calendar-history-head strong {
  font-size: 14px;
}

body.workday-view-active .work-calendar-history-head span {
  color: #5b7891;
  font-size: 12px;
  font-weight: 800;
}

body.workday-view-active .work-calendar-history .table-wrap {
  max-height: 160px;
  overflow: auto;
  border-radius: 8px;
}

body.workday-view-active .work-calendar-history table {
  min-width: 0;
  width: 100%;
}

body.workday-view-active .work-calendar-history th,
body.workday-view-active .work-calendar-history td {
  height: 32px;
  padding: 4px 8px;
  text-align: center;
  white-space: nowrap;
}

body.workday-view-active .work-calendar {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 163, 238, 0.52) rgba(255, 255, 255, 0.6);
}

body.workday-view-active .work-calendar::-webkit-scrollbar {
  width: 7px;
}

body.workday-view-active .work-calendar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(42, 163, 238, 0.58);
}

body.workday-view-active .calendar-week-header,
body.workday-view-active .calendar-grid {
  gap: 10px;
}

body.workday-view-active .calendar-week-header {
  flex: 0 0 auto;
}

body.workday-view-active .calendar-week-header div {
  padding: 8px 0;
  border-radius: 10px;
  color: #4c6f8b;
  background: #f2f9ff;
  font-size: 13px;
  line-height: 1.1;
}

body.workday-view-active .calendar-grid {
  flex: 0 0 auto;
  grid-auto-rows: minmax(92px, auto);
  overflow: visible;
}

body.workday-view-active .calendar-day {
  min-height: 92px;
  padding: 10px 12px;
  gap: 5px;
  align-content: start;
  overflow: visible;
  border-radius: 12px;
  box-shadow: inset 4px 0 0 currentColor, 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.workday-view-active .calendar-day.collective-overtime {
  border-color: #ef4444;
  box-shadow: inset 4px 0 0 #ef4444, inset 0 0 0 1px rgba(239, 68, 68, 0.28), 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.workday-view-active .calendar-day.early-meeting {
  box-shadow: inset 4px 0 0 #0ea5e9, inset 0 0 0 1px rgba(14, 165, 233, 0.24), 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.workday-view-active .calendar-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

body.workday-view-active .calendar-day-body {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.workday-view-active .calendar-day-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  align-self: end;
  flex-wrap: wrap;
}

body.workday-view-active .calendar-day-number {
  font-size: 26px;
  line-height: 1;
}

body.workday-view-active .calendar-weekday,
body.workday-view-active .calendar-day small {
  font-size: 11px;
  line-height: 1.2;
}

body.workday-view-active .calendar-day strong {
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workday-view-active .calendar-tag {
  max-width: 100%;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workday-view-active .calendar-action-switch,
body.workday-view-active .calendar-overtime-toggle {
  display: inline-flex;
  min-height: 22px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.workday-view-active .calendar-action-switch {
  flex: 1 1 auto;
  padding: 3px 8px;
  border: 1px solid rgba(23, 105, 170, 0.14);
  color: #2d668f;
  background: rgba(255, 255, 255, 0.58);
}

body.workday-view-active .calendar-overtime-toggle {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(2, 132, 199, 0.18);
  color: #075985;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(14, 116, 184, 0.08);
}

body.workday-view-active .calendar-overtime-toggle.is-active {
  border-color: rgba(239, 68, 68, 0.55);
  color: #ffffff;
  background: #ef4444;
}

body.module-view-active #settings .settings-grid {
  gap: 8px;
}

body.module-view-active #settings .form-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

body.module-view-active .rules-grid {
  gap: 8px;
}

body.module-view-active .rules-grid article {
  padding: 10px 12px;
}

body.module-view-active .rules-grid h4 {
  margin-bottom: 5px;
  font-size: 14px;
}

body.module-view-active .rules-grid p {
  font-size: 12px;
  line-height: 1.55;
}

body.module-view-active .payslip-preview-panel {
  max-width: none;
  margin: 0;
}

body.module-view-active .payslip-sheet {
  gap: 0;
}

body.module-view-active .payslip-header div {
  padding: 10px 12px;
}

body.module-view-active .payslip-header strong {
  margin-top: 5px;
  font-size: 15px;
}

body.module-view-active .payslip-columns section {
  padding: 12px 14px;
}

body.module-view-active .payslip-columns h4 {
  margin-bottom: 6px;
  font-size: 15px;
}

body.module-view-active .payslip-lines div {
  padding: 7px 0;
  font-size: 13px;
}

body.module-view-active .payslip-total {
  padding: 12px 14px;
}

body.module-view-active .payslip-total strong {
  font-size: 28px;
}

body.module-view-active #payslipPreview .settings-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

body.employees-view-active {
  overflow: hidden;
}

body.employees-view-active .app {
  grid-template-columns: 220px minmax(0, 1fr);
}

body.employees-view-active .sidebar {
  padding-right: 8px;
  padding-left: 8px;
}

body.employees-view-active .brand-logo {
  width: 196px;
}

body.employees-view-active .brand-logo img {
  width: 56px;
}

body.employees-view-active .brand-logo-text strong {
  font-size: 24px;
}

body.employees-view-active .nav-item {
  min-height: 40px;
  padding-left: 44px;
  font-size: 14px;
}

body.employees-view-active.employee-editor-open {
  overflow: auto;
}

body.employees-view-active.employee-editor-open .workspace {
  height: auto;
  display: block;
}

body.employees-view-active .workspace {
  height: 100vh;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding-right: 18px;
  padding-left: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
}

body.employees-view-active .topbar {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

body.employees-view-active .eyebrow {
  font-size: 12px;
}

body.employees-view-active .topbar h2 {
  margin-top: 2px;
  font-size: 24px;
}

body.employees-view-active.employee-editor-open .workspace {
  padding-top: 8px;
  padding-bottom: 8px;
}

body.employees-view-active #employees {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

body.employees-view-active #employeeProfileEditor {
  margin-bottom: 12px;
  padding: 18px 22px 14px;
  border-radius: 10px;
}

body.employees-view-active #employeeProfileEditor .panel-title {
  margin-bottom: 12px;
  align-items: center;
}

body.employees-view-active #employeeProfileEditor .panel-title h3 {
  font-size: 24px;
  line-height: 1.1;
}

body.employees-view-active #employeeProfileEditor .panel-title span {
  font-size: 13px;
}

body.employees-view-active #employeeProfileEditor .form-grid.three {
  gap: 9px 24px;
}

body.employees-view-active #employeeProfileEditor label {
  gap: 4px;
  color: #466985;
  font-size: 12px;
  line-height: 1.15;
}

body.employees-view-active #employeeProfileEditor input,
body.employees-view-active #employeeProfileEditor select {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
}

body.employees-view-active #employeeProfileEditor input[type="date"] {
  min-height: 36px;
}

body.employees-view-active #employeeProfileEditor .settings-actions {
  margin-top: 10px;
  gap: 8px;
  align-items: center;
}

body.employees-view-active #employeeProfileEditor .settings-actions button {
  min-height: 34px;
  padding: 0 16px;
  font-size: 13px;
}

.employee-list-panel {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 12px 14px 12px;
}

.employee-list-panel .panel-title {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

.employee-list-title {
  align-items: center;
  gap: 10px;
}

.employee-list-panel .panel-title h3 {
  font-size: 17px;
}

.profile-toolbar {
  gap: 12px;
  margin-bottom: 24px;
}

.profile-toolbar .primary,
.profile-toolbar .file-import {
  min-width: 150px;
  justify-content: center;
}

.employee-list-panel .profile-toolbar {
  width: auto;
  flex: 0 0 auto;
  margin-bottom: 0;
  gap: 8px;
  justify-content: flex-end;
}

.employee-list-panel .profile-toolbar .primary,
.employee-list-panel .profile-toolbar .file-import {
  min-width: 132px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.employee-list-panel .profile-toolbar .small {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
}

@media (min-width: 981px) and (max-height: 820px) {
  body.employees-view-active .workspace {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  body.employees-view-active .topbar {
    margin-bottom: 8px;
  }

  body.employees-view-active .eyebrow {
    margin: 0;
    font-size: 11px;
  }

  body.employees-view-active .topbar h2 {
    font-size: 24px;
  }

  .employee-list-panel {
    padding: 12px 14px;
  }

  .employee-list-panel .panel-title {
    margin-bottom: 8px;
  }

}

.filter-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.payroll-command {
  margin-bottom: 20px;
}

.payroll-command-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: end;
}

.payroll-command-row.compact {
  grid-template-columns: minmax(160px, 220px) minmax(260px, auto) minmax(220px, 1fr);
  justify-content: start;
  margin-bottom: 18px;
}

.payroll-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.payroll-import-status {
  align-self: center;
  min-width: 0;
  white-space: normal;
}

.payroll-dashboard-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payroll-dashboard-title h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.payroll-dashboard-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.payroll-kpi-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-soft);
}

.payroll-kpi-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}

.payroll-kpi-grid strong {
  font-size: 22px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.employee-profile-scroll {
  max-height: min(680px, calc(100vh - 320px));
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.employee-list-panel .employee-profile-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

.employee-profile-scroll::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.employee-profile-scroll::-webkit-scrollbar-track {
  background: #e8f5ff;
  border-left: 1px solid var(--line);
}

.employee-profile-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #e8f5ff;
  border-radius: 999px;
  background: #8bcdf4;
}

.employee-profile-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.payroll-preview-table {
  max-height: 430px;
  overflow: auto;
}

.payroll-detail-panel summary {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.payroll-detail-panel summary::-webkit-details-marker {
  display: none;
}

.payroll-detail-panel summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.payroll-detail-panel summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.payroll-detail-panel[open] summary {
  margin-bottom: 12px;
}

.payroll-detail-panel[open] summary::after {
  content: "-";
}

.compact-table table {
  min-width: 1120px;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
  white-space: nowrap;
}

.compact-table td {
  font-size: 13px;
}

.department-manager-table table {
  min-width: 620px;
}

.department-manager-table th:nth-child(1),
.department-manager-table td:nth-child(1) {
  width: 180px;
}

.department-manager-table th:nth-child(2),
.department-manager-table td:nth-child(2) {
  width: 320px;
}

.department-manager-table input {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.account-permission-table table {
  min-width: 1180px;
}

.account-permission-table th:nth-child(1),
.account-permission-table td:nth-child(1),
.account-permission-table th:nth-child(2),
.account-permission-table td:nth-child(2),
.account-permission-table th:nth-child(3),
.account-permission-table td:nth-child(3) {
  width: 140px;
}

.account-permission-table th:nth-child(4),
.account-permission-table td:nth-child(4) {
  width: 420px;
  white-space: normal;
}

.account-permission-table input,
.account-permission-table select {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}

.account-permission-table input[readonly],
.account-permission-table select:disabled,
.account-permission-table button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

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

.account-permission-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.account-permission-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(42, 163, 238, 0.14);
  border-radius: 999px;
  background: #f4fbff;
  color: #315c7c;
  font-size: 11px;
  font-weight: 800;
}

.account-permission-options input {
  width: 13px;
  min-height: 0;
  height: 13px;
  padding: 0;
  margin: 0;
}

.micro {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.employee-profile-permission-detail {
  color: #1c78a8;
  border-color: rgba(42, 163, 238, 0.24);
  background: #ffffff;
}

body:not(.is-super-admin) .super-admin-only {
  display: none;
}

.attendance-review-history {
  margin: 10px 0 0;
}

.missing-punch-verification {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(33, 150, 243, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(239, 249, 255, 0.98), rgba(248, 252, 255, 0.98));
}

.missing-punch-verification.hidden {
  display: none;
}

.missing-punch-mail-links {
  display: flex;
  max-width: 560px;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.missing-punch-mail-links.hidden {
  display: none;
}

.push-account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 260px;
  padding: 0 10px;
  border: 1px solid rgba(33, 150, 243, 0.18);
  border-radius: 999px;
  background: rgba(232, 247, 255, 0.92);
  color: #15527a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.missing-punch-verification-wrap {
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.missing-punch-verification-wrap table {
  width: 100%;
  table-layout: fixed;
}

.missing-punch-verification-wrap th,
.missing-punch-verification-wrap td {
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.missing-punch-verification-wrap th:nth-child(1),
.missing-punch-verification-wrap td:nth-child(1) {
  width: 52px;
}

.missing-punch-verification-wrap th:nth-child(2),
.missing-punch-verification-wrap td:nth-child(2) {
  width: 150px;
}

.missing-punch-verification-wrap th:nth-child(3),
.missing-punch-verification-wrap td:nth-child(3) {
  width: 120px;
}

.missing-punch-verification-wrap th:nth-child(4),
.missing-punch-verification-wrap td:nth-child(4) {
  width: 90px;
}

.missing-punch-verification-wrap th:nth-child(5),
.missing-punch-verification-wrap td:nth-child(5) {
  width: 72px;
}

.missing-punch-verification-wrap th:nth-child(6),
.missing-punch-verification-wrap td:nth-child(6) {
  width: 105px;
}

.missing-punch-verification-wrap th:nth-child(7),
.missing-punch-verification-wrap td:nth-child(7) {
  width: auto;
}

#attendanceManagement .exemption-panel,
#attendanceManagement .attendance-table {
  display: none !important;
}

.review-distribution {
  position: relative;
  margin: 8px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(33, 150, 243, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(239, 249, 255, 0.98), rgba(248, 252, 255, 0.98));
}

#attendanceDistribution {
  min-height: calc(100vh - 136px);
  align-items: stretch;
}

#attendanceDistribution .review-distribution {
  margin: 0;
  height: 100%;
  min-height: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

#attendanceDistribution .distribution-head {
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(33, 150, 243, 0.16);
}

#attendanceDistribution .distribution-head h3 {
  margin-bottom: 2px;
  font-size: 18px;
}

#attendanceDistribution .distribution-head span {
  font-size: 12px;
}

#attendanceDistribution .distribution-head .table-actions {
  gap: 8px;
}

#attendanceDistribution .distribution-head .table-actions button {
  min-height: 32px;
  padding-inline: 14px;
}

#attendanceDistribution .distribution-name-header {
  width: auto;
  justify-content: center;
  gap: 5px;
}

#attendanceDistribution .distribution-name-filter-trigger {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  border-color: transparent;
  background: transparent;
  opacity: 0.72;
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

#attendanceDistribution .distribution-name-filter-trigger::before {
  width: 6px;
  height: 6px;
  border-width: 1.6px;
  border-color: #6f91a8;
}

#attendanceDistribution .distribution-name-filter-trigger::after {
  right: 3px;
  bottom: 4px;
  width: 5px;
  height: 1.5px;
  background: #6f91a8;
}

#attendanceDistribution .distribution-name-filter-trigger:hover,
#attendanceDistribution .distribution-name-filter-trigger.is-active {
  border-color: rgba(42, 163, 238, 0.32);
  background: #ffffff;
  opacity: 1;
  transform: translateY(-1px);
}

#attendanceDistribution .distribution-name-filter-trigger.is-active::before {
  border-color: var(--primary);
}

#attendanceDistribution .distribution-name-filter-trigger.is-active::after {
  background: var(--primary);
}

#attendanceDistribution .distribution-filter-popover {
  min-width: 220px;
}

#attendanceDistribution .distribution-table-wrap {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#attendanceDistribution .distribution-table-wrap table {
  min-width: 1720px;
  table-layout: fixed;
}

#attendanceDistribution .distribution-table-wrap th,
#attendanceDistribution .distribution-table-wrap td {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
}

#attendanceDistribution .distribution-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 30px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(1),
#attendanceDistribution .distribution-table-wrap td:nth-child(1),
#attendanceDistribution .distribution-table-wrap th:nth-child(2),
#attendanceDistribution .distribution-table-wrap td:nth-child(2) {
  position: sticky;
  background: #f7fbff;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(1),
#attendanceDistribution .distribution-table-wrap td:nth-child(1) {
  left: 0;
  z-index: 4;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(2),
#attendanceDistribution .distribution-table-wrap td:nth-child(2) {
  left: 48px;
  z-index: 4;
  box-shadow: 8px 0 12px rgba(72, 123, 160, 0.08);
}

#attendanceDistribution .distribution-table-wrap th:nth-child(1),
#attendanceDistribution .distribution-table-wrap th:nth-child(2) {
  z-index: 6;
  background: #eaf6ff;
}

#attendanceDistribution .distribution-table-wrap::-webkit-scrollbar {
  width: 12px;
}

#attendanceDistribution .distribution-table-wrap::-webkit-scrollbar-track {
  background: rgba(223, 241, 253, 0.9);
  border-radius: 999px;
}

#attendanceDistribution .distribution-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #76c8f6, #2aa3ee);
  border: 3px solid rgba(223, 241, 253, 0.9);
  border-radius: 999px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(1),
#attendanceDistribution .distribution-table-wrap td:nth-child(1) {
  width: 48px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(2),
#attendanceDistribution .distribution-table-wrap td:nth-child(2) {
  width: 92px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(3),
#attendanceDistribution .distribution-table-wrap td:nth-child(3) {
  width: 180px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(4),
#attendanceDistribution .distribution-table-wrap td:nth-child(4) {
  width: 86px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(5),
#attendanceDistribution .distribution-table-wrap td:nth-child(5) {
  width: 80px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(6),
#attendanceDistribution .distribution-table-wrap td:nth-child(6) {
  width: 220px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(7),
#attendanceDistribution .distribution-table-wrap td:nth-child(7) {
  width: 80px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(8),
#attendanceDistribution .distribution-table-wrap td:nth-child(8) {
  width: 220px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(9),
#attendanceDistribution .distribution-table-wrap td:nth-child(9) {
  width: 70px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(10),
#attendanceDistribution .distribution-table-wrap td:nth-child(10) {
  width: 260px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(11),
#attendanceDistribution .distribution-table-wrap td:nth-child(11) {
  width: 72px;
}

#attendanceDistribution .distribution-table-wrap th:nth-child(12),
#attendanceDistribution .distribution-table-wrap td:nth-child(12) {
  width: 220px;
}

#attendanceDistribution .distribution-adjust-input {
  width: 100%;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid rgba(94, 164, 214, 0.38);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  font: inherit;
}

#attendanceDistribution .distribution-remark-input {
  text-align: left;
}

#attendanceDistribution .distribution-date-text-input {
  display: block;
  min-height: 28px;
  height: auto;
  padding: 5px 7px;
  line-height: 1.35;
  overflow: hidden;
  resize: none;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

#attendanceDistribution .distribution-table-wrap tr.is-confirmed td {
  background: rgba(238, 248, 255, 0.78);
}

#attendanceDistribution .distribution-adjust-input[readonly] {
  border-color: rgba(128, 157, 178, 0.2);
  background: rgba(232, 241, 248, 0.78);
  color: #48697f;
  cursor: not-allowed;
}

#attendanceDistribution .distribution-confirm-checkbox:disabled {
  cursor: not-allowed;
}

#attendanceDistribution .distribution-net-days {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 24px;
  border-radius: 6px;
  background: rgba(226, 242, 255, 0.82);
  color: #164565;
  font-weight: 900;
}

#attendanceDistribution .distribution-confirm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  color: #164565;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#attendanceDistribution .row-actions {
  flex-wrap: wrap;
  gap: 5px;
}

#attendanceDistribution .button-link.small,
#attendanceDistribution .distribution-table-wrap button.small {
  min-height: 22px;
  padding: 2px 10px;
  font-size: 12px;
}

#attendanceDistribution .distribution-pagination {
  margin-top: 0;
  padding: 6px 10px;
  border: 1px solid rgba(33, 150, 243, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

#attendanceDistribution .distribution-pagination select,
#attendanceDistribution .distribution-pagination button {
  min-height: 26px;
  padding-top: 0;
  padding-bottom: 0;
}

#attendanceDistribution .distribution-pagination {
  font-size: 12px;
}

.distribution-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 9px;
}

.distribution-head h3 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
}

.distribution-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.distribution-head .table-actions {
  margin: 0;
  gap: 8px;
  flex-wrap: nowrap;
}

.distribution-table-wrap {
  max-height: 170px;
  overflow-x: hidden;
  overflow-y: auto;
}

.distribution-table-wrap table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.distribution-table-wrap th:nth-child(1),
.distribution-table-wrap td:nth-child(1) {
  width: 11%;
}

.distribution-table-wrap th:nth-child(2),
.distribution-table-wrap td:nth-child(2) {
  width: 22%;
}

.distribution-table-wrap th:nth-child(3),
.distribution-table-wrap td:nth-child(3) {
  width: 42%;
}

.distribution-table-wrap th:nth-child(4),
.distribution-table-wrap td:nth-child(4) {
  width: 12%;
}

.distribution-table-wrap th:nth-child(5),
.distribution-table-wrap td:nth-child(5) {
  width: 13%;
}

.distribution-table-wrap .needs-email td {
  background: rgba(255, 247, 237, 0.82);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.button-link.small {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

.attendance-review-history .table-wrap {
  max-height: 160px;
  overflow-x: hidden;
  overflow-y: auto;
}

.attendance-review-history table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.attendance-review-history th,
.attendance-review-history td {
  padding: 7px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-review-history th:nth-child(1),
.attendance-review-history td:nth-child(1) {
  width: 12%;
}

.attendance-review-history th:nth-child(2),
.attendance-review-history td:nth-child(2) {
  width: 18%;
}

.attendance-review-history th:nth-child(3),
.attendance-review-history td:nth-child(3),
.attendance-review-history th:nth-child(4),
.attendance-review-history td:nth-child(4) {
  width: 8%;
  text-align: center;
}

.attendance-review-history th:nth-child(5),
.attendance-review-history td:nth-child(5) {
  width: 34%;
}

.attendance-review-history th:nth-child(6),
.attendance-review-history td:nth-child(6) {
  width: 20%;
}

.attendance-review-history .row-actions {
  justify-content: flex-end;
  gap: 6px;
}

.attendance-review-history .row-actions button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: var(--surface);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #3f5f7c;
  background: #eef8ff;
  font-size: 13px;
  font-weight: 900;
}

.sort-header {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: inherit;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-header:hover {
  color: var(--primary-strong);
  background: transparent;
}

.sort-header::after {
  content: "⇅";
  display: inline-grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #c7dff0;
  border-radius: 999px;
  color: #6f91a8;
  background: #f7fcff;
  font-size: 10px;
  line-height: 1;
}

.sort-header.is-asc,
.sort-header.is-desc {
  color: var(--primary-strong);
}

.sort-header.is-asc::after {
  content: "↑";
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.sort-header.is-desc::after {
  content: "↓";
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.th-tools {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  justify-content: center;
  overflow: visible;
}

.th-tools .sort-header {
  flex: 1 1 auto;
}

.column-filter-trigger {
  position: relative;
  display: inline-grid;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  line-height: 1;
  overflow: visible;
}

.column-filter-trigger::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid #9eb0bf;
  border-radius: 999px;
}

.column-filter-trigger::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: #9eb0bf;
  transform: rotate(45deg);
  transform-origin: center;
}

.column-filter-trigger:hover,
.column-filter-trigger.is-active {
  border-color: #b8d7ef;
  background: #fff;
}

.column-filter-trigger.is-active::before {
  border-color: var(--primary);
}

.column-filter-trigger.is-active::after {
  background: var(--primary);
}

.column-filter-popover {
  position: absolute;
  z-index: 30;
  display: grid;
  width: 220px;
  gap: 8px;
  padding: 12px;
  border: 1px solid #bdd8ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(31, 75, 111, 0.18);
}

.column-filter-popover strong {
  color: #294a64;
  font-size: 13px;
}

.column-filter-popover input,
.column-filter-popover select {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
}

.column-filter-checklist {
  display: grid;
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fcff;
}

.column-filter-check {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.column-filter-check + .column-filter-check {
  border-top: 1px solid var(--line);
}

.column-filter-check input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: var(--primary);
}

.column-filter-check:hover {
  background: #eaf7ff;
}

.column-filter-popover .row-actions {
  justify-content: flex-end;
  gap: 6px;
}

.column-filter-popover .small {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

td {
  font-size: 14px;
}

tbody tr:nth-child(even) td {
  background: #f8fcff;
}

tbody tr:hover td {
  background: #eaf7ff;
}

.employee-profile-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.employee-profile-table th,
.employee-profile-table td {
  min-width: 0;
  padding: 3px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.employee-profile-table td {
  height: 30px;
  color: #183852;
  font-size: 11.5px;
  line-height: 1.18;
}

.employee-profile-table th {
  height: 30px;
  color: #174866;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.employee-profile-table thead th {
  position: sticky;
  z-index: 4;
  overflow: hidden;
  border-bottom: 1px solid #b8d9ef;
  background: linear-gradient(180deg, #f1f9ff 0%, #e5f3ff 100%);
}

.employee-profile-table thead tr:first-child th {
  top: 0;
  height: 32px;
  box-shadow: inset 0 -1px 0 #c8e3f4;
}

.employee-profile-table thead tr:nth-child(2) th {
  top: 32px;
  z-index: 5;
  height: 30px;
  color: #1b5577;
  background: #edf7ff;
}

.employee-profile-table thead th[rowspan="2"] {
  top: 0;
  z-index: 6;
  height: 62px;
}

.employee-profile-table .sort-header {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0 11px 0 1px;
  overflow: hidden;
  color: inherit;
  line-height: 1.12;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-profile-table .sort-header::after {
  content: "\2195";
  position: absolute;
  top: 50%;
  right: 1px;
  display: inline-grid;
  width: 9px;
  height: 9px;
  place-items: center;
  border: 1px solid #b7d4e7;
  border-radius: 999px;
  color: #7397ad;
  background: #f9fdff;
  font-size: 6px;
  line-height: 1;
  transform: translateY(-50%);
}

.employee-profile-table .sort-header.is-asc::after {
  content: "\2191";
  color: #fff;
  border-color: #4d9bc7;
  background: #4d9bc7;
}

.employee-profile-table .sort-header.is-desc::after {
  content: "\2193";
  color: #fff;
  border-color: #4d9bc7;
  background: #4d9bc7;
}

.employee-profile-table .th-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 1px;
}

.employee-profile-table .column-filter-trigger {
  width: 10px;
  min-width: 10px;
  max-width: 10px;
  height: 10px;
  min-height: 10px;
  max-height: 10px;
  border-color: transparent;
  background: transparent;
}

.employee-profile-table .column-filter-trigger::before {
  width: 4px;
  height: 4px;
  border-width: 1.3px;
  border-color: #7f9eb2;
}

.employee-profile-table .column-filter-trigger::after {
  right: 1px;
  bottom: 2px;
  width: 4px;
  height: 1.3px;
  background: #7f9eb2;
}

.employee-profile-table .column-filter-trigger:hover,
.employee-profile-table .column-filter-trigger.is-active {
  border-color: #b8d7ef;
  background: #fff;
}

.profile-col-sequence { width: 34px; }
.profile-col-name { width: 70px; }
.profile-col-functional-dept { width: 70px; }
.profile-col-business-dept { width: 74px; }
.profile-col-level { width: 48px; }
.profile-col-status { width: 72px; }
.profile-col-base-salary { width: 70px; }
.profile-col-probation-rate { width: 42px; }
.profile-col-allowance { width: 56px; }
.profile-col-date { width: 82px; }
.profile-col-actions { width: 70px; }

.employee-profile-table thead tr:first-child th:nth-child(2),
.employee-profile-table tbody td:nth-child(2) {
  position: sticky;
  left: 0;
  min-width: 70px;
  box-shadow: 8px 0 14px -14px rgba(31, 75, 111, 0.7);
}

.employee-profile-table thead tr:first-child th:nth-child(2) {
  z-index: 7;
  background: linear-gradient(180deg, #f1f9ff 0%, #e5f3ff 100%);
}

.employee-profile-table tbody td:nth-child(2) {
  z-index: 2;
  background: var(--surface);
  font-weight: 900;
}

.profile-name-toggle {
  display: inline-flex;
  width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  color: #0d3b5a;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.profile-name-toggle::after {
  content: "+";
  margin-left: 4px;
  color: #4f94bd;
  font-size: 12px;
}

.profile-name-toggle.is-open,
.profile-name-toggle:hover {
  color: #086ba8;
  background: #e8f6ff;
}

.profile-name-toggle.is-open::after {
  content: "-";
}

.employee-detail-row td {
  height: auto;
  padding: 0 8px 8px;
  background: #f3fbff;
  white-space: normal;
}

.employee-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #cde6f7;
  border-radius: 8px;
  background: #f8fdff;
}

.employee-detail-grid div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.employee-detail-grid span {
  color: #5b7891;
  font-size: 11px;
  font-weight: 900;
}

.employee-detail-grid strong {
  overflow: hidden;
  color: #143a56;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-history-panel {
  margin: 8px 12px 0;
  padding: 10px 12px;
  border: 1px solid #cde6f7;
  border-radius: 8px;
  background: #ffffff;
}

.employee-history-title {
  margin-bottom: 8px;
  color: #0d3b5a;
  font-size: 12px;
  font-weight: 900;
}

.employee-history-item {
  display: grid;
  grid-template-columns: 150px minmax(120px, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px dashed #d8eaf6;
  color: #24455f;
  font-size: 12px;
  line-height: 1.45;
}

.employee-history-title + .employee-history-item {
  border-top: 0;
}

.employee-history-item span,
.employee-history-item strong {
  white-space: nowrap;
}

.employee-history-item strong {
  color: #0d3b5a;
  white-space: normal;
  overflow-wrap: anywhere;
}

.employee-history-item em {
  min-width: 0;
  color: #5b7891;
  font-style: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.employee-history-empty {
  color: #7a94aa;
  font-size: 12px;
}

.employee-profile-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #f8fcff;
}

.employee-profile-table tbody tr:hover td:nth-child(2) {
  background: #eaf7ff;
}

.employee-profile-table td:nth-child(1),
.employee-profile-table td:nth-child(6),
.employee-profile-table td:nth-child(7),
.employee-profile-table th:nth-child(1),
.employee-profile-table th:nth-child(6),
.employee-profile-table th:nth-child(7) {
  font-weight: 900;
}

.employee-profile-table td:nth-child(7),
.employee-profile-table td:nth-child(9),
.employee-profile-table td:nth-child(10),
.employee-profile-table td:nth-child(11),
.employee-profile-table td:nth-child(12) {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.attendance-table input {
  min-width: 128px;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.employee-profile-table .row-actions {
  gap: 2px;
  justify-content: center;
}

.employee-profile-table .row-actions .small {
  min-height: 22px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 10.5px;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.employee-list-panel .pagination {
  flex: 0 0 auto;
  min-height: 28px;
  margin-top: 4px;
  gap: 6px;
  overflow: hidden;
  font-size: 11px;
}

.employee-list-panel .page-size-control {
  gap: 5px;
  font-size: 11px;
}

.employee-list-panel .page-size-select {
  min-width: 70px;
  min-height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
}

.employee-list-panel .page-controls {
  gap: 6px;
}

.employee-list-panel .page-controls .small {
  min-height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
}

.employee-list-panel .page-controls span {
  font-size: 11px;
}

.page-size-control {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-size-control span {
  white-space: nowrap;
}

.page-size-select {
  width: auto;
  min-width: 96px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
}

.page-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.page-controls span {
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.small {
  min-height: 32px;
  padding: 0 10px;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.rules-grid h4 {
  margin: 0 0 8px;
}

.rules-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.work-calendar {
  display: grid;
  gap: 10px;
}

.calendar-week-header,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-week-header div {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  padding: 8px 0;
}

.calendar-day {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
  background: #fbfdff;
  color: var(--ink);
  white-space: normal;
}

.calendar-day.workday {
  border-color: #8ed0fa;
  color: #229de4;
  background: linear-gradient(180deg, #effaff 0%, #d8f1ff 100%);
}

.calendar-day.restday {
  border-color: #d7e2ec;
  color: #8ca2b3;
  background: #f8fbfd;
}

.calendar-day.holiday {
  border-color: #f2c76e;
  color: #e49a16;
  background: linear-gradient(180deg, #fff8e8 0%, #ffeec4 100%);
}

.calendar-day.adjusted-workday {
  border-color: #55c3ee;
  color: #0f97cf;
  background: linear-gradient(180deg, #ecfcff 0%, #d2f5ff 100%);
}

.calendar-day.collective-overtime {
  border-color: #ef4444;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.28);
}

.calendar-day.early-meeting {
  border-color: #38bdf8;
}

.calendar-day:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.calendar-day-number {
  font-size: 26px;
  font-weight: 900;
}

.calendar-weekday,
.calendar-day small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day strong {
  font-size: 15px;
}

.calendar-day-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.calendar-day.workday strong,
.calendar-day.adjusted-workday strong {
  color: #07385d;
}

.calendar-day.restday strong {
  color: #365a74;
}

.calendar-day.holiday strong {
  color: #744a00;
}

.calendar-tag {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--primary-strong);
  background: rgba(23, 105, 170, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.calendar-day.holiday .calendar-tag {
  color: #8a5600;
  background: rgba(240, 168, 41, 0.2);
}

.calendar-day.adjusted-workday .calendar-tag {
  color: #0f86c8;
  background: rgba(25, 167, 232, 0.12);
}

.calendar-day.restday small {
  color: #6c8193;
}

.calendar-overtime-toggle,
.calendar-early-meeting-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 92px;
  padding: 3px 7px;
  border: 1px solid rgba(23, 105, 170, 0.18);
  border-radius: 999px;
  color: #2f6d98;
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-overtime-toggle.is-active {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  background: #ef4444;
}

.calendar-early-meeting-toggle.is-active {
  border-color: rgba(14, 165, 233, 0.5);
  color: #ffffff;
  background: #0ea5e9;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 45, 70, 0.32);
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: min(760px, 96vw);
  max-height: min(760px, 92vh);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(94, 164, 214, 0.26);
  border-radius: 14px;
  padding: 18px;
  background: #f8fcff;
  box-shadow: 0 24px 70px rgba(22, 72, 112, 0.22);
}

.work-calendar-history-card {
  width: min(920px, 94vw);
  max-height: min(720px, 88vh);
}

.work-calendar-history-table {
  flex: 1 1 auto;
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(94, 164, 214, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.work-calendar-history-table table {
  width: 100%;
  min-width: 760px;
}

.work-calendar-history-table th,
.work-calendar-history-table td {
  text-align: center;
}

.social-insurance-location-modal {
  width: min(620px, 94vw);
}

.social-insurance-location-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 0 6px;
}

.social-insurance-location-body label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.social-insurance-location-body input,
.social-insurance-location-body select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.employee-profile-permission-modal {
  width: min(860px, 94vw);
}

.employee-profile-permission-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.employee-profile-permission-content section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(94, 164, 214, 0.2);
  border-radius: 12px;
  background: #ffffff;
}

.employee-profile-permission-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #163f5d;
}

.employee-profile-permission-section-title div {
  display: flex;
  gap: 6px;
}

.employee-profile-permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 330px;
  overflow: auto;
}

.employee-profile-permission-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(42, 163, 238, 0.14);
  border-radius: 8px;
  background: #f4fbff;
  color: #244f6d;
  font-size: 12px;
  font-weight: 800;
}

.employee-profile-permission-check input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.employee-profile-permission-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #3d6b88;
  background: #edf7ff;
  font-size: 12px;
}

.missing-punch-notifications-card {
  width: min(1180px, 96vw);
  max-height: min(760px, 92vh);
}

.missing-punch-notification-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid rgba(94, 164, 214, 0.18);
  border-radius: 12px;
  background: #eef8ff;
}

.missing-punch-notification-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 160px;
  color: #315c7c;
  font-size: 12px;
  font-weight: 900;
}

.missing-punch-notification-toolbar select {
  min-height: 34px;
  border: 1px solid rgba(94, 164, 214, 0.32);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #12344d;
  font: inherit;
}

.missing-punch-notifications-table {
  flex: 1 1 auto;
  max-height: 520px;
  overflow: auto;
  border: 1px solid rgba(94, 164, 214, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.missing-punch-notifications-table table {
  width: 100%;
  min-width: 1040px;
}

.missing-punch-notifications-table th,
.missing-punch-notifications-table td {
  text-align: center;
  vertical-align: middle;
}

.missing-punch-notifications-table input {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(94, 164, 214, 0.22);
  border-radius: 8px;
  padding: 0 8px;
  background: #ffffff;
  color: #143b59;
  font: inherit;
  text-align: center;
}

.missing-punch-notifications-table tr.is-confirmed td {
  background: #f3fbf5;
}

.employee-profile-field-hidden,
.employee-profile-action-hidden {
  display: none !important;
}

.employee-profile-readonly-note {
  color: #6d8396;
  font-size: 12px;
  font-weight: 800;
}

.modal-head,
.modal-actions,
.early-meeting-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 2px 0 4px;
  color: #163f5d;
  font-size: 20px;
}

.modal-head span,
.early-meeting-form span,
.early-meeting-participant small {
  color: #5f7890;
  font-size: 12px;
}

.early-meeting-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 180px)) 1fr;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 12px;
  background: #eef8ff;
}

.early-meeting-form label {
  display: grid;
  gap: 6px;
  color: #355b78;
  font-size: 12px;
  font-weight: 800;
}

.early-meeting-form input {
  height: 34px;
  border: 1px solid rgba(94, 164, 214, 0.34);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #173f5e;
}

.early-meeting-toolbar strong {
  flex: 0 0 auto;
  color: #173f5e;
  font-size: 14px;
}

.early-meeting-search {
  flex: 1 1 280px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #5f7890;
  font-size: 12px;
  font-weight: 800;
}

.early-meeting-search input {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(94, 164, 214, 0.34);
  border-radius: 9px;
  padding: 0 12px;
  background: #ffffff;
  color: #173f5e;
  outline: none;
}

.early-meeting-search input:focus {
  border-color: rgba(34, 143, 218, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 143, 218, 0.12);
}

.early-meeting-toolbar > div {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.early-meeting-participants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 160px;
  max-height: 360px;
  overflow: auto;
  padding: 2px;
}

.early-meeting-participant {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(94, 164, 214, 0.22);
  border-radius: 10px;
  background: #ffffff;
}

.early-meeting-participant input {
  width: 16px;
  height: 16px;
}

.early-meeting-participant span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.early-meeting-participant strong,
.early-meeting-participant small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.modal-actions .danger {
  margin-right: auto;
}

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

  .early-meeting-participants {
    grid-template-columns: 1fr;
  }

  .early-meeting-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .early-meeting-search {
    max-width: none;
    margin-left: 0;
  }

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

  .modal-actions .danger {
    margin-right: 0;
  }
}

.empty-day {
  visibility: visible;
  border-color: transparent;
  background: repeating-linear-gradient(
    -45deg,
    rgba(216, 235, 247, 0.5),
    rgba(216, 235, 247, 0.5) 6px,
    rgba(247, 252, 255, 0.85) 6px,
    rgba(247, 252, 255, 0.85) 12px
  );
  box-shadow: none !important;
  pointer-events: none;
}

/* Unified compact module layout */
body.module-view-active .workspace {
  padding: 14px 26px 18px;
}

body.module-view-active .topbar {
  margin-bottom: 8px;
}

body.module-view-active .eyebrow {
  font-size: 12px;
  line-height: 1.1;
}

body.module-view-active .topbar h2 {
  margin-top: 3px;
  font-size: 25px;
  line-height: 1.12;
}

body.module-view-active .view.active {
  gap: 8px;
}

body.module-view-active .panel {
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(42, 163, 238, 0.08);
}

body.module-view-active .panel + .panel,
body.module-view-active #settings .panel + .panel,
body.module-view-active #companyAllowance > .panel + .panel {
  margin-top: 8px;
}

body.module-view-active .panel-title,
body.module-view-active .compact-title {
  margin-bottom: 8px;
  gap: 10px;
}

body.module-view-active .panel-title h3,
body.module-view-active .section-heading,
body.module-view-active .compact-title h3 {
  font-size: 16px;
  line-height: 1.18;
}

body.module-view-active .panel-title span,
body.module-view-active .compact-title span {
  font-size: 11px;
  line-height: 1.25;
}

body.module-view-active .workflow-hint,
body.module-view-active .allowance-rule-note,
body.module-view-active .import-status {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
}

body.module-view-active .module-filters,
body.module-view-active #workdaySettings .module-filters,
body.module-view-active .allowance-filters {
  width: 100%;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
}

body.module-view-active .workspace label {
  gap: 3px;
  font-size: 11px;
  line-height: 1.2;
}

body.module-view-active .workspace input,
body.module-view-active .workspace select,
body.workday-view-active #workdaySettings input,
body.module-view-active .page-size-select {
  min-height: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
}

body.module-view-active .workspace button,
body.module-view-active .workspace .file-import,
body.module-view-active .workspace .more-actions summary,
body.module-view-active .button-link,
body.module-view-active .small {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.2;
}

body.module-view-active .table-actions,
body.workday-view-active #workdaySettings .settings-actions {
  gap: 6px;
  margin: 0;
  align-items: center;
}

body.module-view-active .settings-actions {
  margin-top: 8px;
}

body.module-view-active .table-wrap {
  border-radius: 8px;
}

body.module-view-active table {
  font-size: 12px;
}

body.module-view-active th,
body.module-view-active td,
body.module-view-active .compact-table th,
body.module-view-active .compact-table td {
  height: 28px;
  padding: 4px 8px;
  line-height: 1.2;
  text-align: center;
}

body.module-view-active th {
  font-size: 12px;
}

body.module-view-active td,
body.module-view-active .compact-table td {
  font-size: 12px;
}

body.module-view-active .missing-punch-verification-wrap th:nth-child(7),
body.module-view-active .missing-punch-verification-wrap td:nth-child(7) {
  padding-right: 28px;
  padding-left: 14px;
  text-align: left;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.module-view-active .row-actions {
  gap: 5px;
  justify-content: center;
}

body.module-view-active .row-actions button,
body.module-view-active .row-actions .button-link {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
}

body.module-view-active .attendance-command-panel {
  gap: 8px;
  padding: 12px 14px;
}

body.module-view-active .attendance-command-main {
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 8px;
}

body.module-view-active .attendance-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

body.module-view-active .attendance-actions .file-import,
body.module-view-active .attendance-actions button,
body.module-view-active .attendance-actions summary {
  min-height: 30px;
  font-size: 12px;
}

body.module-view-active .attendance-review-history {
  margin-top: 6px;
}

body.module-view-active .exemption-panel {
  margin: 6px 0;
  padding: 8px 10px;
}

body.module-view-active .exemption-form {
  gap: 7px;
}

body.module-view-active .attendance-table input {
  min-width: 92px;
}

body.module-view-active .attendance-summary,
body.module-view-active .payroll-kpi-grid {
  gap: 6px;
}

body.module-view-active .attendance-summary div,
body.module-view-active .payroll-kpi-grid div {
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 8px;
}

body.module-view-active .attendance-summary span,
body.module-view-active .payroll-kpi-grid span {
  font-size: 11px;
}

body.module-view-active .attendance-summary strong,
body.module-view-active .payroll-kpi-grid strong {
  font-size: 17px;
}

body.module-view-active .allowance-command,
body.module-view-active .payroll-command {
  gap: 8px;
  padding: 12px 14px;
}

body.module-view-active .allowance-command .workflow-hint,
body.module-view-active .payroll-command-head {
  padding-bottom: 8px;
}

body.module-view-active .payroll-command-head h3 {
  font-size: 16px;
}

body.module-view-active .payroll-command-head span:not(.import-status) {
  margin-top: 3px;
  font-size: 12px;
}

body.module-view-active .payroll-command-row.compact {
  grid-template-columns: minmax(150px, 210px) minmax(420px, auto) minmax(200px, 1fr);
  gap: 8px;
}

body.module-view-active .payroll-command-actions .file-import,
body.module-view-active .payroll-command-actions .ghost,
body.module-view-active .payroll-command-actions .primary,
body.module-view-active .allowance-command .settings-actions button,
body.workday-view-active #workdaySettings .settings-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

body.module-view-active .payroll-detail-panel summary {
  min-height: 34px;
  padding: 0;
}

body.module-view-active .payroll-detail-panel[open] summary {
  margin-bottom: 6px;
}

body.module-view-active .payroll-preview-table,
body.module-view-active .allowance-table,
body.module-view-active .attendance-table,
body.module-view-active .exemption-table,
body.module-view-active .attendance-review-history .table-wrap {
  max-height: 420px;
}

body.module-view-active #calculator .payroll-preview-table {
  height: min(100%, calc(100vh - 470px));
  min-height: 380px;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

body.module-view-active #calculator,
body.module-view-active #calculator .payslip,
body.module-view-active #calculator .payroll-detail-panel,
body.module-view-active #calculator .payroll-preview-tools,
body.module-view-active #calculator .payroll-preview-scrollbar,
body.module-view-active #calculator .payroll-preview-table {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.module-view-active #calculator .payslip,
body.module-view-active #calculator .payroll-detail-panel,
body.module-view-active #calculator .payroll-preview-tools,
body.module-view-active #calculator .payroll-preview-scrollbar,
body.module-view-active #calculator .payroll-preview-table {
  width: 100% !important;
}

body.module-view-active #calculator .payroll-preview-table {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

body.module-view-active #calculator .payroll-preview-tools,
body.module-view-active #calculator .payroll-preview-scrollbar,
body.module-view-active #calculator .payroll-preview-table {
  inline-size: min(100%, calc(100vw - 286px)) !important;
  width: min(100%, calc(100vw - 286px)) !important;
  max-width: min(100%, calc(100vw - 286px)) !important;
}

body.module-view-active #calculator .payroll-detail-panel.is-fullscreen .payroll-preview-tools,
body.module-view-active #calculator .payroll-detail-panel.is-fullscreen .payroll-preview-scrollbar,
body.module-view-active #calculator .payroll-detail-panel.is-fullscreen .payroll-preview-table {
  inline-size: calc(100vw - 50px) !important;
  width: calc(100vw - 50px) !important;
  max-width: calc(100vw - 50px) !important;
}

body.module-view-active #calculator .payroll-detail-panel.is-fullscreen .payroll-preview-table {
  flex: 1 1 auto;
  height: calc(100vh - 160px) !important;
  min-height: calc(100vh - 160px) !important;
  max-height: calc(100vh - 160px) !important;
}

body.module-view-active #calculator .payroll-preview-scrollbar {
  flex: 0 0 auto;
  display: block;
}

body.module-view-active #calculator .payroll-preview-scrollbar.hidden {
  display: none;
}

body.module-view-active #calculator .payroll-preview-table table {
  min-width: 2140px;
}

body.module-view-active #calculator .payroll-preview-table th,
body.module-view-active #calculator .payroll-preview-table td {
  height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1.15;
  box-sizing: border-box;
  white-space: nowrap;
}

body.module-view-active #calculator .payroll-preview-table thead th {
  height: 34px;
  font-size: 12px;
}

body.module-view-active #calculator .payroll-preview-table thead tr:first-child th:nth-last-child(-n + 7),
body.module-view-active #calculator .payroll-preview-table tbody td:nth-last-child(-n + 7) {
  min-width: 104px;
  width: 104px;
}

body.module-view-active #calculator .payroll-preview-table thead tr:first-child th:nth-last-child(-n + 3),
body.module-view-active #calculator .payroll-preview-table tbody td:nth-last-child(-n + 3) {
  min-width: 124px;
  width: 124px;
}

body.module-view-active #calculator .payroll-preview-table thead tr:first-child th:last-child,
body.module-view-active #calculator .payroll-preview-table tbody td:last-child {
  min-width: 142px;
  width: 142px;
  padding-right: 20px;
  font-weight: 800;
}

body.module-view-active .allowance-rules-panel {
  padding: 10px 12px;
}

body.module-view-active .allowance-rules-table th,
body.module-view-active .allowance-rules-table td {
  height: 26px;
  padding: 3px 5px;
}

body.module-view-active .table-number-input {
  height: 24px;
  min-height: 24px;
  font-size: 11px;
}

body.module-view-active #companyAllowance.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: calc(100vh - 92px);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

body.module-view-active #companyAllowance:not(.active) {
  display: none;
}

body.module-view-active #companyAllowance > .panel {
  min-width: 0;
  margin: 0;
}

body.module-view-active #companyAllowance > .panel + .panel {
  margin-top: 0;
}

body.module-view-active #companyAllowance .allowance-command {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  padding: 10px 12px;
}

body.module-view-active #companyAllowance .allowance-command .workflow-hint {
  padding: 5px 9px;
  font-size: 11.5px;
}

body.module-view-active #companyAllowance .allowance-filters {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  align-items: end;
  gap: 8px 12px;
  width: 100%;
}

body.module-view-active #companyAllowance .allowance-command .settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

body.module-view-active #companyAllowance .allowance-command .settings-actions button {
  flex: 0 0 auto;
}

body.module-view-active #companyAllowance .allowance-command .settings-actions .import-status {
  flex: 1 1 160px;
  min-width: 120px;
  max-width: 260px;
}

body.module-view-active #companyAllowance .allowance-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

body.module-view-active #companyAllowance .allowance-summary div {
  padding: 6px 8px;
}

body.module-view-active #companyAllowance .allowance-summary strong {
  font-size: 16px;
}

body.module-view-active #companyAllowance .allowance-rules-panel {
  padding: 8px 12px;
}

body.module-view-active #companyAllowance .allowance-rules-table th,
body.module-view-active #companyAllowance .allowance-rules-table td {
  height: 24px;
  padding: 2px 5px;
  font-size: 11.5px;
}

body.module-view-active #companyAllowance .allowance-rule-actions {
  margin-top: 5px;
}

body.module-view-active #companyAllowance .allowance-rule-note {
  margin-top: 4px;
  padding: 5px 8px;
  font-size: 11px;
}

.allowance-rules-modal-card {
  width: min(1120px, 94vw);
  max-height: min(680px, 88vh);
}

.allowance-rules-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px;
}

.allowance-rules-modal-body .allowance-rules-table {
  max-height: min(360px, 48vh);
  overflow: auto;
  border: 1px solid rgba(94, 164, 214, 0.2);
  border-radius: 10px;
  background: #fff;
}

.allowance-rules-modal-body .allowance-rules-table table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.allowance-rules-modal-body .allowance-rules-table th,
.allowance-rules-modal-body .allowance-rules-table td {
  height: 34px;
  padding: 5px 8px;
  text-align: center;
}

.allowance-rules-modal-body .allowance-rules-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.payroll-adjustments-card {
  width: min(1060px, 94vw);
  max-height: min(740px, 90vh);
}

.payroll-adjustments-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.payroll-adjustments-toolbar label {
  display: grid;
  gap: 4px;
  min-width: 220px;
  color: #416986;
  font-size: 12px;
  font-weight: 900;
}

.payroll-adjustments-toolbar .payroll-adjustments-search {
  flex: 1 1 260px;
  min-width: 240px;
}

.payroll-adjustments-toolbar .payroll-adjustments-search input {
  width: 100%;
}

.payroll-adjustments-toolbar .payroll-adjustments-import {
  min-width: 118px;
  align-self: end;
  padding: 12px 16px;
}

.payroll-adjustments-table {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(480px, 58vh);
  overflow: auto;
  border: 1px solid rgba(94, 164, 214, 0.2);
  border-radius: 10px;
  background: #fff;
}

.payroll-adjustments-table table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.payroll-adjustments-table th,
.payroll-adjustments-table td {
  height: 38px;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}

.payroll-adjustments-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.payroll-adjustments-table th:nth-child(1),
.payroll-adjustments-table td:nth-child(1) {
  width: 120px;
}

.payroll-adjustments-table th:nth-child(2),
.payroll-adjustments-table td:nth-child(2),
.payroll-adjustments-table th:nth-child(3),
.payroll-adjustments-table td:nth-child(3) {
  width: 130px;
}

.payroll-adjustments-table th:nth-child(4),
.payroll-adjustments-table td:nth-child(4),
.payroll-adjustments-table th:nth-child(5),
.payroll-adjustments-table td:nth-child(5) {
  width: 130px;
}

.payroll-adjustments-table .table-number-input {
  width: 100%;
  max-width: 112px;
}

.critical-illness-overrides-table table {
  min-width: 1220px;
}

.critical-illness-overrides-table th:nth-child(1),
.critical-illness-overrides-table td:nth-child(1) {
  width: 110px;
}

.critical-illness-overrides-table th:nth-child(2),
.critical-illness-overrides-table td:nth-child(2) {
  width: 145px;
}

.critical-illness-overrides-table th:nth-child(3),
.critical-illness-overrides-table td:nth-child(3) {
  width: 150px;
}

.critical-illness-overrides-table th:nth-child(4),
.critical-illness-overrides-table td:nth-child(4) {
  width: 270px;
  white-space: normal;
  line-height: 1.35;
}

.critical-illness-overrides-table th:nth-child(5),
.critical-illness-overrides-table td:nth-child(5) {
  width: 150px;
}

.critical-illness-overrides-table th:nth-child(6),
.critical-illness-overrides-table td:nth-child(6) {
  width: 360px;
}

.critical-illness-overrides-table .critical-illness-override-action,
.critical-illness-overrides-table .critical-illness-override-remark {
  width: 100%;
}

.payroll-adjustment-remark {
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #f8fbff;
}

body.module-view-active #companyAllowance > .panel:last-child {
  display: flex;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

body.module-view-active #companyAllowance > .panel:last-child .compact-title {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

body.module-view-active #companyAllowance .allowance-table {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

body.module-view-active #companyAllowance .allowance-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

body.module-view-active #companyAllowance .allowance-table th,
body.module-view-active #companyAllowance .allowance-table td {
  height: 34px;
  padding: 5px 6px;
}

body.workday-view-active #workdaySettings .workday-status {
  padding: 6px 10px;
}

body.workday-view-active #workdaySettings .workflow-hint {
  margin-bottom: 8px;
  padding: 6px 10px;
}

body.workday-view-active .work-calendar {
  gap: 7px;
}

body.workday-view-active .calendar-week-header,
body.workday-view-active .calendar-grid {
  gap: 6px;
}

body.workday-view-active .calendar-week-header div {
  padding: 5px 0;
  font-size: 11px;
}

body.workday-view-active .calendar-day {
  min-height: 82px;
  padding: 7px 8px;
  gap: 3px;
  border-radius: 8px;
}

body.workday-view-active .calendar-day-number {
  font-size: 20px;
}

body.workday-view-active .calendar-weekday,
body.workday-view-active .calendar-day small {
  font-size: 10px;
}

body.workday-view-active .calendar-day strong {
  font-size: 12px;
}

body.workday-view-active .calendar-tag {
  padding: 2px 6px;
  font-size: 10px;
}

body.workday-view-active .calendar-day-actions {
  gap: 4px;
}

body.workday-view-active .calendar-overtime-toggle,
body.workday-view-active .calendar-early-meeting-toggle {
  max-width: 74px;
  padding: 2px 5px;
  font-size: 10px;
}

body.module-view-active #settings .settings-grid,
body.module-view-active #settings .rules-grid {
  gap: 8px;
}

body.module-view-active #settings .rules-grid article {
  padding: 10px 12px;
  border-radius: 8px;
}

body.module-view-active #settings .rules-grid h4 {
  margin-bottom: 4px;
  font-size: 13px;
}

body.module-view-active #settings .rules-grid p {
  font-size: 12px;
  line-height: 1.45;
}

body.module-view-active .payslip-sheet {
  padding: 14px 16px;
}

body.module-view-active .payslip-header {
  gap: 8px;
  padding-bottom: 10px;
}

body.module-view-active .payslip-columns {
  gap: 10px;
}

body.module-view-active .payslip-lines div {
  padding: 6px 0;
}

body.module-view-active .payslip-total {
  margin-top: 10px;
  padding-top: 10px;
}

body.module-view-active .pagination {
  min-height: 30px;
  gap: 6px;
  margin-top: 6px;
}

body.module-view-active .page-size-control,
body.module-view-active .page-controls span,
body.module-view-active .page-nav {
  font-size: 12px;
}

/* Consistent page shell across modules */
body.module-view-active,
body.employees-view-active,
body.workday-view-active {
  overflow: hidden;
}

body.module-view-active .app,
body.employees-view-active .app,
body.workday-view-active .app {
  grid-template-columns: 220px minmax(0, 1fr);
}

body.module-view-active .sidebar,
body.employees-view-active .sidebar,
body.workday-view-active .sidebar {
  padding-right: 8px;
  padding-left: 8px;
}

body.module-view-active .brand-logo,
body.employees-view-active .brand-logo,
body.workday-view-active .brand-logo {
  width: 196px;
}

body.module-view-active .brand-logo img,
body.employees-view-active .brand-logo img,
body.workday-view-active .brand-logo img {
  width: 56px;
}

body.module-view-active .brand-logo-text strong,
body.employees-view-active .brand-logo-text strong,
body.workday-view-active .brand-logo-text strong {
  font-size: 24px;
}

body.module-view-active .nav-item,
body.employees-view-active .nav-item,
body.workday-view-active .nav-item {
  min-height: 40px;
  padding-left: 44px;
  font-size: 14px;
}

body.module-view-active .workspace,
body.employees-view-active .workspace,
body.workday-view-active .workspace {
  height: 100vh;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 12px 18px;
  overflow: hidden;
}

body.module-view-active .topbar,
body.employees-view-active .topbar,
body.workday-view-active .topbar {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

body.module-view-active .eyebrow,
body.employees-view-active .eyebrow,
body.workday-view-active .eyebrow {
  margin: 0;
  font-size: 12px;
  line-height: 1.1;
}

body.module-view-active .topbar h2,
body.employees-view-active .topbar h2,
body.workday-view-active .topbar h2 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.12;
}

body.module-view-active .view.active,
body.employees-view-active .view.active,
body.workday-view-active .view.active {
  flex: 1 1 auto;
  min-height: 0;
}

body.module-view-active .view.active > .panel:first-child,
body.workday-view-active #workdaySettings > .panel,
.employee-list-panel {
  border-radius: 8px;
}

body.settings-view-active {
  overflow-x: hidden;
  overflow-y: auto;
}

body.settings-view-active .app {
  min-height: 100vh;
  height: auto;
}

body.settings-view-active .workspace {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 42px;
}

body.settings-view-active #settings.active {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  padding-bottom: 24px;
}

body.settings-view-active #settings .panel {
  overflow: visible;
}

body.workday-view-active #workdaySettings {
  flex: 1 1 auto;
  min-height: 0;
}

body.workday-view-active #workdaySettings > .panel {
  padding: 12px 14px;
}

body.workday-view-active #workdaySettings .module-filters {
  margin-bottom: 8px;
}

body.workday-view-active #workdaySettings .workflow-hint {
  flex: 0 0 auto;
}

body.workday-view-active .work-calendar {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 980px) {
  body.employees-view-active {
    overflow: auto;
  }

  body.employees-view-active .workspace {
    height: auto;
    display: block;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace {
    padding: 24px 18px 36px;
  }

  .topbar,
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .span-7,
  .span-5,
  .span-12 {
    grid-column: 1 / -1;
  }

  .form-grid.two,
  .form-grid.three,
  .attendance-command-panel,
  .module-filters,
  .payroll-command-row,
  .payroll-kpi-grid,
  .attendance-summary,
  .exemption-form,
  .payslip-header,
  .payslip-columns,
  .payslip-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  body.module-view-active #workdaySettings .module-filters {
    grid-template-columns: 1fr;
  }

  body.module-view-active .payroll-command-head,
  body.module-view-active .payroll-command-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.module-view-active .payroll-command-row.compact {
    grid-template-columns: 1fr;
  }

  body.module-view-active .attendance-command-main {
    grid-template-columns: 1fr;
  }

  body.module-view-active .attendance-command-panel > .import-status {
    width: 100%;
    border-radius: 8px;
  }

  body.module-view-active .payroll-import-status {
    max-width: none;
    border-radius: 8px;
  }

  body.module-view-active #workdaySettings .settings-actions {
    align-items: stretch;
  }

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

  .calendar-week-header {
    display: none;
  }

  .table-actions {
    align-items: stretch;
  }

  .table-actions button,
  .file-import,
  .more-actions summary {
    justify-content: center;
  }

  .more-actions {
    width: 100%;
  }

  .more-actions div {
    position: static;
    min-width: 0;
  }

  .import-status {
    flex-basis: 100%;
    min-width: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  #payrollForm,
  .table-actions {
    display: none;
  }

  .app,
  .workspace {
    display: block;
    padding: 0;
  }

  .panel {
    box-shadow: none;
  }

  .view {
    display: none;
  }

  #payslipPreview {
    display: block;
  }

  .payslip-preview-panel {
    max-width: none;
    border: 0;
  }
}
