                                                                          /* Here you can add your CSS classes */

/* Authentication pages ---------------------------------------------------- */
.auth-page {
  --auth-blue: #315efb;
  --auth-blue-dark: #2348d7;
  --auth-ink: #17233c;
  --auth-muted: #687386;
  background: #eef2f8;
  color: var(--auth-ink);
  min-height: 100vh;
  padding: 24px;
}

.auth-shell {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(22, 39, 73, .13);
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(480px, 1.18fr);
  min-height: calc(100vh - 48px);
  overflow: hidden;
  width: min(1280px, 100%);
}

.auth-aside {
  background: #12284d;
  color: #f4f7ff;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 4.5vw, 68px);
  position: relative;
}

.auth-aside::before {
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 80%, transparent);
  position: absolute;
  z-index: -1;
}

.auth-aside::after {
  background: var(--auth-blue);
  border-radius: 50%;
  content: "";
  height: 190px;
  position: absolute;
  right: -115px;
  top: 16%;
  width: 190px;
  z-index: -1;
}

.auth-brand {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
  font-weight: 750;
  gap: 11px;
  letter-spacing: -.02em;
}

.auth-brand-mark {
  align-items: center;
  background: var(--auth-blue);
  border-radius: 50% 50% 50% 12px;
  box-shadow: 0 8px 20px rgba(7,20,46,.28);
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  letter-spacing: -.04em;
  width: 38px;
}

.auth-aside-copy { margin: 48px 0 36px; }
.auth-aside-copy h2 { font-size: clamp(32px,3.6vw,50px); font-weight: 650; letter-spacing: -.045em; line-height: 1.05; margin: 0 0 18px; }
.auth-aside-copy p { color: #b9c8e4; font-size: 15px; line-height: 1.65; margin: 0; max-width: 450px; }

.auth-steps { display: grid; gap: 12px; margin-top: auto; }
.auth-step { align-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; display: grid; gap: 13px; grid-template-columns: 36px 1fr; padding: 13px 15px; }
.auth-step-number { align-items: center; background: rgba(91,141,255,.2); border-radius: 10px; color: #bcd0ff; display: flex; font-size: 12px; font-weight: 800; height: 36px; justify-content: center; width: 36px; }
.auth-step strong { display: block; font-size: 13px; margin-bottom: 2px; }
.auth-step small { color: #9eb0cf; font-size: 12px; }

.auth-security-art { align-items: center; display: flex; justify-content: center; margin: 30px auto; min-height: 250px; position: relative; width: min(330px,100%); }
.auth-security-ring { border: 2px dashed #47618c; border-radius: 50%; height: 230px; position: absolute; width: 230px; }
.auth-security-ring::before,.auth-security-ring::after { background: #5b8dff; border: 6px solid #12284d; border-radius: 50%; content: ""; height: 24px; position: absolute; width: 24px; }
.auth-security-ring::before { left: 12px; top: 28px; }
.auth-security-ring::after { bottom: 10px; right: 26px; }
.auth-lock { align-items: center; background: #f2f6ff; border-radius: 32px; box-shadow: 0 20px 45px rgba(3,14,35,.28); color: #12284d; display: flex; flex-direction: column; height: 150px; justify-content: center; position: relative; width: 150px; }
.auth-lock::before { border: 12px solid #315efb; border-bottom: 0; border-radius: 45px 45px 0 0; content: ""; height: 58px; position: absolute; top: -38px; width: 76px; }
.auth-lock-key { background: #315efb; border-radius: 50%; height: 24px; position: relative; width: 24px; }
.auth-lock-key::after { background: #315efb; content: ""; height: 28px; left: 9px; position: absolute; top: 17px; width: 6px; }
.auth-aside-note { align-items: center; color: #aebfdd; display: flex; font-size: 13px; gap: 8px; }
.auth-aside-note::before { background: #6fa0ff; background-clip: padding-box; border: 4px solid rgba(111,160,255,.2); border-radius: 50%; content: ""; height: 13px; width: 13px; }

.auth-form-side { align-items: center; display: flex; justify-content: center; padding: clamp(40px,5.5vw,76px); }
.auth-form-wrap { max-width: 470px; width: 100%; }
.auth-mobile-brand { display: none; }
.auth-eyebrow { color: var(--auth-blue); font-size: 12px; font-weight: 750; letter-spacing: .13em; margin-bottom: 10px; text-transform: uppercase; }
.auth-form-wrap h1 { font-size: clamp(29px,3vw,38px); font-weight: 700; letter-spacing: -.04em; margin: 0 0 8px; }
.auth-subtitle { color: var(--auth-muted); font-size: 14px; margin-bottom: 28px; }
.auth-fields { display: grid; gap: 17px; }
.auth-page .form-label { color: #344054; font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.auth-page .form-control { background: #fff; border: 1px solid #d8dde7; border-radius: 9px; box-shadow: none; color: var(--auth-ink); font-size: 14px; min-height: 46px; padding: 10px 14px; }
.auth-page .form-control:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 4px rgba(49,94,251,.11); }
.auth-page .form-control::placeholder { color: #a0a8b8; }
.auth-page .form-text { color: #7d8797; font-size: 12px; }
.auth-primary { background: var(--auth-blue); border-color: var(--auth-blue); border-radius: 9px; box-shadow: 0 9px 20px rgba(49,94,251,.2); font-size: 14px; font-weight: 650; min-height: 47px; }
.auth-primary:hover,.auth-primary:focus { background: var(--auth-blue-dark); border-color: var(--auth-blue-dark); }
.auth-link { color: var(--auth-blue); font-size: 13px; font-weight: 650; text-decoration: none; }
.auth-link:hover { color: var(--auth-blue-dark); }
.auth-back { align-items: center; color: #687386; display: flex; font-size: 13px; gap: 8px; justify-content: center; margin-top: 12px; text-decoration: none; }
.auth-back:hover { color: var(--auth-blue); }
.auth-back-arrow { font-size: 18px; line-height: 1; }
.auth-page [id$="Message"]:empty { display: none; }
.auth-page [id$="Message"].alert,.auth-page [id$="Message"] .alert { border-radius: 9px; font-size: 13px; }
.auth-security-note { align-items: flex-start; background: #f5f7fb; border: 1px solid #e1e6ef; border-radius: 10px; color: #687386; display: flex; font-size: 12px; gap: 9px; line-height: 1.5; margin-top: 18px; padding: 11px 13px; }
.auth-security-note::before { color: #315efb; content: "●"; font-size: 9px; margin-top: 3px; }

@media (max-width: 991.98px) {
  .auth-page { padding: 0; }
  .auth-shell { border: 0; border-radius: 0; grid-template-columns: minmax(300px,.75fr) minmax(440px,1.25fr); min-height: 100vh; }
  .auth-aside { padding: 40px; }
  .auth-aside-copy h2 { font-size: 36px; }
  .auth-form-side { padding: 44px; }
}

@media (max-width: 767.98px) {
  .auth-shell { display: block; }
  .auth-aside { display: none; }
  .auth-form-side { min-height: 100vh; padding: 36px 24px; }
  .auth-mobile-brand { color: var(--auth-ink); display: inline-flex; margin-bottom: 38px; }
}

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

.app-main {
  background: var(--bs-light);
}

.app-sidebar {
  background: var(--bs-white);
  border-right: var(--bs-border-width) solid var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
  color: var(--bs-body-color);
  min-height: 100vh;
  overflow: hidden;
  padding: 16px 12px;
  position: relative;
  transition: width .22s ease, padding .22s ease;
  width: 292px;
}

.app-sidebar-header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px 1fr 34px;
  margin-bottom: 22px;
  min-height: 42px;
}

.app-sidebar-mark {
  align-items: center;
  background: var(--bs-primary);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  transition: background .16s ease;
  width: 38px;
}

.app-sidebar-mark:hover {
  background: var(--bs-primary-emphasis, #0a58ca);
}

.app-sidebar-mark i {
  color: var(--bs-white);
  font-size: 16px;
}

.app-sidebar-brand {
  display: grid;
  line-height: 1.1;
  min-width: 0;
}

.app-sidebar-brand span {
  color: var(--bs-body-color);
  font-size: 17px;
  font-weight: 800;
}

.app-sidebar-brand small {
  color: var(--bs-secondary-color);
  font-size: 12px;
  margin-top: 3px;
}

.app-sidebar-toggle-button {
  align-items: center;
  background: var(--bs-white);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: 8px;
  color: var(--bs-secondary-color);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .22s ease;
  width: 34px;
}

.app-sidebar-toggle-button:hover {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
  color: var(--bs-primary);
}

.app-sidebar-toggle-button i {
  font-size: 15px;
  transition: transform .22s ease;
}

.app-menu-group {
  margin-bottom: 18px;
}

.app-menu-group-title {
  color: var(--bs-secondary-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  overflow: hidden;
  padding: 0 10px 7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-menu {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-menu-item {
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}

.app-menu-link {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--bs-body-color);
  display: flex;
  gap: 11px;
  min-height: 42px;
  overflow: hidden;
  padding: 10px 11px;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
  width: 100%;
}

.app-menu-link i {
  color: var(--bs-secondary-color);
  flex: 0 0 20px;
  font-size: 17px;
  text-align: center;
  transition: color .16s ease;
  width: 20px;
}

.app-menu-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-item:hover .app-menu-link {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
  color: var(--bs-primary);
}

.app-menu-item.active .app-menu-link {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: var(--bs-box-shadow-sm);
  color: var(--bs-white);
  font-weight: 700;
}

.app-menu-item.active .app-menu-link i {
  color: var(--bs-white);
}

.app-menu-item-muted .app-menu-link {
  color: var(--bs-secondary-color);
}

.app-sidebar-toggle:checked ~ .app-sidebar {
  padding-left: 10px;
  padding-right: 10px;
  width: 78px;
}

.app-sidebar-toggle:checked ~ .app-sidebar .app-sidebar-header {
  grid-template-columns: 38px;
  justify-content: center;
}

.app-sidebar-toggle:checked ~ .app-sidebar .app-sidebar-brand,
.app-sidebar-toggle:checked ~ .app-sidebar .app-menu-group-title,
.app-sidebar-toggle:checked ~ .app-sidebar .app-menu-text {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
}

.app-sidebar-toggle:checked ~ .app-sidebar .app-sidebar-toggle-button {
  bottom: 18px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.app-sidebar-toggle:checked ~ .app-sidebar .app-sidebar-toggle-button i {
  transform: rotate(180deg);
}

.app-sidebar-toggle:checked ~ .app-sidebar .app-menu-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* Hover-to-expand: while collapsed (icon-only), hovering the sidebar
   temporarily shows it at full size again - same visual as fully expanded -
   without affecting the checkbox's own checked state or reflowing .app-main.
   Taken out of the sticky-top flex flow into a fixed overlay for this
   (position needs !important - Bootstrap's own .sticky-top utility class
   sets position:sticky !important, which otherwise wins on equal specificity
   by source order); every rule below just re-applies the plain expanded-state
   styling (the collapsed-state rules above) for the duration of the hover. */
.app-sidebar-toggle:checked ~ .app-sidebar:hover {
  position: fixed !important;
  top: 0;
  left: 0;
  bottom: 0;
  width: 292px;
  height: 100vh;
  padding: 16px 12px;
  z-index: 1030;
  box-shadow: var(--bs-box-shadow);
}

.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-sidebar-header {
  grid-template-columns: 38px 1fr 34px;
  justify-content: normal;
}

.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-sidebar-brand,
.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-menu-group-title,
.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-menu-text {
  opacity: 1;
  pointer-events: auto;
  position: static;
  width: auto;
}

.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-sidebar-toggle-button {
  bottom: auto;
  left: auto;
  position: static;
  transform: none;
}

.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-sidebar-toggle-button i {
  transform: none;
}

.app-sidebar-toggle:checked ~ .app-sidebar:hover .app-menu-link {
  justify-content: flex-start;
  padding-left: 11px;
  padding-right: 11px;
}

.app-empty-state {
  border: var(--bs-border-width) dashed var(--bs-border-color);
  border-radius: 6px;
  color: var(--bs-secondary-color);
  padding: 20px;
}

.page-section {
  background: var(--bs-white);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: 8px;
  box-shadow: var(--bs-box-shadow-sm);
  padding: 18px;
}

.app-list-add-button {
  align-items: center;
  display: inline-flex;
  gap: .375rem;
}

/* ── Every "report/list style" table (TWebTableControl output) ───────────
   Targets .app-data-table itself - the class every one of these tables
   already carries via its own ElementTableClassName (ListFrame/SearchFrame/
   RoleForm/EssPayslipPage/PayrollEntrySlipForm/PayrollCalculationPage/
   VacationCalculationPage/TempDisabilityCalculation's tables, plus Excel
   ImportView's PreviewTable) - not #tablelist, which only worked because
   most (not all - PreviewTable didn't) of those tables happen to reuse the
   same container div id. A NEW table gets this automatically the moment its
   own ElementTableClassName includes app-data-table, regardless of what its
   container div's id is. dfLines grids are deliberately not included here -
   they're denser/editable-cell-friendly and already have their own tailored
   .app-line-table rules below. */
.app-data-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
  width: 100%;
}

.app-data-table th {
  background: var(--bs-light);
  border-bottom: 2px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 9px 14px;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

.app-data-table td {
  border-bottom: 1px solid var(--bs-border-color-translucent);
  color: var(--bs-body-color);
  padding: 9px 14px;
  vertical-align: middle;
}

.app-data-table tr:last-child td {
  border-bottom: none;
}

.app-data-table tbody tr:hover td {
  background: var(--bs-primary-bg-subtle);
  cursor: default;
}

/* ── Page toolbar ────────────────────────────────────────── */
.page-section > .d-flex:first-child {
  row-gap: .5rem;
}

/* .page-section > .d-flex:first-child .input-group {
  min-width: 160px;
  width: 200px;
} */

/* Status/type pill badges (Utils.Base.pas's FormatCellValue - Active/Fixed/
   Probationary etc.) render via plain Bootstrap .badge, whose default
   font-size (0.75em) and padding read as too small/cramped in a data-table
   row. Sized up and given a touch more breathing room instead. */
.app-data-table .badge.rounded-pill {
  /* font-size: 10px; */
  text-transform: uppercase;
  /* font-weight: 600; */
  padding: 5px 10px;
}

.app-header-search {
  max-width: 260px;
}

.btn-icon {
  align-items: center;
  aspect-ratio: 1;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 38px;
}

/* ── Fix TMS WebCore frame offset bleeding into page layout ─ */
#pageContent {
  min-height: 0;
  position: relative;
}

/* Make the form div and any inner frame divs static so TMS DFM offsets don't leak */
#pageContent > div,
#pageContent > div > div {
  height: 100% !important;
  min-height: 0 !important;
  position: static !important;
  width: 100% !important;
}

/* ── Sidebar always stays in a left column ───────────────── */
.app-sidebar {
  flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .app-main {
    padding: 1.25rem !important;
  }

  .page-section {
    padding: 14px;
  }
}

/* On narrow screens: collapse sidebar to icon-only, keep it in its column */
@media (max-width: 767.98px) {
  .app-sidebar {
    min-height: 100vh;
    padding-left: 10px;
    padding-right: 10px;
    width: 70px;
  }

  .app-sidebar .app-sidebar-header {
    grid-template-columns: 38px;
    justify-content: center;
  }

  .app-sidebar .app-sidebar-brand,
  .app-sidebar .app-menu-group-title,
  .app-sidebar .app-menu-text {
    display: none;
  }

  .app-sidebar .app-sidebar-toggle-button {
    display: none;
  }

  .app-sidebar .app-menu-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .app-main {
    min-width: 0;
    overflow-x: hidden;
    padding: 1rem !important;
  }

  .app-header-search {
    flex: 1 1 auto;
    max-width: none;
    min-width: 120px;
  }

  /* Toolbar wraps on mobile — search takes full row */
  .page-section > .d-flex:first-child .input-group {
    flex: 1 1 auto;
    min-width: 140px;
    width: auto;
  }
}


/* ── Danger-tinted menu item (Logout) ───────────────────── */
.app-menu-item-danger .app-menu-link {
  color: var(--bs-danger);
}

.app-menu-item-danger .app-menu-link i {
  color: var(--bs-danger);
}

.app-menu-item-danger:hover .app-menu-link {
  background: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
  color: var(--bs-danger);
}

/* ── Filter combos ─────────────────────────────────────── */
#filterCombos select {
  min-width: 120px;
  width: auto;
}

/* ── Pagination (TWebButton with page-link class) ────── */
#tablePagination {
  gap: 0.75rem;
  flex-wrap: wrap;
}
#pagerControl {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}
#pagerControl button.page-link {
  position: relative;
  margin-left: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #0d6efd;
  line-height: 1.5;
}
#pagerControl button.page-link:first-child {
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
}
#pagerControl button.page-link:last-child {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}
#pagerControl button.page-link.active {
  z-index: 3;
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}
#pagerControl button.page-link:disabled {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
  opacity: 0.65;
}

/* Scroll box for a dfLines grid: vertical scroll happens HERE (not on the
   page), so the sticky thead above pins against it. Height-capped so a long
   line list scrolls inside the grid instead of pushing the whole form. */
.app-line-grid {
  overflow: auto;
  max-height: 420px;
}

/* Wrapping lcText cells (FormFrame TLineColumnDef.WrapText) - a min-width
   keeps the column from collapsing to nothing while auto layout sizes it. */
.app-line-table textarea.app-wrap-input {
  min-width: 220px;
  resize: none;
  overflow: hidden;
}

.app-line-table > thead th,
.app-line-table tr:first-child th {
  background: var(--bs-light);
  border-bottom: 2px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 8px 12px;
  position: sticky !important;
  text-transform: uppercase;
  top: 0 !important;
  vertical-align: bottom;
  white-space: normal;
  z-index: 3;
}