:root {
  --navy: #172f52;
  --navy-soft: #2a4a72;
  --green: #3f8f63;
  --red: #c95353;
  --yellow: #b88a2d;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e6e9ee;
  --line-soft: #f0f2f5;
  --shadow: 0 8px 20px rgba(23, 47, 82, 0.045);
  --radius: 6px;
  --radius-sm: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --control-h: 40px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

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

.link-button,
a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.alert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 650;
}

.alert.success {
  border-color: rgba(63, 143, 99, 0.24);
  background: rgba(63, 143, 99, 0.1);
  color: var(--green);
}

.alert.danger {
  border-color: rgba(201, 83, 83, 0.24);
  background: rgba(201, 83, 83, 0.1);
  color: var(--red);
}

.alert.warning {
  border-color: rgba(202, 143, 42, 0.24);
  background: rgba(202, 143, 42, 0.1);
  color: var(--yellow);
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  padding-bottom: 58px;
  background:
    linear-gradient(135deg, rgba(14, 31, 58, 0.98), rgba(28, 61, 104, 0.94)),
    var(--navy);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 58px);
  padding: clamp(32px, 7vw, 88px);
  color: #fff;
}

.login-brand-panel {
  max-width: 640px;
}

.login-logo {
  width: min(420px, 100%);
  max-width: 78vw;
  height: auto;
  display: block;
  margin-bottom: clamp(28px, 5vw, 56px);
  object-fit: contain;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: none;
}

.login-visual h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 760;
}

.login-subtitle {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 650;
  letter-spacing: 0;
}

.login-visual p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.login-features {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.login-features article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.075);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.login-features article:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.login-features strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

.login-features span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.4;
}

.login-feature-icon {
  width: 30px;
  height: 30px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.login-feature-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  flex: 0 0 15px;
  fill: currentColor;
  opacity: 0.88;
  transform: translateY(0.5px);
}

.login-card {
  align-self: center;
  width: min(440px, calc(100% - 32px));
  justify-self: center;
  background: var(--card);
  border-radius: 10px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.login-footer {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 650;
}

.login-footer a {
  color: #fff;
  font-weight: 800;
  text-underline-offset: 3px;
  transition: opacity 0.18s ease, text-decoration-color 0.18s ease;
}

.login-footer a:hover,
.login-footer a:focus {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline;
}

.eyebrow,
.page-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h2,
.panel h3,
.topbar h2 {
  margin: 6px 0 0;
  color: var(--navy);
}

.form-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

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

.form-grid label,
.filter-bar label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 4px rgba(28, 61, 104, 0.1);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--red);
  background: #fffafa;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(201, 83, 83, 0.12);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--green);
  background: #fbfffd;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 143, 99, 0.12);
}

.field-error {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.date-input-group {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.native-date-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.form-row.justify-end {
  justify-content: flex-end;
}

.check-label {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
}

.check-label input {
  width: 18px;
  min-height: 18px;
}

.btn {
  min-height: var(--control-h);
  border: 0;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 14px rgba(23, 47, 82, 0.14);
}

.btn.secondary {
  background: #edf2f7;
  color: var(--navy);
}

.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn.full {
  width: 100%;
}

.btn.compact {
  min-height: 34px;
  padding: 7px 12px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--line);
}

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

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

.side-nav {
  display: grid;
  gap: 4px;
}

.nav-link {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 11px;
  background: transparent;
  color: #526071;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0.72;
}

.nav-link:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.nav-link:focus-visible {
  outline: 2px solid rgba(28, 61, 104, 0.28);
  outline-offset: 2px;
}

.nav-link:active {
  background: #e8eef5;
  color: var(--navy);
}

.nav-link.active {
  background: var(--navy);
  color: #fff;
}

.nav-link.active:hover,
.nav-link.active:active {
  background: var(--navy);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  border-radius: var(--radius);
  padding: 13px;
  background: #f1f6f3;
  color: var(--green);
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 14px 26px;
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.topbar h2 {
  font-size: 22px;
  font-weight: 700;
}

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

.search-box {
  position: relative;
  width: min(250px, 22vw);
}

.search-box span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.user-chip span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.user-chip strong {
  font-weight: 650;
}

.user-menu {
  position: relative;
}

.notification-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.user-dropdown a,
.user-dropdown button {
  width: 100%;
  display: block;
  border: 0;
  padding: 11px 14px;
  background: #fff;
  color: #344054;
  text-align: left;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: #f7f9fb;
  color: var(--navy);
}

.top-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.top-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 22;
  width: min(380px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

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

.notification-head strong {
  color: var(--navy);
  font-size: 15px;
}

.notification-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.notification-head .link-button {
  white-space: nowrap;
  font-size: 12px;
}

.notification-list {
  max-height: 420px;
  overflow: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.is-unread {
  background: #f8fbff;
}

.notification-item.is-read {
  opacity: 0.78;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--navy);
}

.notification-dot.info {
  background: var(--navy);
}

.notification-dot.warning {
  background: var(--yellow);
}

.notification-dot.critical {
  background: var(--red);
}

.notification-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-title-row a,
.notification-title-row strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
}

.notification-item p {
  margin: 5px 0 8px;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.notification-type {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
}

.notification-type.info {
  background: rgba(28, 61, 104, 0.1);
  color: var(--navy);
}

.notification-type.warning {
  background: rgba(184, 138, 45, 0.13);
  color: var(--yellow);
}

.notification-type.critical {
  background: rgba(201, 83, 83, 0.12);
  color: var(--red);
}

.notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.notification-meta .link-button {
  font-size: 11px;
}

.notification-empty {
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 650;
}

.icon-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
}

.content {
  padding: var(--space-7);
}

.screen {
  display: none;
}

.screen.active {
  display: grid;
  gap: var(--space-5);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
}

.page-header h1 {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.page-tabs a {
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 14px;
  background: #fff;
  color: #526071;
  font-size: 13px;
  font-weight: 750;
}

.page-tabs a.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.page-subtitle {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
}

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

.ds-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 24px;
  min-height: 142px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 650;
}

.metric-card strong {
  display: block;
  margin-top: 16px;
  color: var(--navy);
  font-size: 32px;
  font-weight: 700;
}

.trend {
  display: inline-flex;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 650;
}

.success {
  color: var(--green);
}

.warning {
  color: var(--yellow);
}

.danger {
  color: var(--red);
}

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

.dashboard-grid,
.salary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
}

.panel {
  padding: var(--space-6);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.panel h3 {
  font-size: 18px;
  font-weight: 700;
}

.bar-chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.bar-chart span {
  position: relative;
  min-height: 34px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #8fc2a5;
}

.bar-chart b {
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
}

.weekly-chart {
  height: 280px;
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  align-items: end;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.weekly-day {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weekly-bars {
  width: 34px;
  min-height: 10px;
  align-self: end;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #eef2f7;
}

.weekly-segment {
  display: block;
  min-height: 0;
}

.weekly-segment.success {
  background: rgba(63, 143, 99, 0.78);
}

.weekly-segment.warning {
  background: rgba(184, 138, 45, 0.6);
}

.weekly-segment.danger {
  background: rgba(201, 83, 83, 0.68);
}

.weekly-day strong {
  color: var(--navy);
}

.weekly-day small {
  color: #98a2b3;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

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

.status-list div,
.payroll-line,
.payroll-total,
.legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-list div {
  min-height: 46px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line-soft);
  color: #374151;
}

.status-list div:last-child {
  border-bottom: 0;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: var(--muted);
}

.day.success {
  background: rgba(31, 157, 99, 0.14);
  color: var(--green);
}

.day.warning {
  background: rgba(214, 155, 23, 0.16);
  color: var(--yellow);
}

.day.info {
  background: rgba(28, 61, 104, 0.1);
  color: var(--navy);
}

.day.danger {
  background: rgba(216, 59, 59, 0.14);
  color: var(--red);
}

.day.muted {
  background: #eef2f7;
  color: var(--muted);
}

.dot.success {
  background: var(--green);
}

.dot.warning {
  background: var(--yellow);
}

.dot.danger {
  background: var(--red);
}

.status-list .dot {
  margin-right: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-card {
  display: grid;
  gap: var(--space-4);
}

.table-card .panel-head,
.table-card .filter-bar {
  margin-bottom: 0;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.table,
.data-table {
  margin: 0;
}

th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #fafbfc;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  color: #2f3947;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
}

.badge.success {
  background: rgba(63, 143, 99, 0.12);
}

.badge.warning {
  background: rgba(184, 138, 45, 0.14);
}

.badge.info {
  background: rgba(28, 61, 104, 0.1);
  color: var(--navy);
}

.badge.danger {
  background: rgba(201, 83, 83, 0.12);
}

.badge.muted {
  background: #eef2f7;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.activity-filter {
  grid-template-columns: 0.9fr 1fr 1fr 0.75fr 0.75fr auto;
}

.employee-filter {
  grid-template-columns: 1.2fr 0.9fr 0.75fr 0.9fr auto;
}

.table-action {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.danger-action {
  color: var(--red);
}

.action-tooltip {
  position: relative;
  color: #667085;
  cursor: help;
}

.action-tooltip::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #172b4d;
  color: #fff;
  box-shadow: var(--shadow);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.action-tooltip:hover::after,
.action-tooltip:focus::after {
  opacity: 1;
  transform: translateY(0);
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.bulk-info {
  border: 1px solid rgba(28, 61, 104, 0.12);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(28, 61, 104, 0.05);
  color: #475467;
  font-size: 13px;
}

.bulk-info strong {
  color: var(--navy);
}

.user-password-head {
  margin: var(--space-2) 0 0;
}

.cell-input {
  min-width: 120px;
  min-height: 38px;
  padding: 8px;
}

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

.day {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  font-weight: 750;
}

.legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0;
  color: var(--muted);
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payroll-card {
  align-self: start;
}

.payroll-line,
.payroll-total {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.payroll-total {
  margin-top: 8px;
  border-bottom: 0;
  color: var(--navy);
}

.payroll-total strong {
  font-size: 28px;
}

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

.report-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.report-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: var(--space-4);
}

.rules-list {
  display: grid;
  gap: var(--space-3);
}

.rules-list .check-label {
  min-height: 44px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  color: #374151;
  font-weight: 650;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--muted);
  font-size: 13px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
}

.page-link {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  background: #fff;
  color: #526071;
  font-weight: 650;
  cursor: pointer;
}

.page-link.active,
.page-link:hover:not(:disabled) {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.page-link:disabled {
  color: #a0a8b3;
  cursor: not-allowed;
}

.page-link.disabled {
  color: #a0a8b3;
  pointer-events: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(31, 41, 55, 0.42);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

.modal-dialog {
  width: min(680px, 100%);
}

.modal-content {
  overflow: hidden;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: 20px;
}

.modal-body {
  padding: var(--space-6);
}

.modal-body p {
  margin: 0;
  color: #344054;
  line-height: 1.6;
}

.confirm-subject {
  margin-top: var(--space-4) !important;
  color: var(--navy) !important;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.danger-button {
  background: var(--red);
}

.danger-button:hover:not(:disabled) {
  background: #b83232;
}

.rules-list .check-label:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

@media (max-width: 940px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-bottom: 0;
  }

  .login-visual {
    min-height: 44vh;
    padding: 42px clamp(24px, 7vw, 64px) 84px;
  }

  .login-card {
    margin: -44px auto 32px;
  }

  .login-footer {
    position: static;
    grid-row: 3;
    padding: 0 24px 26px;
    color: rgba(255, 255, 255, 0.78);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .icon-button {
    display: block;
    flex: 0 0 auto;
  }

  .search-box,
  .topbar-actions .user-chip strong {
    display: none;
  }

  .dashboard-grid,
  .salary-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .content,
  .topbar {
    padding: var(--space-5);
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .metric-grid,
  .report-grid,
  .form-grid.two-col,
  .filter-bar,
  .login-features {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-header,
  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions,
  .pagination {
    width: 100%;
    justify-content: flex-start;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  .login-card {
    padding: 24px;
  }

  .login-logo {
    max-width: 100%;
  }

  .login-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .login-logo {
    width: min(300px, 100%);
    margin-bottom: 28px;
  }

  .login-visual h1 {
    font-size: 38px;
  }

  .login-visual p {
    font-size: 16px;
  }

  .user-chip {
    padding-right: 7px;
  }

  .metric-card strong {
    font-size: 28px;
  }

  th,
  td {
    padding: 12px;
  }
}
