:root {
  --navy: #102a43;
  --navy-soft: #1f4e79;
  --paper: #ffffff;
  --cream: #f3f6f9;
  --ink: #182433;
  --muted: #687586;
  --line: #dce5ee;
  --orange: #2563eb;
  --orange-dark: #1d4ed8;
  --green: #0f8a6a;
  --blue: #0891b2;
  --shadow: 0 10px 24px rgba(16, 42, 67, 0.07);
  --radius: 12px;
}

html { background: #f1f5f9; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

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

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 30px 22px;
  color: white;
  background: var(--navy);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: rgba(255,255,255,.1);
  font-size: 25px;
  line-height: 1;
  display: none;
  place-items: center;
}

.sidebar-close:hover { background: rgba(255,255,255,.18); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-mark {
  width: 58px;
  height: 45px;
  padding: 5px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: white;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand strong, .brand span { display: block; }
.brand strong { font-size: 18px; }
.brand span { margin-top: 2px; color: #9eabc0; font-size: 12px; }

.nav-list {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding-right: 3px;
  overflow-y: auto;
}

.nav-section-label {
  margin: 12px 14px 2px;
  color: #718198;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 11px;
  color: #b7c2d2;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: .2s ease;
  text-decoration: none;
}

.nav-item:hover, .nav-item.active {
  color: white;
  background: var(--navy-soft);
}

.nav-item.active { box-shadow: inset 3px 0 var(--orange); }
.nav-icon { width: 22px; font-weight: 800; text-align: center; }

.sidebar-user-footer {
  margin-top: auto;
  padding: 19px 8px 5px;
  border-top: 1px solid rgba(255,255,255,.11);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #18332b;
  background: #dff2e9;
  font-size: 11px;
  font-weight: 800;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-info strong,
.sidebar-user-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-info strong { color: white; font-size: 12px; }
.sidebar-user-info small { margin-top: 3px; color: #aab7b1; font-size: 10px; }
.sidebar-user-footer form { margin: 0; }
.sidebar-logout {
  padding: 8px 0 8px 8px;
  border: 0;
  color: #c1cbc7;
  background: transparent;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: .2s ease;
}
.sidebar-logout:hover { color: white; }

.main-content { margin-left: 248px; padding: 0 34px 44px; }

.topbar {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar h1 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.03em; }
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.user-switcher { position: relative; }
.active-user-button {
  min-width: 170px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.active-user-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy);
  font-size: 11px;
  font-weight: 800;
}
.active-user-button strong, .active-user-button small { display: block; }
.active-user-button strong { max-width: 112px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.active-user-button small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.user-switcher-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 7px);
  right: 0;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
  display: none;
}
.user-switcher-menu.open { display: grid; gap: 4px; }
.user-switch-option {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.user-switch-option:hover, .user-switch-option.active { background: #fff1e8; }
.user-switch-option strong, .user-switch-option span { display: block; }
.user-switch-option strong { font-size: 11px; }
.user-switch-option span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.role-hidden { display: none !important; }
.today-box { padding-right: 17px; border-right: 1px solid var(--line); text-align: right; }
.today-box span, .today-box strong { display: block; }
.today-box span { color: var(--muted); font-size: 11px; }
.today-box strong { margin-top: 3px; font-size: 13px; }

.primary-btn, .secondary-btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 750;
  transition: .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn { color: white; background: var(--orange); box-shadow: 0 8px 18px rgba(230,106,44,.2); }
.primary-btn:hover { background: var(--orange-dark); transform: translateY(-1px); }
.secondary-btn { color: var(--navy); background: #edf0f4; }
.secondary-btn:hover { background: #e2e7ec; }
.compact-btn { padding: 8px 12px; font-size: 10px; }
.wide { width: 100%; padding: 13px 18px; }
.text-btn { padding: 5px; border: 0; color: var(--orange); background: transparent; font-weight: 700; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }

.page { display: none; animation: appear .25s ease; }
.page.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }

.filter-bar {
  padding: 17px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filter-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.date-fields { display: flex; align-items: end; gap: 10px; }
.date-fields label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }

input, select, textarea {
  width: 100%;
  border: 1px solid #dfe2e6;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: .2s ease;
}

input, select { height: 42px; padding: 0 12px; }
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--orange) 50%),
    linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
textarea { padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(230,106,44,.1); }
.date-fields input { display: block; width: 148px; height: 38px; margin-top: 5px; }
.compact-input { width: 150px; height: 36px; }
.date-picker-input {
  cursor: pointer;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--orange) 50%),
    linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 17px,
    calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.calendar-popover {
  position: fixed;
  z-index: 120;
  width: 330px;
  padding: 15px;
  border: 1px solid rgba(19, 34, 56, .1);
  border-radius: 16px;
  background: white;
  box-shadow: 0 22px 55px rgba(19, 34, 56, .2);
  display: none;
}
.calendar-popover.open { display: block; animation: calendarOpen .18s ease; }
@keyframes calendarOpen { from { opacity: 0; transform: translateY(-5px); } }
.calendar-header {
  padding: 2px 2px 13px;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}
.calendar-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 6px;
}
.calendar-selectors select {
  width: 100%;
  height: 34px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}
.calendar-selectors .themed-select {
  min-width: 0;
}
.calendar-selectors .themed-select-button {
  height: 34px;
  padding: 0 28px 0 11px;
  border-radius: 9px;
  color: #185fa5;
  background:
    linear-gradient(45deg, transparent 50%, #185fa5 50%) calc(100% - 15px) 15px / 5px 5px no-repeat,
    linear-gradient(135deg, #185fa5 50%, transparent 50%) calc(100% - 10px) 15px / 5px 5px no-repeat,
    #f7fbff;
  font-size: 12px;
  font-weight: 700;
}
.calendar-selectors .themed-select-list {
  z-index: 140;
  max-height: 210px;
}
.calendar-selectors .themed-select-option {
  min-height: 31px;
  padding: 7px 9px;
  font-size: 12px;
}
.calendar-nav {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--navy);
  font-size: 22px;
  line-height: 1;
}
.calendar-nav:hover { background: var(--navy-soft); }
.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-weekdays { margin-bottom: 6px; }
.calendar-weekdays span {
  padding: 5px 0;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.calendar-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}
.calendar-day:hover { color: var(--orange); background: #fff0e7; }
.calendar-day.other-month { color: #bdc3cd; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--orange); }
.calendar-day.selected {
  color: white;
  background: var(--orange);
  box-shadow: 0 6px 14px rgba(230, 106, 44, .25);
}
.calendar-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-footer .secondary-btn { padding: 8px 12px; font-size: 10px; }
.calendar-footer button:disabled { opacity: .35; cursor: not-allowed; }

.stats-grid {
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  min-height: 126px;
  padding: 21px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-card div { min-width: 0; }
.stat-card span, .stat-card strong, .stat-card small { display: block; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card strong { margin: 8px 0 5px; font-size: 22px; letter-spacing: -.03em; }
.stat-card small { color: #9ba3b1; font-size: 10px; }

.accent-card {
  display: block;
  color: white;
  background: linear-gradient(135deg, var(--orange), #f08a3f);
}

.accent-card .stat-label, .accent-card small { color: rgba(255,255,255,.78); }
.accent-card strong { margin-top: 13px; font-size: 29px; }

.stat-icon {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  display: grid !important;
  place-items: center;
  font-weight: 850;
}
.stat-icon.green { color: var(--green); background: #e8f7f1; }
.stat-icon.orange { color: var(--orange); background: #fff0e7; }
.stat-icon.blue { color: var(--blue); background: #ebf1fd; }

.dashboard-grid, .split-layout, .management-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.split-layout { grid-template-columns: .8fr 1.4fr; }
.management-grid { grid-template-columns: 360px 1fr; }

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.02em; }

.section-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 { margin: 5px 0 0; }
.muted { color: var(--muted); }
.quick-actions, .action-row, .slip-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}
.stack-form { display: grid; gap: 15px; }
.stack-form label, .filter-bar label {
  display: grid;
  gap: 6px;
  color: #5e6777;
  font-size: 11px;
  font-weight: 700;
}
.check-label { grid-template-columns: 20px 1fr; align-items: center; }
.check-label input { width: 18px; height: 18px; }
.status-pill {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--green);
  background: #e8f7f1;
  font-size: 10px;
  font-weight: 800;
}
.status-pill.pending { color: #9a5a10; background: #fff3da; }
.status-pill.approved { color: #176448; background: #e8f7f1; }
.status-pill.rejected { color: #a63737; background: #fff0f0; }
.attendance-calendar {
  overflow: auto;
  display: grid;
  gap: 8px;
}
.attendance-row {
  min-width: max-content;
  display: grid;
  grid-template-columns: 210px repeat(var(--attendance-days, 31), 48px) 74px;
  gap: 5px;
  align-items: center;
}
.attendance-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 4px;
  background: var(--cream);
  font-size: 10px;
  font-weight: 850;
}
.attendance-name,
.attendance-total,
.attendance-day {
  min-height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #f6f7f8;
  font-size: 10px;
  font-weight: 800;
}
.attendance-day {
  align-content: center;
  gap: 1px;
  line-height: 1.05;
}
.attendance-head .attendance-day {
  min-height: 32px;
}
.attendance-day strong {
  font-size: 10px;
}
.attendance-day span {
  display: block;
  font-size: 8px;
  font-weight: 800;
}
.attendance-name {
  justify-items: start;
  padding: 7px 9px;
}
.attendance-name span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}
.attendance-present { color: #176448; background: #e8f7f1; }
.attendance-leave { color: #7952b3; background: #f0e9ff; }
.attendance-sick { color: #0b6285; background: #e7f6fb; }
.attendance-absent { color: #a63737; background: #fff0f0; }
.attendance-holiday { color: #9a5a10; background: #fff3da; }
.attendance-empty { color: #9aa3af; background: #f5f5f5; }
.attendance-editable {
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(19,34,56,.08);
}
.attendance-editable:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(19,34,56,.12);
}
.attendance-summary-box strong {
  display: block;
  margin: 5px 0 10px;
  color: var(--navy);
  font-size: 13px;
}
.attendance-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.attendance-mini-cell {
  width: 45px;
  min-height: 44px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  line-height: 1.05;
  font-size: 9px;
  font-weight: 850;
}
.attendance-mini-cell strong { font-size: 10px; }
.attendance-mini-cell small {
  display: block;
  font-size: 8px;
  font-weight: 850;
}
.stat-primary { display: block; color: white; background: linear-gradient(135deg, var(--orange), #f08a3f); }
.stat-primary small, .stat-primary span { color: rgba(255,255,255,.8); }
.welcome-card {
  margin-bottom: 20px;
  padding: 22px;
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.welcome-avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--orange);
  font-size: 18px;
  font-weight: 850;
}
.welcome-card .eyebrow { color: rgba(255,255,255,.62); }
.welcome-card h2 { margin: 5px 0; font-size: 20px; }
.welcome-card p:last-child { margin: 0; color: rgba(255,255,255,.75); font-size: 11px; }
.cell-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.table-actions form { display: inline-block; margin: 0 0 0 5px; }
.small-btn {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--navy);
  background: #edf0f4;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}
.danger-btn { color: #b93b3b; background: #fff0f0; }
.empty-state { padding: 35px; color: var(--muted); text-align: center; }
.empty-access-panel {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}
.empty-access-panel > div { max-width: 560px; }
.empty-access-panel h2 { margin: 6px 0 10px; }
.permission-check > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.permission-origin {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.permission-check input:disabled { opacity: .7; }
.alert {
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 10px;
  color: #176448;
  background: #e8f7f1;
  font-size: 12px;
  font-weight: 650;
}
.alert-error { color: #a63737; background: #fff0f0; }
.logout-link, .quick-input-btn { white-space: nowrap; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.login-page {
  min-height: 100vh;
  padding: 30px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 10% 10%, rgba(230,106,44,.15), transparent 30%),
    var(--cream);
}
.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 24px 70px rgba(19,34,56,.13);
}
.login-logo {
  width: 190px;
  height: 90px;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  object-position: center;
}
.login-card h1 { margin: 8px 0; font-size: 29px; }
.login-card > .muted { margin: 0 0 24px; line-height: 1.6; }
.login-help { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 11px; }

.slip-page { max-width: 620px; margin: 0 auto; }
.slip-toolbar { justify-content: space-between; margin-bottom: 16px; }
.slip-toolbar .slip-actions { margin-top: 0; }
.slip-sheet {
  padding: 35px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}
.slip-sheet .slip-header { text-align: center; }
.slip-sheet .slip-header p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.slip-sheet .slip-header span { color: var(--muted); font-size: 11px; }
.slip-table { white-space: normal; }
.slip-table td:last-child { text-align: right; font-weight: 750; }
.slip-table th:last-child { text-align: right; }
.slip-note { padding: 12px; border-radius: 9px; color: var(--muted); background: #f7f7f5; font-size: 11px; }
.slip-footer { margin-top: 25px; color: var(--muted); text-align: center; font-size: 9px; }

.bar-chart {
  height: 190px;
  padding-top: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 10px;
}

.bar-item { height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; }
.bar-value { color: var(--muted); font-size: 10px; }
.bar { width: min(32px, 65%); min-height: 3px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #f2a36e, var(--orange)); }
.bar-day { color: var(--muted); font-size: 10px; padding-bottom: 8px; }

.ranking-list { display: grid; gap: 13px; }
.ranking-item { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; }
.rank-number { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; color: var(--orange); background: #fff0e8; font-size: 11px; font-weight: 850; }
.rank-info strong, .rank-info span { display: block; }
.rank-info strong { font-size: 12px; }
.rank-info span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.rank-pay { font-size: 12px; }
.table-link { color: var(--ink); text-decoration: none; }
.table-link:hover { color: var(--orange); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:hover { background: #fbfaf7; }
tbody tr:last-child td { border-bottom: 0; }
.table-subtext { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
tfoot td { padding-top: 17px; border-bottom: 0; font-weight: 850; }
.money { color: var(--navy); font-weight: 800; }
.qty-badge, .count-badge { display: inline-block; border-radius: 20px; color: var(--green); background: #e8f7f1; font-size: 10px; font-weight: 750; }
.qty-badge { padding: 5px 9px; }
.count-badge { padding: 7px 11px; }
.empty-row td { padding: 35px; color: var(--muted); text-align: center; }
.delete-btn, .edit-btn {
  border: 0;
  border-radius: 7px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: .2s ease;
}
.delete-btn { color: #d65b5b; background: #fff0f0; }
.edit-btn { color: var(--blue); background: #edf3ff; }
.edit-btn:hover { color: white; background: var(--blue); transform: translateY(-1px); }
.delete-btn:hover { color: white; background: #d65b5b; transform: translateY(-1px); }
.card-actions { display: flex; align-items: center; gap: 6px; }
.user-use-btn { padding: 6px 9px; font-size: 10px; }
.form-actions { display: flex; gap: 9px; }
.form-actions .wide { flex: 1; }

.permission-editor {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.permission-editor-head {
  display: grid;
  gap: 4px;
}
.permission-editor-head strong {
  color: var(--ink);
}
.permission-editor-head small {
  color: var(--muted);
  line-height: 1.5;
}
.permission-group {
  display: grid;
  gap: 8px;
}
.permission-group > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.permission-check {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.user-origin-box {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #eff6ff;
}
.user-origin-box strong {
  color: var(--primary-strong);
}
.user-origin-box small {
  color: var(--muted);
  line-height: 1.5;
}
.hidden { display: none !important; }

.form-panel form { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; color: #5e6777; font-size: 11px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.pay-mode-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f5f7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.user-role-options { grid-template-columns: repeat(4, 1fr); }
.pay-mode-switch button {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}
.pay-mode-switch button.active {
  color: white;
  background: var(--navy);
  box-shadow: 0 5px 12px rgba(19, 34, 56, .18);
}
.tailor-combobox { position: relative; }
.tailor-combobox input[type="search"] { padding-right: 34px; }
.tailor-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  box-shadow: 0 14px 30px rgba(19, 34, 56, .14);
  display: none;
}
.tailor-suggestions.open { display: block; }
.tailor-option {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tailor-option:hover, .tailor-option:focus, .tailor-option.keyboard-active {
  background: #fff3eb;
  outline: none;
}
.tailor-option .avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 10px;
}
.tailor-option strong, .tailor-option span { display: block; }
.tailor-option strong { font-size: 11px; }
.tailor-option span { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.tailor-empty { padding: 15px 10px; color: var(--muted); text-align: center; font-size: 10px; }
.tailor-empty[hidden], .tailor-option[hidden] { display: none; }
.searchable-combobox::after {
  content: "\2304";
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--orange);
  font-size: 14px;
  pointer-events: none;
}
.searchable-combobox input { padding-right: 34px; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.money-input input { padding-left: 34px; }
.calculation-box { padding: 15px; border-radius: 11px; background: #f8f6f1; display: flex; justify-content: space-between; align-items: center; }
.calculation-box span { color: var(--muted); font-size: 11px; }
.calculation-box strong { color: var(--orange); font-size: 20px; }
.payroll-method-notice {
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.payroll-method-notice span { color: var(--muted); font-size: 11px; }
.payroll-method-notice strong { color: #185fa5; font-size: 13px; }
.field-help {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.5;
}

.toolbar-actions,
.recruitment-filter,
.recruitment-job-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recruitment-form-panel,
.recruitment-jobs-panel,
.recruitment-candidates-panel {
  margin-bottom: 12px;
}

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

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

.recruitment-job-row {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.recruitment-job-row > div:first-child,
.recruitment-job-row > div:first-child span {
  min-width: 0;
}

.recruitment-job-row > div:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--color-text-secondary);
  font-size: 11px;
}

.recruitment-job-meta > span:not(.status-pill) {
  color: var(--color-text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.recruitment-filter {
  margin-bottom: 12px;
}

.recruitment-filter .search-box {
  flex: 1;
}

.recruitment-filter .search-box input {
  width: 100%;
}

.recruitment-filter .themed-select {
  width: 170px;
}

.recruitment-stage-new { color: #185fa5; background: #dbeafe; }
.recruitment-stage-screening { color: #5b4a9d; background: #eeeafe; }
.recruitment-stage-interview { color: #854f0b; background: #faeeda; }
.recruitment-stage-offer { color: #0f6b5b; background: #dff5ef; }
.recruitment-stage-hired { color: #126b50; background: #d8f3e8; }
.recruitment-stage-rejected { color: #a32d2d; background: #fcebeb; }
.candidate-cv-box { padding: 10px 12px; border: 1px solid var(--color-border-tertiary); border-radius: 8px; background: #ffffff; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cell-link { display: block; margin-top: 4px; color: #2563eb; font-size: 10px; text-decoration: none; }

.career-page {
  min-height: 100vh;
  color: #1e293b;
  background: #f1f5f9;
}

.career-header {
  min-height: 68px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid #cbd5e1;
  background: #16324f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.career-brand {
  min-width: 0;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.career-brand img {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 7px;
  object-fit: contain;
  background: #ffffff;
}

.career-brand span,
.career-brand small {
  display: block;
}

.career-brand strong { font-size: 15px; }
.career-brand small { margin-top: 2px; color: #b7c5d2; font-size: 10px; }
.career-header .secondary-btn { color: #ffffff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }

.career-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.career-intro {
  max-width: 720px;
  margin-bottom: 24px;
}

.career-intro > span,
.career-job-department {
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.career-intro h1,
.career-job-detail h1 {
  margin: 7px 0 8px;
  color: #16324f;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.career-intro p { margin: 0; color: #526276; line-height: 1.6; }

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

.career-job-card {
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.career-job-card h2 { margin: 7px 0 5px; color: #1e293b; font-size: 19px; }
.career-job-card p { margin: 0; color: #526276; font-size: 12px; }

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

.career-job-card-footer > span { color: #526276; font-size: 11px; }

.career-application-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(480px, 1.15fr);
  align-items: start;
  gap: 20px;
}

.career-job-detail {
  position: sticky;
  top: 20px;
  padding: 20px 4px;
}

.career-job-facts {
  margin: 14px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.career-job-facts span {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #526276;
  background: #f8fafc;
  font-size: 11px;
}

.career-copy h2 { margin: 20px 0 6px; font-size: 14px; }
.career-copy p { margin: 0; color: #526276; font-size: 13px; line-height: 1.7; }
.career-application-panel .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.career-application-panel .full { grid-column: 1 / -1; }
.career-application-panel button.full { width: 100%; }
.career-honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.career-footer { padding: 18px 20px; color: #8a9aad; background: #16324f; font-size: 11px; text-align: center; }

@media (max-width: 780px) {
  .career-header { padding: 11px 16px; }
  .career-main { width: min(100% - 28px, 1120px); padding-top: 20px; }
  .career-job-grid,
  .career-application-layout,
  .career-application-panel .form-grid { grid-template-columns: 1fr; }
  .career-job-detail { position: static; padding: 4px 2px; }
  .career-job-card-footer { align-items: stretch; flex-direction: column; }
  .career-job-card-footer .primary-btn { width: 100%; text-align: center; }
  .career-application-panel .full { grid-column: auto; }
}
.small-form form { display: grid; gap: 15px; }
.list-search { margin: -6px 0 15px; }
.list-search .search-box input { width: 100%; }
.card-actions form { margin: 0; }

.card-list, .rate-list { display: grid; gap: 10px; }
.person-card, .rate-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.person-main { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: white; background: var(--navy-soft); font-size: 12px; font-weight: 850; }
.person-card strong, .person-card span, .rate-card strong, .rate-card span { display: block; }
.person-card strong, .rate-card strong { font-size: 12px; }
.person-card span, .rate-card span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.rate-card .money { font-size: 14px; }

.print-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.recap-panel { margin-top: 20px; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.table-pagination > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.table-pagination > div { display: flex; gap: 8px; }
.table-pagination .disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.print-title > strong { color: var(--muted); font-size: 11px; }
.recap-heading-actions { display: flex; align-items: center; gap: 14px; }
.recap-heading-actions > strong { color: var(--muted); font-size: 11px; }
.search-box {
  position: relative;
  display: block;
}
.search-box span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
.search-box input {
  width: 220px;
  height: 38px;
  padding-left: 34px;
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 100;
  padding: 13px 18px;
  border-radius: 10px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 30px;
  display: none;
  place-items: center;
  background: rgba(13,25,40,.6);
}
.modal.open { display: grid; }
.modal-card { position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 35px; border-radius: 18px; background: white; }
.modal-close { position: absolute; right: 17px; top: 12px; border: 0; color: var(--muted); background: transparent; font-size: 27px; }
.slip-header { padding-bottom: 20px; border-bottom: 2px solid var(--navy); text-align: center; }
.slip-logo { width: 150px; height: 70px; margin: 0 auto 12px; object-fit: contain; }
.slip-header h2 { margin: 4px 0; font-size: 22px; }
.slip-meta { margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slip-meta span, .slip-meta strong { display: block; }
.slip-meta span { color: var(--muted); font-size: 10px; }
.slip-meta strong { margin-top: 4px; font-size: 12px; }
.slip-total { margin: 18px 0; padding: 16px; border-radius: 10px; background: #f7f4ed; display: flex; justify-content: space-between; }
.slip-total strong { color: var(--orange); font-size: 20px; }
.slip-actions { display: flex; gap: 10px; margin-top: 18px; }
.slip-actions .wide { flex: 1; }
.share-btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  color: white;
  background: var(--navy);
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(19, 34, 56, .2);
}
.share-btn:hover { background: var(--navy-soft); transform: translateY(-1px); }
.share-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.signature { margin: 40px 0 25px auto; width: 180px; text-align: center; }
.signature-line { margin-top: 55px; border-top: 1px solid var(--ink); padding-top: 5px; font-size: 10px; }

/* Prototype-aligned HRIS visual system */
:root {
  --color-background-primary: #f8fafc;
  --color-background-secondary: #e8eef5;
  --color-background-info: #dbeafe;
  --color-border-tertiary: #cbd5e1;
  --color-border-secondary: #b8c5d4;
  --color-text-primary: #1e293b;
  --color-text-secondary: #526276;
  --color-text-tertiary: #7b8ca1;
  --color-text-info: #2563eb;
  --border-radius-lg: 10px;
  --border-radius-md: 7px;
  --navy: #2563eb;
  --navy-soft: #dbeafe;
  --cream: #f1f5f9;
  --ink: #1e293b;
  --muted: #526276;
  --line: #cbd5e1;
  --orange: #2563eb;
  --orange-dark: #1d4ed8;
  --green: #16876b;
  --blue: #2563eb;
  --shadow: none;
  --radius: 10px;
}

body {
  color: var(--color-text-primary);
  background: #f1f5f9;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-shell {
  min-height: 100vh;
  background: #f1f5f9;
}

.sidebar {
  width: 200px;
  padding: 0;
  color: #e2e8f0;
  background: #16324f;
  border-right: .5px solid #294863;
}

.brand {
  min-height: 57px;
  padding: 14px 16px;
  border-bottom: .5px solid rgba(255,255,255,.12);
  gap: 8px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  padding: 2px;
  border-radius: 6px;
}

.brand strong {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 500;
}

.brand span {
  color: #a9b9c9;
  font-size: 10px;
}

.nav-list {
  gap: 0;
  margin-top: 0;
  padding: 8px 0 0;
}

.nav-section-label {
  margin: 0;
  padding: 8px 16px 4px;
  color: #8fa4b8;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .05em;
}

.nav-item {
  min-height: 34px;
  padding: 8px 16px;
  border-left: 2px solid transparent;
  border-radius: 0;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 400;
  gap: 8px;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255,255,255,.08);
}

.nav-item.active {
  color: #ffffff;
  background: #2563eb;
  border-left-color: #93c5fd;
  box-shadow: none;
  font-weight: 500;
}

.nav-icon {
  width: 16px;
  height: 16px;
  border-radius: 0;
  display: inline-grid;
  color: inherit;
  background: transparent;
  font-size: 12px;
}

.sidebar-user-footer {
  margin-top: auto;
  padding: 12px 14px;
  border-top: .5px solid rgba(255,255,255,.12);
  background: #102b43;
}

.sidebar-user-avatar {
  color: #16324f;
  background: #bfdbfe;
}

.sidebar-user-info strong {
  color: #f8fafc;
}

.sidebar-user-info small,
.sidebar-logout {
  color: #b7c5d2;
}

.main-content {
  margin-left: 200px;
  padding: 0;
  background: #f1f5f9;
}

.topbar {
  min-height: 57px;
  padding: 12px 20px;
  border-bottom: .5px solid var(--color-border-tertiary);
  background: var(--color-background-primary);
}

.topbar h1 {
  margin-top: 0;
  font-size: 15px;
  font-weight: 500;
}

.eyebrow {
  display: none;
}

.topbar-actions {
  gap: 12px;
}

.today-box {
  padding: 3px 10px;
  border: 0;
  border-radius: 20px;
  background: var(--color-background-info);
  text-align: left;
}

.today-box span {
  display: none;
}

.today-box strong {
  margin: 0;
  color: #185fa5;
  font-size: 11px;
  font-weight: 500;
}

.page.active {
  padding: 16px 20px;
}

.primary-btn {
  border: .5px solid #185fa5;
  border-radius: var(--border-radius-md);
  background: #185fa5;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.primary-btn:hover {
  background: #124b82;
}

.secondary-btn {
  border: .5px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  color: var(--color-text-primary);
  background: var(--color-background-primary);
  font-size: 13px;
  font-weight: 400;
}

.secondary-btn:hover {
  background: var(--color-background-secondary);
}

.filter-bar,
.panel,
.stat-card,
.slip-sheet,
.login-card {
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  box-shadow: none;
}

.filter-bar {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--color-background-primary);
}

input,
select,
textarea {
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: #ffffff;
  font-size: 13px;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, #185fa5 50%),
    linear-gradient(135deg, #185fa5 50%, transparent 50%);
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.themed-select {
  position: relative;
  width: 100%;
}

.themed-select-button {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  color: var(--color-text-primary);
  background:
    linear-gradient(45deg, transparent 50%, #185fa5 50%) calc(100% - 17px) 18px / 5px 5px no-repeat,
    linear-gradient(135deg, #185fa5 50%, transparent 50%) calc(100% - 12px) 18px / 5px 5px no-repeat,
    var(--color-background-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.themed-select-button:hover {
  border-color: #9fb9d3;
}

.themed-select-button:focus-visible {
  outline: none;
  border-color: #185fa5;
  box-shadow: 0 0 0 2px rgba(24,95,165,.1);
}

.themed-select-button.is-placeholder {
  color: var(--color-text-tertiary);
}

.themed-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  display: none;
}

.themed-select.open .themed-select-list {
  display: grid;
  gap: 3px;
}

.themed-select-option {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--color-text-primary);
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.themed-select-option:hover,
.themed-select-option.selected {
  color: #185fa5;
  background: #e6f1fb;
}

.themed-select-option.is-placeholder {
  color: var(--color-text-tertiary);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #185fa5;
  box-shadow: 0 0 0 2px rgba(24,95,165,.1);
}

.date-picker-input {
  background-image:
    linear-gradient(45deg, transparent 50%, #185fa5 50%),
    linear-gradient(135deg, #185fa5 50%, transparent 50%);
}

.stats-grid,
.dashboard-grid,
.split-layout,
.management-grid {
  margin: 0 0 12px;
  gap: 12px;
}

.panel {
  padding: 14px 16px;
  background: var(--color-background-primary);
}

.panel-heading {
  margin-bottom: 10px;
}

.panel h2,
.section-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.stat-card {
  min-height: auto;
  padding: 12px 14px;
  background: var(--color-background-secondary);
}

.stat-card strong {
  margin: 4px 0 0;
  color: var(--color-text-primary);
  font-size: 22px;
  font-weight: 500;
}

.stat-label {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 400;
}

.stat-card small {
  color: var(--color-text-tertiary);
  font-size: 11px;
}

.accent-card,
.stat-primary,
.welcome-card {
  color: var(--color-text-primary);
  background: var(--color-background-secondary);
}

.accent-card .stat-label,
.accent-card small,
.stat-primary small,
.stat-primary span,
.welcome-card p:last-child {
  color: var(--color-text-secondary);
}

.table-wrap {
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  background: var(--color-background-primary);
}

table {
  font-size: 12px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: .5px solid var(--color-border-tertiary);
}

th {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

td {
  color: var(--color-text-primary);
}

tbody tr:hover {
  background: var(--color-background-secondary);
}

.status-pill,
.qty-badge,
.count-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 400;
}

.attendance-calendar {
  gap: 0;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  background: var(--color-background-primary);
}

.attendance-row {
  gap: 0;
  border-bottom: .5px solid var(--color-border-tertiary);
}

.attendance-row:last-child {
  border-bottom: 0;
}

.attendance-name,
.attendance-total,
.attendance-day {
  border: 0;
  border-right: .5px solid var(--color-border-tertiary);
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
}

.attendance-head .attendance-day,
.attendance-head .attendance-name,
.attendance-head .attendance-total {
  color: var(--color-text-secondary);
  background: var(--color-background-secondary);
  font-weight: 500;
}

.attendance-present,
.status-pill.approved,
.status-pill {
  color: #3b6d11;
  background: #eaf3de;
}

.attendance-leave,
.attendance-sick {
  color: #185fa5;
  background: #e6f1fb;
}

.attendance-absent,
.status-pill.rejected,
.alert-error,
.danger-btn,
.delete-btn {
  color: #a32d2d;
  background: #fcebeb;
}

.attendance-holiday,
.status-pill.pending {
  color: #854f0b;
  background: #faeeda;
}

.form-grid,
.stack-form,
.small-form form,
.form-panel form {
  gap: 12px;
}

.field,
.stack-form label,
.filter-bar label {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.calculation-box,
.slip-total {
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.calculation-box strong,
.slip-total strong,
.text-btn,
.table-link:hover {
  color: #185fa5;
}

.bar {
  background: linear-gradient(180deg, #7bb7ed, #378add);
}

.rank-number {
  color: #185fa5;
  background: #e6f1fb;
}

.login-page {
  background: #eef1f5;
}

.toast {
  background: #24292f;
}

.hr-dashboard .welcome-card {
  margin-bottom: 12px;
}

.hr-stats {
  grid-template-columns: 1.25fr repeat(4, 1fr);
}

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

.attendance-status-card {
  min-height: 76px;
  padding: 12px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  display: grid;
  align-content: space-between;
}

.attendance-status-card span,
.team-row span,
.approval-item span,
.approval-item small,
.payroll-inline-summary span {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.attendance-status-card strong {
  font-size: 22px;
  font-weight: 600;
}

.hr-policy-strip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: .5px solid var(--color-border-tertiary);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hr-policy-strip span {
  padding: 9px 10px;
  border-radius: var(--border-radius-md);
  color: var(--color-text-secondary);
  background: var(--color-background-secondary);
  font-size: 11px;
}

.hr-policy-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--color-text-primary);
  font-size: 12px;
}

.hr-policy-strip small {
  display: block;
  margin-top: 3px;
  color: var(--color-text-tertiary);
  font-size: 10px;
  line-height: 1.35;
}

.birthday-calendar-panel {
  margin-bottom: 20px;
}

.calendar-summary {
  padding: 7px 10px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  color: var(--color-text-secondary);
  background: var(--color-background-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

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

.birthday-calendar-weekdays {
  margin-bottom: 8px;
}

.birthday-calendar-weekdays span {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.birthday-day {
  min-height: 86px;
  padding: 9px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.birthday-day.is-empty {
  border-style: dashed;
  background: var(--color-background-secondary);
}

.birthday-day.is-today {
  border-color: #378add;
  box-shadow: inset 0 0 0 1px #378add;
}

.birthday-day.has-birthday {
  background: #f2f7fc;
}

.birthday-date {
  width: max-content;
  min-width: 42px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-text-primary);
  background: var(--color-background-secondary);
  font-size: 11px;
  font-weight: 700;
}

.birthday-date strong,
.birthday-date small {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.birthday-day.has-birthday .birthday-date {
  color: #fff;
  background: #378add;
}

.birthday-weekday {
  margin-top: -3px;
  color: var(--color-text-secondary);
  font-size: 10px;
  font-weight: 600;
}

.birthday-names {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.birthday-names span {
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 5px;
  color: #185fa5;
  background: #e6f1fb;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-list,
.approval-list {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(0, 160px) 1fr;
  align-items: center;
  gap: 12px;
}

.team-row strong,
.approval-item strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 500;
}

.team-row span,
.approval-item span,
.approval-item small {
  display: block;
  margin-top: 3px;
}

.team-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-background-secondary);
}

.team-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #378add;
}

.team-summary {
  margin-top: 2px;
  padding: 10px 12px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-background-secondary);
  font-size: 12px;
}

.approval-item {
  padding: 11px 0;
  border-bottom: .5px solid var(--color-border-tertiary);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

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

.status-pill.present {
  color: #2d6315;
  background: #eaf4e3;
}

.status-pill.leave,
.status-pill.sick,
.status-pill.holiday {
  color: #185fa5;
  background: #e6f1fb;
}

.status-pill.absent {
  color: #a13d3d;
  background: #fcebeb;
}

.payroll-summary-panel {
  margin-top: 0;
}

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

.payroll-inline-summary > div {
  padding: 12px 14px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.payroll-inline-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--color-text-primary);
  font-size: 16px;
  font-weight: 600;
}

.directory-toolbar {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.directory-toolbar h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 16px;
  font-weight: 500;
}

.directory-toolbar p {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.directory-panel,
.employee-form-panel {
  margin-bottom: 12px;
}

.directory-search {
  margin: -6px 0 12px;
}

.directory-search input {
  width: min(420px, 100%);
}

.directory-table th,
.directory-table td {
  padding: 10px 12px;
}

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

.directory-person .avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e6f1fb;
  color: #185fa5;
  font-size: 10px;
}

.directory-person strong {
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 500;
}

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

.employee-form-actions {
  align-self: end;
}

.employee-hr-form {
  display: block;
  margin-bottom: 12px;
}

.employee-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 12px;
}

.employee-side-stack {
  display: grid;
  align-content: start;
  gap: 12px;
}

.hris-form-section {
  position: relative;
  padding: 0;
  overflow: visible;
}

.hris-form-section:has(.themed-select.open),
.form-panel:has(.themed-select.open),
.form-panel:has(.tailor-suggestions.open) {
  z-index: 100;
}

.themed-select.open,
.searchable-combobox:has(.tailor-suggestions.open) {
  z-index: 120;
}

.hris-form-section .panel-heading {
  margin: 0;
  padding: 11px 14px;
  border-bottom: .5px solid var(--color-border-tertiary);
  background: var(--color-background-secondary);
}

.hris-form-section .panel-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.employee-profile-grid,
.hris-form-section .stack-form,
.profile-upload {
  padding: 14px;
}

.employee-profile-grid {
  grid-template-columns: 1fr;
}

.employee-profile-grid .field strong,
.hris-form-section .stack-form label strong {
  display: inline;
  color: #d63d3d;
  font-size: 12px;
}

.profile-upload {
  display: grid;
  gap: 10px;
}

.form-hint {
  margin: -2px 0 0;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.schedule-settings-form {
  display: grid;
  gap: 12px;
}

.schedule-profile-card {
  padding: 13px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.schedule-profile-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-profile-heading strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 600;
}

.schedule-profile-heading span {
  display: block;
  margin-top: 3px;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.schedule-profile-card .form-grid {
  margin: 0;
}

.schedule-summary-list {
  gap: 8px;
}

.schedule-summary-card {
  align-items: flex-start;
}

.profile-upload input[type="file"] {
  height: auto;
  padding: 8px;
}

.profile-remove {
  display: inline-grid;
  width: max-content;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.employee-photo-preview,
.employee-photo-placeholder {
  width: 100px;
  height: 100px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.employee-photo-preview {
  object-fit: cover;
}

.employee-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--color-text-tertiary);
  font-size: 11px;
}

.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 12px;
  padding: 10px 0;
  border-top: .5px solid var(--color-border-tertiary);
  background: rgba(255, 255, 255, .96);
  display: flex;
  align-items: center;
  gap: 10px;
}

.directory-person small {
  display: block;
  margin-top: 2px;
  color: var(--color-text-secondary);
  font-size: 10px;
}

.directory-person .image-avatar {
  object-fit: cover;
  background: var(--color-background-secondary);
}

.attendance-toolbar {
  margin-bottom: 12px;
}

.attendance-dashboard-grid {
  margin: 0 0 12px;
}

.attendance-dashboard-status {
  margin-bottom: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.attendance-tools-panel {
  margin-bottom: 12px;
}

.attendance-tools-panel[hidden] {
  display: none !important;
}

.attendance-tools-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.attendance-tools-grid .panel {
  min-width: 0;
}

.employee-detail-panel {
  margin-bottom: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.employee-detail-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.employee-detail-photo {
  display: grid;
  place-items: center;
  width: 160px;
  aspect-ratio: 1;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  font-size: 42px;
  font-weight: 800;
}

.employee-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.employee-detail-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.employee-detail-grid > div.full {
  grid-column: 1 / -1;
}

.employee-detail-grid span,
.employee-detail-grid strong {
  display: block;
}

.employee-detail-grid span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.employee-detail-grid strong {
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 13px;
}

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .split-layout { grid-template-columns: 1fr; }
  .hr-policy-strip,
  .payroll-inline-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-form-panel .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-form-layout { grid-template-columns: 1fr; }
  .employee-detail-layout { grid-template-columns: 1fr; }
  .employee-detail-photo { width: 132px; }
  .employee-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-tools-grid { grid-template-columns: 1fr; }
  .attendance-dashboard-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .sidebar { transform: translateX(-100%); transition: .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; }
  .main-content { margin-left: 0; padding: 0 18px 30px; }
  .mobile-menu { display: block; }
  .topbar { min-height: 90px; }
  .today-box { display: none; }
  .user-switcher { position: fixed; right: 14px; bottom: 14px; z-index: 50; filter: drop-shadow(0 10px 20px rgba(19,34,56,.16)); }
  .topbar .primary-btn { display: none; }
  .filter-bar, .date-fields { align-items: stretch; flex-direction: column; }
  .date-fields input { width: 100%; }
  .management-grid { grid-template-columns: 1fr; }
  .print-title, .recap-heading-actions { align-items: stretch; flex-direction: column; }
  .search-box input { width: 100%; }
  .topbar-actions .active-user-button { display: none; }
  .logout-link { padding: 9px 11px; }
  .quick-input-btn { display: none; }
  .directory-toolbar { align-items: stretch; flex-direction: column; }
  .directory-toolbar .primary-btn { width: 100%; }
  .detail-actions { justify-content: flex-start; }
  .sticky-form-actions { position: static; align-items: stretch; flex-direction: column; }
  .sticky-form-actions .primary-btn,
  .sticky-form-actions .secondary-btn { width: 100%; }
  .welcome-card { align-items: flex-start; }
  .recap-panel { margin-top: 16px; }
  .table-pagination { align-items: stretch; flex-direction: column; }
  .table-pagination > div { justify-content: space-between; }
  .person-card, .rate-card { align-items: flex-start; }
  .card-actions { flex-wrap: wrap; justify-content: flex-end; }
  .birthday-calendar-panel { overflow: visible; }
  .birthday-calendar-panel .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .birthday-calendar-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .birthday-day {
    min-width: 0;
    min-height: 82px;
    padding: 8px;
  }
  .calendar-summary {
    max-width: 100%;
    white-space: normal;
  }
  .toolbar-actions,
  .recruitment-filter {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar-actions .primary-btn,
  .toolbar-actions .secondary-btn,
  .recruitment-filter .secondary-btn,
  .recruitment-filter .themed-select {
    width: 100%;
  }
  .recruitment-form-panel .form-grid {
    grid-template-columns: 1fr;
  }
  .recruitment-job-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .recruitment-job-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .attendance-status-grid,
  .hr-policy-strip,
  .payroll-inline-summary,
  .attendance-dashboard-status { grid-template-columns: 1fr; }
  .team-row,
  .approval-item { grid-template-columns: 1fr; }
  .employee-form-panel .form-grid { grid-template-columns: 1fr; }
  .employee-detail-grid { grid-template-columns: 1fr; }
  .employee-detail-photo { width: 100%; max-width: 160px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .panel { padding: 17px; }
  .topbar h1 { font-size: 22px; }
  .slip-actions { flex-direction: column; }
  .welcome-avatar { flex-basis: 44px; width: 44px; height: 44px; }
  .welcome-card h2 { font-size: 17px; }
  .person-main { min-width: 0; }
  .person-main > div { min-width: 0; }
  .person-card { flex-direction: column; }
  .person-card .card-actions { width: 100%; justify-content: flex-end; }
  .rate-card { flex-direction: column; }
  .rate-card .card-actions { width: 100%; justify-content: flex-end; }
}

.bpjs-policy-note {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #b9d8f4;
  border-radius: 8px;
  color: #174c73;
  background: #edf7ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bpjs-policy-note strong,
.bpjs-policy-note span { display: block; }
.bpjs-policy-note strong { margin-bottom: 3px; font-size: 12px; }
.bpjs-policy-note span { font-size: 10px; }
.bpjs-policy-values { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bpjs-policy-values span {
  padding: 7px 9px;
  border-radius: 6px;
  color: #174c73;
  background: rgba(255, 255, 255, .75);
  font-weight: 750;
}
.bpjs-form-panel,
.bpjs-directory-panel { margin-bottom: 16px; }
.bpjs-selected-staff {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
}
.bpjs-selected-staff strong { color: var(--ink); font-size: 14px; }
.bpjs-selected-staff small { color: var(--muted); }
.bpjs-simulation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.bpjs-simulation > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}
.bpjs-simulation span,
.bpjs-simulation strong { display: block; }
.bpjs-simulation span { margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.bpjs-simulation strong { color: #185fa5; font-size: 16px; overflow-wrap: anywhere; }
.bpjs-filter {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 190px auto;
  gap: 8px;
  align-items: center;
}
.bpjs-filter .search-box { width: 100%; }
.bpjs-directory-panel table { min-width: 1040px; }

@media (max-width: 900px) {
  .bpjs-policy-note { align-items: flex-start; flex-direction: column; }
  .bpjs-filter { grid-template-columns: 1fr 1fr; }
  .bpjs-filter .search-box { grid-column: 1 / -1; }
  .bpjs-simulation { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .bpjs-filter { grid-template-columns: 1fr; }
  .bpjs-filter .search-box { grid-column: auto; }
  .bpjs-filter .secondary-btn { width: 100%; }
}

.id-card-filter .date-fields input[name="q"] {
  width: min(320px, 42vw);
}

.id-card-panel-heading {
  align-items: end;
}

.id-card-batch-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.id-card-batch-actions .field {
  min-width: 180px;
}

.id-card-select-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.id-card-select-tools span {
  color: #185fa5;
  font-size: 12px;
  font-weight: 600;
}

.id-card-directory-table th:first-child,
.id-card-directory-table td:first-child {
  width: 42px;
  text-align: center;
}

.id-card-toolbar {
  margin-bottom: 10px;
}

.id-card-print-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: .5px solid #b8d4ee;
  border-radius: var(--border-radius-md);
  color: #315b7d;
  background: #edf5fc;
  font-size: 12px;
}

.id-card-background-panel {
  margin-bottom: 14px;
  overflow: visible;
}

.panel-heading-note {
  max-width: 330px;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.id-card-background-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.id-card-background-editor {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 12px 16px;
  padding: 14px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.id-card-background-editor > div:first-child,
.id-card-background-form {
  display: grid;
  gap: 7px;
}

.id-card-background-editor small {
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.id-card-background-preview {
  grid-column: 1;
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 54 / 85.6;
  overflow: hidden;
  border: .5px solid #aebdc8;
  border-radius: 6px;
  color: #607785;
  background-color: #f7f9fb;
  background-image: linear-gradient(155deg, transparent 65%, #d95b3d 65% 72%, #12354b 72%);
  background-position: center;
  background-size: cover;
  box-shadow: 0 4px 14px rgba(15, 47, 58, .12);
}

.id-card-background-editor > div:first-child,
.id-card-background-editor > form {
  grid-column: 2;
}

.id-card-background-preview.has-image { background-image: var(--preview-background); }
.id-card-background-preview[style] { background-size: cover; }

.id-card-background-preview span {
  padding: 5px 8px;
  border-radius: 4px;
  color: #315b70;
  background: rgba(255, 255, 255, .88);
  font-size: 10px;
  font-weight: 700;
}

.id-card-file-field {
  display: grid;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.id-card-file-field input {
  width: 100%;
  padding: 7px;
  border: .5px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  color: var(--color-text-primary);
  background: var(--color-background-primary);
  font-size: 11px;
}

.id-card-file-field input::file-selector-button {
  margin-right: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #185fa5;
  cursor: pointer;
}

.danger-text-btn {
  padding: 0;
  border: 0;
  color: #b34242;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.id-card-sheet {
  display: grid;
  justify-content: center;
  gap: 6mm;
  padding: 8mm;
  border: .5px solid var(--color-border-tertiary);
  background: #dfe6ec;
}

.id-card-pair {
  display: grid;
  grid-template-columns: repeat(2, 54mm);
  gap: 6mm;
  break-inside: avoid;
}

.staff-id-card {
  position: relative;
  width: 54mm;
  height: 85.6mm;
  overflow: hidden;
  border: .3mm solid #b8c5ce;
  border-radius: 2.2mm;
  color: #153247;
  background: #f7f9fb;
  box-shadow: 0 5px 18px rgba(15,47,58,.14);
  font-family: Arial, Helvetica, sans-serif;
}

.staff-id-card.has-custom-background {
  background-color: #fff;
  background-image: var(--id-card-background-image);
  background-position: center;
  background-size: cover;
}

.staff-id-front::after {
  content: "";
  position: absolute;
  right: -14mm;
  bottom: -15mm;
  width: 43mm;
  height: 43mm;
  border: 8mm solid rgba(217,91,61,.13);
  border-radius: 50%;
}

.staff-id-front.has-custom-background::after { display: none; }

.staff-id-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2mm;
  height: 14mm;
  padding: 0 3mm;
  color: #fff;
  background: #12354b;
}

.staff-id-brand::after {
  content: "";
  position: absolute;
  top: auto;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1.2mm;
  background: #d95b3d;
}

.staff-id-brand img,
.staff-id-back-head img {
  width: 8mm;
  height: 8mm;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.staff-id-brand span {
  display: grid;
  gap: .4mm;
}

.staff-id-brand img,
.staff-id-brand span,
.staff-id-back-head img,
.staff-id-back-head div {
  transform: translateY(2mm);
}

.staff-id-brand strong {
  font-size: 3.1mm;
  letter-spacing: 0;
}

.staff-id-brand small {
  color: #dbe8ef;
  font-size: 1.55mm;
}

.has-custom-background .staff-id-brand {
  color: #12354b;
  width: 44mm;
  height: 9mm;
  margin: 7mm auto 0;
  padding: 0 2mm;
  border-radius: 1.5mm;
  background: rgba(255, 255, 255, .52);
}

.has-custom-background .staff-id-brand img,
.staff-id-back.has-custom-background .staff-id-back-head img,
.has-custom-background .staff-id-brand span,
.staff-id-back.has-custom-background .staff-id-back-head div {
  transform: none;
}

.has-custom-background .staff-id-brand img,
.staff-id-back.has-custom-background .staff-id-back-head img {
  width: 11mm;
  height: 7mm;
}

.has-custom-background .staff-id-brand,
.staff-id-back.has-custom-background .staff-id-back-head {
  gap: 1.5mm;
}

.has-custom-background .staff-id-brand::after {
  display: none;
}

.has-custom-background .staff-id-brand small { color: #486879; }

.staff-id-front-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3mm;
  height: 61mm;
  padding: 4mm 4mm 2mm;
}

.staff-id-photo {
  display: grid;
  place-items: center;
  width: 27mm;
  height: 34mm;
  overflow: hidden;
  border: .5mm solid #fff;
  border-radius: 1.5mm;
  color: #185fa5;
  background: #dcebf7;
  box-shadow: 0 0 0 .3mm #b9cbd8;
  font-size: 7mm;
  font-weight: 700;
}

.staff-id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-id-person {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  text-align: center;
}

.has-custom-background .staff-id-person {
  width: calc(100% - 4mm);
  padding: 1.6mm 2mm;
  border-radius: 1.5mm;
  background: rgba(255, 255, 255, .64);
}

.staff-id-type {
  display: inline-block;
  margin-bottom: 1.2mm;
  padding: .7mm 1.8mm;
  border-radius: 1mm;
  color: #fff;
  background: #d95b3d;
  font-size: 1.9mm;
  font-weight: 700;
  text-transform: uppercase;
}

.staff-id-type.employee {
  color: #125b84;
  background: #cfeeff;
}

.staff-id-person h2 {
  max-height: 11mm;
  margin: 0 0 1mm;
  overflow: hidden;
  font-size: 3.8mm;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.staff-id-person p {
  margin: 0 0 .8mm;
  color: #315b70;
  font-size: 2.7mm;
  font-weight: 700;
}

.staff-id-person small {
  color: #607785;
  font-size: 2.2mm;
}

.staff-id-code {
  position: absolute;
  z-index: 2;
  right: 3mm;
  bottom: 3mm;
  left: 3mm;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: .5mm;
  padding: 1.2mm 2mm;
  border-radius: 1.2mm;
  background: rgba(255, 255, 255, .64);
  text-align: center;
}

.staff-id-code span,
.staff-id-code strong { width: 100%; }

.staff-id-code span {
  color: #6c7f8a;
  font-size: 1.8mm;
}

.staff-id-code strong {
  font-size: 2.7mm;
}

.staff-id-back {
  padding: 4mm;
  background: #fff;
}

.staff-id-back-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2mm;
  padding-bottom: 2mm;
  border-bottom: .35mm solid #d95b3d;
}

.staff-id-back.has-custom-background .staff-id-back-head {
  width: 44mm;
  height: 9mm;
  margin: 3mm auto 0;
  padding: 0 2mm;
  border-bottom: 0;
  border-radius: 1.5mm;
  background: rgba(255, 255, 255, .52);
}

.staff-id-back-head div {
  display: grid;
  gap: .5mm;
}

.staff-id-back-head strong {
  font-size: 3.2mm;
}

.staff-id-back-head span {
  color: #607785;
  font-size: 2mm;
}

.staff-id-back-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3mm;
  height: 61mm;
  text-align: center;
}

.staff-id-qr {
  display: grid;
  place-items: center;
  width: 30mm;
  height: 30mm;
  padding: 1mm;
  border: .3mm solid #c9d5dc;
  background: #fff;
}

.staff-id-qr img,
.staff-id-qr canvas {
  width: 100% !important;
  height: 100% !important;
}

.staff-id-qr-status {
  color: #607785;
  font-size: 2mm;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.staff-id-qr.is-error {
  border-color: #d8a3a3;
  background: #fff7f7;
}

.staff-id-qr.is-error .staff-id-qr-status {
  color: #a33a3a;
}

.staff-id-instructions strong {
  font-size: 2.7mm;
}

.staff-id-instructions p {
  margin: 1.2mm 0;
  color: #506a79;
  font-size: 1.95mm;
  line-height: 1.35;
}

.staff-id-back.has-custom-background .staff-id-instructions {
  width: calc(100% - 4mm);
  padding: 1.6mm 2mm;
  border-radius: 1.5mm;
  background: rgba(255, 255, 255, .64);
}

.staff-id-instructions span {
  color: #185fa5;
  font-size: 2.1mm;
  font-weight: 700;
}

.staff-id-back-footer {
  position: absolute;
  right: 3mm;
  bottom: 2mm;
  left: 3mm;
  color: #70838e;
  font-size: 1.8mm;
  text-align: center;
}

.staff-id-back.has-custom-background .staff-id-back-footer {
  bottom: 1.5mm;
  padding: .6mm 1mm;
  border-radius: .8mm;
  color: #ffffff;
  background: rgba(7, 25, 42, .68);
  font-size: 2mm;
  font-weight: 700;
  text-shadow: 0 .2mm .4mm rgba(0, 0, 0, .45);
}

.id-verify-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 150px);
  padding: 24px;
}

.id-verify-card {
  width: min(100%, 520px);
  padding: 28px;
  text-align: center;
}

.id-verify-card.valid { border-top: 4px solid #1f8a5b; }
.id-verify-card.invalid { border-top: 4px solid #c44949; }

.id-verify-symbol {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #fff;
  background: #1f8a5b;
  font-size: 26px;
  font-weight: 700;
}

.id-verify-card.invalid .id-verify-symbol { background: #c44949; }
.id-verify-card h1 { margin: 12px 0 4px; font-size: 24px; }
.id-verify-card > p { margin: 0 0 18px; color: var(--color-text-secondary); }
.id-verify-card > small { display: block; margin-top: 16px; color: var(--color-text-tertiary); }

.id-verify-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: left;
}

.id-verify-details div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.id-verify-details span { color: var(--color-text-tertiary); font-size: 11px; }
.id-verify-details strong { font-size: 13px; }

.onboarding-shell {
  width: min(100% - 32px, 900px);
}

.onboarding-intro {
  margin-bottom: 18px;
}

.onboarding-intro > span {
  color: #185fa5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.onboarding-intro h1,
.onboarding-complete h1,
.onboarding-expired h1 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.onboarding-intro p,
.onboarding-complete p,
.onboarding-expired p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.onboarding-public-form {
  display: grid;
  gap: 14px;
}

.onboarding-form-section {
  margin: 0;
}

.onboarding-bank-note {
  align-self: end;
  padding: 10px 12px;
  border: .5px solid #b8d4ee;
  border-radius: var(--border-radius-md);
  color: #315b7d;
  background: #edf5fc;
  line-height: 1.45;
}

.onboarding-consent {
  padding: 14px;
  border: .5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  line-height: 1.5;
}

.onboarding-submit {
  min-height: 46px;
  justify-self: end;
  min-width: 210px;
}

.onboarding-complete,
.onboarding-expired {
  max-width: 680px;
  margin: 50px auto;
  padding: 28px;
  text-align: center;
}

.onboarding-link-panel {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  border-color: #9ec5e8;
  background: #edf5fc;
}

.onboarding-link-panel p {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
}

.onboarding-link-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.onboarding-invite-form {
  display: grid !important;
  grid-template-columns: 120px max-content;
  gap: 6px;
  min-width: 260px;
}

.onboarding-invite-form .themed-select-button,
.onboarding-invite-form .secondary-btn {
  height: 34px;
  min-height: 34px;
}

.recruitment-actions {
  min-width: 290px;
  flex-wrap: wrap;
}

.status-text-success {
  color: #16794c;
  font-weight: 600;
}

.onboarding-prefill-notice {
  margin-bottom: 12px;
}

@media (max-width: 780px) {
  .id-card-panel-heading,
  .id-card-batch-actions { align-items: stretch; flex-direction: column; }
  .id-card-batch-actions { width: 100%; }
  .id-card-batch-actions .field,
  .id-card-batch-actions .primary-btn { width: 100%; }
  .id-card-filter .date-fields input[name="q"] { width: 100%; }
  .id-card-background-panel .panel-heading { align-items: flex-start; flex-direction: column; }
  .panel-heading-note { text-align: left; }
  .id-card-background-grid { grid-template-columns: 1fr; }
  .id-card-background-editor { grid-template-columns: 118px minmax(0, 1fr); }
  .id-card-background-preview { width: 118px; }
  .id-card-sheet { justify-content: stretch; padding: 12px; overflow: hidden; }
  .id-card-pair { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .staff-id-card { width: min(54mm, 100%); height: auto; aspect-ratio: 54 / 85.6; }
  .id-verify-details { grid-template-columns: 1fr; }
  .onboarding-shell { width: min(100% - 24px, 900px); }
  .onboarding-intro h1,
  .onboarding-complete h1,
  .onboarding-expired h1 { font-size: 23px; }
  .onboarding-submit { width: 100%; justify-self: stretch; }
  .onboarding-link-panel,
  .onboarding-link-copy { grid-template-columns: 1fr; }
  .onboarding-invite-form { grid-template-columns: 1fr; min-width: 210px; }
}

@media (max-width: 460px) {
  .id-card-background-editor { grid-template-columns: 1fr; }
  .id-card-background-preview,
  .id-card-background-editor > div:first-child,
  .id-card-background-editor > form { grid-column: 1; }
  .id-card-background-preview { grid-row: auto; width: min(150px, 100%); justify-self: center; }
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  @page slip { size: auto; margin: .1mm; }
  @page recap { size: A4 landscape; margin: 10mm; }
  html, body { width: 100%; min-width: 0; margin: 0; background: white; }
  .sidebar, .topbar, .filter-bar, .no-print, body > :not(.app-shell):not(.modal) { display: none !important; }
  .app-shell, .main-content { width: 100%; min-width: 0; }
  .main-content { margin: 0; padding: 0; }
  .page { display: none !important; }
  .page.active { display: block !important; }
  .id-card-preview-mode { width: 100%; margin: 0; padding: 0; }
  .id-card-sheet { display: grid; gap: 5mm; padding: 0; border: 0; background: #fff; }
  .id-card-pair { grid-template-columns: repeat(2, 54mm); gap: 5mm; break-inside: avoid; page-break-inside: avoid; }
  .staff-id-card { width: 54mm; height: 85.6mm; aspect-ratio: auto; border-radius: 2.2mm; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .recap-panel { display: block !important; margin: 0; box-shadow: none; padding: 0; page: recap; }
  .recap-panel .table-wrap { overflow: visible; }
  .recap-panel table { width: 100%; table-layout: auto; font-size: 9px; }
  .recap-panel th, .recap-panel td { padding: 7px 6px; }
  .modal.open { position: static; display: block; padding: 0; background: white; }
  .modal.open .modal-card { width: 100%; max-height: none; overflow: visible; box-shadow: none; }
  .slip-page {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
    page: slip;
  }
  .slip-sheet {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    color: #000 !important;
    background: #fff !important;
    box-shadow: none;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 700;
    font-size: 8px;
  }
  .slip-sheet * {
    color: #000 !important;
    border-color: #000 !important;
    text-shadow: none !important;
  }
  .slip-sheet h1,
  .slip-sheet h2,
  .slip-sheet h3,
  .slip-sheet strong,
  .slip-sheet th,
  .slip-sheet .total-value {
    font-weight: 900 !important;
  }
  .slip-sheet td,
  .slip-sheet p,
  .slip-sheet span {
    font-weight: 700 !important;
  }
  .slip-sheet .slip-header {
    padding-bottom: 8px;
    border-bottom-width: 1px;
  }
  .slip-sheet .slip-logo {
    width: 34mm;
    height: 16mm;
    margin-bottom: 4px;
  }
  .slip-sheet .slip-header p {
    font-size: 7px;
    letter-spacing: .08em;
  }
  .slip-sheet .slip-header h2 {
    margin: 2px 0;
    font-size: 13px;
  }
  .slip-sheet .slip-header span {
    font-size: 8px;
  }
  .slip-sheet .slip-meta {
    margin: 8px 0;
    gap: 4px;
  }
  .slip-sheet .slip-meta span {
    font-size: 7px;
  }
  .slip-sheet .slip-meta strong {
    margin-top: 1px;
    font-size: 8px;
  }
  .slip-sheet .table-wrap {
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .slip-sheet .slip-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: var(--thermal-table-font, 6.8px);
  }
  .slip-sheet .slip-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .slip-sheet .slip-table th,
  .slip-sheet .slip-table td {
    padding: 3px 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
  }
  .slip-sheet[data-print-density="compact"] {
    --thermal-table-font: 6.1px;
  }
  .slip-sheet[data-print-density="compact"] .slip-table th,
  .slip-sheet[data-print-density="compact"] .slip-table td {
    padding: 2.5px 1.5px;
    line-height: 1.2;
  }
  .slip-sheet[data-print-density="ultra"] {
    --thermal-table-font: 5.5px;
  }
  .slip-sheet[data-print-density="ultra"] .slip-table th,
  .slip-sheet[data-print-density="ultra"] .slip-table td {
    padding: 2px 1px;
    line-height: 1.15;
  }
  .slip-sheet .slip-table-tailor th:nth-child(1) { width: 20%; }
  .slip-sheet .slip-table-tailor th:nth-child(2) { width: 25%; }
  .slip-sheet .slip-table-tailor th:nth-child(3) { width: 31%; }
  .slip-sheet .slip-table-tailor th:nth-child(4) { width: 24%; }
  .slip-sheet .slip-table-employee th:nth-child(1) { width: 28%; }
  .slip-sheet .slip-table-employee th:nth-child(2) { width: 42%; }
  .slip-sheet .slip-table-employee th:nth-child(3) { width: 30%; }
  .slip-sheet .slip-total {
    margin: 8px 0;
    padding: 7px 5px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff !important;
  }
  .slip-sheet .slip-total span {
    font-size: 8px;
  }
  .slip-sheet .slip-total strong {
    font-size: 11px;
  }
  .slip-sheet .signature {
    margin-top: 12px;
    font-size: 8px;
  }
  .slip-sheet[data-print-density="compact"] .slip-meta,
  .slip-sheet[data-print-density="compact"] .slip-total {
    margin-top: 6px;
    margin-bottom: 6px;
  }
  .slip-sheet[data-print-density="ultra"] .slip-meta,
  .slip-sheet[data-print-density="ultra"] .slip-total {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .slip-sheet .slip-note {
    background: #fff !important;
    border: 1px solid #000;
  }
}
.payroll-bpjs-box{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid #b8d7ee;border-radius:8px;background:#edf7fc;color:#163d59}.payroll-bpjs-box[hidden]{display:none}.payroll-bpjs-summary{display:grid;gap:3px}.payroll-bpjs-summary span,.payroll-bpjs-employer{font-size:12px;color:#527087}.payroll-bpjs-summary strong{font-size:18px}.payroll-bpjs-toggle{display:flex;align-items:center;gap:9px;font-weight:600;cursor:pointer}.payroll-bpjs-toggle input{width:18px;height:18px;accent-color:#1769aa}.payroll-bpjs-toggle input:disabled{cursor:not-allowed}.payroll-bpjs-employer strong{color:#163d59}@media(max-width:720px){.payroll-bpjs-box{align-items:flex-start;flex-direction:column;gap:10px}}

@media (max-width: 780px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-content {
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .page.active {
    width: 100%;
    max-width: 100vw;
    padding: 16px;
  }

  .split-layout,
  .dashboard-grid,
  .management-grid,
  .panel,
  .form-grid,
  .field,
  .tailor-combobox,
  .searchable-combobox,
  input,
  select,
  textarea,
  .pay-mode-switch,
  .calculation-box,
  .primary-btn,
  .secondary-btn {
    min-width: 0;
    max-width: 100%;
  }

  .split-layout,
  .dashboard-grid,
  .management-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    width: 100%;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .page.active {
    padding-right: 12px;
    padding-left: 12px;
  }

  .panel {
    padding-right: 12px;
    padding-left: 12px;
  }
}
