/**
 * ITM Workforce Suite — shared look & feel (AdminLTE + Bootstrap 5)
 * Loaded after adminlte.min.css
 */

/* ─── Design tokens ─── */
:root {
  --itm-radius: 0.5rem;
  --itm-radius-sm: 0.375rem;
  --itm-font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --itm-shadow-header: 0 1px 0 rgba(0, 0, 0, 0.06);
  --itm-shadow-card: 0 0.125rem 0.5rem rgba(15, 23, 42, 0.06), 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
  --itm-shadow-card-hover: 0 0.35rem 1.15rem rgba(15, 23, 42, 0.1), 0 0.125rem 0.35rem rgba(15, 23, 42, 0.06);
  --itm-shadow-dropdown: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.12);
  --itm-sidebar-link-radius: 0.375rem;
}

[data-bs-theme="dark"] {
  --itm-shadow-card: 0 0.25rem 0.65rem rgba(0, 0, 0, 0.45);
  --itm-shadow-card-hover: 0 0.45rem 1.25rem rgba(0, 0, 0, 0.55);
  --itm-shadow-header: 0 1px 0 rgba(255, 255, 255, 0.06);
  --itm-shadow-dropdown: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5);
}

/* ─── Card headers: AdminLTE floats .card-title (breaks stacked subtitles) ─── */
.itm-app .card-header .card-title {
  float: none !important;
  display: block;
  line-height: 1.3;
  margin-bottom: 0;
}
.itm-app .card-header .card-subtitle {
  display: block;
  clear: both;
  float: none;
  width: 100%;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-top: 0.2rem;
  margin-bottom: 0;
  color: var(--bs-secondary-color);
}
.card-header-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.card-header-title-block .card-title {
  line-height: 1.3;
  margin-bottom: 0;
}
.card-header-title-block .card-subtitle {
  margin-top: 0;
}
.itm-app .card-header.d-flex,
.itm-app .card-header.d-flex.flex-wrap {
  align-items: flex-start;
  gap: 0.65rem 0.75rem;
}
.itm-app .card-header.d-flex > .btn,
.itm-app .card-header.d-flex > .btn-group,
.itm-app .card-header.d-flex > .input-group,
.itm-app .card-header.d-flex > .form-check {
  flex-shrink: 0;
  align-self: flex-start;
}
/* Nested title group (e.g. report filters: icon + title block) */
.card-header-title-block > div:has(.card-title) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bs-secondary-bg) 25%,
    var(--bs-tertiary-bg) 50%,
    var(--bs-secondary-bg) 75%
  );
  background-size: 200% 100%;
  animation: itm-skeleton-loading 1.2s ease-in-out infinite;
  border-radius: 0.25rem;
}
@keyframes itm-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skeleton-text {
  height: 1em;
  min-height: 1em;
}
.skeleton-row {
  height: 2.5rem;
}

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
}
.empty-state-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 0.75rem;
}
.empty-state-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.empty-state-hint {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.filter-toggle {
  transition: transform 0.2s;
}
.filter-toggle.collapsed {
  transform: rotate(-90deg);
}

body.layout-fixed {
  --lte-sidebar-width: min(320px, 92vw);
}
.app-sidebar {
  min-width: var(--lte-sidebar-width) !important;
  max-width: var(--lte-sidebar-width) !important;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-sidebar .sidebar-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.75rem;
  background: inherit;
  scrollbar-width: thin;
}

/* Scoped + !important: dark sidebar (data-bs-theme on aside) still uses AdminLTE logo caps otherwise */
.itm-app .app-sidebar .sidebar-brand.sidebar-brand-itm {
  height: auto !important;
  min-height: calc(42px + 0.95rem);
  overflow: visible !important;
  white-space: normal !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  background-color: #fff !important;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.itm-app .app-sidebar .sidebar-brand .brand-link.itm-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  width: 100%;
}

/* Logo alone — beat AdminLTE .sidebar-brand .brand-link .brand-image { max-height: 33px } */
.itm-app .app-sidebar .sidebar-brand .brand-link.itm-brand-stack .itm-brand-logo-line {
  display: block;
  width: 100%;
  line-height: 0;
  background-color: #fff !important;
  border-radius: var(--itm-radius-sm);
}
.itm-app .app-sidebar .sidebar-brand .brand-link.itm-brand-stack .itm-brand-logo-line img.itm-brand-logo,
.itm-app .app-sidebar .sidebar-brand .brand-link.itm-brand-stack .itm-brand-logo-line img.brand-image {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 48px !important;
  object-fit: contain;
  object-position: left center;
}

/* Client logo in top bar (Global settings upload / company_logo_url) */
.itm-app .navbar .itm-client-logo-header-wrap {
  display: flex;
  align-items: center;
  max-height: 3.14rem;
  padding-left: 0.64rem;
  margin-left: 0.125rem;
  border-left: 1px solid var(--bs-border-color-translucent);
}
.itm-app .navbar .itm-client-logo-header {
  max-height: 39px;
  max-width: 158px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 575.98px) {
  .itm-app .navbar .itm-client-logo-header-wrap {
    padding-left: 0.38rem;
    max-width: min(134px, 34vw);
  }
  .itm-app .navbar .itm-client-logo-header {
    max-height: 29px;
    max-width: 100%;
  }
}

/* ─── App chrome (AdminLTE shell) ─── */
.itm-app {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
}

.itm-app .app-header.navbar {
  box-shadow: var(--itm-shadow-header);
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.itm-app .app-content-header {
  padding: 1rem 0 0.875rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-primary) 8%) 100%);
}
[data-bs-theme="dark"] .itm-app .app-content-header {
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, var(--bs-body-bg) 100%);
}

.itm-app .app-content-header h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  color: var(--bs-heading-color);
}

.itm-app .app-content-header .breadcrumb {
  font-size: 0.8125rem;
  padding-top: 0.35rem;
}
.itm-app .app-content-header .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  font-weight: 500;
  opacity: 0.45;
}

.itm-app .app-content {
  padding-top: 1.35rem;
  padding-bottom: 2.25rem;
}

.itm-app .app-footer {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  border-top: 1px solid var(--bs-border-color-translucent);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* ─── Cards ─── */
.itm-app .card:not(.border-0) {
  border-radius: var(--itm-radius);
  border-color: var(--bs-border-color-translucent);
  box-shadow: var(--itm-shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.itm-app .card.border-0.shadow-sm {
  box-shadow: var(--itm-shadow-card) !important;
}
.itm-app .card-header {
  font-weight: 600;
  font-size: 0.9375rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom-color: var(--bs-border-color-translucent);
  background-color: color-mix(in srgb, var(--bs-body-bg) 96%, var(--bs-primary) 4%);
}
html[data-bs-theme="dark"] .itm-app .card-header {
  background-color: color-mix(in srgb, var(--bs-body-bg) 92%, #fff 8%);
}

/* ─── Tables ─── */
.itm-app .table {
  --bs-table-hover-bg: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.05);
}
.itm-app .table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.itm-app .table-responsive {
  border-radius: var(--itm-radius-sm);
}

/* ─── Sidebar navigation ─── */
.itm-app .sidebar-menu .nav-link {
  border-radius: var(--itm-sidebar-link-radius);
  transition: background-color 0.15s ease, color 0.15s ease;
  margin-inline: 0.35rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.itm-app .sidebar-menu .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.07);
}
.itm-app .sidebar-menu .nav-link.active {
  background-color: rgba(255, 255, 255, 0.14);
  font-weight: 600;
}
/* AdminLTE styles :focus like hover — only highlight the current section (.active) */
.itm-app .sidebar-wrapper .sidebar-menu > .nav-item > .nav-link:focus:not(.active) {
  background-color: transparent !important;
  color: inherit;
}
.itm-app .sidebar-menu .nav-link:focus:not(.active) {
  background-color: transparent !important;
}
.itm-app .sidebar-menu .nav-link:focus-visible:not(.active) {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}
.itm-app .sidebar-menu .nav-header {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  opacity: 0.85;
}

/* ─── Controls ─── */
.itm-app .btn {
  border-radius: var(--itm-radius-sm);
  font-weight: 500;
}
.itm-app .btn:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.35);
}
.itm-app .form-control:focus,
.itm-app .form-select:focus {
  border-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.55);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.15);
}

.itm-app .dropdown-menu {
  border-radius: var(--itm-radius);
  box-shadow: var(--itm-shadow-dropdown);
  border-color: var(--bs-border-color-translucent);
}

/* ─── Suite modals (unified dialogs) ─── */
.itm-app .modal-backdrop.show {
  opacity: 0.45;
}
.itm-app .modal .modal-dialog {
  margin: 1.25rem auto;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) {
  border: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.14), 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}
[data-bs-theme="dark"] .itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) {
  box-shadow: 0 1rem 2.75rem rgba(0, 0, 0, 0.55), 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-header {
  border: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bs-primary) 92%, #000 8%) 0%,
    var(--bs-primary) 48%,
    color-mix(in srgb, var(--bs-primary) 78%, #0a3d7a 22%) 100%
  );
  color: #fff;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #fff;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.88;
  margin: 0;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-header .btn-close:hover {
  opacity: 1;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body {
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--bs-body-bg);
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  margin-bottom: 0.3rem;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body .form-text,
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body .text-muted.small {
  font-size: 0.8125rem;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body hr {
  margin: 1rem 0;
  opacity: 0.35;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body .itm-modal-section-title,
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-body > p.small.text-muted:first-child {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.65rem;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-footer {
  border: 0;
  border-top: 1px solid var(--bs-border-color-translucent);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, var(--bs-body-bg));
  padding: 0.75rem 1.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-footer .btn {
  min-width: 5.5rem;
  font-weight: 500;
}
.itm-app .modal .modal-content:not(.itm-confirm-modal):not(.hrm-prof-modal) .modal-footer .btn-primary {
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}
/* HR profile modal — align footer with suite */
.itm-app .modal .hrm-prof-modal .modal-footer {
  border-top: 1px solid var(--bs-border-color-translucent);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, var(--bs-body-bg));
  padding: 0.75rem 1.25rem;
  gap: 0.5rem;
}
.itm-app .modal .hrm-prof-modal .modal-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.itm-app .alert {
  border-radius: var(--itm-radius-sm);
}

/* ─── Module pages (unified tab UI across HRM, Payroll, Leave, etc.) ─── */
.itm-module-hero,
.hrm-perf-hero {
  --itm-hero-fg: #fff;
  --itm-hero-fg-muted: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 40%, #1e40af 100%);
  color: var(--itm-hero-fg);
  border-radius: 0.65rem;
  overflow: hidden;
}
.itm-module-hero--primary {
  background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 45%, #084298 100%);
}
.itm-module-hero--success {
  background: linear-gradient(135deg, #157347 0%, #146c43 45%, #0a3622 100%);
}
.itm-module-hero--warning {
  /* Deeper amber (not bright gold) so white text and light-outline buttons stay readable */
  background: linear-gradient(135deg, #a16207 0%, #854d0e 42%, #713f12 100%);
}
.itm-module-hero--info {
  background: linear-gradient(135deg, #087990 0%, #055160 48%, #032830 100%);
}
.itm-module-hero .card-body,
.hrm-perf-hero .card-body {
  padding: 1.15rem 1.35rem;
}
.itm-module-hero-icon,
.hrm-perf-hero-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}
.itm-module-hero h2,
.hrm-perf-hero h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.itm-module-hero p,
.hrm-perf-hero p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--itm-hero-fg-muted);
  max-width: 40rem;
}
.itm-module-hero .text-muted,
.hrm-perf-hero .text-muted {
  color: var(--itm-hero-fg-muted) !important;
}
/* Brand logos on saturated heroes — white chip so logo colors do not fight the banner */
.itm-module-hero .hrm-dash-logo,
.itm-module-hero .pay-dash-logo,
.itm-module-hero .pf-dash-logo {
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
/* Hero quick actions: never use default gray outline on a colored banner */
.itm-module-hero .btn-outline-secondary,
.itm-module-hero .btn-outline-primary,
.itm-module-hero .btn-outline-dark,
.itm-module-hero .btn-outline-warning {
  --bs-btn-color: var(--itm-hero-fg);
  --bs-btn-border-color: rgba(255, 255, 255, 0.72);
  --bs-btn-hover-color: #1e293b;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: #1e293b;
  --bs-btn-active-bg: #f1f5f9;
  --bs-btn-active-border-color: #f1f5f9;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}
.itm-module-hero .btn-warning {
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-color: #713f12;
  --bs-btn-hover-bg: #f8fafc;
  --bs-btn-hover-border-color: #f8fafc;
  --bs-btn-hover-color: #5c3d08;
  --bs-btn-active-bg: #e2e8f0;
  --bs-btn-active-border-color: #e2e8f0;
  --bs-btn-active-color: #5c3d08;
}
.itm-module-hero .btn-success {
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-color: #146c43;
  --bs-btn-hover-bg: #f0fdf4;
  --bs-btn-hover-border-color: #f0fdf4;
  --bs-btn-hover-color: #0f5132;
}
.itm-module-hero .btn-light,
.itm-module-hero .btn.btn-light {
  --bs-btn-color: #1e293b;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: #f1f5f9;
  --bs-btn-hover-border-color: #f1f5f9;
}
.itm-module-hero .btn-primary:not(.btn-outline-primary) {
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-color: #0a58ca;
  --bs-btn-hover-bg: #f1f5f9;
  --bs-btn-hover-color: #084298;
}
.itm-module-stat,
.hrm-perf-stat,
.itm-app .hrm-stat-card,
.itm-app .pay-stat-card {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
}
.itm-module-stat,
.hrm-perf-stat {
  padding: 0.65rem 0.85rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.itm-module-stat-icon,
.hrm-perf-stat-icon,
.itm-app .hrm-stat-icon,
.itm-app .pay-stat-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.itm-module-stat h4,
.hrm-perf-stat h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}
.itm-module-stat small,
.hrm-perf-stat small {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
}
.itm-module-toolbar,
.hrm-perf-toolbar {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 55%, var(--bs-body-bg));
}
.itm-module-toolbar .card-body,
.hrm-perf-toolbar .card-body {
  padding: 0.85rem 1rem;
}
.itm-module-toolbar .form-label,
.hrm-perf-toolbar .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}
.itm-module-nav,
.hrm-perf-nav {
  gap: 0.35rem;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}
.itm-module-nav .nav-link,
.hrm-perf-nav .nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  border-radius: 2rem;
  padding: 0.35rem 0.85rem;
  white-space: nowrap;
}
.itm-module-nav .nav-link:hover,
.hrm-perf-nav .nav-link:hover {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.08);
}
.itm-module-nav .nav-link.active,
.hrm-perf-nav .nav-link.active {
  color: #fff;
  background: var(--bs-primary);
}
.itm-module-panel,
.hrm-perf-panel,
.itm-module-suite .tab-content .tab-pane .card.shadow-sm.itm-module-panel {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.55rem;
  overflow: hidden;
  scroll-margin-top: 5rem;
}
.itm-module-panel-head,
.hrm-perf-panel-head,
.itm-module-suite .tab-content .tab-pane .card.shadow-sm > .card-header.itm-module-panel-head,
.itm-module-suite .tab-content .tab-pane .card.shadow-sm > .card-header:has(.fw-semibold):not(.itm-module-hero *) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 70%, var(--bs-body-bg));
  border-bottom: 1px solid var(--bs-border-color-translucent);
}
.itm-module-panel-title,
.hrm-perf-panel-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}
.itm-module-panel-icon,
.hrm-perf-panel-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.itm-module-panel-icon--accent-indigo,
.itm-module-panel-icon--cycle,
.hrm-perf-panel-icon--cycle { background: rgba(99, 102, 241, 0.15); color: #4f46e5; }
.itm-module-panel-icon--accent-success,
.itm-module-panel-icon--goals,
.hrm-perf-panel-icon--goals { background: rgba(25, 135, 84, 0.14); color: var(--bs-success); }
.itm-module-panel-icon--accent-primary,
.itm-module-panel-icon--review,
.hrm-perf-panel-icon--review { background: rgba(13, 110, 253, 0.12); color: var(--bs-primary); }
.itm-module-panel-icon--accent-info,
.itm-module-panel-icon--feedback,
.hrm-perf-panel-icon--feedback { background: rgba(13, 202, 240, 0.14); color: #0aa2c0; }
.itm-module-panel-icon--accent-warning,
.itm-module-panel-icon--promo,
.hrm-perf-panel-icon--promo { background: rgba(255, 193, 7, 0.18); color: #b58100; }
.itm-module-panel-icon--accent-danger,
.itm-module-panel-icon--disc,
.hrm-perf-panel-icon--disc { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.itm-module-panel-icon--accent-secondary,
.itm-module-panel-icon--history,
.hrm-perf-panel-icon--history { background: rgba(108, 117, 125, 0.14); color: var(--bs-secondary); }
.itm-module-panel .table thead th,
.hrm-perf-panel .table thead th,
.itm-module-suite .tab-content .tab-pane .card.shadow-sm table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  background: transparent;
}
.itm-module-panel .table tbody td,
.hrm-perf-panel .table tbody td,
.itm-module-suite .tab-content .tab-pane .card.shadow-sm table tbody td {
  font-size: 0.875rem;
  vertical-align: middle;
}
.itm-module-empty td,
.hrm-perf-empty td {
  text-align: center;
  padding: 1.35rem 1rem !important;
  color: var(--bs-secondary-color);
}
.itm-module-empty i,
.hrm-perf-empty i {
  font-size: 1.35rem;
  opacity: 0.35;
  display: block;
  margin-bottom: 0.35rem;
}
.itm-module-progress,
.hrm-perf-progress {
  min-width: 5.5rem;
  height: 0.45rem;
  border-radius: 1rem;
  background: var(--bs-secondary-bg);
}
.itm-module-progress .progress-bar,
.hrm-perf-progress .progress-bar {
  border-radius: 1rem;
}
.itm-module-rating,
.hrm-perf-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.itm-module-rating--high,
.hrm-perf-rating--high { background: rgba(25, 135, 84, 0.15); color: var(--bs-success); }
.itm-module-rating--mid,
.hrm-perf-rating--mid { background: rgba(255, 193, 7, 0.2); color: #9a6700; }
.itm-module-rating--low,
.hrm-perf-rating--low { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.itm-module-history-wrap,
.hrm-perf-history-wrap {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}
.itm-module-history-group,
.hrm-perf-history-group { margin-bottom: 1rem; }
.itm-module-history-group:last-child,
.hrm-perf-history-group:last-child { margin-bottom: 0; }
.itm-module-history-group h6,
.hrm-perf-history-group h6 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}
.itm-module-history-item,
.hrm-perf-history-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  background: var(--bs-secondary-bg);
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
}
.itm-module-history-item:last-child,
.hrm-perf-history-item:last-child { margin-bottom: 0; }
.itm-module-suite .tab-content > .tab-pane > p.text-muted.small:first-child {
  padding: 0.35rem 0.15rem 0.75rem;
  margin-bottom: 0;
}

/* ─── Suite home (modules picker) ─── */
.itm-suite-shell {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.itm-suite-shell .suite-hero {
  max-width: 1000px;
  margin: 0 auto;
}
.itm-suite-shell .suite-card {
  border-radius: var(--itm-radius);
  border: 1px solid var(--bs-border-color-translucent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--itm-shadow-card);
}
.itm-suite-shell .suite-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--itm-shadow-card-hover) !important;
  border-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}
.itm-suite-shell .suite-card.disabled {
  opacity: 0.55;
  pointer-events: none;
}
.itm-suite-shell .suite-footer {
  border-top: 1px solid var(--bs-border-color-translucent);
}

/* Suite home — landing (modules picker) */
.itm-suite-shell.itm-suite-home {
  position: relative;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg)) 0%,
      var(--bs-body-bg) 38%,
      color-mix(in srgb, var(--bs-info) 4%, var(--bs-body-bg)) 100%
    );
}
html[data-bs-theme="dark"] .itm-suite-shell.itm-suite-home {
  background: linear-gradient(
    168deg,
    color-mix(in srgb, var(--bs-primary) 14%, #0a0f18) 0%,
    var(--bs-body-bg) 48%,
    #020617 100%
  );
}
.itm-suite-shell.itm-suite-home::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 48% at 50% -12%, rgba(var(--bs-primary-rgb, 13, 110, 253), 0.11), transparent 55%),
    radial-gradient(ellipse 70% 55% at 108% 8%, rgba(var(--bs-info-rgb, 13, 202, 240), 0.06), transparent 48%),
    radial-gradient(ellipse 55% 45% at -5% 92%, rgba(var(--bs-success-rgb, 25, 135, 84), 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.itm-suite-shell.itm-suite-home::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 52px,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.018) 52px,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.018) 53px
  );
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 68%);
}
html[data-bs-theme="dark"] .itm-suite-shell.itm-suite-home::after {
  opacity: 0.28;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 56px,
    rgba(255, 255, 255, 0.028) 56px,
    rgba(255, 255, 255, 0.028) 57px
  );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 72%);
}
.itm-suite-home {
  overflow-x: hidden;
}
.itm-suite-home .suite-home-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin-inline: auto;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-primary) 8%);
  border: 1px solid color-mix(in srgb, var(--bs-border-color-translucent) 82%, var(--bs-primary) 18%);
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  /* reserve space so fixed controls don’t sit on logos / headings */
  padding-top: max(1.85rem, env(safe-area-inset-top, 0px));
  padding-right: max(2rem, env(safe-area-inset-right, 0px));
  padding-left: max(0.625rem, env(safe-area-inset-left, 0px));
}
html[data-bs-theme="dark"] .itm-suite-home .suite-home-main {
  background: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-primary) 10%);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.35);
}
.itm-suite-home .suite-home-top-actions {
  position: fixed;
  top: max(0.45rem, env(safe-area-inset-top, 0px));
  right: max(0.45rem, env(safe-area-inset-right, 0px));
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.35rem;
  width: max-content;
  max-width: min(calc(100vw - 0.9rem), 36rem);
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.42) inset,
    0 8px 32px rgba(15, 23, 42, 0.09);
}
.itm-suite-home .suite-home-top-actions > * {
  flex-shrink: 0;
}
.itm-suite-home .suite-home-top-actions__cluster {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
}
html[data-bs-theme="dark"] .itm-suite-home .suite-home-top-actions {
  background: color-mix(in srgb, var(--bs-body-bg) 72%, transparent);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}
.itm-ess-portal .suite-home-top-actions--ess {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}
html[data-bs-theme="dark"] .itm-ess-portal .suite-home-top-actions--ess {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
}
.itm-suite-home .suite-home-top-actions .btn {
  border-radius: var(--itm-radius-sm);
  box-shadow: none;
  border-color: var(--bs-border-color-translucent);
}
.itm-suite-home .suite-home-lang {
  margin-bottom: 0;
}
.itm-suite-home .suite-home-lang select {
  min-width: 6.75rem;
  max-width: 9.5rem;
  cursor: pointer;
}
@media (max-width: 479.98px) {
  .itm-suite-home .suite-home-top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
    max-width: calc(100vw - 0.9rem);
    border-radius: 1rem;
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
  }
  .itm-suite-home .suite-home-lang {
    flex: 1 1 100%;
  }
  .itm-suite-home .suite-home-lang select {
    width: 100%;
    max-width: none;
  }
  .itm-suite-home .suite-home-top-actions__cluster {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}
.itm-suite-home .suite-home-skip:focus {
  clip: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0.25rem !important;
  padding: 0.35rem 0.6rem !important;
  overflow: visible !important;
  z-index: 30;
  left: max(0.5rem, env(safe-area-inset-left, 0px));
  top: max(0.5rem, env(safe-area-inset-top, 0px));
  position: fixed;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-primary);
  background: var(--bs-body-bg);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.35);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}
/* Critical: grid columns default min-width:auto lets wide images blow up the row */
.itm-suite-home .row > [class*="col-"] {
  min-width: 0;
}
.itm-suite-home .suite-hero-panel {
  border-radius: 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.14);
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--bs-body-bg) 94%, rgba(var(--bs-primary-rgb, 13, 110, 253), 1) 6%),
    color-mix(in srgb, var(--bs-body-bg) 88%, transparent)
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.58) inset,
    0 14px 48px rgba(15, 23, 42, 0.07),
    0 2px 10px rgba(15, 23, 42, 0.04);
  padding: clamp(1rem, 2.6vw, 1.45rem);
  margin-bottom: 1.15rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.itm-suite-home .suite-hero-panel--elevated {
  position: relative;
  overflow: hidden;
}
.itm-suite-home .suite-hero-panel--elevated::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 85%;
  background: radial-gradient(
    ellipse 70% 55% at 50% 0%,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.09),
    transparent 62%
  );
  pointer-events: none;
}
.itm-suite-home .suite-hero-panel--elevated > * {
  position: relative;
  z-index: 1;
}
html[data-bs-theme="dark"] .itm-suite-home .suite-hero-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    158deg,
    color-mix(in srgb, var(--bs-body-bg) 88%, rgba(var(--bs-primary-rgb, 13, 110, 253), 1) 12%),
    color-mix(in srgb, var(--bs-body-bg) 92%, #020617)
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 16px 48px rgba(0, 0, 0, 0.45);
}
html[data-bs-theme="dark"] .itm-suite-home .suite-hero-panel--elevated::before {
  background: radial-gradient(
    ellipse 75% 60% at 50% 0%,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.14),
    transparent 58%
  );
}
.itm-suite-home .suite-hero-heading {
  font-weight: 800;
  letter-spacing: -0.035em;
  font-size: clamp(1.32rem, 3.1vw, 1.68rem);
  color: var(--bs-heading-color);
  margin-bottom: 0.35rem;
  line-height: 1.28;
}
.itm-suite-home .suite-hero-tagline {
  font-size: 0.9375rem;
  color: var(--bs-secondary-color);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.58;
  opacity: 0.97;
}
.itm-suite-home .suite-org-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.72rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: linear-gradient(
    180deg,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1),
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.05)
  );
  color: var(--bs-body-color);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.18);
  box-shadow: 0 2px 10px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
}
.itm-suite-home .suite-home-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.72rem;
}
/* Client + suite marks sit side-by-side at all breakpoints (inline hero styles overridden with !important). */
.itm-suite-home .suite-home-brand-stack--with-client {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  flex-shrink: 0;
}
.itm-suite-home .suite-home-brand-stack--with-client img.suite-home-img-client {
  flex: 0 1 auto;
  margin-inline: 0 !important;
  max-width: min(146px, 38vw) !important;
  max-height: 51px !important;
}
.itm-suite-home .suite-home-brand-stack--with-client img.suite-home-img-suite {
  flex: 0 1 auto;
  margin-inline: 0 !important;
  max-width: min(240px, calc(100vw - 9.5rem)) !important;
  max-height: 52px !important;
}
@media (max-width: 380px) {
  .itm-suite-home .suite-home-brand-stack--with-client {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .itm-suite-home .suite-home-brand-stack--with-client img.suite-home-img-client {
    max-width: min(129px, 35vw) !important;
  }
  .itm-suite-home .suite-home-brand-stack--with-client img.suite-home-img-suite {
    max-width: min(200px, 85vw) !important;
    max-height: 46px !important;
  }
}
.itm-suite-home .suite-home-admin-label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
}
/*
 * Landing logos — preserve intrinsic aspect ratio (no stretching).
 * "!important" wins over Bootstrap/AdminLTE reboot rules such as img { width: 100%; }.
 */
.itm-suite-home img.suite-home-img-suite {
  display: block;
  box-sizing: content-box !important;
  width: auto !important;
  height: auto !important;
  max-width: min(286px, 97vw) !important;
  max-height: 57px !important;
  opacity: 0.92;
  filter: saturate(1.03);
  object-fit: scale-down !important;
  object-position: center center;
  margin-inline: auto;
  flex-shrink: 0;
}
.itm-suite-home img.suite-home-img-client {
  display: block;
  box-sizing: content-box !important;
  width: auto !important;
  height: auto !important;
  max-width: min(165px, 49vw) !important;
  max-height: 56px !important;
  opacity: 0.88;
  filter: saturate(1.03);
  object-fit: scale-down !important;
  object-position: center center;
  margin-inline: auto;
  flex-shrink: 0;
}
.itm-suite-home img.suite-home-img-module {
  display: block;
  box-sizing: content-box !important;
  width: auto !important;
  height: auto !important;
  max-width: min(117px, 87%) !important;
  max-height: 32px !important;
  object-fit: scale-down !important;
  object-position: center center;
  margin: 0 auto 0.5rem;
  flex-shrink: 0;
  opacity: 0.93;
}
.itm-suite-home .suite-modules-head {
  text-align: center;
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}
.itm-suite-home .suite-modules-head--accent::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0 auto 0.55rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.55),
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25),
    transparent
  );
  box-shadow: 0 1px 10px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}
/* Landing page: module cards in two columns (md+) */
.itm-suite-home .suite-home-module-row--two-col {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.itm-suite-home .suite-home-module-row--two-col > [class*="col-"] {
  display: flex;
}
.itm-suite-home .suite-home-module-row--two-col .suite-module-link {
  width: 100%;
}
.itm-suite-home .suite-home-module-row--solo {
  justify-content: center !important;
}
.itm-suite-home .suite-home-module-row--solo > [class*="col-"] {
  flex: 0 1 auto !important;
  width: 100%;
  max-width: 26rem;
}
.itm-suite-home .suite-module-link--solo .suite-module-body {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.itm-suite-home .suite-main-content:focus-visible {
  outline: none;
}
@keyframes suiteLandingIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .itm-suite-home .suite-hero-panel {
    animation: suiteLandingIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .itm-suite-home .suite-modules-head {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
  }
  .itm-suite-home .suite-home-module-row > [class*="col-"]:nth-child(1) .suite-module-card-inner {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }
  .itm-suite-home .suite-home-module-row > [class*="col-"]:nth-child(2) .suite-module-card-inner {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
  }
  .itm-suite-home .suite-home-module-row > [class*="col-"]:nth-child(3) .suite-module-card-inner {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
  }
  .itm-suite-home .suite-home-module-row > [class*="col-"]:nth-child(4) .suite-module-card-inner {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
  }
  .itm-suite-home .suite-admin-panel.card {
    animation: suiteLandingIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
  }
}
.itm-suite-home .suite-modules-head h2 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--bs-secondary-color);
  margin: 0 0 0.2rem;
}
.itm-suite-home .suite-module-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  border-radius: var(--itm-radius);
  outline-offset: 2px;
}
.itm-suite-home .suite-module-link:focus-visible .suite-module-card-inner {
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.35);
}
.itm-suite-home .suite-module-card-inner {
  height: 100%;
  min-height: 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
  background: var(--bs-body-bg);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 22px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}
.itm-suite-home .suite-module-link:hover .suite-module-card-inner {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.22);
}
.itm-suite-home .suite-module-card--time:hover .suite-module-card-inner {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 18px 42px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.14);
}
.itm-suite-home .suite-module-card--hrm:hover .suite-module-card-inner {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 18px 42px rgba(var(--bs-success-rgb, 25, 135, 84), 0.14);
}
.itm-suite-home .suite-module-card--payroll:hover .suite-module-card-inner {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 18px 42px rgba(var(--bs-warning-rgb, 255, 193, 7), 0.18);
}
.itm-suite-home .suite-module-card--provident:hover .suite-module-card-inner {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 18px 42px rgba(var(--bs-info-rgb, 13, 202, 240), 0.16);
}
html[data-bs-theme="dark"] .itm-suite-home .suite-module-card-inner {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
html[data-bs-theme="dark"] .itm-suite-home .suite-module-link:hover .suite-module-card-inner {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}
.itm-suite-home .suite-module-card-top {
  height: 4px;
  flex-shrink: 0;
}
.itm-suite-home .suite-module-card--time .suite-module-card-top {
  background: linear-gradient(90deg, var(--bs-primary), color-mix(in srgb, var(--bs-primary) 65%, var(--bs-info)));
}
.itm-suite-home .suite-module-card--hrm .suite-module-card-top {
  background: linear-gradient(90deg, var(--bs-success), color-mix(in srgb, var(--bs-success) 70%, #20c997));
}
.itm-suite-home .suite-module-card--payroll .suite-module-card-top {
  background: linear-gradient(90deg, var(--bs-warning), color-mix(in srgb, var(--bs-warning) 75%, var(--bs-danger)));
}
.itm-suite-home .suite-module-card--provident .suite-module-card-top {
  background: linear-gradient(90deg, var(--bs-info), color-mix(in srgb, var(--bs-info) 70%, var(--bs-primary)));
}
.itm-suite-home .suite-module-body {
  padding: 0.95rem 1rem 1rem;
  text-align: center;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.itm-suite-home .suite-module-card--time .suite-module-body {
  background: linear-gradient(
    185deg,
    rgba(var(--bs-primary-rgb, 13, 110, 253), 0.09) 0%,
    transparent 52%
  );
}
.itm-suite-home .suite-module-card--hrm .suite-module-body {
  background: linear-gradient(
    185deg,
    rgba(var(--bs-success-rgb, 25, 135, 84), 0.1) 0%,
    transparent 52%
  );
}
.itm-suite-home .suite-module-card--payroll .suite-module-body {
  background: linear-gradient(
    185deg,
    rgba(var(--bs-warning-rgb, 255, 193, 7), 0.11) 0%,
    transparent 52%
  );
}
.itm-suite-home .suite-module-card--provident .suite-module-body {
  background: linear-gradient(
    185deg,
    rgba(var(--bs-info-rgb, 13, 202, 240), 0.1) 0%,
    transparent 52%
  );
}
.itm-suite-home .suite-module-body img.suite-home-img-module {
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--bs-body-bg) 82%, var(--bs-secondary-bg));
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
  margin-bottom: 0.65rem !important;
}
.itm-suite-home .suite-module-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--bs-heading-color);
  margin-bottom: 0.25rem;
  line-height: 1.32;
  max-width: 100%;
}
.itm-suite-home .suite-module-desc {
  font-size: 0.78125rem;
  color: var(--bs-secondary-color);
  line-height: 1.48;
  flex-grow: 1;
  max-width: 100%;
}
.itm-suite-home .suite-module-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.58rem;
  font-size: 0.734375rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--bs-primary);
}
.itm-suite-home .suite-module-card--hrm .suite-module-cta {
  color: var(--bs-success);
}
.itm-suite-home .suite-module-card--payroll .suite-module-cta {
  color: var(--bs-warning);
}
.itm-suite-home .suite-module-card--provident .suite-module-cta {
  color: var(--bs-info);
}
.itm-suite-home .suite-module-link:hover .suite-module-cta i {
  transform: translateX(3px);
}
.itm-suite-home .suite-module-cta i {
  transition: transform 0.18s ease;
  font-size: 1.0625rem;
  line-height: 1;
}
.itm-suite-home .suite-admin-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: none;
}
.itm-suite-home .suite-admin-head {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: 0.75rem;
}
.itm-suite-home .suite-admin-head h2 {
  margin-bottom: 0;
}
.itm-suite-home .suite-admin-subtitle {
  font-size: clamp(1.05rem, 2.35vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--bs-heading-color);
}
.itm-suite-home .suite-admin-intro {
  margin-inline: auto;
  max-width: 32rem;
  line-height: 1.52;
}
.itm-suite-home .suite-admin-panel-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
.itm-suite-home .suite-admin-section .suite-admin-panel {
  margin-inline: auto;
  width: fit-content;
  max-width: 100%;
}
.itm-suite-home .suite-admin-panel {
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.12);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bs-body-bg) 92%, rgba(var(--bs-primary-rgb, 13, 110, 253), 1) 8%),
    color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-secondary-bg))
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 26px rgba(15, 23, 42, 0.06);
}
html[data-bs-theme="dark"] .itm-suite-home .suite-admin-panel {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.itm-suite-home .suite-admin-actions {
  margin-top: 0;
}
.itm-suite-home .suite-home-signout {
  border-radius: var(--itm-radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.28rem 0.55rem;
  flex-shrink: 0;
}
.itm-suite-home .suite-footer {
  opacity: 0.88;
  font-size: 0.734375rem;
  border-top: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.08);
  padding-top: 1rem !important;
}

/* Back to top — suite home + AdminLTE module pages */
.itm-back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 1080;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.35);
  background: var(--bs-body-bg);
  color: var(--bs-primary);
  box-shadow: 0 0.2rem 0.65rem rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.15s ease, color 0.15s ease;
}
.itm-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.itm-back-to-top:hover {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}
.itm-back-to-top:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.itm-suite-home .suite-home-announcement {
  border-radius: var(--itm-radius-md);
  font-size: 0.95rem;
  border-left: 4px solid var(--bs-primary);
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.12) 0%, rgba(var(--bs-primary-rgb), 0.04) 100%);
}
.suite-announcement-body,
.suite-announcement-preview {
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.suite-announcement-body strong,
.suite-announcement-preview strong {
  font-weight: 700;
}
.suite-announcement-body a,
.suite-announcement-preview a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.suite-announcement-body .suite-ann-list,
.suite-announcement-preview .suite-ann-list {
  margin: 0.35rem 0 0.5rem 1.15rem;
  padding: 0;
}
.suite-announcement-body .suite-ann-list li,
.suite-announcement-preview .suite-ann-list li {
  margin-bottom: 0.2rem;
}
.suite-announcement-preview {
  min-height: 2.5rem;
}
.itm-ann-editor textarea.font-monospace {
  font-size: 0.875rem;
  line-height: 1.45;
}
.itm-suite-home .suite-home-announcement-empty-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--itm-radius-md);
  border: 1px dashed rgba(var(--bs-primary-rgb), 0.45);
  background: rgba(var(--bs-primary-rgb), 0.05);
  color: var(--bs-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.itm-suite-home .suite-home-announcement-empty-link:hover {
  background: rgba(var(--bs-primary-rgb), 0.1);
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.itm-suite-home .suite-resume-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--itm-radius-md);
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1) 0%, rgba(var(--bs-primary-rgb), 0.04) 100%);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.18);
}
.itm-suite-home .suite-resume-bar-text {
  font-size: 0.9rem;
  color: var(--bs-body-color);
}
.itm-suite-home .suite-quick-actions {
  padding: 0.25rem 0;
}
.itm-suite-home .suite-ess-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  height: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--itm-radius-md);
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.itm-suite-home .suite-ess-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
  box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.itm-suite-home .suite-ess-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 1.1rem;
}
.itm-suite-home .suite-ess-card-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.itm-suite-home .suite-ess-card-desc {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  line-height: 1.3;
}
.itm-suite-home .suite-module-stat {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
}
.itm-suite-home .suite-module-stat--warning { color: var(--bs-warning); }
.itm-suite-home .suite-module-stat--danger { color: var(--bs-danger); }
.itm-suite-home .suite-module-stat--info { color: var(--bs-info); }
.itm-suite-home .suite-module-stat--muted { color: var(--bs-secondary-color); }

/* ─── ESS portal (suite home + in-app self-service) ─── */
.itm-ess-portal.itm-suite-home .suite-home-main {
  max-width: 52rem;
}
.itm-ess-portal .ess-portal-section-head {
  text-align: center;
  margin-bottom: 1rem;
}
.itm-ess-portal .ess-portal-section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}
.itm-ess-portal .suite-ess-actions-card {
  border-radius: 0.65rem !important;
  border: 1px solid var(--bs-border-color-translucent) !important;
}
.itm-ess-portal .suite-ess-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, rgba(var(--bs-warning-rgb), 0.12) 0%, rgba(var(--bs-warning-rgb), 0.04) 100%);
  border-bottom: 1px solid var(--bs-border-color-translucent);
}
.itm-ess-portal .suite-ess-action-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--bs-secondary);
}
.itm-ess-portal .suite-ess-action-item--danger { border-left-color: var(--bs-danger); }
.itm-ess-portal .suite-ess-action-item--warning { border-left-color: var(--bs-warning); }
.itm-ess-portal .suite-ess-action-item--info { border-left-color: var(--bs-info); }
.itm-ess-portal .suite-ess-action-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.itm-ess-portal .suite-ess-action-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
}
.itm-ess-portal .suite-ess-action-title {
  font-size: 0.9rem;
  line-height: 1.3;
}
.itm-ess-portal .suite-ess-action-msg {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.itm-ess-portal .suite-ess-card {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 0.65rem;
  border: 1px solid var(--bs-border-color-translucent);
  background: var(--bs-body-bg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.itm-ess-portal .suite-ess-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  color: inherit;
}
.itm-ess-portal .suite-ess-card-top {
  display: block;
  height: 4px;
  background: var(--bs-primary);
}
.itm-ess-portal .suite-ess-card--hrm .suite-ess-card-top { background: linear-gradient(90deg, var(--bs-success), #20c997); }
.itm-ess-portal .suite-ess-card--payroll .suite-ess-card-top { background: linear-gradient(90deg, #e8a317, #cc9a06); }
.itm-ess-portal .suite-ess-card--provident .suite-ess-card-top { background: linear-gradient(90deg, #6f42c1, #9b59b6); }
.itm-ess-portal .suite-ess-card--time .suite-ess-card-top { background: linear-gradient(90deg, var(--bs-info), #0d6efd); }
.itm-ess-portal .suite-ess-card--leave .suite-ess-card-top { background: linear-gradient(90deg, #fd7e14, #ffc107); }
.itm-ess-portal .suite-ess-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.1rem 1.05rem;
}
.itm-ess-portal .suite-ess-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
}
.itm-ess-portal .suite-ess-card--hrm .suite-ess-card-icon {
  background: rgba(var(--bs-success-rgb), 0.12);
  color: var(--bs-success);
}
.itm-ess-portal .suite-ess-card--payroll .suite-ess-card-icon {
  background: rgba(255, 193, 7, 0.2);
  color: #9a6700;
}
.itm-ess-portal .suite-ess-card--provident .suite-ess-card-icon {
  background: rgba(111, 66, 193, 0.12);
  color: #6f42c1;
}
.itm-ess-portal .suite-ess-card--time .suite-ess-card-icon {
  background: rgba(var(--bs-info-rgb), 0.12);
  color: #0aa2c0;
}
.itm-ess-portal .suite-ess-card--leave .suite-ess-card-icon {
  background: rgba(253, 126, 20, 0.14);
  color: #c35a09;
}
.itm-ess-portal .suite-ess-card-label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}
.itm-ess-portal .suite-ess-card-desc {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  line-height: 1.35;
  flex-grow: 1;
}
.itm-ess-portal .suite-ess-card-go {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-top: 0.15rem;
}
.itm-ess-portal .suite-ess-card--hrm .suite-ess-card-go { color: var(--bs-success); }
.itm-ess-portal .suite-ess-card--payroll .suite-ess-card-go { color: #9a6700; }
.itm-ess-portal .suite-ess-card--provident .suite-ess-card-go { color: #6f42c1; }
.itm-ess-portal .suite-ess-card:hover .suite-ess-card-go i {
  transform: translateX(2px);
  transition: transform 0.12s ease;
}

/* In-app ESS (HRM tab, employee shell) */
.itm-ess-user .app-main {
  background: color-mix(in srgb, var(--bs-tertiary-bg) 35%, var(--bs-body-bg));
}
.itm-ess-user #hrm-tab-ess.itm-ess-workspace {
  padding-top: 0.15rem;
}
.itm-ess-user .itm-ess-stat-row {
  margin-bottom: 1rem;
}
.itm-ess-user .itm-ess-stat {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.55rem;
  background: var(--bs-body-bg);
  padding: 0.75rem 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--itm-shadow-card);
}
.itm-ess-user .itm-ess-stat-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.itm-ess-user .itm-ess-stat-icon--training {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}
.itm-ess-user .itm-ess-stat-icon--requests {
  background: rgba(var(--bs-info-rgb), 0.12);
  color: #0aa2c0;
}
.itm-ess-user .itm-ess-stat h4 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}
.itm-ess-user .itm-ess-stat small {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
}

/* Training enrollment status badges (HR + ESS) */
.itm-training-status {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.itm-training-status--registered {
  background-color: #2563eb !important;
  color: #fff !important;
}
.itm-training-status--in-progress {
  background-color: #d97706 !important;
  color: #fff !important;
}
.itm-training-status--completed {
  background-color: #16a34a !important;
  color: #fff !important;
}
.itm-training-status--no-show {
  background-color: #64748b !important;
  color: #fff !important;
}
html[data-bs-theme="dark"] .itm-training-status--registered {
  background-color: #3b82f6 !important;
}
html[data-bs-theme="dark"] .itm-training-status--in-progress {
  background-color: #f59e0b !important;
  color: #1e293b !important;
}
html[data-bs-theme="dark"] .itm-training-status--completed {
  background-color: #22c55e !important;
  color: #052e16 !important;
}

.itm-ess-user .ess-course-card {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.6rem;
  background: var(--bs-body-bg);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--itm-shadow-card);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.itm-ess-user .ess-course-card:hover {
  border-color: color-mix(in srgb, var(--bs-primary) 28%, var(--bs-border-color));
  box-shadow: var(--itm-shadow-card-hover);
  transform: translateY(-1px);
}
.itm-ess-user .ess-course-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.itm-ess-user .ess-course-card-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}
.itm-ess-user .ess-course-card-meta {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.65rem;
}
.itm-ess-user .ess-course-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.itm-ess-user .ess-course-card-actions .btn,
.itm-ess-user #hrmEssTrainingTableWrap .hrm-training-actions .btn {
  padding: 0.18rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1.2;
}
.itm-ess-user .ess-course-open-btn {
  font-weight: 500;
}
.itm-ess-user .ess-request-card {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.55rem;
  background: var(--bs-body-bg);
  padding: 0.9rem 1.05rem;
  margin-bottom: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: var(--itm-shadow-card);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.itm-ess-user .ess-request-card:hover {
  border-color: color-mix(in srgb, var(--bs-info) 30%, var(--bs-border-color));
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.itm-ess-user .ess-request-card-subject {
  font-weight: 600;
  font-size: 0.9rem;
}
.itm-ess-user .ess-request-card-kind {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
.itm-ess-user #hrmEssTrainingTableWrap.d-none + .ess-course-list,
.itm-ess-user .ess-course-list:empty {
  display: none;
}
html[data-bs-theme="dark"] .itm-ess-portal .suite-ess-card {
  background: var(--bs-body-bg);
}

/* ─── Polished data tables (HRM contact directory, users, etc.) ─── */
.itm-data-table {
  font-size: 0.875rem;
  margin-bottom: 0;
}
.itm-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, var(--bs-body-bg));
  border-bottom: 1px solid var(--bs-border-color-translucent);
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}
.itm-data-table tbody td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  border-color: var(--bs-border-color-translucent);
}
.itm-data-table tbody tr {
  transition: background-color 0.12s ease;
}
.itm-data-table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-primary) 5%, var(--bs-body-bg));
}
.itm-data-table tbody tr:last-child td {
  border-bottom: 0;
}
.itm-empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem !important;
  color: var(--bs-secondary-color);
}
.itm-empty-state .bi {
  display: block;
  font-size: 2.25rem;
  opacity: 0.35;
  margin: 0 auto 0.65rem;
}
.itm-empty-state p {
  margin: 0;
  font-size: 0.9rem;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.itm-empty-state--loading .spinner-border {
  margin-bottom: 0.65rem;
}

/* ─── HRM contact directory ─── */
.itm-contact-directory .itm-contact-directory-toolbar .card-body {
  padding: 1rem 1.15rem;
}
.itm-contact-directory .itm-contact-search-wrap {
  max-width: none;
  min-width: min(100%, 16rem);
}
.itm-contact-directory .itm-contact-search {
  border-radius: 2rem;
  padding: 0.6rem 1rem 0.6rem 2.65rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.itm-contact-directory .itm-contact-search:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
}
.itm-contact-directory .itm-contact-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  pointer-events: none;
  font-size: 1rem;
}
.itm-contact-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--bs-info) 12%, var(--bs-body-bg));
  color: color-mix(in srgb, var(--bs-info) 85%, var(--bs-body-color));
  border: 1px solid color-mix(in srgb, var(--bs-info) 22%, transparent);
}
.itm-contact-directory-panel {
  border-radius: 0.65rem;
  overflow: hidden;
}
.itm-contact-table-scroll {
  max-height: min(70vh, 42rem);
  overflow: auto;
}
.itm-contact-directory .itm-contact-table .hrm-photo-cell {
  width: 3.25rem;
  padding-left: 1rem;
}
.itm-contact-directory .itm-contact-table .hrm-photo-wrap {
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  border: 2px solid var(--bs-body-bg);
  outline: 1px solid var(--bs-border-color-translucent);
}
.itm-contact-directory .itm-contact-name-cell {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bs-emphasis-color);
}
.itm-contact-dept-pill {
  display: inline-block;
  max-width: 14rem;
  padding: 0.2rem 0.55rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg));
  color: var(--bs-primary);
  border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.itm-contact-dept-pill--muted {
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  border-color: var(--bs-border-color-translucent);
  font-weight: 400;
}
.itm-contact-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.8125rem;
  text-decoration: none;
  border: 1px solid var(--bs-border-color-translucent);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  max-width: 100%;
}
.itm-contact-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itm-contact-action .bi {
  flex-shrink: 0;
  opacity: 0.75;
}
.itm-contact-action--phone:hover {
  background: color-mix(in srgb, var(--bs-success) 10%, var(--bs-body-bg));
  border-color: color-mix(in srgb, var(--bs-success) 35%, transparent);
  color: var(--bs-success);
}
.itm-contact-action--email:hover {
  background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg));
  border-color: color-mix(in srgb, var(--bs-primary) 35%, transparent);
  color: var(--bs-primary);
}
.itm-contact-muted {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  font-style: italic;
}
.itm-ess-user .itm-contact-directory .itm-contact-directory-panel {
  box-shadow: var(--itm-shadow-card);
}

/* ─── User management page ─── */
.itm-users-page .itm-module-hero .card-body {
  padding: 1.1rem 1.35rem;
}
.itm-users-page .itm-users-panel {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.65rem;
  overflow: hidden;
  box-shadow: var(--itm-shadow-card);
}
.itm-users-page .itm-users-panel > .card-header {
  padding: 0.85rem 1.15rem;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 65%, var(--bs-body-bg));
  border-bottom: 1px solid var(--bs-border-color-translucent);
}
.itm-users-page .itm-users-panel .card-title {
  font-size: 1rem;
  font-weight: 700;
}
.itm-users-page .create-form-panel {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bs-primary) 6%, var(--bs-body-bg)) 0%,
    transparent 100%
  );
  border: 1px dashed color-mix(in srgb, var(--bs-primary) 22%, var(--bs-border-color));
  border-radius: 0.55rem;
}
.itm-users-page .user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.itm-users-page .user-avatar.inactive {
  opacity: 0.55;
  filter: grayscale(0.45);
  box-shadow: none;
}
.itm-users-page .role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.itm-users-page .role-badge.role-super_admin {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
}
.itm-users-page .role-badge.role-admin {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #fff;
}
.itm-users-page .role-badge.role-department_manager {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}
.itm-users-page .role-badge.role-hr_auditor {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
}
.itm-users-page .role-badge.role-finance {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
}
.itm-users-page .role-badge.role-employee {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
}
.itm-users-page .users-table .user-cell {
  min-width: 200px;
}
.itm-users-page .users-table .user-cell .fw-medium {
  font-size: 0.9rem;
}
.itm-users-page .empty-state .bi {
  font-size: 3rem;
  opacity: 0.28;
}

/* ─── Login pages (AdminLTE login-box) ─── */
.itm-login-shell {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem 1.75rem;
  background: linear-gradient(165deg,
    color-mix(in srgb, var(--bs-primary) 18%, var(--bs-body-bg)) 0%,
    var(--bs-body-bg) 42%,
    color-mix(in srgb, var(--bs-info) 12%, var(--bs-body-bg)) 100%);
}
html[data-bs-theme="dark"] .itm-login-shell {
  background: linear-gradient(165deg,
    color-mix(in srgb, var(--bs-primary) 22%, #0f172a) 0%,
    var(--bs-body-bg) 50%,
    #020617 100%);
}

.itm-login-shell .login-box {
  width: min(420px, 100%);
}

.itm-login-shell .login-logo a {
  display: block;
  text-align: center;
}

.itm-login-shell .card {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: var(--itm-radius);
  box-shadow: var(--itm-shadow-card-hover);
  backdrop-filter: blur(8px);
}
html[data-bs-theme="dark"] .itm-login-shell .card {
  background: rgba(var(--bs-body-bg-rgb, 33, 37, 41), 0.85);
}

.itm-login-shell .input-group:focus-within .input-group-text {
  border-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.55);
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06);
}

.itm-login-shell .btn-primary {
  border-radius: var(--itm-radius-sm);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
}

.itm-login-shell .form-control {
  border-radius: var(--itm-radius-sm);
}

/* ─── Module disabled page ─── */
.itm-module-off {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, var(--bs-secondary-bg) 100%);
}

/* ─── Legacy base.html ─── */
.itm-legacy-shell {
  font-family: var(--itm-font);
  -webkit-font-smoothing: antialiased;
}

/* ─── Shared confirm modal (replaces window.confirm) ─── */
.itm-confirm-modal {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.14), 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}
.itm-confirm-modal .modal-header .modal-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.itm-confirm-header {
  padding: 1.1rem 1.25rem 0.35rem;
}
.itm-confirm-header--danger { background: linear-gradient(180deg, rgba(220, 53, 69, 0.08) 0%, transparent 100%); }
.itm-confirm-header--warning { background: linear-gradient(180deg, rgba(255, 193, 7, 0.12) 0%, transparent 100%); }
.itm-confirm-header--primary { background: linear-gradient(180deg, rgba(13, 110, 253, 0.08) 0%, transparent 100%); }
.itm-confirm-header--success { background: linear-gradient(180deg, rgba(25, 135, 84, 0.1) 0%, transparent 100%); }
.itm-confirm-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.itm-confirm-icon-wrap--danger { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.itm-confirm-icon-wrap--warning { background: rgba(255, 193, 7, 0.2); color: #b58100; }
.itm-confirm-icon-wrap--primary { background: rgba(13, 110, 253, 0.12); color: var(--bs-primary); }
.itm-confirm-icon-wrap--success { background: rgba(25, 135, 84, 0.14); color: var(--bs-success); }
.itm-confirm-message {
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--bs-body-color);
  font-size: 0.9375rem;
  padding-top: 0.15rem;
}
.itm-confirm-modal .modal-footer {
  padding: 0.5rem 1.25rem 1.15rem;
}
.itm-confirm-modal .modal-footer .btn-light {
  background: var(--bs-body-bg);
}
#itmConfirmModal .modal-backdrop.show {
  opacity: 0.45;
}

/* ─── Toast notifications (fixed, no scroll to top) ─── */
.itm-toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1095;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2.5rem));
  pointer-events: none;
}
.itm-toast-stack .toast {
  pointer-events: auto;
  box-shadow: var(--itm-shadow-dropdown);
}
@media (max-width: 575.98px) {
  .itm-toast-stack {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* Searchable employee picker (name + EMS) */
.employee-select-wrapper { position: relative; }
.employee-select-wrapper .form-control.employee-select-input { padding-right: 2rem; cursor: text; }
.employee-select-wrapper .employee-select-caret {
  position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--bs-secondary-color); font-size: 0.75rem;
}
.employee-select-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
  margin-top: 0.15rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); max-height: 240px; overflow: hidden;
}
.employee-select-dropdown.open { display: block; }
.employee-select-search {
  width: 100%; padding: 0.4rem 0.75rem; border: none; border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg); outline: none;
}
.employee-select-search:focus { border-bottom-color: var(--bs-primary); }
.employee-select-wrapper .form-control.employee-select-display { cursor: pointer; background-color: var(--bs-body-bg); }
.employee-select-wrapper:has(.employee-select-dropdown.open) { z-index: 1060; }
.employee-select-list { max-height: 200px; overflow-y: auto; }
.employee-select-option { padding: 0.4rem 0.75rem; cursor: pointer; line-height: 1.35; }
.employee-select-option:hover,
.employee-select-option.active { background: var(--bs-primary); color: white; }
.employee-select-option .emp-ems { opacity: 0.85; font-size: 0.875em; }
.employee-select-empty { padding: 0.5rem 0.75rem; color: var(--bs-secondary-color); font-size: 0.875rem; }

/* ─── In-app documentation (help center) ─── */
.itm-help-hub-header {
  padding-bottom: 0.25rem;
}
.itm-help-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: inherit;
  border-color: var(--bs-border-color-translucent) !important;
}
.itm-help-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--itm-shadow-card-hover) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
}
.itm-help-card:hover .itm-help-card-title {
  color: var(--bs-primary);
}
.itm-help-card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 1.35rem;
  flex-shrink: 0;
}
.itm-help-card-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-body-color);
  margin: 0;
}
.itm-help-card-desc {
  display: block;
  line-height: 1.55;
  margin: 0;
}
.itm-help-card-lang {
  border-top: 1px solid var(--bs-border-color-translucent);
  line-height: 1.45;
}
.itm-doc-toc .toc {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.itm-doc-toc .toc ul {
  padding-left: 1rem;
  list-style: none;
}
.itm-doc-toc .toc a {
  display: block;
  padding: 0.2rem 0;
  color: var(--bs-secondary-color);
  text-decoration: none;
  line-height: 1.35;
}
.itm-doc-toc .toc a:hover,
.itm-doc-toc .toc a:focus {
  color: var(--bs-primary);
}
.itm-doc-content {
  line-height: 1.65;
  font-size: 0.9375rem;
  max-width: 52rem;
}
.itm-doc-content h1, .itm-doc-content h2, .itm-doc-content h3, .itm-doc-content h4 {
  scroll-margin-top: 5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.itm-doc-content h1 { font-size: 1.65rem; }
.itm-doc-content h2 { font-size: 1.35rem; border-bottom: 1px solid var(--bs-border-color); padding-bottom: 0.35rem; }
.itm-doc-content h3 { font-size: 1.15rem; }
.itm-doc-content table {
  width: 100%;
  margin: 1rem 0;
  font-size: 0.875rem;
}
.itm-doc-content table th,
.itm-doc-content table td {
  border: 1px solid var(--bs-border-color);
  padding: 0.45rem 0.65rem;
  vertical-align: top;
}
.itm-doc-content table th {
  background: var(--bs-tertiary-bg);
}
.itm-doc-content pre {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.8125rem;
}
.itm-doc-content code {
  font-size: 0.875em;
  color: var(--bs-danger);
}
.itm-doc-content pre code { color: inherit; }
.itm-doc-content a { text-decoration: underline; text-underline-offset: 2px; }
.itm-doc-content blockquote {
  border-left: 3px solid var(--bs-primary);
  padding-left: 1rem;
  color: var(--bs-secondary-color);
  margin: 1rem 0;
}
.itm-doc-content img { max-width: 100%; height: auto; }
