:root {
  /* 60% neutrals, 30% cool-support tones, 10% accent */
  --bg: #eef3f9;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #edf4fc;
  --line: #d6deea;
  --line-soft: #e2e9f2;
  --text: #18263a;
  --muted: #6d7d92;
  --primary: #2a62c4;
  --primary-dark: #214f9a;
  --success: #157347;
  --warning: #9f6404;
  --violet: #4e57b8;
  --shadow: 0 8px 18px rgba(17, 24, 39, .05);
  --panel-shadow: 0 1px 2px rgba(17, 24, 39, .03), 0 14px 34px rgba(17, 24, 39, .06);
  --radius-card: 18px;
  --radius-input: 12px;
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
}

* {
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, .92) 0, rgba(255, 255, 255, 0) 28rem),
    radial-gradient(circle at 100% 0%, rgba(98, 154, 236, .08) 0, rgba(98, 154, 236, 0) 22rem),
    linear-gradient(180deg, #f9fbfe 0%, #f3f7fc 48%, #eef3f9 100%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.progress-thin {
  height: 12px;
}

.roster-staff-col {
  min-width: 220px;
}

.roster-day-col {
  min-width: 120px;
}

#rosterCalendarTable .roster-cell {
  cursor: cell;
  user-select: none;
}

.legacy-page {
  font-family: inherit;
  margin: 0;
  padding: 2rem;
  background-color: #f4f4f9;
}

.legacy-page-center {
  text-align: center;
}

.legacy-card {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: min(400px, calc(100vw - 2rem));
  margin: 0 auto;
  animation: fadeIn .5s ease-in-out;
}

.legacy-card h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

.legacy-card label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

.legacy-card input[type="text"],
.legacy-card input[type="date"],
.legacy-card input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.legacy-card .form-group {
  margin-bottom: 15px;
}

.legacy-card .checkbox-group {
  display: flex;
  align-items: center;
}

.legacy-card button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background .3s;
}

.legacy-card button:hover {
  background-color: #0056b3;
}

.legacy-card .readonly-field {
  background-color: #e9ecef;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.legacy-details-panel {
  margin-top: 20px;
  padding: 10px;
  border-radius: 5px;
  background: #f8f9fa;
  border: 1px solid #ccc;
}

.legacy-details-panel.is-collapsed {
  display: none;
}

.checkbox-inline-label {
  margin-left: 10px;
}

.legacy-table {
  width: min(80%, 1100px);
  margin: 20px auto;
  border-collapse: collapse;
  background: #fff;
}

.legacy-table th,
.legacy-table td {
  padding: 10px;
  border: 1px solid #ddd;
}

.legacy-table th {
  background-color: #007BFF;
  color: white;
}

.dashboard-queue-item,
.dashboard-activity-item {
  color: var(--text);
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dashboard-queue-item-warning {
  border-color: #ecd8a8;
  background: linear-gradient(180deg, #fffdf8 0%, #fff9ef 100%);
}

.dashboard-queue-item-danger {
  border-color: #f1c6c4;
  background: linear-gradient(180deg, #fffafb 0%, #fff3f2 100%);
}

.dashboard-queue-item:hover,
.dashboard-activity-item:hover {
  border-color: #c6d6ee;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

a {
  text-decoration: none;
}

.container {
  max-width: 1400px;
}

.sidebar-toggle-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

.sidebar-mobile-trigger {
  display: none;
}

.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .92rem .85rem .75rem;
  background: rgba(255, 255, 255, .94);
  border-right: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
  overflow: hidden;
  z-index: 1020;
  transition: width .22s ease, padding .22s ease, transform .22s ease;
}

.sidebar-brand {
  padding: 0 .08rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.sidebar-brand a,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  color: var(--text);
}

.sidebar-brand strong,
.mobile-brand strong {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-brand .brand-mark {
  width: 2.3rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #334155;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  flex: 0 0 auto;
}

.sidebar-brand-copy {
  display: block;
  min-width: 0;
}

.sidebar-pin-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sidebar-pin-toggle:hover {
  color: var(--text);
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.sidebar-nav {
  display: grid;
  gap: .28rem;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: .75rem;
}

.sidebar-section {
  margin: .58rem .5rem .12rem;
  color: #8a9ab3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.sidebar-section:first-of-type {
  margin-top: .06rem;
}

.sidebar-link,
.sidebar-group-title,
.sidebar-subnav a,
.sidebar-user,
.sidebar-logout,
.sidebar-subnav-meta {
  display: grid;
  align-items: center;
  color: #475569;
  border-radius: 12px;
}

.sidebar-link,
.sidebar-group-title,
.sidebar-user,
.sidebar-logout {
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  column-gap: .75rem;
  min-height: 40px;
  padding: .56rem .76rem;
  position: relative;
  font-size: 15px;
  font-weight: 500;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sidebar-link i,
.sidebar-group-title i,
.sidebar-user i,
.sidebar-logout i {
  width: 1.1rem;
  grid-column: 1;
  color: #94a3b8;
  text-align: center;
  font-size: .98rem;
  transition: color .18s ease, transform .18s ease;
}

.sidebar-link > span:not(.sidebar-badge),
.sidebar-group-title > span:not(.sidebar-badge),
.sidebar-user > span,
.sidebar-logout > span {
  grid-column: 2;
  min-width: 0;
}

.sidebar-user > span {
  overflow: hidden;
}

.sidebar-link:hover,
.sidebar-group-title:hover,
.sidebar-subnav a:hover,
.sidebar-user:hover,
.sidebar-logout:hover {
  background: #f8fafc;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px #edf2f7;
  transform: translateX(1px);
}

.sidebar-link.active,
.sidebar-user.active,
.sidebar-subnav a.active {
  background: rgba(37, 99, 235, .1);
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, .9);
}

.sidebar-link.active,
.sidebar-user.active {
  font-weight: 600;
}

.sidebar-link.active::before,
.sidebar-user.active::before,
.sidebar-subnav a.active::before {
  content: "";
  position: absolute;
  left: .3rem;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #2563eb;
}

.sidebar-link.active i,
.sidebar-group[open] > .sidebar-group-title i,
.sidebar-user.active i {
  color: #2563eb;
}

.sidebar-badge,
.sidebar-role-badge {
  grid-column: 3;
  justify-self: end;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 .38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

.sidebar-badge {
  background: rgba(37, 99, 235, .12);
  color: #2563eb;
}

.sidebar-group {
  padding: 0;
}

.sidebar-group-title {
  color: #0f172a;
  list-style: none;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
}

.sidebar-group-title::-webkit-details-marker {
  display: none;
}

.sidebar-group-title::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  grid-column: 3;
  justify-self: end;
  color: #94a3b8;
  font-size: .72rem;
  transition: transform .18s ease, color .18s ease;
}

.sidebar-group[open] > .sidebar-group-title {
  background: #f8fbff;
  border-color: transparent;
  box-shadow: none;
}

.sidebar-group[open] > .sidebar-group-title::after {
  transform: rotate(180deg);
  color: #2563eb;
}

.sidebar-subnav {
  position: relative;
  display: grid;
  gap: .08rem;
  margin: .12rem 0 .18rem .72rem;
  padding: .08rem .08rem .08rem .74rem;
  animation: sidebarDrop .18s ease;
  overflow: hidden;
}

.sidebar-subnav::before {
  content: "";
  position: absolute;
  left: .28rem;
  top: .12rem;
  bottom: .12rem;
  width: 1px;
  background: #e8eef6;
}

.sidebar-subnav a {
  min-height: 34px;
  padding: .38rem .58rem;
  font-size: 14px;
  font-weight: 400;
  border-radius: 10px;
  position: relative;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar-subnav a.active {
  font-weight: 500;
}

.sidebar-subnav-meta {
  min-height: 34px;
  padding: .35rem .62rem;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  opacity: .9;
}

@keyframes sidebarDrop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-footer {
  display: grid;
  gap: .22rem;
  margin-top: auto;
  padding: .58rem 0 0;
  border-top: 1px solid #e2e8f0;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, .96);
  z-index: 1;
  backdrop-filter: blur(14px);
}

.sidebar-footer form {
  margin: 0;
}

.sidebar-user {
  align-items: center;
  min-height: 48px;
  padding-top: .54rem;
  padding-bottom: .54rem;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user small {
  color: #94a3b8;
  font-size: .77rem;
  margin-top: .08rem;
}

.sidebar-role-badge {
  align-self: center;
  background: #f1f5f9;
  color: #334155;
  min-width: auto;
  height: auto;
  padding: .2rem .48rem;
  white-space: nowrap;
}

.sidebar-logout {
  color: #64748b;
  width: 100%;
  border: 1px solid transparent;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-height: 38px;
}

.sidebar-logout i {
  color: #94a3b8;
}

.app-main {
  min-width: 0;
  margin-left: 280px;
  padding-left: 12px;
  transition: margin-left .22s ease;
}

.content-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: .75rem .85rem 1.2rem .1rem;
}

.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .25rem;
}

.sub-nav-link {
  min-height: 40px;
  padding: .55rem .92rem;
  border-radius: 999px;
  border: 1px solid #cfdbea;
  background: rgba(255, 255, 255, .68);
  color: #4d607a;
  font-weight: 760;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.sub-nav-link:hover {
  color: var(--text);
  background: #fff;
  border-color: #c9d6e8;
  box-shadow: 0 4px 12px rgba(20, 28, 38, .07);
}

.sub-nav-link.active {
  color: #12325e;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border-color: #abc3e7;
  box-shadow: 0 6px 14px rgba(20, 28, 38, .08);
}

.sidebar-scrim {
  display: none;
}

body.sidebar-compact .app-sidebar {
  width: 88px;
  padding-left: .7rem;
  padding-right: .7rem;
}

body.sidebar-compact .app-main {
  margin-left: 88px;
  padding-left: 12px;
}

body.sidebar-compact .sidebar-brand-copy,
body.sidebar-compact .sidebar-link span,
body.sidebar-compact .sidebar-group-title span,
body.sidebar-compact .sidebar-subnav,
body.sidebar-compact .sidebar-user span,
body.sidebar-compact .sidebar-section,
body.sidebar-compact .sidebar-badge,
body.sidebar-compact .sidebar-role-badge {
  display: none !important;
}

body.sidebar-compact .sidebar-group {
  margin: .08rem 0;
}

body.sidebar-compact .sidebar-group-title::after {
  display: none;
}

body.sidebar-compact .sidebar-link,
body.sidebar-compact .sidebar-group-title,
body.sidebar-compact .sidebar-user,
body.sidebar-compact .sidebar-logout {
  grid-template-columns: 1fr;
  justify-content: center;
  padding-left: .55rem;
  padding-right: .55rem;
}

body.sidebar-compact .sidebar-link i,
body.sidebar-compact .sidebar-group-title i,
body.sidebar-compact .sidebar-user i,
body.sidebar-compact .sidebar-logout i {
  grid-column: 1;
  justify-self: center;
}

body.sidebar-compact .sidebar-link.active::before,
body.sidebar-compact .sidebar-user.active::before {
  left: 50%;
  top: auto;
  bottom: 5px;
  width: 20px;
  height: 3px;
  transform: translateX(-50%);
}

body.sidebar-compact .sidebar-pin-toggle i {
  transform: rotate(180deg);
}

.public-main {
  max-width: 1400px;
}

.app-nav {
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 14px 34px rgba(17, 24, 39, .18);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  font-weight: 750;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: .8rem;
  font-weight: 800;
}

.brand-mark.large {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.app-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255, 255, 255, .78);
  border-radius: 8px;
  padding: .52rem .68rem;
  font-size: .92rem;
  font-weight: 650;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus,
.app-nav .nav-link.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.app-nav .nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.app-nav .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: .35rem;
}

.app-nav .dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
}

.app-nav .dropdown-item i {
  width: 1rem;
  color: var(--muted);
}

.app-nav .dropdown-item.active,
.app-nav .dropdown-item:active {
  background: #eef5ff;
  color: var(--primary-dark);
}

.app-nav .logout-link {
  color: #ffd6d6;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, .18);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #dde5ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75), 0 10px 24px rgba(17, 24, 39, .05);
}

.page-header h1 {
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -.015em;
}

.text-muted {
  color: var(--muted) !important;
}

.metric-card,
.table-card,
.form-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(250, 252, 255, .96) 100%);
  border: 1px solid #dbe4ef;
  border-radius: var(--radius-card);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px);
}

.metric-card {
  min-height: 112px;
  padding: .85rem .92rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-width: 1px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.metric-card strong {
  font-family: inherit;
  font-size: 1.85rem;
  line-height: 1;
}

.metric-label {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: rgba(31, 111, 235, .08);
  color: var(--primary);
}

.metric-icon.green {
  background: rgba(22, 132, 91, .11);
  color: var(--success);
}

.metric-icon.amber {
  background: rgba(183, 110, 0, .12);
  color: var(--warning);
}

.metric-icon.violet {
  background: rgba(111, 75, 196, .12);
  color: var(--violet);
}

.table-card,
.form-card {
  padding: .78rem .9rem;
}

.form-card {
  display: grid;
  gap: .62rem;
}

.table-card {
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
}

.form-card h1,
.form-card h2,
.table-card h2 {
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.01em;
}

.table {
  margin-bottom: 0;
  color: var(--text);
}

.table-card .table {
  min-width: 0;
}

.table-card .table.table-sm {
  min-width: 520px;
}

.table thead th {
  background: #f7faff;
  border-bottom: 1px solid #dde6f0;
  color: #54657c;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .68rem .78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.table td,
.table th {
  padding: .66rem .78rem;
  vertical-align: middle;
}

.table td {
  white-space: normal;
}

.table.align-middle td strong,
.table.align-middle th strong {
  line-height: 1.25;
}

.table tbody tr {
  border-color: var(--line-soft);
}

.table tbody tr:hover > * {
  background: #f7fbff;
}

.table td .empty-state,
.table td .action-row {
  white-space: normal;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #fbfcfe;
}

.table.table-bordered {
  border-color: var(--line-soft);
}

.table.table-bordered > :not(caption) > * > * {
  border-color: var(--line-soft);
}

.form-label {
  color: #334155;
  font-size: .78rem;
  font-weight: 750;
  margin-bottom: .34rem;
  letter-spacing: .02em;
}

.form-control,
.form-select {
  background-color: #fff;
  border-color: #c7d5e6;
  border-radius: var(--radius-input);
  min-height: 41px;
  padding-top: .42rem;
  padding-bottom: .42rem;
  color: #142033;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #7fa4e4;
  box-shadow: 0 0 0 .2rem rgba(36, 95, 194, .14);
}

.compact-form-grid {
  --bs-gutter-x: .75rem;
  --bs-gutter-y: .7rem;
}

.compact-form-grid .form-label {
  margin-bottom: .26rem;
}

.compact-form-grid .btn.w-100 {
  min-width: 0;
}

.form-card .section-heading,
.form-card > h2,
.form-card > h3 {
  margin-bottom: 0;
}

.section-heading,
.dashboard-section-title {
  margin-bottom: .45rem;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.was-validated textarea:invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  font-size: .78rem;
  font-weight: 650;
}

.btn {
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 780;
  min-height: 36px;
  padding: .36rem .78rem;
  letter-spacing: 0;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.btn-sm {
  min-height: 28px;
  font-size: .79rem;
  padding: .14rem .52rem;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(42, 98, 196, .18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(17, 77, 168, .22);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
  background: rgba(255, 255, 255, .62);
  border-color: #8c97a6;
  color: #4e5a6a;
}

.btn-outline-secondary:hover,
.btn-outline-dark:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
  background: rgba(255, 255, 255, .9);
  color: #2f3d4e;
  border-color: #718093;
}

.action-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: flex-start;
}

.action-row > a,
.action-row > button,
.action-row > .btn {
  min-height: 38px;
}

.action-row > form {
  display: flex;
  align-items: center;
  margin: 0;
}

.action-row > form .btn {
  min-height: 38px;
}

.action-row.compact > a,
.action-row.compact > button,
.action-row.compact > .btn,
.action-row.compact > form .btn {
  min-height: 34px;
}

.leave-settings-page {
  display: grid;
  gap: 1rem;
}

.leave-settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, .99) 0%, rgba(247, 250, 255, .96) 100%);
  box-shadow: 0 16px 34px rgba(20, 32, 51, .07);
}

.leave-settings-eyebrow,
.leave-settings-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leave-settings-hero h1 {
  margin: .3rem 0 .15rem;
  font-family: inherit;
  font-size: clamp(2rem, 2.6vw, 2.65rem);
  font-weight: 760;
  letter-spacing: -.03em;
}

.leave-settings-hero p {
  max-width: 56rem;
  margin: 0;
  color: #5d6d83;
  font-size: .98rem;
}

.leave-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, .92fr);
  gap: 1rem;
  align-items: start;
}

.leave-settings-main,
.leave-settings-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.leave-settings-card {
  position: relative;
  padding: 1rem 1rem 1.05rem;
  border-radius: 22px;
}

.leave-settings-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, .7), rgba(37, 99, 235, 0));
  pointer-events: none;
}

.leave-settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .8rem;
}

.leave-settings-section-head h2 {
  margin: .15rem 0 0;
  font-size: 1.45rem;
}

.leave-settings-inline-form {
  margin: 0;
}

.leave-settings-stack {
  display: grid;
  gap: .8rem;
  margin: 0;
}

.leave-settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 41px;
  padding: .25rem .2rem;
  font-weight: 700;
  color: #334155;
}

.leave-settings-toggle .form-check-input {
  margin-top: 0;
}

.leave-settings-table-wrap {
  overflow-x: auto;
}

.leave-settings-table {
  min-width: 0;
}

.leave-settings-table thead th:last-child,
.leave-settings-table tbody td:last-child {
  text-align: right;
}

.leave-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
}

.leave-settings-balance-card {
  position: sticky;
  top: .75rem;
}

.leave-settings-entitlement-table {
  min-width: 860px;
}

.leave-settings-remaining {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, .12);
  color: #0f8a64;
  font-weight: 800;
}

.leave-settings-policy-form {
  margin-bottom: .95rem;
}

body .leave-settings-page .form-control,
body .leave-settings-page .form-select {
  min-height: 44px;
}

body .leave-settings-page .table td,
body .leave-settings-page .table th {
  padding-top: .9rem;
  padding-bottom: .9rem;
}

body .leave-settings-page .btn-sm {
  min-height: 34px;
  padding-inline: .82rem;
}

.filter-card {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, .52);
}

.sticky-filter {
  position: sticky;
  top: .65rem;
  z-index: 12;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(20, 32, 51, .08);
}

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

.directory-head > div {
  display: flex;
  align-items: baseline;
  gap: .65rem;
}

.directory-head .text-muted.small {
  display: none;
}

.employee-directory {
  padding: var(--sp-3);
  overflow: visible;
}

.employee-directory .directory-head {
  margin-bottom: var(--sp-3);
}

.employee-directory .table-actions .btn {
  min-height: 36px;
}

.employee-directory .table th,
.employee-directory .table td {
  padding-top: .58rem;
  padding-bottom: .58rem;
}

body .content-shell .page-header:has(+ .filter-card) {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
}

body .content-shell .filter-card {
  padding: var(--sp-3);
}

body .content-shell .filter-card .form-label {
  font-size: .76rem;
  margin-bottom: .22rem;
}

body .content-shell .filter-card .form-control,
body .content-shell .filter-card .form-select {
  min-height: 32px;
  padding-top: .24rem;
  padding-bottom: .24rem;
}

body .content-shell .filter-card .row {
  --bs-gutter-y: .55rem;
}

body .content-shell .workspace-filter-bar {
  padding: .7rem .85rem;
  background: rgba(255, 255, 255, .58);
}

body .content-shell .workspace-filter-bar form {
  --bs-gutter-x: .6rem;
  --bs-gutter-y: .45rem;
}

body .content-shell .sticky-filter {
  margin-top: 0;
}

body .content-shell .workspace-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: .45rem;
}

body .content-shell .workspace-filter-actions .btn {
  min-width: 82px;
  min-height: 32px;
}

body .content-shell .workspace-filter-bar .form-label {
  text-transform: none;
  letter-spacing: 0;
}

body .content-shell .employee-management-filter {
  margin-top: 0;
  padding-top: .7rem;
}

body .content-shell .employee-directory {
  padding: .58rem .72rem;
  max-height: calc(100vh - 240px);
  overflow: auto;
}

body .content-shell .employee-directory .directory-head {
  margin-bottom: .24rem;
}

body .content-shell .employee-directory .table th,
body .content-shell .employee-directory .table td {
  padding-top: .3rem;
  padding-bottom: .3rem;
}

body .content-shell .employee-directory .employee-table tbody td {
  min-height: 46px;
}

body .content-shell .employee-directory .employee-meta {
  font-size: .72rem;
}

body .content-shell .employee-directory .avatar-sm {
  width: 34px;
  height: 34px;
}

body .content-shell .employee-directory .status-pill {
  min-height: 22px;
  padding: .12rem .44rem;
  font-size: .72rem;
}

body .content-shell .employee-directory .table-actions {
  gap: .28rem;
}

body .content-shell .employee-directory .table-actions .btn {
  min-height: 28px;
  padding: .12rem .46rem;
  font-size: .76rem;
  border-radius: 8px;
}

.employee-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.employee-table thead th {
  border-top: 0;
  position: sticky;
  top: 0;
  z-index: 3;
}

.employee-table td,
.employee-table th {
  border-left: 0;
  border-right: 0;
}

.employee-table tbody td {
  height: auto;
  min-height: 46px;
  padding-top: .36rem;
  padding-bottom: .36rem;
  vertical-align: middle;
}

.col-person {
  width: 30%;
}

.col-department {
  width: 18%;
}

.col-position {
  width: 18%;
}

.col-role {
  width: 12%;
}

.col-status {
  width: 10%;
}

.col-actions {
  width: 12%;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: .56rem;
  min-width: 0;
}

.employee-copy {
  display: flex;
  flex-direction: column;
  gap: .04rem;
  min-width: 0;
}

.employee-name {
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-name:hover {
  color: var(--primary);
}

.employee-meta {
  display: block;
  color: #51627b;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
}

.employee-strong {
  color: var(--text);
  font-weight: 800;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.avatar-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d6e1ef;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--primary-dark);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.text-truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: .12rem .44rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: .72rem;
  font-weight: 800;
}

.employee-role-cell,
.employee-status-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  min-width: 0;
}

.employee-status-cell .status-pill {
  white-space: nowrap;
}

.employee-exception-pill {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 24px;
  padding: .16rem .46rem;
  border-radius: 999px;
  background: rgba(220, 53, 69, .11);
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, .18);
  font-size: .72rem;
  font-weight: 800;
}

.employee-exception-pill i {
  font-size: .72rem;
}

.employee-exception-pill-ok {
  background: rgba(22, 132, 91, .12);
  color: var(--success);
  border-color: rgba(21, 115, 71, .18);
}

.employee-table tbody tr > td {
  border-bottom: 1px solid var(--line-soft);
}

.employee-table tbody tr.collapse > td {
  background: rgba(255, 255, 255, .36);
  border-bottom: 1px solid var(--line-soft);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: .34rem;
  flex-wrap: wrap;
}

.table-actions .btn,
.table-actions form .btn,
.table td .action-row .btn,
.table td .action-row form .btn {
  min-height: 28px;
}

.col-actions .table-actions .btn {
  min-width: 82px;
  justify-content: center;
}

.col-actions .table-actions .btn.dropdown-toggle {
  min-width: 96px;
}

.directory-tools {
  justify-content: flex-end;
}

.employee-action-menu {
  min-width: 210px;
}

.employee-action-menu form {
  margin: 0;
}

.popover-btn {
  border: 1px solid #cfd9e6;
  border-radius: 14px;
  background: #f5f8fc;
  color: #334155;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(16, 24, 40, .03);
}

.popover-btn:hover,
.popover-btn:focus {
  background: #edf3fb;
  border-color: #c1d0e3;
  color: #1f2f45;
}

.popover-btn.popover-btn-primary {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

.popover-btn.popover-btn-primary:hover,
.popover-btn.popover-btn-primary:focus {
  background: #165fd2;
  border-color: #165fd2;
  color: #fff;
}

.popover-btn.popover-btn-soft {
  background: #eef3fa;
}

.popover-menu {
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  padding: .34rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
  background: #f8fbff;
}

.popover-menu .dropdown-item {
  border-radius: 8px;
  font-weight: 700;
}

.popover-menu .dropdown-item:hover {
  background: #eef4ff;
}

.employee-table tbody tr {
  border-bottom: 12px solid transparent;
}

.employee-table tbody tr > td {
  background: #f7fbff;
  border-top: 1px solid #d8e3ef;
  border-bottom: 1px solid #d8e3ef;
}

.employee-table tbody tr > td:first-child {
  border-left: 1px solid #d8e3ef;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.employee-table tbody tr > td:last-child {
  border-right: 1px solid #d8e3ef;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.employee-table tbody tr:hover > td {
  background: #eef5ff;
  border-top-color: #c8d8ea;
  border-bottom-color: #c8d8ea;
}

.employee-table thead th:first-child,
.employee-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

.employee-table thead th:first-child {
  z-index: 4;
}

.employee-table tbody td:first-child {
  background: #f7fbff;
}

.employee-table tbody tr:hover > td:first-child {
  background: #eef5ff;
}

.employee-table-compact tbody td {
  min-height: 40px;
}

.employee-action-menu .dropdown-item {
  font-weight: 750;
}

.template-summary {
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .44);
}

.template-summary strong {
  display: block;
  margin-bottom: .25rem;
}

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

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.stat-card {
  min-height: 98px;
  padding: .35rem 0 .9rem;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stat-card strong {
  display: block;
  margin: .25rem 0;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.stat-label,
.stat-caption {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}

.stat-label {
  color: #344054;
  text-transform: uppercase;
}

.clearance-progress {
  min-width: 180px;
}

.clearance-progress span {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.clearance-progress .progress {
  height: 8px;
  background: #eef2f7;
  border-radius: 999px;
}

.clearance-progress .progress-bar {
  background: var(--primary);
}

.clearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
  gap: 1rem;
  align-items: start;
}

.clearance-checklist {
  display: grid;
  gap: .65rem;
}

.checklist-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 170px minmax(220px, 1.4fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .44);
}

.review-stack {
  display: grid;
  gap: 1rem;
}

.review-stack h3 {
  margin-bottom: .45rem;
  font-weight: 850;
}

.review-line {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}

.review-line strong {
  color: var(--text);
}

.attendance-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.attendance-kpis-expanded {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.attendance-kpi {
  min-height: 112px;
  background: rgba(255, 255, 255, .42);
}

.attendance-kpis.attendance-kpis-compact {
  gap: .65rem;
}

.attendance-kpis.attendance-kpis-compact .attendance-kpi {
  min-height: 84px;
  padding: .62rem 0;
}

.attendance-kpis.attendance-kpis-compact .metric-icon {
  width: 1.9rem;
  height: 1.9rem;
}

.attendance-kpis.attendance-kpis-compact .metric-label {
  font-size: .74rem;
}

.attendance-kpis.attendance-kpis-compact .metric-card strong {
  font-size: 1.38rem;
}

.attendance-filter {
  background: rgba(255, 255, 255, .44);
  backdrop-filter: blur(16px);
}

.attendance-filter-collapsible {
  padding-top: .85rem;
}

.attendance-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.attendance-filter-summary::-webkit-details-marker {
  display: none;
}

.attendance-filter-summary i {
  color: var(--muted);
  transition: transform .2s ease;
}

.attendance-filter-collapsible[open] .attendance-filter-summary i {
  transform: rotate(180deg);
}

.attendance-filter-body {
  margin-top: .95rem;
}

.attendance-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .42rem;
}

.attendance-kpi-ribbon.mb-3 {
  margin-bottom: .65rem !important;
}

.attendance-kpi-chip {
  background: rgba(255, 255, 255, .46);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: .38rem .5rem;
  min-height: 66px;
  display: grid;
  align-content: space-between;
  gap: .12rem;
}

.attendance-kpi-chip .metric-label {
  font-size: .66rem;
  line-height: 1.1;
}

.attendance-kpi-chip strong {
  font-size: .96rem;
  line-height: 1.05;
}

.attendance-kpi-chip .metric-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 7px;
  font-size: .76rem;
}

.filter-collapsible {
  padding: .55rem .72rem;
}

.attendance-filter.mb-4 {
  margin-bottom: .85rem !important;
}

.filter-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
  user-select: none;
}

.filter-collapsible-header h2,
.attendance-panel .section-heading h2 {
  font-size: .98rem;
  line-height: 1.15;
}

.filter-collapsible-header i {
  color: var(--muted);
  transition: transform .2s ease;
}

.filter-collapsible.filter-open .filter-collapsible-header i {
  transform: rotate(180deg);
}

.filter-collapsible-body {
  margin-top: .65rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .34s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}

.filter-collapsible:not(.filter-open) .filter-collapsible-body {
  pointer-events: none;
}

.filter-collapsible.filter-open .filter-collapsible-body {
  opacity: 1;
  pointer-events: auto;
}

.attendance-panel {
  padding: .72rem;
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(18px);
}

.attendance-panel.mb-4 {
  margin-bottom: .85rem !important;
}

.group-board {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(auto-fit, minmax(220px, 1fr));
  gap: .72rem;
}

.group-lane {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .48);
  padding: .62rem;
  min-height: 320px;
}

.group-lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}

.group-dropzone {
  min-height: 250px;
  border: 1px dashed #c8d3e1;
  border-radius: 8px;
  padding: .45rem;
  display: flex;
  flex-direction: column;
  gap: .38rem;
}

.group-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(31, 111, 235, .06);
}

.employee-chip {
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  padding: .4rem .5rem;
  cursor: grab;
  display: grid;
  gap: .06rem;
}

.employee-chip strong {
  font-size: .82rem;
  line-height: 1.25;
}

.employee-chip span,
.employee-chip small {
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.2;
}

.employee-chip.dragging {
  opacity: .55;
}

@media (max-width: 991.98px) {
  .group-board {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  .group-lane {
    min-height: 0;
    padding: .55rem;
  }

  .group-dropzone {
    min-height: 130px;
    max-height: 280px;
    overflow: auto;
  }

  .group-lane-header .action-row {
    gap: .24rem;
  }

  .group-board-toolbar .btn {
    width: 100%;
  }
}

.attendance-overview-table,
.attendance-record-table {
  min-width: 1120px !important;
}

.attendance-overview-table th,
.attendance-overview-table td {
  padding-top: .38rem;
  padding-bottom: .38rem;
}

.attendance-overview-table td,
.attendance-record-table td {
  border-left: 0;
  border-right: 0;
}

.attendance-person {
  display: flex;
  align-items: center;
  gap: .52rem;
  min-width: 240px;
}

.attendance-person.compact {
  min-width: 230px;
}

.attendance-mini-stack {
  display: grid;
  gap: .08rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
  line-height: 1.16;
  min-width: 116px;
  white-space: normal;
}

.attendance-overview-table th,
.attendance-record-table th {
  white-space: nowrap;
}

.attendance-overview-table td,
.attendance-record-table td {
  vertical-align: middle;
}

.attendance-overview-table .employee-name {
  font-size: .84rem;
  line-height: 1.08;
}

.attendance-overview-table .employee-meta {
  font-size: .7rem;
}

.attendance-overview-table .count-pill,
.attendance-overview-table .status-pill {
  min-width: 28px;
  min-height: 22px;
  padding: .1rem .42rem;
  font-size: .72rem;
}

.hour-gap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 22px;
  padding: .1rem .42rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
}

.hour-gap-pill.met {
  background: rgba(22, 132, 91, .12);
  color: var(--success);
}

.hour-gap-pill.short {
  background: rgba(183, 110, 0, .13);
  color: var(--warning);
}

.attendance-calendar .table {
  table-layout: fixed;
}

.attendance-calendar td {
  vertical-align: top;
  min-height: 120px;
  height: 120px;
  padding: .4rem;
}

.attendance-calendar .calendar-day {
  font-weight: 800;
  margin-bottom: .2rem;
}

.attendance-calendar .calendar-stat-row {
  display: flex;
  gap: .2rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.attendance-calendar .calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem .75rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
}

.attendance-calendar .calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
}

.attendance-calendar .calendar-dot {
  width: .52rem;
  height: .52rem;
  border-radius: 999px;
}

.attendance-calendar .calendar-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .04rem .36rem;
  font-size: .68rem;
  font-weight: 800;
}

.attendance-calendar .calendar-pill.present {
  background: #e8f8ef;
  color: #0f7a42;
}

.attendance-calendar .calendar-pill.late {
  background: #fff4e5;
  color: #a25d00;
}

.attendance-calendar .calendar-pill.absent {
  background: #fde8e8;
  color: #b42318;
}

.attendance-calendar .calendar-pill.vacation {
  background: #ecfdf3;
  color: #027a48;
}

.attendance-calendar .calendar-pill.missing,
.attendance-calendar .calendar-dot.missing {
  background: #eef2f7;
  color: #344054;
}

.attendance-calendar .calendar-pill.hours,
.attendance-calendar .calendar-dot.hours {
  background: rgba(31, 111, 235, .1);
  color: var(--primary-dark);
}

.attendance-calendar .calendar-dot.present {
  background: #0f7a42;
}

.attendance-calendar .calendar-dot.late {
  background: #a25d00;
}

.attendance-calendar .calendar-dot.absent {
  background: #b42318;
}

.attendance-calendar .calendar-dot.vacation {
  background: #039855;
}

.attendance-calendar .calendar-total {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.attendance-calendar .calendar-event {
  font-size: .7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-calendar .calendar-event.time-range {
  color: #344054;
  font-weight: 750;
}

.attendance-initial {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(31, 111, 235, .08);
  color: var(--primary-dark);
  font-size: .74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.permission-role-list .list-group-item {
  border-color: var(--line-soft);
  font-weight: 800;
}

.permission-role-list .list-group-item.active {
  background: var(--primary);
  border-color: var(--primary);
}

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

.permission-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .52);
  cursor: pointer;
}

.permission-card input {
  margin-top: .2rem;
}

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

.permission-card small {
  color: var(--muted);
  font-weight: 750;
}

.count-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: .22rem .58rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 850;
  border: 1px solid transparent;
}

.count-pill.neutral {
  background: #eef2f7;
  color: #344054;
}

.count-pill.success,
.status-pill.success,
.status-pill.present {
  background: rgba(22, 132, 91, .12);
  color: var(--success);
  border-color: rgba(21, 115, 71, .2);
}

.count-pill.warning,
.status-pill.warning,
.status-pill.late {
  background: rgba(183, 110, 0, .13);
  color: var(--warning);
  border-color: rgba(178, 106, 0, .2);
}

.status-pill.pending {
  background: rgba(183, 110, 0, .13);
  color: var(--warning);
  border-color: rgba(178, 106, 0, .2);
}

.status-pill.approved,
.status-pill.resolved {
  background: rgba(22, 100, 217, .12);
  color: var(--primary-dark);
  border-color: rgba(22, 100, 217, .22);
}

.count-pill.danger,
.status-pill.absent,
.status-pill.rejected,
.status-pill.cancelled {
  background: rgba(220, 53, 69, .11);
  color: #b42318;
  border-color: rgba(180, 35, 24, .2);
}

.status-pill.vacation {
  background: #ecfdf3;
  color: #027a48;
  border-color: rgba(2, 122, 72, .22);
}

.status-pill.auto {
  background: #eef2f7;
  color: #344054;
}

.status-pill.closed {
  background: #eef2f7;
  color: #344054;
}

.setup-summary-card {
  min-height: 100%;
}

.setup-progress {
  height: .55rem;
  background: var(--surface-3);
  border-radius: 999px;
}

.setup-progress .progress-bar {
  background: var(--success);
  border-radius: inherit;
}

.setup-counts-card {
  height: 100%;
}

.setup-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.setup-count-grid div {
  padding: .85rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-2);
}

.setup-count-grid span,
.setup-area small {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}

.setup-count-grid strong {
  display: block;
  margin-top: .15rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.setup-area {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 18rem;
}

.setup-area-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--primary-dark);
  flex: 0 0 auto;
}

.setup-checklist-table td,
.setup-checklist-table th {
  vertical-align: middle;
}

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

  .setup-checklist-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.empty-state {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 64px;
}

.empty-state i {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(31, 111, 235, .08);
  color: var(--primary);
}

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

.empty-state span {
  max-width: 34rem;
  font-size: .88rem;
}

.table-card .empty-state,
.table td .empty-state {
  padding: .55rem 0;
}

.error-state {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .75rem;
}

.error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  font-weight: 900;
  color: var(--primary);
}

.error-state h1 {
  font-weight: 850;
}

.modal-content {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.avatar-sm,
.avatar-lg,
.avatar-xl {
  object-fit: cover;
  background: rgba(238, 242, 247, .78);
  border: 1px solid var(--line-soft);
  display: block;
}

.avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.avatar-lg {
  width: 76px;
  height: 76px;
  border-radius: 12px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  border-radius: 16px;
}

.profile-title,
.profile-edit-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-edit-head {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.profile-value {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.leave-calendar td {
  width: 14.285%;
  min-height: 116px;
  height: 116px;
  vertical-align: top;
  background: #fff;
}

.calendar-muted {
  background: #f7f9fc !important;
}

.calendar-day {
  font-weight: 800;
  margin-bottom: .35rem;
}

.calendar-event {
  border-radius: 6px;
  padding: .28rem .4rem;
  margin-bottom: .25rem;
  background: #eef5ff;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 700;
}

.calendar-event.approved {
  background: rgba(22, 132, 91, .12);
  color: var(--success);
}

.calendar-event.pending {
  background: rgba(183, 110, 0, .12);
  color: var(--warning);
}

.leave-calendar-summary .table-card {
  padding: .9rem 1rem;
}

.leave-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.leave-summary-list {
  display: grid;
  gap: .5rem;
}

.leave-summary-item {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 2fr auto;
  align-items: center;
  gap: .75rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f9fbff;
  padding: .55rem .7rem;
}

.leave-summary-name {
  font-weight: 800;
  color: var(--ink-700);
}

.leave-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.leave-calendar .calendar-event {
  display: grid;
  gap: .1rem;
  border-left: 3px solid transparent;
  background: #edf4ff;
}

.leave-calendar .calendar-event strong {
  display: block;
  line-height: 1.15;
}

.leave-calendar .calendar-event span {
  font-size: .72rem;
  font-weight: 700;
  opacity: .9;
  line-height: 1.1;
}

.leave-calendar .calendar-event.approved {
  border-left-color: var(--success);
}

.leave-calendar .calendar-event.pending {
  border-left-color: #b77c00;
}

@media (max-width: 920px) {
  .leave-summary-item {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
}

.leave-workspace {
  display: grid;
  gap: .9rem;
}

.leave-request-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line-soft);
}

.leave-request-head h1 {
  margin: .12rem 0 .18rem;
  font-size: 1.65rem;
  font-weight: 850;
}

.leave-request-head p,
.leave-section-title p,
.leave-info-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.section-kicker {
  display: block;
  color: var(--primary-dark);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.leave-request-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: .9rem;
  align-items: start;
}

.leave-request-form {
  display: grid;
  gap: .85rem;
  padding: .9rem;
}

.leave-form-section,
.leave-info-card,
.leave-balance-list {
  padding: .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .38);
}

.leave-section-title {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: .7rem;
}

.leave-section-title h2,
.leave-info-card h2 {
  margin: 0 0 .12rem;
  font-size: .98rem;
  font-weight: 850;
}

.leave-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.leave-form-grid.two {
  grid-template-columns: minmax(140px, .45fr) minmax(0, 1fr);
}

.leave-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .45rem;
  padding-top: .15rem;
}

.leave-side-panel {
  display: grid;
  gap: .75rem;
}

.leave-info-card {
  display: grid;
  gap: .45rem;
}

.leave-info-card .btn {
  justify-self: start;
}

.leave-balance-list {
  display: grid;
  gap: .55rem;
}

.leave-mini-list {
  display: grid;
  gap: .45rem;
}

.leave-mini-list div {
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line-soft);
}

.leave-mini-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.leave-mini-list strong,
.leave-mini-list span {
  display: block;
}

.leave-mini-list span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.leave-balance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line-soft);
}

.leave-balance-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.leave-balance-item strong,
.leave-balance-item span {
  display: block;
}

.leave-balance-item span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.leave-balance-item b {
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(22, 132, 91, .12);
  color: var(--success);
  font-size: 1rem;
}

.leave-balance-item b.negative {
  background: rgba(183, 110, 0, .13);
  color: var(--warning);
}

.leave-section-stack {
  display: grid;
  gap: .9rem;
}

.leave-board-card {
  padding: .75rem;
}

.leave-board-card .section-heading {
  padding-bottom: .55rem;
  margin-bottom: .35rem;
}

.leave-table {
  min-width: 900px;
}

.leave-table th,
.leave-table td {
  padding-top: .46rem;
  padding-bottom: .46rem;
}

.leave-muted-row > * {
  background: rgba(238, 242, 247, .55) !important;
  color: #667085;
}

.leave-muted-row strong,
.leave-muted-row a {
  color: #667085;
}

.leave-past-card {
  background: rgba(248, 250, 252, .62);
}

.quick-actions .action-tile {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: .72rem;
  padding: .72rem .8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .045);
  color: var(--text);
  font-weight: 800;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.quick-actions .action-tile i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: rgba(42, 98, 196, .1);
  color: var(--primary);
}

.quick-actions .action-tile:hover {
  background: #fff;
  border-color: rgba(42, 98, 196, .24);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, .07);
}

.admin-dashboard-header {
  padding: .82rem .92rem;
  border: 1px solid #d8e1ec;
  border-radius: 18px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(102, 164, 240, .16) 0%, rgba(102, 164, 240, 0) 56%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 250, 255, .92));
  box-shadow: 0 12px 28px rgba(16, 24, 40, .06);
}

.admin-dashboard-shell {
  align-items: flex-end;
}

.admin-dashboard-copy {
  max-width: 760px;
  display: grid;
  gap: .22rem;
}

.admin-dashboard-copy h1 {
  font-size: clamp(1.85rem, 2.6vw, 2.3rem);
  line-height: 1.02;
  margin: 0;
}

.admin-dashboard-actions {
  align-self: flex-start;
  gap: .55rem;
}

.admin-health-bar {
  margin-top: .12rem;
  min-height: 30px;
  padding: .34rem .68rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  border: 1px solid #cfe6d5;
  border-radius: 999px;
  background: #eef9f1;
  color: #1f5a36;
  font-size: .74rem;
  font-weight: 760;
}

.admin-health-bar.needs-attention {
  border-color: #e4d7b4;
  background: #fff8e8;
  color: #7d5a13;
}

.admin-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2f8f57;
  flex: 0 0 auto;
}

.admin-health-bar.needs-attention .admin-health-dot {
  background: #d59a12;
}

.admin-kpis .metric-card {
  min-height: 108px;
}

.admin-kpi-card {
  border-radius: 16px;
  border: 1px solid #d4deea;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
}

.admin-kpi-card-warning {
  border-color: #ecd8a8;
  background: linear-gradient(180deg, #ffffff 0%, #fff8ea 100%);
}

.admin-kpi-card-danger {
  border-color: #f1c6c4;
  background: linear-gradient(180deg, #ffffff 0%, #fff4f3 100%);
}

.admin-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .2rem;
}

.admin-kpi-head i {
  width: 1.95rem;
  height: 1.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #2a5daa;
  background: rgba(42, 93, 170, .1);
  font-size: .9rem;
}

.admin-kpi-card strong {
  font-size: clamp(1.5rem, 2vw, 1.95rem);
  margin-top: .02rem;
}

.admin-kpi-card .small {
  line-height: 1.35;
}

.admin-quick-actions .action-tile {
  min-height: 70px;
}

.admin-action-tile {
  align-items: center;
  gap: .72rem;
  border-radius: 18px;
}

.admin-action-tile span {
  display: block;
  min-width: 0;
}

.dashboard-support-text {
  color: #4b5b73 !important;
}

.dashboard-activity-panel {
  padding: 1.1rem 1.15rem;
}

.dashboard-activity-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.dashboard-activity-summary::-webkit-details-marker {
  display: none;
}

.dashboard-activity-summary h2 {
  margin: 0;
}

.admin-action-tile strong {
  display: block;
  font-size: .93rem;
  color: #17263d;
  margin-bottom: .06rem;
}

.admin-action-tile small {
  display: block;
  color: #63748e;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
}

.admin-leave-table-card {
  border-radius: 14px;
  border: 1px solid #d4deea;
}

.admin-leave-table thead th {
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #607089;
}

.dashboard-spotlight {
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(102, 164, 240, .12) 0%, rgba(102, 164, 240, 0) 62%),
    rgba(255, 255, 255, .94);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .045);
}

.admin-dashboard-band {
  display: grid;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.spotlight-item {
  padding: .72rem .78rem;
  border: 1px solid #d6e0ec;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(248, 251, 255, .9) 100%);
  display: grid;
  gap: .16rem;
}

.spotlight-label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.spotlight-item strong {
  font-family: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

.spotlight-item small {
  line-height: 1.35;
}

.admin-actions-head {
  margin-top: .05rem;
  margin-bottom: .55rem !important;
}

.employee-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, .95fr);
  gap: .8rem;
  align-items: start;
}

.employee-hero-dense {
  margin-bottom: .7rem !important;
}

.employee-hero-copy {
  display: grid;
  gap: .28rem;
  padding: 0;
}

.employee-hero-kicker,
.card-kicker {
  color: #6c7d95;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.employee-hero-copy h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.8rem, 3.2vw, 2.65rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}

.employee-hero-copy p {
  margin: 0;
  max-width: 60rem;
  color: #34445c;
  font-size: .95rem;
}

.employee-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .08rem;
}

.employee-hero-panel {
  padding: .78rem .86rem;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(247, 250, 255, .94) 100%);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
}

.employee-hero-profile {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-bottom: .62rem;
  margin-bottom: .62rem;
  border-bottom: 1px solid var(--line-soft);
}

.employee-hero-profile strong,
.employee-hero-profile span {
  display: block;
}

.employee-hero-profile span {
  color: var(--muted);
  font-weight: 700;
}

.employee-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem .9rem;
}

.employee-hero-meta span {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .2rem;
}

.employee-hero-meta strong {
  display: block;
  color: var(--text);
  font-size: .96rem;
}

.employee-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.dashboard-stat-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: .72rem .82rem;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(16, 24, 40, .05);
}

.dashboard-stat-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .55rem;
}

.dashboard-stat-value {
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  line-height: 1.03;
  letter-spacing: -.01em;
}

.status-holiday-name {
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.15;
}

.dashboard-balance-mini {
  display: grid;
  gap: .35rem;
}

.dashboard-balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #d6dfeb;
  padding-bottom: .2rem;
}

.dashboard-balance-line:last-child {
  border-bottom: 0;
}

.dashboard-balance-line strong.negative {
  color: #9e2d2d;
}

.ess-dashboard {
  display: grid;
  gap: 16px;
  color: #0f172a;
  font-family: inherit;
}

.ess-header,
.ess-header-actions,
.ess-summary-grid,
.ess-middle-grid,
.ess-bottom-grid,
.ess-snapshot-row,
.ess-action-list,
.ess-mini-table,
.ess-mini-table-head,
.ess-mini-table-row,
.ess-timeline,
.ess-timeline-item,
.ess-balance-stack,
.ess-balance-line,
.ess-balance-line-head {
  display: grid;
}

.ess-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.ess-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.ess-header-copy h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.03em;
}

.ess-header-copy p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.ess-header-actions {
  grid-auto-flow: column;
  gap: 10px;
  align-items: end;
}

.ess-icon-button,
.ess-avatar-button,
.ess-quick-menu summary {
  position: relative;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 22px rgba(15, 23, 42, .04);
}

.ess-icon-button,
.ess-avatar-button {
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}

.ess-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563EB;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ess-avatar-button {
  font-size: 16px;
  font-weight: 700;
  color: #2563EB;
}

.ess-quick-menu {
  position: relative;
}

.ess-quick-menu summary {
  min-width: 160px;
  padding: 11px 14px;
  list-style: none;
  cursor: pointer;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

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

.ess-quick-menu summary i {
  margin-left: 8px;
  color: #64748b;
  font-size: 12px;
}

.ess-quick-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
  z-index: 12;
}

.ess-quick-menu-list a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

.ess-quick-menu-list a:hover {
  background: #f1f5f9;
}

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

.ess-summary-card {
  height: 120px;
  padding: 18px 18px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 12px 28px rgba(15, 23, 42, .04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ess-card-title {
  display: block;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

.ess-main-number {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0f172a;
}

.ess-holiday-text {
  font-size: 24px;
}

.ess-summary-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.text-primary { color: #2563EB; }
.text-success { color: #10B981; }
.text-warning { color: #F59E0B; }
.text-danger { color: #EF4444; }

.ess-middle-grid {
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 16px;
}

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

.ess-snapshot-card,
.ess-actions-card,
.ess-data-card {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
}

.ess-panel-title {
  margin-bottom: 14px;
}

.ess-panel-title h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ess-snapshot-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ess-snapshot-item {
  padding: 13px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ess-snapshot-item span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.ess-snapshot-item strong {
  font-size: 14px;
  font-weight: 700;
}

.ess-action-list {
  gap: 12px;
}

.ess-action-button {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  justify-content: flex-start;
}

.ess-action-button i {
  color: #2563EB;
}

.ess-action-primary {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}

.ess-action-primary i {
  color: #fff;
}

.ess-mini-table {
  gap: 10px;
}

.ess-mini-table-head,
.ess-mini-table-row {
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.ess-mini-table-head {
  padding: 0 4px 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ess-mini-table-row {
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  font-size: 13px;
  color: #334155;
}

.ess-timeline {
  gap: 12px;
}

.ess-timeline-item {
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 6px 2px;
  color: #0f172a;
}

.ess-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.ess-timeline-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.ess-timeline-item p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ess-balance-stack {
  gap: 16px;
}

.ess-balance-line {
  gap: 9px;
}

.ess-balance-line-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ess-balance-line-head strong {
  font-size: 13px;
  font-weight: 700;
}

.ess-balance-line-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.ess-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.ess-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.ess-progress-fill.is-annual { background: #10B981; }
.ess-progress-fill.is-ph { background: #2563EB; }
.ess-progress-fill.is-unpaid { background: #F59E0B; }
.ess-progress-fill.is-other { background: #7C3AED; }

.ess-leave-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin: 0 0 1rem;
  font-size: .82rem;
  color: var(--muted);
}

.ess-leave-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.ess-leave-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.ess-leave-legend-swatch.is-annual { background: #10B981; }
.ess-leave-legend-swatch.is-ph { background: #2563EB; }
.ess-leave-legend-swatch.is-unpaid { background: #F59E0B; }
.ess-leave-legend-swatch.is-other { background: #7C3AED; }

.leave-type-badge {
  display: inline-flex;
  align-items: center;
  padding: .28rem .62rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.leave-type-badge.is-annual {
  background: rgba(16, 185, 129, .14);
  color: #0f766e;
  border-color: rgba(16, 185, 129, .24);
}

.leave-type-badge.is-ph {
  background: rgba(37, 99, 235, .14);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, .24);
}

.leave-type-badge.is-unpaid {
  background: rgba(245, 158, 11, .16);
  color: #b45309;
  border-color: rgba(245, 158, 11, .28);
}

.leave-type-badge.is-other {
  background: rgba(124, 58, 237, .12);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, .22);
}

.ess-page {
  display: grid;
  gap: 1rem;
}

.ess-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.ess-page-header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.ess-page-header p {
  margin: .45rem 0 0;
  color: var(--muted);
}

.ess-panel {
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 12px 28px rgba(15, 23, 42, .04);
}

.ess-detail-list {
  margin: 0;
  display: grid;
  gap: .85rem;
}

.ess-detail-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.ess-detail-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ess-detail-item dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ess-detail-item dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.ess-info-stack {
  display: grid;
  gap: .85rem;
}

.ess-info-card {
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-2);
}

.ess-info-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.ess-info-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.ess-info-card-grid span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ess-info-card-grid strong {
  display: block;
  margin-top: .18rem;
}

.notification-filter-form + .notification-bulk-form {
  margin-top: .85rem;
}

.leave-event-annual {
  border-left: 3px solid #10B981;
  background: rgba(16, 185, 129, .10);
}

.leave-event-ph {
  border-left: 3px solid #2563EB;
  background: rgba(37, 99, 235, .10);
}

.leave-event-unpaid {
  border-left: 3px solid #F59E0B;
  background: rgba(245, 158, 11, .12);
}

.leave-event-other {
  border-left: 3px solid #7C3AED;
  background: rgba(124, 58, 237, .10);
}

.dashboard-stat-card-notify {
  align-items: flex-start;
}

.employee-content-grid,
.employee-dashboard-layout,
.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .72rem;
  align-items: start;
}

.dashboard-layout > .form-card,
.employee-dashboard-layout .form-card,
.employee-content-grid .form-card {
  min-height: 100%;
  border-radius: 16px;
}

.employee-profile-card {
  grid-row: span 1;
}

.employee-panel-card {
  display: grid;
  align-content: start;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: .62rem;
}

.dashboard-layout > .form-card,
.employee-status-strip .metric-card,
.employee-dashboard-layout .form-card,
.employee-content-grid .form-card,
.admin-kpis .metric-card,
.quick-actions .action-tile,
.dashboard-spotlight {
  animation: dashboardReveal .32s ease both;
}

.dashboard-layout > .form-card:nth-child(2) { animation-delay: .03s; }
.dashboard-layout > .form-card:nth-child(3) { animation-delay: .06s; }
.dashboard-layout > .form-card:nth-child(4) { animation-delay: .09s; }
.dashboard-layout > .form-card:nth-child(5) { animation-delay: .12s; }

@keyframes dashboardReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-bottom: .62rem;
  margin-bottom: .62rem;
  border-bottom: 1px solid var(--line-soft);
}

.profile-mini strong,
.profile-mini span {
  display: block;
}

.profile-mini span {
  color: var(--muted);
  font-weight: 650;
}

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

.profile-field {
  padding: .58rem .64rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .48);
}

.profile-field span,
.profile-field strong {
  display: block;
}

.profile-field span {
  margin-bottom: .22rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.profile-field strong {
  color: var(--text);
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.profile-initial {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: .75rem;
  padding: .52rem 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.detail-list dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.attendance-status-card,
.balance-row,
.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .7rem .75rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .42);
}

.attendance-status-card {
  padding: .85rem .9rem;
}

.attendance-status-card strong {
  display: block;
  font-size: 1.35rem;
}

.balance-list,
.stack-list {
  display: grid;
  gap: .6rem;
}

.leave-balance-bars {
  display: grid;
  gap: .55rem;
}

.leave-balance-bar-card {
  padding: .62rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, .46);
}

.leave-balance-bar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.leave-balance-bar-head strong,
.leave-balance-bar-head span {
  display: block;
}

.leave-balance-bar-head span {
  color: var(--muted);
  font-size: .8rem;
}

.leave-balance-bar-head b {
  min-width: 34px;
  text-align: right;
  font-family: inherit;
  font-size: 1rem;
  color: var(--primary-dark);
}

.leave-balance-bar-head b.negative {
  color: #9e2d2d;
}

.leave-balance-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf6;
}

.leave-balance-used,
.leave-balance-remaining {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
}

.leave-balance-used {
  background: linear-gradient(90deg, #f0c36b 0%, #dc9b1d 100%);
  opacity: .9;
}

.leave-balance-remaining {
  background: linear-gradient(90deg, #7eb1ff 0%, #2a62c4 100%);
  opacity: .92;
}

.employee-support-card {
  gap: .65rem;
}

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

.support-mini-card {
  padding: .62rem .68rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, .46);
}

.support-mini-card strong,
.support-mini-card p {
  display: block;
}

.support-mini-card strong {
  margin-top: .14rem;
  font-family: inherit;
  font-size: .96rem;
}

.support-mini-card p {
  margin: .14rem 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.3;
}

.quick-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.quick-link-pill {
  min-height: 32px;
  padding: .38rem .62rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e1ec;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #41546f;
  font-size: .78rem;
  font-weight: 760;
}

.quick-link-pill:hover {
  color: var(--primary-dark);
  border-color: #bfd2ec;
  background: #fff;
}

.balance-row strong,
.balance-row span,
.stack-item strong,
.stack-item span {
  display: block;
}

.balance-row span,
.stack-item span {
  color: var(--muted);
  font-size: .88rem;
}

.balance-row b {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(31, 111, 235, .08);
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.stack-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}

.notification-list {
  display: grid;
  gap: .75rem;
}

.notification-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: flex-start;
  padding: .95rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .42);
}

.notification-row.unread {
  border-color: rgba(31, 111, 235, .22);
  background: rgba(31, 111, 235, .045);
}

.notification-status-dot {
  width: 10px;
  height: 10px;
  margin-top: .45rem;
  border-radius: 999px;
  background: #cbd5e1;
}

.notification-row.unread .notification-status-dot {
  background: var(--primary);
}

.notification-body {
  min-width: 0;
}

.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.notification-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-body p {
  margin: 0 0 .55rem;
  color: #344054;
  overflow-wrap: anywhere;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

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

.timeline-list {
  display: grid;
  gap: .75rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .8rem;
  align-items: flex-start;
  padding: .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .42);
}

.timeline-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(31, 111, 235, .08);
  color: var(--primary);
}

.timeline-item strong,
.timeline-item span,
.timeline-item small {
  display: block;
}

.timeline-item span {
  color: #344054;
  overflow-wrap: anywhere;
}

.timeline-item small {
  color: var(--muted);
  font-weight: 700;
}

.alert {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
  background: rgba(255, 255, 255, .76);
}

.login-shell {
  --login-base: #f4f6fa;     /* 60% */
  --login-support: #dfe6f2;  /* 30% */
  --login-accent: #1f5fbf;   /* 10% */
  --login-text: #162033;
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0 2rem;
  position: relative;
  background:
    linear-gradient(145deg, var(--login-base) 0%, var(--login-base) 62%, var(--login-support) 100%);
}

.login-shell::before,
.login-shell::after {
  content: none;
}

.login-shell::before {
  width: 360px;
  height: 360px;
  left: -80px;
  top: -50px;
  background: radial-gradient(circle, rgba(44, 117, 232, .24) 0%, rgba(44, 117, 232, 0) 70%);
}

.login-shell::after {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(21, 115, 71, .16) 0%, rgba(21, 115, 71, 0) 70%);
}

.login-panel {
  width: min(100%, 420px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.login-minimal {
  animation: loginSlideIn .35s ease both;
}

.login-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.login-heading h1 {
  margin: 0;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 850;
  color: var(--login-text);
}

.login-card {
  padding: 0;
}

.elevated-login {
  border: 1px solid #d6e1ef;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .94) 0%, rgba(249, 252, 255, .92) 100%);
  box-shadow: 0 20px 44px rgba(20, 28, 38, .12), 0 2px 0 rgba(255, 255, 255, .7) inset;
  backdrop-filter: blur(10px);
}

.login-card-premium {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: stretch;
  overflow: hidden;
  animation: loginSlideIn .45s ease both;
}

.login-hero {
  padding: 2.2rem 2rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0) 48%),
    linear-gradient(165deg, #295da9 0%, #1e4f95 45%, #15386a 100%);
  color: #f4f8ff;
}

.login-book {
  perspective: 1400px;
  transform-style: preserve-3d;
}

.login-book .login-hero {
  transform-origin: left center;
  backface-visibility: hidden;
  animation: bookOpenCover .9s cubic-bezier(.2, .75, .2, 1) .08s both;
  box-shadow: 12px 0 28px rgba(8, 25, 56, .28);
}

.login-hero .brand-mark.large {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
}

.login-form-wrap {
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(250, 252, 255, .92) 100%);
  opacity: 0;
  transform: translateX(-12px);
  animation: bookRevealPage .58s ease .45s both;
}

.login-form-wrap h2 {
  margin: 0 0 1.15rem;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 780;
  color: #21314c;
}

.login-form {
  width: 100%;
}

.login-form .mb-3 {
  margin-bottom: .95rem !important;
}

.login-input {
  position: relative;
}

.login-input i {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #5e6f89;
  z-index: 2;
}

.login-input .form-control {
  padding-left: 2.55rem;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: var(--login-text);
  box-shadow: 0 0 0 1px var(--login-support);
}

.login-input .form-control:focus {
  box-shadow: 0 0 0 2px rgba(31, 95, 191, .24);
}

.login-submit {
  min-height: 46px;
  border-radius: 11px;
  font-weight: 760;
  margin-top: .45rem;
  background: var(--login-accent);
  border-color: var(--login-accent);
}

.login-submit:hover,
.login-submit:focus {
  background: #194e9d;
  border-color: #194e9d;
}

.login-support {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: .95rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.login-support a {
  color: var(--login-accent);
}

.login-support a:hover {
  text-decoration: underline;
}

.public-main .alert-danger {
  border: 1px solid #f5c2c7;
  background: #fdecee;
  color: #8d1022;
}

@media (max-width: 991px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    width: 240px;
  }

  .app-main {
    margin-left: 240px;
    padding-left: 10px;
  }

  body.sidebar-compact .app-sidebar {
    width: 80px;
  }

  body.sidebar-compact .app-main {
    margin-left: 80px;
    padding-left: 10px;
  }

  .content-shell {
    padding: 1.2rem 1rem 2rem;
  }

  .login-card-premium {
    grid-template-columns: 1fr;
  }

  .login-book .login-hero {
    animation: none;
    transform: none;
    box-shadow: none;
  }

  .login-form-wrap {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .login-hero,
  .login-form-wrap {
    padding: 1.35rem 1.2rem;
  }

  .admin-hero {
    align-items: flex-start;
  }

  .admin-hero .action-row {
    width: 100%;
  }

  .admin-hero .action-row .btn {
    flex: 1 1 auto;
  }

  .employee-hero,
  .employee-dashboard-layout,
  .employee-content-grid {
    grid-template-columns: 1fr;
  }

  .ess-header,
  .ess-middle-grid,
  .ess-bottom-grid {
    grid-template-columns: 1fr;
  }

  .ess-header-actions {
    grid-auto-flow: row;
    justify-items: stretch;
  }

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

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

  .employee-status-strip,
  .support-grid,
  .profile-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ess-page-header,
  .leave-request-grid,
  .leave-request-head {
    grid-template-columns: 1fr;
  }

  .leave-request-head {
    display: grid;
    gap: .9rem;
  }
}

@media (max-width: 767px) {
  .sidebar-mobile-trigger {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    color: #0f172a;
    z-index: 1040;
  }

  .app-sidebar {
    width: min(88vw, 280px);
    transform: translateX(-100%);
  }

  .app-main,
  body.sidebar-compact .app-main {
    margin-left: 0;
    padding-left: 0;
  }

  .sidebar-toggle-input:checked ~ .app-shell .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(4px);
    z-index: 1010;
  }

  .sidebar-toggle-input:checked ~ .app-shell .sidebar-scrim {
    display: block;
  }

  body.sidebar-compact .app-sidebar {
    width: min(88vw, 280px);
    padding-left: .9rem;
    padding-right: .9rem;
  }

  body.sidebar-compact .sidebar-brand-copy,
  body.sidebar-compact .sidebar-subnav,
  body.sidebar-compact .sidebar-user span,
  body.sidebar-compact .sidebar-section,
  body.sidebar-compact .sidebar-badge,
  body.sidebar-compact .sidebar-role-badge {
    display: block !important;
  }

  body.sidebar-compact .sidebar-badge,
  body.sidebar-compact .sidebar-role-badge {
    display: inline-flex !important;
  }

  body.sidebar-compact .sidebar-link,
  body.sidebar-compact .sidebar-group-title,
  body.sidebar-compact .sidebar-user,
  body.sidebar-compact .sidebar-logout {
    grid-template-columns: 1.1rem minmax(0, 1fr) auto;
    justify-content: initial;
    padding-left: .82rem;
    padding-right: .82rem;
  }
}

@media (prefers-color-scheme: dark) {
  .app-sidebar,
  .sidebar-mobile-trigger {
    background: rgba(15, 23, 42, .92);
    border-color: rgba(148, 163, 184, .22);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .4);
  }

  .sidebar-brand strong,
  .sidebar-link.active,
  .sidebar-user.active,
  .sidebar-breadcrumbs strong,
  .sidebar-group-title,
  .sidebar-link:hover,
  .sidebar-group-title:hover,
  .sidebar-subnav a:hover,
  .sidebar-user:hover,
  .sidebar-logout:hover {
    color: #e5eefb;
  }

  .sidebar-pin-toggle,
  .sidebar-logout {
    background: rgba(30, 41, 59, .82);
    border-color: rgba(148, 163, 184, .22);
    box-shadow: none;
  }

  .sidebar-search,
  .sidebar-link,
  .sidebar-subnav a,
  .sidebar-user,
  .sidebar-logout,
  .sidebar-mobile-trigger {
    color: #cbd5e1;
  }

  .sidebar-link:hover,
  .sidebar-group-title:hover,
  .sidebar-subnav a:hover,
  .sidebar-user:hover,
  .sidebar-logout:hover,
  .sidebar-group[open] > .sidebar-group-title {
    background: rgba(30, 41, 59, .95);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
  }

  .sidebar-link.active,
  .sidebar-user.active,
  .sidebar-subnav a.active {
    background: rgba(37, 99, 235, .2);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .35);
  }

  .sidebar-subnav::before,
  .sidebar-footer {
    border-color: rgba(148, 163, 184, .18);
  }
}

@media (max-width: 576px) {
  .login-panel {
    width: 100%;
  }

  .login-shell {
    padding: .6rem 0 1.2rem;
  }

  .login-heading h1 {
    font-size: 1.55rem;
  }

}

@keyframes loginSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bookOpenCover {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(-72deg);
  }
}

@keyframes bookRevealPage {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 767px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-row {
    width: 100%;
  }

  .action-row .btn,
  .action-row > a,
  .action-row > button,
  .action-row > form,
  .action-row > form .btn {
    flex: 1 1 auto;
  }

  .table-card {
    overflow-x: auto;
  }

  .employee-directory {
    max-height: none !important;
    overflow: visible;
  }

  .employee-table {
    min-width: 0 !important;
  }

  .employee-table colgroup,
  .employee-table thead {
    display: none;
  }

  .employee-table,
  .employee-table tbody,
  .employee-table tr,
  .employee-table td {
    display: block;
    width: 100%;
  }

  .employee-table tbody tr {
    padding: .85rem 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .employee-table tbody tr:last-child {
    border-bottom: 0;
  }

  .employee-table tbody td {
    min-height: 0;
    height: auto;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: .75rem;
    padding: .55rem 0;
    border: 0;
    white-space: normal;
    align-items: start;
  }

  .employee-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .employee-table tbody td[data-label="Employee"] {
    grid-template-columns: 1fr;
  }

  .employee-table tbody td[data-label="Employee"]::before {
    display: none;
  }

  .table-actions {
    align-items: stretch;
  }

  .employee-role-cell,
  .employee-status-cell {
    gap: .35rem;
  }

  .table-actions .btn,
  .table-actions form {
    flex: 1 1 110px;
  }

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

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

  .employee-status-strip,
  .employee-content-grid,
  .support-grid,
  .profile-field-grid,
  .employee-hero-meta,
  .ess-kpi-grid,
  .ess-snapshot-row {
    grid-template-columns: 1fr;
  }

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

  .checklist-row {
    grid-template-columns: 1fr;
  }

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

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

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

  .stack-item,
  .attendance-status-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .stack-actions {
    width: 100%;
    justify-content: space-between;
  }

  .notification-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .notification-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .ess-page-header {
    align-items: flex-start;
  }

  .ess-page-header .action-row {
    width: 100%;
  }

  .ess-detail-item,
  .ess-info-card-grid,
  .leave-form-grid {
    grid-template-columns: 1fr;
  }

  .ess-info-card-head,
  .notification-heading,
  .notification-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-actions {
    display: flex;
    width: 100%;
  }

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

  .leave-request-form,
  .leave-balance-list,
  .leave-info-card {
    padding: 1rem;
  }

  .notification-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

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

  .leave-request-grid,
  .leave-form-grid,
  .leave-form-grid.two {
    grid-template-columns: 1fr;
  }

  .leave-form-actions {
    justify-content: stretch;
    flex-direction: column;
  }

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

  .app-nav .nav-link {
    width: 100%;
  }
}

/* Employee profile redesign */
.employee-profile-v2 {
  display: grid;
  gap: 1rem;
}

.epv2-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: .9rem 1rem;
}

.epv2-person {
  display: flex;
  gap: .9rem;
  align-items: center;
}

.epv2-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--panel-shadow);
}

.epv2-person-copy {
  display: grid;
  gap: .32rem;
}

.epv2-person h1 {
  font-size: 1.35rem;
  margin: 0;
}

.epv2-subtitle,
.epv2-meta {
  margin: 0;
  color: var(--muted);
}

.epv2-back-link {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: #64748b;
  font-size: .88rem;
  font-weight: 600;
}

.epv2-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .08rem;
}

.epv2-summary-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #526277;
  font-size: .8rem;
  font-weight: 700;
}

.epv2-actions {
  margin-top: .35rem;
  display: flex;
  gap: .5rem;
}

.epv2-stats {
  min-width: 320px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem .9rem;
}

.epv2-stats div span,
.epv2-kv-grid div span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
}

.epv2-stats div strong,
.epv2-kv-grid div strong {
  font-size: .96rem;
}

.epv2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 1rem;
  align-items: start;
}

.epv2-workspace {
  margin-top: 1rem;
  padding: .9rem 1rem;
}

.workspace-shell-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
}

.epv2-workspace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
}

.workspace-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.workspace-shell-actions .btn {
  min-height: 32px;
}

.workspace-shell .epv2-tabs {
  flex: 1 1 520px;
}

.epv2-workspace-head h2,
.epv2-main h2,
.epv2-timeline h2 {
  margin: 0 0 .9rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.epv2-workspace-head p {
  margin: 0;
  color: var(--muted);
}

.epv2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.epv2-tabs a {
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: .56rem .82rem;
  color: #2d3a4b;
  font-weight: 600;
  background: #fff;
  font-size: .95rem;
  line-height: 1.2;
  position: relative;
}

.epv2-tabs a.active {
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border-color: #bfd5f6;
  color: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .08);
}

.epv2-tabs a.active::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: -.3rem;
  height: 3px;
  border-radius: 999px;
  background: #2563eb;
}

.epv2-tabs a:hover {
  background: #f0f4fa;
  border-color: #d5e0ef;
}

.epv2-main {
  display: grid;
  gap: 1rem;
}

.epv2-alert-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
}

.epv2-alert-card {
  padding: .9rem 1rem;
  border-radius: 14px;
}

.epv2-alert-card.is-warning {
  background: linear-gradient(180deg, #fff9ec 0%, #fff3d8 100%);
  border-color: #f6d28b;
}

.epv2-alert-card.is-danger {
  background: linear-gradient(180deg, #fff3f2 0%, #ffe3e0 100%);
  border-color: #f1b5ac;
}

.epv2-alert-label {
  display: block;
  margin-bottom: .18rem;
  color: #8a6a19;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.epv2-pane {
  min-height: 220px;
}

.epv2-pane-loading {
  opacity: .72;
  transition: opacity .16s ease;
}

.workspace-pane {
  min-height: 180px;
}

.epv2-overview-card {
  padding: 1rem 1.1rem;
}

.epv2-module-card,
.workspace-table-card {
  padding: .82rem .95rem;
}

.epv2-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}

.epv2-module-head-copy {
  display: grid;
  gap: .1rem;
}

.epv2-module-head-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.epv2-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.epv2-section-head p {
  margin: .2rem 0 0;
  color: var(--muted);
}

.epv2-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.epv2-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
  font-size: .82rem;
  font-weight: 700;
}

.epv2-badge-soft {
  background: #eef2f7;
  color: #475569;
}

.epv2-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 280px;
  gap: 1rem;
  align-items: start;
}

.epv2-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.epv2-kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.epv2-side-stack {
  display: grid;
  gap: .7rem;
}

.epv2-inline-metric,
.epv2-summary-panel {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(246, 249, 254, .96) 100%);
  padding: .9rem 1rem;
}

.epv2-inline-metric span,
.epv2-mini-card span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .2rem;
}

.epv2-inline-metric strong {
  color: var(--text);
  font-size: 1rem;
}

.epv2-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.epv2-mini-card {
  padding: 1rem 1.05rem;
}

.epv2-mini-card strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: .2rem;
}

.epv2-mini-card small {
  color: var(--muted);
  font-size: .82rem;
  display: block;
}

.epv2-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.epv2-record-list {
  display: grid;
  gap: .75rem;
}

.epv2-record-item {
  padding: .85rem .95rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(247, 250, 255, .94) 100%);
}

.epv2-record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .35rem;
}

.epv2-record-top strong {
  color: var(--text);
}

.epv2-record-top span,
.epv2-record-meta,
.epv2-record-item p {
  color: var(--muted);
}

.epv2-record-item p {
  margin: 0;
}

.epv2-record-meta {
  margin-top: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  font-size: .9rem;
}

.epv2-tight-table th,
.epv2-tight-table td,
.workspace-table-card .table th,
.workspace-table-card .table td {
  padding-top: .52rem;
  padding-bottom: .52rem;
}

@media (max-width: 1200px) {
  .epv2-tabs {
    gap: .45rem;
  }

  .epv2-tabs a {
    padding: .48rem .72rem;
    font-size: .9rem;
  }
}

.epv2-mini-grid h3 {
  font-size: .97rem;
  margin-bottom: .4rem;
}

.epv2-summary-panel h3 {
  margin-top: 0;
}

.epv2-mini-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .25rem;
  font-size: .9rem;
}

.epv2-timeline-list {
  position: relative;
  display: grid;
  gap: .65rem;
}

.epv2-timeline-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
}

.epv2-dot {
  width: 12px;
  height: 12px;
  margin-top: .35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #23c6e3, #1b79ff);
  box-shadow: 0 0 0 3px rgba(35, 198, 227, .15);
}

.epv2-timeline-item h3 {
  margin: 0;
  font-size: 1rem;
  color: #2c65bf;
}

.epv2-timeline-item p {
  margin: .2rem 0;
  color: #3c4a5b;
}

.epv2-timeline-item small {
  color: #6a7788;
}

.epv2-warning-copy {
  color: #b45309 !important;
}

.epv2-empty-activity {
  display: grid;
  gap: .7rem;
}

.epv2-empty-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .82rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(246, 249, 254, .96) 100%);
}

.epv2-empty-activity-row span {
  color: var(--muted);
  font-size: .84rem;
}

.epv2-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

.epv2-summary-strip .epv2-mini-card {
  min-height: 0;
  padding: .8rem .92rem;
}

.documents-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.documents-summary-chip {
  min-width: 140px;
  padding: .58rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(246, 249, 254, .96) 100%);
}

.documents-summary-chip span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  margin-bottom: .16rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.documents-summary-chip strong {
  font-size: 1.15rem;
  color: var(--text);
}

.documents-add-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.documents-add-form {
  align-content: start;
}

.documents-live-panel {
  display: grid;
  gap: .85rem;
}

.documents-live-section {
  display: grid;
  gap: .55rem;
}

.documents-live-section h3 {
  margin: 0;
  font-size: .98rem;
}

.documents-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.documents-upload-chip {
  min-width: 150px;
  padding: .7rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(246, 249, 254, .96) 100%);
}

.documents-upload-chip span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.documents-upload-chip strong {
  display: block;
  color: var(--text);
  font-size: .9rem;
}

.devices-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.devices-summary-chip {
  min-width: 150px;
  padding: .58rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(246, 249, 254, .96) 100%);
}

.devices-summary-chip span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  margin-bottom: .16rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.devices-summary-chip strong {
  font-size: 1.15rem;
  color: var(--text);
}

.devices-summary-chip.is-warning {
  border-color: #f3d28f;
  background: linear-gradient(180deg, #fff9ec 0%, #fff5df 100%);
}

.devices-overdue-copy {
  color: #b45309 !important;
  font-weight: 700;
}

.device-action-menu {
  min-width: 170px;
}

@media (max-width: 1200px) {
  .documents-add-layout {
    grid-template-columns: 1fr;
  }

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

  .epv2-overview-grid,
  .epv2-overview-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .epv2-stats,
  .epv2-kv-grid,
  .epv2-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sticky-filter {
    position: static;
    top: auto;
    box-shadow: none;
    backdrop-filter: none;
  }

  .epv2-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-shell-bar,
  .epv2-workspace-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .epv2-stats,
  .epv2-overview-grid,
  .epv2-overview-metrics,
  .epv2-kv-grid,
  .epv2-mini-grid {
    grid-template-columns: 1fr;
  }

  .epv2-person {
    align-items: flex-start;
  }
}

/* Leave payouts redesign */
.leave-payouts-v2 {
  display: grid;
  gap: 1rem;
}

.lpv2-header {
  align-items: flex-start;
}

.lpv2-select-card {
  border: 1px solid var(--line);
  background: linear-gradient(155deg, #ffffff, #f4f8fd);
}

.lpv2-select-help {
  color: var(--muted);
  font-weight: 600;
}

.lpv2-select-help i {
  color: var(--primary);
  margin-right: .35rem;
}

.lpv2-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.lpv2-kpi {
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--panel-shadow);
  padding: .85rem .95rem;
}

.lpv2-kpi span {
  display: block;
  color: #5d6b7d;
  font-size: .8rem;
  margin-bottom: .25rem;
}

.lpv2-kpi strong {
  font-size: 1.05rem;
  color: #122038;
}

.lpv2-form-card {
  border: 1px solid #dbe5f0;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

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

.lpv2-balance-item {
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #fbfdff;
  padding: .7rem .8rem;
}

.lpv2-balance-item h3 {
  margin: 0;
  font-size: .98rem;
}

.lpv2-balance-item p {
  margin: .22rem 0 .4rem;
  color: #677487;
  font-size: .83rem;
}

.lpv2-balance-meta {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  font-size: .82rem;
}

.lpv2-balance-meta strong {
  color: #10523d;
}

.lpv2-rem-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .16rem .52rem;
  border: 1px solid transparent;
}

.lpv2-rem-badge.ok {
  background: rgba(22, 122, 76, .13);
  border-color: rgba(22, 122, 76, .25);
  color: #0f6e43;
}

.lpv2-rem-badge.warn {
  background: rgba(187, 114, 0, .14);
  border-color: rgba(187, 114, 0, .28);
  color: #9c5f00;
}

.lpv2-rem-badge.danger {
  background: rgba(193, 56, 56, .14);
  border-color: rgba(193, 56, 56, .28);
  color: #9e2d2d;
}

.lpv2-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
}

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

@media (max-width: 768px) {
  .lpv2-kpis,
  .lpv2-balance-grid {
    grid-template-columns: 1fr;
  }
}

/* UI/UX polish pass: denser enterprise screens with clearer hierarchy. */
.app-sidebar {
  width: 292px;
  padding: .78rem .72rem .68rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(250, 252, 255, .96) 100%);
  border-right-color: #dde6f2;
  box-shadow: 8px 0 28px rgba(17, 24, 39, .045);
}

.app-main {
  margin-left: 292px;
  padding-left: 0;
}

.content-shell {
  padding: .62rem .72rem 1.2rem;
}

.sidebar-brand {
  min-height: 44px;
  padding: 0 .22rem .42rem;
  border-bottom: 1px solid #edf2f8;
}

.sidebar-brand strong {
  font-size: .96rem;
  font-weight: 760;
}

.sidebar-brand .brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: #f8fbff;
}

.sidebar-pin-toggle {
  width: 36px;
  height: 36px;
  border-radius: 13px;
}

.sidebar-nav {
  gap: .18rem;
  padding-top: .42rem;
}

.sidebar-section {
  margin: .72rem .48rem .2rem;
  color: #8798b1;
  font-size: 10px;
  font-weight: 840;
  letter-spacing: .14em;
}

.sidebar-link,
.sidebar-group-title,
.sidebar-user,
.sidebar-logout {
  min-height: 38px;
  border-radius: 12px;
  padding: .5rem .7rem;
  font-size: .92rem;
}

.sidebar-group-title {
  color: #1f2d41;
}

.sidebar-link i,
.sidebar-group-title i,
.sidebar-user i,
.sidebar-logout i {
  color: #94a3b8;
  font-size: .94rem;
}

.sidebar-link:hover,
.sidebar-group-title:hover,
.sidebar-subnav a:hover,
.sidebar-user:hover,
.sidebar-logout:hover {
  background: #f6f9fd;
  box-shadow: inset 0 0 0 1px #e8eef7;
  transform: none;
}

.sidebar-link.active,
.sidebar-user.active,
.sidebar-subnav a.active,
.sidebar-group[open] > .sidebar-group-title {
  background: #eef5ff;
  color: #102341;
  box-shadow: inset 0 0 0 1px #bfd7ff;
}

.sidebar-subnav {
  gap: .1rem;
  margin: .16rem 0 .24rem .8rem;
  padding: .08rem .08rem .08rem .7rem;
}

.sidebar-subnav a {
  min-height: 32px;
  padding: .34rem .54rem;
  color: #4c5d73;
  font-size: .88rem;
  font-weight: 520;
}

.sidebar-footer {
  padding-top: .62rem;
}

.metric-card,
.table-card,
.form-card,
.epv2-module-card,
.workspace-table-card {
  border-color: #dce5f1;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .025), 0 10px 26px rgba(17, 24, 39, .045);
}

.metric-card {
  min-height: 78px;
  padding: .72rem .82rem;
}

.metric-card strong {
  font-size: 1.42rem;
}

.metric-label {
  font-size: .72rem;
  font-weight: 840;
  letter-spacing: .08em;
}

.table-card,
.form-card,
.epv2-module-card,
.workspace-table-card {
  padding: .86rem 1rem;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  background: #f4f7fb;
  color: #61718a;
  font-size: .64rem;
  letter-spacing: .11em;
  padding: .62rem .72rem;
}

.table td,
.table th,
.workspace-table-card .table th,
.workspace-table-card .table td,
.epv2-tight-table th,
.epv2-tight-table td {
  padding: .54rem .72rem;
}

.table tbody tr:hover > * {
  background: #f8fbff;
}

.employee-directory {
  border-radius: 16px;
}

body .content-shell .employee-directory {
  max-height: calc(100vh - 220px);
}

.directory-head {
  margin-bottom: .55rem;
  padding: 0 .08rem;
}

.directory-head h2,
.section-heading h2,
.epv2-module-head h2,
.epv2-module-head h3,
.epv2-workspace-head h2,
.epv2-main h2,
.epv2-timeline h2 {
  color: #18263a;
  font-weight: 780;
  letter-spacing: -.01em;
}

.form-label {
  color: #334155;
  font-size: .74rem;
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 38px;
  border-color: #cbd8e8;
  border-radius: 10px;
}

.btn {
  border-radius: 10px;
  min-height: 34px;
  font-size: .82rem;
}

.btn-sm {
  min-height: 28px;
  padding: .16rem .54rem;
}

.btn-primary {
  background: #2563d9;
  border-color: #2563d9;
  box-shadow: 0 6px 14px rgba(37, 99, 217, .16);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
  background: rgba(255, 255, 255, .82);
  border-color: #a6b4c7;
}

.epv2-tabs {
  gap: .5rem;
}

.epv2-tabs a {
  min-height: 38px;
  border-radius: 12px;
  padding: .48rem .72rem;
  font-size: .9rem;
}

.epv2-tabs a.active::after {
  left: .72rem;
  right: .72rem;
  bottom: -.22rem;
}

.workspace-filter-bar,
.filter-card {
  border-color: #dce5f1;
  border-radius: 16px;
}

.workspace-pane-body,
.epv2-main {
  display: grid;
  gap: .9rem;
}

.empty-state {
  min-height: 128px;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 251, 255, .72) 0%, rgba(255, 255, 255, .68) 100%);
}

.empty-state.compact {
  min-height: 86px;
}

.empty-state i {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: #eef5ff;
}

.status-pill,
.badge,
.sidebar-badge,
.sidebar-role-badge {
  font-weight: 800;
}

@media (max-width: 1200px) {
  .app-sidebar {
    width: 280px;
  }

  .app-main {
    margin-left: 280px;
  }
}

@media (max-width: 767px) {
  .app-sidebar,
  body.sidebar-compact .app-sidebar {
    width: min(88vw, 280px);
    padding-left: .9rem;
    padding-right: .9rem;
    transform: translateX(-100%);
  }

  .app-main,
  body.sidebar-compact .app-main {
    margin-left: 0;
    padding-left: 0;
  }

  .content-shell {
    padding: 4.4rem .72rem 1rem;
  }

  .sidebar-toggle-input:checked ~ .app-shell .app-sidebar {
    transform: translateX(0);
  }
}

/* Project-wide consistency layer. Keep all modules on one visual system. */
body,
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.table,
.dropdown-menu,
.modal-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-header h1,
.form-card h1,
.form-card h2,
.table-card h2,
.metric-card strong,
.stat-card strong,
.admin-hero-title,
.card-title,
.ess-page-header h1,
.epv2-person h1,
.epv2-workspace-head h2,
.epv2-main h2,
.epv2-timeline h2,
.lpv2-kpi strong {
  font-family: inherit !important;
  color: var(--text);
  font-weight: 780;
  letter-spacing: -.01em;
}

.page-header,
.form-card,
.table-card,
.metric-card,
.stat-card,
.filter-card,
.admin-hero,
.admin-kpi-card,
.attendance-panel,
.leave-board-card,
.leave-info-card,
.ess-panel,
.ess-card,
.epv2-hero,
.epv2-module-card,
.epv2-overview-card,
.epv2-inline-metric,
.epv2-summary-panel,
.epv2-mini-card,
.workspace-table-card,
.workspace-shell,
.lpv2-select-card,
.lpv2-form-card,
.lpv2-kpi,
.lpv2-balance-item,
.legacy-modern-card {
  border: 1px solid #dce5f1;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(248, 251, 255, .95) 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .025), 0 10px 26px rgba(17, 24, 39, .045);
}

.form-card,
.table-card,
.admin-hero,
.attendance-panel,
.leave-board-card,
.leave-info-card,
.ess-panel,
.epv2-module-card,
.epv2-overview-card,
.workspace-table-card,
.workspace-shell,
.lpv2-select-card,
.lpv2-form-card,
.legacy-modern-card {
  padding: .9rem 1rem;
}

.metric-card,
.stat-card,
.admin-kpi-card,
.lpv2-kpi {
  min-height: 78px;
  padding: .72rem .82rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card strong,
.stat-card strong,
.admin-kpi-card strong,
.lpv2-kpi strong {
  font-size: 1.42rem;
  line-height: 1.05;
}

.metric-label,
.stat-label,
.admin-kpi-card span,
.lpv2-kpi span,
.card-kicker {
  color: #667891;
  font-size: .72rem;
  font-weight: 840;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-heading,
.directory-head,
.epv2-module-head,
.epv2-workspace-head,
.ess-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .62rem;
}

.section-heading h2,
.directory-head h2,
.epv2-module-head h2,
.epv2-module-head h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.section-heading p,
.epv2-module-head-copy p,
.ess-page-header p,
.epv2-section-head p,
.lpv2-balance-item p {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.form-label {
  color: #334155;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: 0;
}

.form-control,
.form-select,
.form-control-sm,
.form-select-sm,
.correction-readonly {
  min-height: 38px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  background-color: #fff;
  color: #142033;
  font-size: .92rem;
}

.form-control-sm,
.form-select-sm {
  min-height: 32px;
  font-size: .86rem;
}

.btn {
  min-height: 34px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 780;
}

.btn-sm {
  min-height: 28px;
  border-radius: 8px;
  font-size: .78rem;
}

.sub-nav,
.epv2-tabs {
  gap: .5rem;
  padding: .12rem;
}

.sub-nav-link,
.epv2-tabs a {
  min-height: 38px;
  border: 1px solid #cbd8e8;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
  color: #334155;
  font-size: .9rem;
  font-weight: 760;
  padding: .48rem .72rem;
}

.sub-nav-link.active,
.epv2-tabs a.active {
  background: #eef5ff;
  border-color: #b8d0f6;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}

.table {
  color: var(--text);
}

.table thead th,
.table-card .table thead th,
.workspace-table-card .table thead th {
  background: #f4f7fb;
  color: #61718a;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: .62rem .72rem;
  border-bottom: 1px solid #dce5f1;
}

.table td,
.table th,
.table-card .table td,
.workspace-table-card .table td,
.epv2-tight-table th,
.epv2-tight-table td {
  padding: .54rem .72rem;
  vertical-align: middle;
  border-color: #e5ecf5;
}

.table tbody tr:hover > * {
  background: #f8fbff;
}

.employee-meta,
.text-muted,
.small,
.epv2-record-meta,
.timeline-entry-meta {
  color: var(--muted) !important;
}

.employee-meta {
  display: block;
  margin-top: .1rem;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.3;
}

.status-pill,
.badge,
.sidebar-badge,
.sidebar-role-badge,
.epv2-badge,
.lpv2-rem-badge {
  min-height: 24px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 820;
  line-height: 1;
}

.table-actions,
.action-row,
.workspace-filter-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.empty-state {
  min-height: 124px;
  border-radius: 14px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(248, 251, 255, .72) 0%, rgba(255, 255, 255, .68) 100%);
}

.empty-state strong {
  color: var(--text);
  font-weight: 780;
}

.empty-state span {
  font-size: .86rem;
}

.legacy-details-panel {
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #f8fbff;
  padding: .85rem;
}

.legacy-details-panel p {
  margin: 0 0 .35rem;
  color: var(--muted);
}

.legacy-details-panel p:last-child {
  margin-bottom: 0;
}

.modal-content,
.dropdown-menu {
  border: 1px solid #dce5f1;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, .12);
}
