/* App layout � Bootstrap 5 extensions */
:root {
  /* Same horizontal inset as Bootstrap px-3 / px-md-4 � shared by topbar + scroll area */
  --app-inline-padding: 1rem;
  /* Inset from main column edges for wide panes (hero, rows, list cards, toolbars) */
  --app-wide-edge-gap: 0.625rem;
  --sidebar-width: 272px;
  --mobile-nav-width: 17rem;
  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(15, 23, 42, 0.07);
  --sidebar-shadow: 0 8px 32px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --sidebar-link: #64748b;
  --sidebar-link-hover-bg: rgba(15, 23, 42, 0.04);
  --sidebar-accent-gradient: linear-gradient(90deg, #2563eb, #7c3aed, #0891b2);
  --sidebar-active-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
  --sidebar-active-color: #1d4ed8;
  --sidebar-icon-bg: rgba(15, 23, 42, 0.06);
  --sidebar-icon-active-bg: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
}

/* Logged-in shell: viewport locked, sidebar + main scroll independently */
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.app-layout {
  height: 100%;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Add user modal: fixed shell height so the iframe fills space; scroll only inside the iframe document. */
#modalAddUser .modal-dialog {
  max-height: calc(100vh - 2rem);
}
#modalAddUser .modal-content {
  height: min(90vh, 920px);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}
#modalAddUser .modal-add-user-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
#modalAddUser iframe.modal-add-user-iframe {
  height: 100%;
  min-height: 0;
  vertical-align: top;
}

/* Embedded create-user document (loaded inside iframe) */
html:has(body.user-embed-body) {
  height: auto;
}
.user-embed-body {
  margin: 0;
  min-height: 0;
}

/* Add user: compact two-column form */
.user-create-card {
  max-width: 32rem;
}
@media (min-width: 768px) {
  .user-create-card {
    max-width: 36rem;
  }
}

@supports (height: 100dvh) {
  .app-layout {
    min-height: 100dvh;
    max-height: 100dvh;
  }
}

.app-layout .app-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  max-height: 100%;
}

@media (min-width: 768px) {
  :root {
    --app-inline-padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --app-inline-padding: 0.3rem;
    --app-wide-edge-gap: 0.3rem;
    --app-surface-padding-x: 1rem;
  }

  .dashboard-stat-card:not(.dashboard-stat-card--home) .stat-label,
  .dashboard-stat-card:not(.dashboard-stat-card--home) .stat-value,
  .dashboard-stat-card:not(.dashboard-stat-card--home) .stat-progress-hint {
    font-size: 1rem;
    line-height: 1;
  }

  .dashboard-stat-card:not(.dashboard-stat-card--home) .stat-label,
  .dashboard-stat-card:not(.dashboard-stat-card--home) .stat-progress-hint {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 992px) {
  .app-layout .app-wrapper {
    padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  }
}

/* �� Auth pages (login, forgot password, reset) �� */
.auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background-color: #0f172a;
  background-image:
    radial-gradient(ellipse 100% 70% at 15% 10%, rgba(59, 130, 246, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 95% 85%, rgba(124, 58, 237, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(13, 148, 136, 0.18) 0%, transparent 45%),
    linear-gradient(165deg, #0f172a 0%, #1e293b 38%, #0c4a6e 72%, #134e4a 100%);
  background-attachment: fixed;
}

.auth-layout {
  width: 100%;
  max-width: 440px;
}

.auth-panel {
  position: relative;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 32px 64px -16px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.auth-panel-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #0891b8);
  flex-shrink: 0;
}

.auth-panel-body {
  padding: 1.75rem 1.5rem 1.5rem;
}

@media (min-width: 576px) {
  .auth-panel-body {
    padding: 2.25rem 2rem 1.75rem;
  }
}

.auth-brand-mark {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.125rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: #1d4ed8;
  background: linear-gradient(145deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

.auth-app-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.auth-company-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e293b;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.auth-form .form-floating > .form-control {
  min-height: calc(3.25rem + 2px);
  border-radius: 0.7rem;
  border-color: #e2e8f0;
  padding-top: 1.1rem;
}

.auth-form .form-floating > label {
  color: #64748b;
  padding-left: 0.95rem;
}

.auth-form .form-floating > .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.auth-form .form-floating > .form-control:focus ~ label {
  color: #3b82f6;
}

.auth-btn-submit {
  border-radius: 0.7rem;
  padding: 0.8rem 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

.auth-panel-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.auth-panel-footer a {
  color: #475569;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}

.auth-panel-footer a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Login only: white page � centered block, two columns: Tasks & Expenses | Sign in */
.auth-body.auth-page-login {
  background: #ffffff;
  background-image: none;
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.auth-page-login .auth-layout-split {
  width: min(100%, 940px);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.auth-login-wrap {
  width: 100%;
}

.auth-login-col-intro {
  text-align: center;
}

.auth-login-col-form .auth-panel {
  max-width: 420px;
}

.auth-intro-inner {
  width: 100%;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .auth-login-col-intro {
    text-align: left;
  }

  .auth-intro-inner {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }
}

.auth-intro-stack {
  width: 100%;
}

.auth-intro-eyebrow {
  color: #64748b;
  letter-spacing: 0.1em;
}

.auth-intro-title {
  font-size: clamp(1.5rem, 2.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.auth-intro-lead {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .auth-intro-lead {
    margin-left: 0;
    margin-right: 0;
  }
}

.auth-intro-card {
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.auth-intro-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Login sign-in card � modern surface, fields, CTA */
.auth-page-login .auth-panel.auth-panel--signin {
  border: none;
  border-radius: 1.5rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 50px -12px rgba(15, 23, 42, 0.14);
}

.auth-page-login .auth-panel--signin .auth-panel-accent {
  height: 3px;
}

.auth-page-login .auth-panel--signin .auth-panel-body {
  padding: 1.875rem 1.5rem 1.625rem;
}

@media (min-width: 576px) {
  .auth-page-login .auth-panel--signin .auth-panel-body {
    padding: 2.25rem 2rem 1.875rem;
  }
}

.auth-brand-logo-img {
  max-height: 3.25rem;
  max-width: min(100%, 220px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.settings-brand-preview {
  max-height: 56px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
}

.settings-brand-preview--favicon {
  max-height: 40px;
  max-width: 40px;
}

.auth-page-login .auth-signin-header .auth-brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  border-radius: 0.875rem;
  box-shadow: none;
  background: linear-gradient(145deg, #eff6ff 0%, #f5f3ff 100%);
  border: none;
}

.auth-page-login .auth-signin-header .auth-app-title {
  font-size: 1.5rem;
}

.auth-page-login .auth-signin-header .auth-company-name {
  font-size: 1.35rem;
}

.auth-page-login .auth-form--modern .form-floating > .form-control {
  min-height: calc(3.35rem + 2px);
  border-radius: 0.875rem;
  border: 1.5px solid #e2e8f0;
  background-color: #f8fafc;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page-login .auth-form--modern .form-floating > .form-control:hover {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

.auth-page-login .auth-form--modern .form-floating > .form-control:focus {
  border-color: #3b82f6;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.auth-page-login .auth-form--modern .form-floating > label {
  padding-left: 1rem;
  color: #64748b;
}

.auth-page-login .auth-form--modern .form-floating > .form-control:focus ~ label {
  color: #2563eb;
}

.auth-page-login .auth-btn-submit--gradient {
  margin-top: 0.25rem;
  border-radius: 9999px;
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #6366f1 100%);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-page-login .auth-btn-submit--gradient:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.4);
}

.auth-page-login .auth-btn-submit--gradient:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.auth-page-login .auth-btn-submit--gradient:focus-visible {
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.35),
    0 8px 22px rgba(79, 70, 229, 0.32);
}

.auth-page-login .auth-panel--signin .auth-panel-footer {
  border-top: none;
  margin-top: 1.75rem;
  padding-top: 0;
}

.auth-page-login .auth-panel--signin .auth-panel-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-page-login .auth-panel--signin .auth-panel-footer a:hover {
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
}

/* Legacy card wrapper (forgot / reset) � match elevated look */
.auth-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 32px 64px -16px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.auth-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #0891b8);
}

.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  flex-shrink: 0;
  align-self: stretch;
  min-height: 0;
  max-height: 100%;
  height: auto;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--sidebar-border);
  border-radius: 1.125rem;
  box-shadow: var(--sidebar-shadow);
}

.sidebar-accent,
.mobile-nav-accent {
  flex-shrink: 0;
  height: 4px;
  background: var(--sidebar-accent-gradient);
}

.sidebar-accent {
  border-radius: 1.125rem 1.125rem 0 0;
}

.sidebar-user {
  flex-shrink: 0;
}

.sidebar-user-card {
  margin: 0.75rem 0.75rem 0.5rem;
  padding: 0.85rem !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  border-radius: 0.875rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07) 0%, rgba(124, 58, 237, 0.04) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 12px rgba(15, 23, 42, 0.06);
}

.sidebar-user-card .sidebar-user-name {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.sidebar-user-card .user-avatar-wrap,
.sidebar-user-card .user-avatar-placeholder {
  margin-left: 0;
  margin-right: 0;
  flex-shrink: 0;
}

.sidebar-nav-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.sidebar-section-label {
  margin: 0.85rem 0.65rem 0.35rem;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.mobile-nav-divider,
.sidebar-nav-divider {
  position: relative;
  height: 0;
  margin: 0.5rem 0.65rem;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  opacity: 1;
}

/* Small vertical stub from section line down toward the group below */
.mobile-nav-divider::after,
.sidebar-nav-divider::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  bottom: -0.4rem;
  width: 2px;
  height: 0.4rem;
  background: rgba(99, 102, 241, 0.28);
  border-radius: 1px;
}

.mobile-nav-divider + .mobile-reports-group,
.sidebar-nav-divider + .sidebar-reports-group {
  position: relative;
  margin-top: 0.35rem;
}

/* Vertical stub from expanded group header into sub-list */
#mobileNav .mobile-reports-group > button.nav-link[aria-expanded="true"]::after,
.sidebar-reports-group > .sidebar-reports-toggle[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  left: 1.65rem;
  bottom: -0.3rem;
  width: 2px;
  height: 0.3rem;
  background: rgba(99, 102, 241, 0.28);
  border-radius: 1px;
  z-index: 1;
}

.sidebar .nav-link,
.sidebar-reports-toggle,
#mobileNav .nav-link {
  position: relative;
  color: var(--sidebar-link);
  padding: 0.5rem 0.65rem;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sidebar .nav-link:hover,
.sidebar-reports-toggle:hover,
#mobileNav .nav-link:hover {
  color: #0f172a;
  background: var(--sidebar-link-hover-bg);
}

.sidebar-reports-group {
  margin-bottom: 0.125rem;
}

.sidebar-reports-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-reports-chevron,
.mobile-nav-chevron {
  transition: transform 0.22s ease;
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4375rem;
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.6875rem;
  opacity: 1;
}

.sidebar-reports-toggle[aria-expanded="true"] .sidebar-reports-chevron,
#mobileNav button.nav-link[aria-expanded="true"] .mobile-nav-chevron {
  transform: rotate(180deg);
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.sidebar-reports-sub {
  position: relative;
  padding-left: 0.35rem;
  margin: 0.15rem 0 0.25rem 0.85rem;
  border-left: 2px solid rgba(99, 102, 241, 0.22);
}

.sidebar-reports-sub-link {
  font-size: 0.8125rem;
  padding: 0.38rem 0.55rem 0.38rem 0.45rem;
}

.sidebar .nav-link.active,
.sidebar-reports-toggle.active,
#mobileNav .nav-link.active {
  color: var(--sidebar-active-color);
  background: var(--sidebar-active-bg);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.sidebar .nav-link.active::before,
#mobileNav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.15rem;
  border-radius: 0 4px 4px 0;
  background: var(--sidebar-accent-gradient);
}

.sidebar .nav-link i.me-2,
#mobileNav .nav-link i.me-2,
.sidebar-reports-toggle i.me-2 {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  margin-right: 0.65rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5625rem;
  background: var(--sidebar-icon-bg);
  color: #475569;
  font-size: 0.8125rem;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar .nav-link:hover i.me-2,
#mobileNav .nav-link:hover i.me-2,
.sidebar-reports-toggle:hover i.me-2 {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.sidebar .nav-link.active i.me-2,
.sidebar-reports-toggle.active i.me-2,
#mobileNav .nav-link.active i.me-2 {
  background: var(--sidebar-icon-active-bg);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.sidebar-logout-btn,
.mobile-nav-logout-btn {
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #dc2626 !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-logout-btn:hover,
.mobile-nav-logout-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

.sidebar-logout-btn i,
.mobile-nav-logout-btn i {
  opacity: 0.92;
}

.main-content {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.main-content > .topbar {
  flex-shrink: 0;
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pill badges � pastel fill, hue-matched border, dark text (same family as reference UI) */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.15;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pill.text-uppercase {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* Expense workflow */
.status-expense-pending {
  background: #fef9c3;
  color: #713f12;
  border-color: #fde047;
}

.status-expense-approved {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}

.status-expense-partial {
  background: #e0e7ff;
  color: #312e81;
  border-color: #a5b4fc;
}

.status-expense-paid {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.status-expense-rejected {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.status-expense-default {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* Task workflow */
.status-task-pending {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}

.status-task-in-progress {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.status-task-completed {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
}

.status-task-backlog {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.status-task-default {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* Task priority */
.priority-low {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.priority-medium {
  background: #cffafe;
  color: #0e7490;
  border-color: #67e8f9;
}

.priority-high {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fb923c;
}

.priority-urgent {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #f87171;
}

/* User role */
.role-admin {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.role-manager {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #5eead4;
}

.role-staff {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

/* Leave workflow */
.status-leave-approved {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.status-leave-pending {
  background: #fef9c3;
  color: #713f12;
  border-color: #fde047;
}

.status-leave-rejected {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.status-leave-cancelled {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.status-leave-recalled {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}

.status-leave-default {
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
}

.role-custom {
  background: #f5f3ff;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.topbar {
  z-index: 100;
}

.topbar-title {
  min-width: 0;
}

/* Header date/time pill (calendar + full date + time) */
.topbar-datetime-pill {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.topbar-datetime-pill__icon {
  color: #0d6efd;
  font-size: 1.05rem;
}

.topbar-datetime-pill__text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  white-space: nowrap;
}

/* Primary page scroll (flashes + view content) */
.content-area {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-left: max(var(--app-inline-padding), env(safe-area-inset-left, 0px));
  padding-right: max(var(--app-inline-padding), env(safe-area-inset-right, 0px));
  padding-top: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .content-area {
    padding-top: 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }
}

.topbar-shell {
  padding-left: max(var(--app-inline-padding), env(safe-area-inset-left, 0px));
  padding-right: max(var(--app-inline-padding), env(safe-area-inset-right, 0px));
}

/*
 * Wide surfaces: break out of .content-area horizontal padding with a small outer inset
 * (same rhythm as .dashboard-hero). Scoped to direct children so nested grid cards stay put.
 */
.content-area > .row,
.content-area > .dashboard-table-wrap,
.content-area > .expense-create-page,
.content-area > .expense-view-page,
.content-area > .card:not([style*="max-width"]),
.content-area > .app-page-toolbar,
.content-area > div.d-flex.align-items-center.mb-3,
.content-area > section:not(.dashboard-hero) {
  margin-left: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
  margin-right: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
  width: calc(100% + 2 * var(--app-inline-padding) - 2 * var(--app-wide-edge-gap));
  max-width: none;
  box-sizing: border-box;
}

.content-area > .card:not([style*="max-width"]),
.content-area > .dashboard-table-wrap {
  border-radius: 1rem;
  overflow: hidden;
}

.content-area > section:not(.dashboard-hero) {
  padding-left: calc(var(--app-inline-padding) - var(--app-wide-edge-gap));
  padding-right: calc(var(--app-inline-padding) - var(--app-wide-edge-gap));
}

/* Phones & small tablets � compact 0.3rem horizontal gutter app-wide */
@media (max-width: 767.98px) {
  .auth-body {
    padding-left: max(var(--app-inline-padding), env(safe-area-inset-left, 0px));
    padding-right: max(var(--app-inline-padding), env(safe-area-inset-right, 0px));
  }

  .content-area .card-body,
  .content-area .dashboard-panel > .card-body {
    padding-left: max(var(--app-surface-padding-x), env(safe-area-inset-left, 0px)) !important;
    padding-right: max(var(--app-surface-padding-x), env(safe-area-inset-right, 0px)) !important;
  }

  .content-area .dashboard-table-wrap > .border-bottom,
  .content-area .dashboard-table-wrap > .border-top,
  .content-area .app-table-scroll-modern > .border-bottom,
  .content-area .app-table-scroll-modern > .border-top {
    padding-left: var(--app-surface-padding-x) !important;
    padding-right: var(--app-surface-padding-x) !important;
  }

  .content-area .app-data-table .ps-4,
  .content-area .app-data-table thead .ps-4,
  .content-area .app-data-table th.ps-4 {
    padding-left: var(--app-surface-padding-x) !important;
  }

  .content-area .app-data-table .pe-4,
  .content-area .app-data-table thead .pe-4,
  .content-area .app-data-table th.pe-4 {
    padding-right: var(--app-surface-padding-x) !important;
  }

  .content-area .list-group-item.px-4 {
    padding-left: var(--app-surface-padding-x) !important;
    padding-right: var(--app-surface-padding-x) !important;
  }

  .hr-employee-form-section,
  .hr-employee-form-section--wide,
  .hr-employee-form-aside,
  .hr-facility-form-section {
    padding-left: var(--app-surface-padding-x);
    padding-right: var(--app-surface-padding-x);
  }

  .dashboard-hero .overflow-x-auto {
    overflow-x: visible;
  }

  .dashboard-hero p.text-nowrap {
    white-space: normal;
  }
}

/* Narrow form cards stay readable, centered in the padded column */
.content-area > .card[style*="max-width"] {
  margin-left: auto;
  margin-right: auto;
}

.sidebar .nav,
.sidebar-reports-sub,
#mobileNav .nav {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
}

.sidebar .nav-link,
.sidebar-reports-toggle,
#mobileNav .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.sidebar .nav-link i.me-2,
#mobileNav .nav-link i.me-2,
.sidebar-reports-toggle i.me-2 {
  flex-shrink: 0;
}

@media (max-width: 1199.98px) {
  .sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .app-wrapper > .main-content {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .main-content > .topbar {
    position: sticky;
    top: 0;
    z-index: 1045;
    background: #fff;
  }

  /* Keep the hamburger above the open drawer so show/hide always works on mobile */
  .topbar-shell .mobile-menu-toggle-btn,
  .topbar-shell .btn[data-bs-target="#mobileNav"] {
    position: relative;
    z-index: 1061;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.18) !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  }

  .topbar-shell .mobile-menu-toggle-btn i,
  .topbar-shell .btn[data-bs-target="#mobileNav"] i {
    font-size: 1.125rem;
  }

  .topbar-shell .mobile-menu-toggle-btn:hover,
  .topbar-shell .btn[data-bs-target="#mobileNav"]:hover {
    background: #e2e8f0 !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    color: #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
  }
}

/* �� Dashboard �� */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  /* Wide band like the topbar, inset by --app-wide-edge-gap on each side */
  margin-left: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
  margin-right: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
  width: calc(100% + 2 * var(--app-inline-padding) - 2 * var(--app-wide-edge-gap));
  max-width: none;
  padding-left: max(1rem, calc(var(--app-inline-padding) - var(--app-wide-edge-gap)));
  padding-right: max(1rem, calc(var(--app-inline-padding) - var(--app-wide-edge-gap)));
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 45%, #eef2ff 100%);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-hero h2 {
  letter-spacing: -0.02em;
}

.dashboard-hero-actions > [class*="col-"] {
  display: flex;
}

.dashboard-hero-action {
  --dha-bg: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  --dha-border: rgba(15, 23, 42, 0.1);
  --dha-text: #0f172a;
  --dha-icon-bg: rgba(15, 23, 42, 0.06);
  --dha-icon-color: #334155;
  --dha-count-bg: #0f172a;
  --dha-count-text: #fff;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  height: 100%;
  padding: 0.375rem 0.7rem 0.375rem 0.5rem;
  border: 1px solid var(--dha-border);
  border-radius: 0.85rem;
  background: var(--dha-bg);
  color: var(--dha-text);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

button.dashboard-hero-action {
  appearance: none;
  text-align: left;
}

.dashboard-hero-action:hover {
  color: var(--dha-text);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.dashboard-hero-action__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.625rem;
  background: var(--dha-icon-bg);
  color: var(--dha-icon-color);
  font-size: 0.8125rem;
}

.dashboard-hero-action__label {
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: -0.01em;
}

.dashboard-hero-action__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--dha-count-bg);
  color: var(--dha-count-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.dashboard-hero-action--expense {
  --dha-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  --dha-border: rgba(37, 99, 235, 0.22);
  --dha-text: #1e3a8a;
  --dha-icon-bg: rgba(37, 99, 235, 0.14);
  --dha-icon-color: #2563eb;
}

.dashboard-hero-action--task {
  --dha-bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --dha-border: rgba(100, 116, 139, 0.22);
  --dha-text: #334155;
  --dha-icon-bg: rgba(100, 116, 139, 0.12);
  --dha-icon-color: #475569;
}

.dashboard-hero-action--field-calm {
  --dha-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  --dha-border: rgba(217, 119, 6, 0.22);
  --dha-text: #92400e;
  --dha-icon-bg: rgba(245, 158, 11, 0.16);
  --dha-icon-color: #b45309;
  --dha-count-bg: #0f172a;
  --dha-count-text: #fcd34d;
}

.dashboard-hero-action--field-urgent {
  --dha-bg: linear-gradient(135deg, #fef2f2 0%, #fee2e2 52%, #fecaca 100%);
  --dha-border: rgba(220, 38, 38, 0.28);
  --dha-text: #991b1b;
  --dha-icon-bg: rgba(239, 68, 68, 0.16);
  --dha-icon-color: #dc2626;
  --dha-count-bg: #fff;
  --dha-count-text: #dc2626;
}

.dashboard-hero-action__live {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: dashboard-hero-action-live 1.6s ease-out infinite;
}

.dashboard-hero-action--alert::before,
.dashboard-hero-action--alert::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.dashboard-hero-action--alert::before {
  border: 2px solid rgba(239, 68, 68, 0.45);
  animation: dashboard-hero-action-ring-a 2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.dashboard-hero-action--alert::after {
  inset: -3px;
  border: 2px solid rgba(248, 113, 113, 0.35);
  animation: dashboard-hero-action-ring-b 2s cubic-bezier(0.22, 1, 0.36, 1) infinite 0.55s;
}

.dashboard-hero-action--alert {
  animation: dashboard-hero-action-glow 2s ease-in-out infinite;
}

@keyframes dashboard-hero-action-glow {
  0%,
  100% {
    box-shadow:
      0 4px 14px rgba(220, 38, 38, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.65);
  }
  50% {
    box-shadow:
      0 10px 28px rgba(220, 38, 38, 0.22),
      0 0 0 1px rgba(239, 68, 68, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }
}

@keyframes dashboard-hero-action-ring-a {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes dashboard-hero-action-ring-b {
  0% {
    opacity: 0.65;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes dashboard-hero-action-live {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.45rem rgba(239, 68, 68, 0);
  }
}

@media (min-width: 992px) {
  .dashboard-hero-action {
    width: auto;
    min-width: 11.5rem;
  }

  .dashboard-hero-action--field-calm,
  .dashboard-hero-action--field-urgent {
    min-width: 13.5rem;
  }
}

@media (max-width: 575.98px) {
  .dashboard-hero-action {
    min-height: 2.375rem;
    padding-right: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-hero-action--alert,
  .dashboard-hero-action--alert::before,
  .dashboard-hero-action--alert::after,
  .dashboard-hero-action__live {
    animation: none;
  }

  .dashboard-hero-action--alert {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35) !important;
  }

  .dashboard-hero-action--alert::before {
    opacity: 0.55;
  }
}

.dashboard-stat-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none;
  transition: border-color 0.2s ease;
  overflow: hidden;
}

.dashboard-stat-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

.dashboard-stat-card--link {
  cursor: pointer;
  display: block;
}

.dashboard-stat-card--link:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

/* Filter / KPI tile selected state (expenses & tasks index) */
.dashboard-stat-card.is-active {
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.dashboard-stat-card .stat-accent {
  display: none;
}

.dashboard-stat-card .stat-value {
  font-size: 1.0125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 1200px) {
  .dashboard-stat-card .stat-value {
    font-size: 1.125rem;
  }
}

.dashboard-stat-card .stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dashboard-stat-card .stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.825rem;
  flex-shrink: 0;
}

.dashboard-stat-card > .card-body > .d-flex {
  align-items: center;
}

.dashboard-stat-card .stat-progress {
  height: 4.5px;
  background: rgba(15, 23, 42, 0.08);
}

.dashboard-stat-card .stat-progress-hint {
  font-size: 0.625rem;
  line-height: 1.25;
}

/* �� Home dashboard stat tiles (flat color, compact) �� */
.dashboard-home-stats .dashboard-stat-card--home {
  --stat-accent: #64748b;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.75rem;
  background: #fff;
}

.dashboard-home-stats .dashboard-stat-card--home:hover {
  border-color: #cbd5e1 !important;
}

.dashboard-home-stats .dashboard-stat-card--home > .card-body {
  padding: 0.75rem 0.85rem 0.85rem !important;
}

.dashboard-home-stats .dashboard-stat-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  margin-bottom: 0.35rem;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.25;
  white-space: normal;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.dashboard-home-stats .stat-icon--sms {
  background: #ede9fe;
  color: #7c3aed;
}

.dashboard-home-stats .stat-icon--sms-ok {
  background: #d1fae5;
  color: #059669;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-value {
  font-size: clamp(0.8125rem, 2.5vw, 1.0625rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.dashboard-home-stats .stat-sub {
  font-size: 0.6875rem;
  line-height: 1.25;
  color: #64748b;
  margin-top: 0.15rem;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-progress-wrap {
  margin-top: 0.625rem;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-progress {
  height: 4px;
  background: #e2e8f0;
}

.dashboard-home-stats .dashboard-stat-card--home .stat-progress-hint {
  font-size: 0.625rem;
  line-height: 1.35;
  color: #94a3b8;
  margin-top: 0.35rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .dashboard-home-stats > [class*="col-"] {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .dashboard-home-stats .dashboard-stat-card--home > .card-body {
    padding: 0.65rem 0.7rem 0.75rem !important;
  }

  .dashboard-home-stats .dashboard-stat-card--home .stat-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  .dashboard-home-stats .dashboard-stat-card--home .stat-value {
    font-size: 0.8125rem;
  }

  .dashboard-home-stats .dashboard-stat-card--home .stat-label {
    font-size: 0.5625rem;
  }
}

@media (min-width: 1200px) {
  .dashboard-home-stats .dashboard-stat-card--home .stat-value {
    font-size: 1.0625rem;
  }
}

/* KPI tiles (~25% shorter than bootstrap utilities py-4 / mt-3 spacing) */
.dashboard-stat-card:not(.inventory-kpi-card):not(.dashboard-stat-card--home) > .card-body {
  padding-top: 1.125rem !important;
  padding-bottom: 1.125rem !important;
}

.dashboard-stat-card:not(.inventory-kpi-card) .stat-label {
  margin-bottom: 0.375rem !important;
}

.dashboard-stat-card:not(.inventory-kpi-card) .stat-progress-wrap {
  margin-top: 0.75rem !important;
}

.dashboard-stat-card:not(.inventory-kpi-card) .stat-progress-hint {
  margin-top: 0.375rem !important;
}

/* Expenses � payroll KPI row: shorter tiles than standard dashboard stats */
.payroll-cycles-metrics .dashboard-stat-card:not(.inventory-kpi-card) > .card-body {
  padding-top: 0.625rem !important;
  padding-bottom: 0.625rem !important;
}

.payroll-cycles-metrics .dashboard-stat-card:not(.inventory-kpi-card) .stat-label {
  margin-bottom: 0.125rem !important;
}

.payroll-cycles-metrics .dashboard-stat-card:not(.inventory-kpi-card) .stat-progress-wrap {
  margin-top: 0.375rem !important;
}

.payroll-cycles-metrics .dashboard-stat-card:not(.inventory-kpi-card) .stat-progress-hint {
  margin-top: 0.125rem !important;
}

.payroll-cycles-metrics .dashboard-stat-card .stat-progress {
  height: 3px;
}

.payroll-cycles-metrics .dashboard-stat-card .stat-icon {
  width: 30px;
  height: 30px;
  font-size: 0.72rem;
}

.payroll-cycles-metrics .dashboard-stat-card .stat-value {
  font-size: 0.9375rem;
}

@media (min-width: 1200px) {
  .payroll-cycles-metrics .dashboard-stat-card .stat-value {
    font-size: 1rem;
  }
}

/* HR dashboard � compact KPI tiles */
.hr-dashboard-stat-tiles .dashboard-stat-card > .card-body {
  padding: 0.85rem 1rem !important;
}

.hr-dashboard-stat-tiles .dashboard-stat-card .stat-label {
  margin-bottom: 0.25rem !important;
}

.hr-dashboard-stat-tiles .dashboard-stat-card .stat-value {
  line-height: 1.15;
}

.hr-dashboard-stat-tiles .dashboard-stat-card > .card-body > .d-flex {
  align-items: flex-start;
}

.hr-dashboard-stat-tiles .dashboard-stat-card .stat-progress-wrap {
  margin-top: 0.5rem !important;
}

.hr-dashboard-stat-tiles .dashboard-stat-card .stat-progress-hint {
  margin-top: 0.25rem !important;
}

.hr-dashboard-stat-tiles .dashboard-stat-card .stat-progress {
  height: 3px;
}

@media (max-width: 767.98px) {
  .hr-dashboard-stat-tiles .dashboard-stat-card .stat-label {
    font-size: 0.625rem !important;
    line-height: 1.2;
  }

  .hr-dashboard-stat-tiles .dashboard-stat-card .stat-value {
    font-size: 1.0625rem !important;
    line-height: 1.15;
  }

  .hr-dashboard-stat-tiles .dashboard-stat-card .stat-progress-hint {
    font-size: 0.625rem !important;
    line-height: 1.25;
  }

  .hr-dashboard-stat-tiles .dashboard-stat-card > .card-body {
    padding: 0.75rem 0.85rem !important;
  }
}

/* HR payroll � generate panel (compact) */
.payroll-generate-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

.payroll-generate-card > .card-body {
  padding: 0.75rem 1rem !important;
}

.payroll-generate-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.payroll-generate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.payroll-generate-eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  padding: 0.2em 0.55em;
}

.payroll-generate-chip {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2em 0.5em;
  color: #475569;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.payroll-generate-desc {
  font-size: 0.75rem;
  line-height: 1.25;
}

.payroll-generate-form {
  padding: 0.5rem 0.625rem;
  border-radius: 0.625rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.payroll-generate-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
}

.payroll-generate-input {
  border-radius: 0.5rem;
  border-color: rgba(15, 23, 42, 0.12);
  font-weight: 600;
  font-size: 0.8125rem;
  min-height: calc(1.5em + 0.5rem + 2px);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.payroll-generate-input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.12);
}

.payroll-generate-submit {
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: none;
}

.payroll-generate-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
}

/* HR � advance / loan create form */
.hr-facility-form-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);
  overflow: hidden;
}

.hr-facility-form-card--loan {
  border-color: rgba(79, 70, 229, 0.15) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #ede9fe 100%);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
}

.hr-facility-form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #0891b2);
}

.hr-facility-form-card--loan::before {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.hr-facility-form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.hr-facility-form-card--loan .hr-facility-form-icon {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.hr-facility-form-eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.hr-facility-form-card--loan .hr-facility-form-eyebrow {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.18);
}

.hr-facility-form-section {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0.875rem;
  padding: 1.15rem 1.25rem;
  height: 100%;
}

.hr-facility-form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hr-facility-form-section-title i {
  opacity: 0.65;
  font-size: 0.8rem;
}

.hr-facility-form .form-control,
.hr-facility-form .form-select {
  border-radius: 0.625rem;
  border-color: rgba(15, 23, 42, 0.12);
}

.hr-facility-form .form-control-lg,
.hr-facility-form .form-select-lg {
  border-radius: 0.75rem;
  min-height: calc(1.5em + 1rem + 2px);
}

.hr-facility-form .form-control:focus,
.hr-facility-form .form-select:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.hr-facility-form .input-group-text {
  border-radius: 0.75rem 0 0 0.75rem;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.hr-facility-form .input-group-lg > .form-control {
  border-radius: 0 0.75rem 0.75rem 0;
}

.hr-facility-form-footer {
  padding-top: 1.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-facility-form-submit {
  font-weight: 600;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: none;
}

.hr-facility-form-card--loan .hr-facility-form-submit {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.hr-facility-form-submit:hover {
  filter: brightness(1.05);
}

/* HR � employee register / edit form */
.hr-employee-form-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(14, 165, 233, 0.14) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #ecfeff 100%);
  box-shadow: 0 8px 32px rgba(14, 116, 144, 0.08);
  overflow: hidden;
}

.hr-employee-form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

.hr-employee-form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
  flex-shrink: 0;
}

.hr-employee-form-eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.hr-employee-form-aside {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.hr-employee-form-aside-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1rem;
}

.hr-employee-form-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.hr-employee-form-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hr-employee-form-step-num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
  flex-shrink: 0;
}

.hr-employee-form-section {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0.875rem;
  padding: 1.5rem 1.75rem;
}

.hr-employee-form-section--wide {
  padding: 1.65rem 1.85rem;
}

.hr-employee-form > .row,
.hr-employee-form .row.g-4 {
  --bs-gutter-y: 1.75rem;
}

@media (min-width: 1200px) {
  .hr-employee-form > .row,
  .hr-employee-form .row.g-4 {
    --bs-gutter-y: 2rem;
  }
}

.hr-employee-form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hr-employee-form-section-title i {
  opacity: 0.65;
  font-size: 0.8rem;
}

.hr-employee-form-section-sub {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 1.35rem;
  line-height: 1.5;
  max-width: 42rem;
}

.hr-employee-form .form-label {
  margin-bottom: 0.4rem;
}

.hr-employee-form .form-text {
  margin-top: 0.35rem;
  line-height: 1.4;
}

.hr-employee-form .form-control,
.hr-employee-form .form-select {
  border-radius: 0.625rem;
  border-color: rgba(15, 23, 42, 0.12);
  padding: 0.5rem 0.75rem;
}

.hr-employee-form .form-control:focus,
.hr-employee-form .form-select:focus {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.12);
}

.hr-employee-form-deduction-tile {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0.75rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hr-employee-form-deduction-tile:has(.form-check-input:checked) {
  border-color: rgba(14, 165, 233, 0.35) !important;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12);
  background: rgba(240, 249, 255, 0.95);
}

.hr-employee-photo-drop {
  border: 1.5px dashed rgba(14, 165, 233, 0.35);
  border-radius: 0.875rem;
  background: rgba(240, 249, 255, 0.45);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hr-employee-photo-drop:hover,
.hr-employee-photo-drop:focus-within {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(240, 249, 255, 0.75);
}

.hr-employee-photo-drop-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.12);
  flex-shrink: 0;
}

.hr-employee-form-footer {
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-employee-form-submit {
  font-weight: 600;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border: none;
}

.hr-employee-form-submit:hover {
  filter: brightness(1.05);
}

@media (max-width: 1199.98px) {
  .hr-employee-form-aside {
    margin-bottom: 0.5rem;
  }
}

.task-row-progress {
  min-width: 5.5rem;
  max-width: 9rem;
}

/* Inventory � KPI row: three equal cards across the content area on desktop */
@media (min-width: 992px) {
  .inventory-kpi-card {
    min-height: 6.375rem;
  }

  .inventory-kpi-card .card-body {
    padding: 0.75rem 0.9375rem 0.75rem 1.125rem;
  }
}

.inventory-kpi-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 20px rgba(15, 23, 42, 0.07);
  border-radius: 1.125rem !important;
}

.inventory-kpi-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 14px 36px rgba(15, 23, 42, 0.1);
}

.inventory-kpi-progress {
  height: 0.225rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.inventory-kpi-progress .progress-bar {
  border-radius: 999px;
  transition: width 0.35s ease;
}

.inventory-kpi-progress-hint {
  font-size: 0.6875rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.inventory-kpi-card > .card-body {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.inventory-kpi-card .inventory-kpi-progress {
  margin-top: 0.375rem !important;
}

.inventory-kpi-card .inventory-kpi-progress-hint {
  margin-top: 0.1875rem !important;
}

@media (max-width: 575.98px) {
  .inventory-kpi-row .inventory-kpi-card .card-body {
    padding: 0.4875rem 1rem !important;
  }

  .inventory-kpi-row .stat-value {
    font-size: 1.0125rem;
  }

  .inventory-kpi-row .stat-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.6375rem;
  }

  .users-stat-row .dashboard-stat-card .card-body {
    padding: 0.4875rem 1rem !important;
  }

  .users-stat-row {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.65rem;
  }

  .users-stat-row .stat-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.6375rem;
  }
}

/* Inventory list table � horizontal scroll (same pattern as suppliers) */
.inventory-table-modern .inventory-index-table {
  table-layout: fixed;
  width: 100%;
}

.inventory-index-table th,
.inventory-index-table td {
  overflow: hidden;
  vertical-align: middle;
}

.inventory-index-table th.inv-col-actions,
.inventory-index-table td.inv-col-actions {
  overflow: visible;
}

.inventory-index-table .inv-col-num {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
}

.inventory-index-table .inv-col-item {
  width: 28%;
  min-width: 9rem;
}

.inventory-index-table .inv-col-sku {
  width: 10%;
  min-width: 5.5rem;
}

.inventory-index-table .inv-col-qty {
  width: 4.5rem;
}

.inventory-index-table .inv-col-reorder {
  width: 4.5rem;
}

.inventory-index-table .inv-col-cost {
  width: 6.5rem;
}

.inventory-index-table .inv-col-updated {
  width: 6.5rem;
  max-width: 6.5rem;
  font-variant-numeric: tabular-nums;
}

.inventory-index-table .inv-col-actions {
  width: 7.5rem;
  min-width: 7.5rem;
}

.inv-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-item-desc {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-updated-time {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.inv-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-actions-group form {
  display: inline-flex;
  margin: 0;
}

/* Inventory list � very compact rows (~half prior padding / gaps) */
.inventory-table-modern.dashboard-table-wrap > .inventory-table-scroll {
  --app-table-body-row-est: 1.6875rem;
}

.inventory-table-modern .inventory-index-table thead th {
  padding-top: 0.275rem;
  padding-bottom: 0.275rem;
  line-height: 1.1;
  font-size: 0.625rem;
}

.inventory-table-modern .inventory-index-table tbody td {
  padding-top: 0.225rem;
  padding-bottom: 0.225rem;
}

.inventory-table-modern .inventory-index-table .inv-item-main {
  gap: 0.275rem;
}

.inventory-table-modern .inventory-index-table .inv-item-desc {
  margin-top: 0.05rem;
  font-size: 0.5625rem;
  line-height: 1.15;
  max-width: 12rem;
}

.inventory-table-modern .inventory-index-table .inv-col-item .badge,
.inventory-table-modern .inventory-index-table .inv-col-sku .badge {
  font-size: 0.5rem;
  font-weight: 600;
  padding: 0.1rem 0.275rem;
  line-height: 1.2;
}

.inventory-table-modern .inventory-index-table .inv-col-updated.small,
.inventory-table-modern .inventory-index-table .inv-col-sku .small {
  font-size: 0.625rem !important;
}

.inventory-table-modern .inv-actions-group .btn {
  width: 1.875rem;
  height: 1.875rem;
  font-size: 0.65rem;
}

.inventory-table-modern .inv-actions-group {
  gap: 0.1875rem;
}

/* Inventory modals */
@media (min-width: 576px) {
  .inventory-form-modal .modal-dialog {
    --bs-modal-width: 920px;
    max-width: min(920px, calc(100vw - 2rem));
  }

  #inventoryReceiveModal.inventory-form-modal .modal-dialog {
    --bs-modal-width: 1040px;
    max-width: min(1040px, calc(100vw - 2rem));
  }
}

/* Field inventory page � segmented tabs */
.field-inventory-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  padding: 0.375rem;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
}

.field-inventory-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  text-decoration: none;
  color: var(--fi-accent, #475569);
  background: var(--fi-bg, transparent);
  border: 1px solid var(--fi-border, transparent);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.field-inventory-tab:hover {
  color: var(--fi-accent, #334155);
  background: #fff;
  border-color: var(--fi-border, rgba(15, 23, 42, 0.11));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.field-inventory-tab.is-active {
  color: var(--fi-accent, #0f172a);
  background: #fff;
  border-color: var(--fi-border, rgba(15, 23, 42, 0.12));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.field-inventory-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--fi-accent, #64748b);
  background: var(--fi-bg, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--fi-border, rgba(15, 23, 42, 0.06));
}

.field-inventory-tab.is-active .field-inventory-tab-icon {
  color: var(--fi-accent, #475569);
  background: var(--fi-bg, #f8fafc);
  border-color: var(--fi-border, rgba(15, 23, 42, 0.1));
}

.field-inventory-tab-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1 1 auto;
}

.field-inventory-tab-label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}

.field-inventory-tab-meta {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--fi-accent, #94a3b8);
  opacity: 0.72;
}

.field-inventory-tab.is-active .field-inventory-tab-meta {
  opacity: 0.88;
}

.field-inventory-tab-count {
  flex-shrink: 0;
  min-width: 1.625rem;
  padding: 0.125rem 0.4375rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--fi-accent, #64748b);
  background: var(--fi-bg, rgba(255, 255, 255, 0.85));
  border: 1px solid var(--fi-border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
}

.field-inventory-tab.is-active .field-inventory-tab-count {
  color: var(--fi-accent, #334155);
  background: var(--fi-bg, #f1f5f9);
  border-color: var(--fi-border, rgba(15, 23, 42, 0.12));
}

/* Main tab tints � match sub-filter palette */
.field-inventory-tab--pending { --fi-accent: #b45309; --fi-bg: #fffbeb; --fi-border: rgba(180, 83, 9, 0.16); }
.field-inventory-tab--items { --fi-accent: #047857; --fi-bg: #ecfdf5; --fi-border: rgba(4, 120, 87, 0.16); }
.field-inventory-tab--issued { --fi-accent: #0f766e; --fi-bg: #f0fdfa; --fi-border: rgba(15, 118, 110, 0.16); }
.field-inventory-tab--returns { --fi-accent: #64748b; --fi-bg: #f8fafc; --fi-border: rgba(100, 116, 139, 0.18); }

.field-inventory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.field-inventory-filters-wrap {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4375rem;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.75rem;
}

.field-inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.field-inventory-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.375rem 0.6875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: #64748b;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.field-inventory-filter:hover {
  color: #334155;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.11);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.field-inventory-filter.is-active {
  color: #0f172a;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.field-inventory-filter-label {
  white-space: nowrap;
}

.field-inventory-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  opacity: 0.88;
}

.field-inventory-filter.is-active .field-inventory-filter-count {
  opacity: 1;
}

/* Subtle status tints � field items */
.field-inventory-filter--all { --fi-accent: #64748b; --fi-bg: #f1f5f9; --fi-border: rgba(100, 116, 139, 0.18); }
.field-inventory-filter--available { --fi-accent: #047857; --fi-bg: #ecfdf5; --fi-border: rgba(4, 120, 87, 0.16); }
.field-inventory-filter--assigned { --fi-accent: #0369a1; --fi-bg: #f0f9ff; --fi-border: rgba(3, 105, 161, 0.16); }
.field-inventory-filter--damaged { --fi-accent: #b45309; --fi-bg: #fffbeb; --fi-border: rgba(180, 83, 9, 0.16); }
.field-inventory-filter--faulty { --fi-accent: #be123c; --fi-bg: #fff1f2; --fi-border: rgba(190, 18, 60, 0.14); }
.field-inventory-filter--in_repair { --fi-accent: #6d28d9; --fi-bg: #f5f3ff; --fi-border: rgba(109, 40, 217, 0.14); }

/* Issued tab reuses same keys where they overlap */
.field-inventory-filter--active { --fi-accent: #0f766e; --fi-bg: #f0fdfa; --fi-border: rgba(15, 118, 110, 0.16); }

.field-inventory-filter[class*="field-inventory-filter--"] {
  color: var(--fi-accent, #64748b);
  background: var(--fi-bg, #f8fafc);
  border-color: var(--fi-border, rgba(15, 23, 42, 0.08));
}

.field-inventory-filter[class*="field-inventory-filter--"]:hover,
.field-inventory-filter[class*="field-inventory-filter--"].is-active {
  color: var(--fi-accent, #334155);
  background: #fff;
  border-color: var(--fi-border, rgba(15, 23, 42, 0.14));
}

.field-inventory-filter[class*="field-inventory-filter--"] .field-inventory-filter-count {
  background: var(--fi-bg, #f1f5f9);
  color: var(--fi-accent, #64748b);
  opacity: 1;
}

.field-inventory-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.4375rem 0.9375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid rgba(29, 78, 216, 0.18);
  border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.field-inventory-action-btn:hover {
  color: #1e40af;
  background: #dbeafe;
  border-color: rgba(29, 78, 216, 0.28);
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.08);
}

.field-inventory-row-num {
  width: 2.75rem;
  min-width: 2.75rem;
  padding-left: 0.75rem !important;
  padding-right: 0.5rem !important;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  text-align: center;
  vertical-align: middle;
}

.field-inventory-row-num:first-child {
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.table thead .field-inventory-row-num {
  color: #64748b;
  font-weight: 600;
}

/* Stock inventory page toolbar */
.inventory-stock-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.inventory-stock-search-wrap {
  position: relative;
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 14rem;
}

.inventory-stock-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8125rem;
  color: #94a3b8;
  pointer-events: none;
}

.inventory-stock-search {
  display: block;
  width: 100%;
  padding: 0.4375rem 0.75rem 0.4375rem 2.125rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #334155;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.inventory-stock-search::placeholder {
  color: #94a3b8;
}

.inventory-stock-search:focus {
  outline: none;
  background: #fff;
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.inventory-stock-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.inventory-stock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.8125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  color: var(--inv-btn-accent, #64748b);
  background: var(--inv-btn-bg, #f8fafc);
  border: 1px solid var(--inv-btn-border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.inventory-stock-btn[data-inv-tip] {
  position: relative;
}

.inventory-stock-btn[data-inv-tip]::after {
  content: attr(data-inv-tip);
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  transform: translateX(-50%) translateY(4px);
  padding: 0.3125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: #dc2626;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.inventory-stock-btn[data-inv-tip]::before {
  content: '';
  position: absolute;
  z-index: 19;
  left: 50%;
  bottom: calc(100% + 0.1875rem);
  transform: translateX(-50%) translateY(4px);
  border: 0.3125rem solid transparent;
  border-top-color: #dc2626;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.inventory-stock-btn[data-inv-tip]:hover::after,
.inventory-stock-btn[data-inv-tip]:hover::before,
.inventory-stock-btn[data-inv-tip]:focus-visible::after,
.inventory-stock-btn[data-inv-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

button.inventory-stock-btn {
  cursor: pointer;
}

.inventory-stock-btn:hover {
  color: var(--inv-btn-accent, #334155);
  background: #fff;
  border-color: var(--inv-btn-border, rgba(15, 23, 42, 0.14));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.inventory-stock-btn i {
  font-size: 0.8125rem;
  line-height: 1;
}

.inventory-stock-btn--field {
  --inv-btn-accent: #047857;
  --inv-btn-bg: #ecfdf5;
  --inv-btn-border: rgba(4, 120, 87, 0.16);
}

.inventory-stock-btn--receive {
  --inv-btn-accent: #0369a1;
  --inv-btn-bg: #f0f9ff;
  --inv-btn-border: rgba(3, 105, 161, 0.16);
}

.inventory-stock-btn--category {
  --inv-btn-accent: #6d28d9;
  --inv-btn-bg: #f5f3ff;
  --inv-btn-border: rgba(109, 40, 217, 0.14);
}

.inventory-stock-btn--new {
  --inv-btn-accent: #1d4ed8;
  --inv-btn-bg: #eff6ff;
  --inv-btn-border: rgba(29, 78, 216, 0.2);
}

@media (max-width: 575.98px) {
  .inventory-stock-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-stock-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-stock-search-wrap {
    max-width: none;
  }

  .inventory-stock-btns {
    justify-content: stretch;
  }

  .inventory-stock-btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .inventory-stock-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .inventory-stock-btn {
    padding: 0.5rem 0.625rem;
    min-width: 2.375rem;
  }
}

@media (max-width: 1199.98px) {
  .field-inventory-tab-meta {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .field-inventory-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-inventory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .field-inventory-action-btn {
    margin-left: 0;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .field-inventory-tab {
    padding: 0.625rem 0.75rem;
    gap: 0.625rem;
  }

  .field-inventory-tab-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8125rem;
  }
}

/* Inventory modals � above backdrop on iOS (modals moved to body via app.js) */
.inventory-modal-modern.modal.show {
  z-index: 1070 !important;
}

.inventory-modal-modern.modal.show .modal-dialog {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.inventory-modal-modern .modal-content {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.inventory-modal-modern.inventory-form-modal .modal-content.border-0 {
  border: none !important;
}

.inv-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--bs-primary-bg-subtle, #e7f0ff);
  color: var(--bs-primary, #0d6efd);
  font-size: 1.15rem;
}

.inventory-modal-modern .modal-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.inventory-modal-modern.inventory-form-modal .modal-header,
.inventory-modal-modern.inventory-form-modal .modal-body,
.inventory-modal-modern.inventory-form-modal .modal-footer {
  background: #fff;
}

.inventory-modal-modern .modal-body {
  padding: 0.75rem 1.5rem 1.25rem;
}

.inventory-modal-modern .modal-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  padding: 0.875rem 1.5rem;
}

.inventory-modal-modern.inventory-form-modal .modal-footer {
  background: #fff;
}

.inv-modal-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
}

.inv-modal-callout-info {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.inv-modal-callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.inv-modal-callout-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.inv-modal-callout-info .inv-modal-callout-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.inv-modal-callout-warning .inv-modal-callout-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.inv-modal-select {
  border-radius: 0.625rem;
}

.inventory-modal-modern .inv-modal-section {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
  padding: 1rem 1.15rem;
}

.inventory-modal-modern .inv-modal-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.inv-modal-switch .form-check-input {
  width: 2.5em;
  height: 1.25em;
}

.inv-create-lines-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.inv-create-line-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inv-create-line-card:focus-within {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.inv-create-remove-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-receive-table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.inv-receive-table {
  margin-bottom: 0;
}

.inv-receive-table thead th {
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.65rem 0.85rem;
}

.inv-receive-table tbody td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  vertical-align: middle;
}

.inv-receive-table tbody tr:last-child td,
.inv-receive-table tbody tr.receive-serial-row:last-child td {
  border-bottom: none;
}

.inv-receive-table .form-control {
  border-radius: 0.5rem;
}

/* Category list � compact rows */
.inv-cat-list-table thead th {
  padding: 0.3rem 0.6rem;
  line-height: 1.1;
}

.inv-cat-list-table tbody td {
  padding: 0.28rem 0.6rem;
  line-height: 1.15;
  font-size: 0.8125rem;
}

.inv-cat-list-table .badge {
  font-size: 0.625rem;
  padding: 0.1rem 0.35rem;
  line-height: 1.15;
}

#inventoryCategoryModal .inv-cat-actions-group .btn {
  width: 1.625rem;
  height: 1.625rem;
  font-size: 0.6875rem;
}

#inventoryCategoryModal .inv-create-line-card {
  padding: 0.65rem 0.75rem;
}

#inventoryCategoryModal .inv-create-lines-stack {
  gap: 0.45rem;
}

#inventoryCategoryModal .inv-cat-create-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#inventoryCategoryModal .inv-cat-create-serial-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

#inventoryCategoryModal .inv-cat-create-serial-wrap .form-check-label {
  white-space: nowrap;
}

#inventoryCategoryModal .inv-modal-switch .form-check-label {
  font-size: 0.8125rem;
}

.inventory-modal-modern .table-responsive.border {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.inventory-receive-serial-wrap {
  background: rgba(255, 251, 235, 0.65);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 0.625rem;
  padding: 0.75rem 0.85rem;
  width: 100%;
}

.inventory-receive-serial-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

#inventoryReceiveModal .inventory-receive-serial-wrap .receive-serial-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  font-size: 1rem;
  line-height: 1.35;
  border-radius: 0.5rem;
}

#inventoryReceiveModal .inventory-receive-modal-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

#inventoryReceiveModal .inventory-receive-modal-footer .btn {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.inv-cat-actions-group .btn {
  width: 1.625rem;
  height: 1.625rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
}

.inv-cat-actions-group {
  gap: 0.1875rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.inv-cat-actions-group .inv-cat-delete-form {
  flex-shrink: 0;
}

.inv-receive-table .inv-cat-actions-col,
.inv-receive-table td:last-child {
  white-space: nowrap;
  width: 1%;
}

/* Receive inventory modal � phones & small screens */
@media (max-width: 575.98px) {
  #inventoryReceiveModal.inventory-receive-modal .modal-content {
    border-radius: 0;
    min-height: 100%;
  }

  #inventoryReceiveModal .inv-modal-section {
    padding: 0.85rem 0.9rem;
  }

  #inventoryReceiveModal .inv-receive-supplier-select {
    font-size: 1rem;
  }

}

@media (max-width: 767.98px) {
  #inventoryReceiveModal .inv-receive-table-wrap {
    overflow: visible;
  }

  #inventoryReceiveModal .inv-receive-table thead {
    display: none;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "item cost qty"
      "sku sku sku";
    gap: 0.35rem 0.5rem;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    align-items: center;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td {
    display: block;
    width: auto;
    text-align: left !important;
    padding: 0;
    border-bottom: none;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-item {
    grid-area: item;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-qty {
    grid-area: qty;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-top: none;
    padding-top: 0;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-sku {
    grid-area: sku;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-cost {
    grid-area: cost;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-cost .receive-line-label,
  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-qty .receive-line-label {
    display: inline;
    margin-bottom: 0;
    flex-shrink: 0;
    font-size: 0.62rem;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-cost .receive-cost-input,
  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-qty .receive-qty-input {
    width: 4.25rem;
    min-width: 4.25rem;
    max-width: none;
    flex-shrink: 0;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-line-main td.receive-line-sku .receive-line-sku-val {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  #inventoryReceiveModal .receive-line-sku .receive-line-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-serial-row {
    display: block;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-serial-row td {
    display: block;
    width: 100%;
    padding: 0 0.9rem 0.85rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-serial-row .inventory-receive-serial-wrap {
    margin: 0;
  }

  #inventoryReceiveModal .inv-receive-table tbody tr.receive-serial-row:last-child td {
    border-bottom: none;
  }
}

@media (min-width: 768px) {
  #inventoryReceiveModal .receive-line-label {
    display: none;
  }
}

.inv-create-lines-table .inv-create-category,
.inv-create-category {
  min-width: 9rem;
}

.inventory-index-table .inv-col-category {
  min-width: 6.5rem;
}

.inventory-index-table .inv-col-qty,
.inventory-index-table .inv-col-reorder,
.inventory-index-table .inv-col-cost,
.inventory-index-table .inv-col-updated,
.inventory-index-table .inv-col-sku {
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .inventory-table-modern .inventory-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
  }

  .inventory-table-modern .inventory-index-table {
    table-layout: auto;
    width: max-content;
    min-width: 44rem;
  }

  .inventory-index-table th,
  .inventory-index-table td {
    display: table-cell !important;
  }

  .inventory-index-table .inv-col-item {
    min-width: 11rem;
    width: auto;
  }

  .inventory-index-table .inv-col-sku {
    min-width: 6rem;
    width: auto;
  }

  .inventory-index-table .inv-col-qty {
    min-width: 4rem;
    width: auto;
  }

  .inventory-index-table .inv-col-reorder {
    min-width: 4.5rem;
    width: auto;
  }

  .inventory-index-table .inv-col-cost {
    min-width: 6rem;
    width: auto;
  }

  .inventory-index-table .inv-col-updated {
    min-width: 6.75rem;
    max-width: none;
    width: auto;
  }

  .inventory-index-table .inv-col-actions {
    min-width: 6.5rem;
    width: auto;
    padding-right: 0.5rem;
  }

  .inv-item-desc {
    max-width: 11rem;
  }
}

/* Payroll runs � no wrap; horizontal scroll on narrow viewports */
.payroll-runs-index-table {
  table-layout: auto;
  min-width: 64rem;
}

.payroll-runs-table-modern .payroll-runs-index-table thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  overflow: visible;
  text-overflow: clip;
}

.payroll-runs-index-table th.pr-col-payment,
.payroll-runs-index-table td.run-payment-cell,
.payroll-runs-index-table th.pr-col-net,
.payroll-runs-index-table td.run-net-total-cell {
  width: auto;
  white-space: nowrap;
}

.payroll-runs-index-table th,
.payroll-runs-index-table td {
  vertical-align: middle;
  overflow: visible;
  text-overflow: clip;
}

.payroll-runs-table-modern .payroll-runs-index-table tbody td {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  font-size: 0.86rem;
}

.payroll-runs-index-table .run-status-badge,
.payroll-runs-index-table .run-payment-badge {
  font-size: 0.68rem;
}

.payroll-runs-index-table .pr-col-period {
  min-width: 11rem;
}

.payroll-runs-index-table .pr-col-range {
  min-width: 13rem;
}

.payroll-runs-index-table .pr-col-status {
  min-width: 8rem;
}

.payroll-runs-index-table .pr-col-owner {
  min-width: 8rem;
}

.payroll-runs-index-table .run-payment-cell {
  min-width: 11rem;
}

.payroll-runs-index-table .pr-col-net,
.payroll-runs-index-table .run-net-total-cell {
  min-width: 9rem;
}

.payroll-runs-index-table .pr-col-payment {
  min-width: 7.5rem;
}

@media (min-width: 992px) {
  .payroll-runs-index-table th.pr-col-payment,
  .payroll-runs-index-table td.run-payment-cell {
    min-width: 9.5rem;
    width: 9.5rem;
  }

  .payroll-runs-index-table th.pr-col-net,
  .payroll-runs-index-table td.run-net-total-cell {
    min-width: 10rem;
    width: 10rem;
  }
}

.payroll-run-lines-table th,
.payroll-run-lines-table td:not(.pr-col-employee) {
  white-space: nowrap;
  vertical-align: middle;
}

.payroll-run-lines-table .pr-col-employee {
  vertical-align: middle;
}

.payroll-runs-actions-group {
  flex-wrap: nowrap;
  row-gap: 0;
}

.payroll-runs-index-table .pr-col-actions {
  min-width: 12.5rem;
}

.payroll-runs-actions-cell {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .payroll-runs-table-modern .payroll-runs-index-table {
    min-width: 60rem;
  }
}

@media (max-width: 767.98px) {
  .payroll-runs-table-modern .payroll-runs-index-table {
    min-width: 56rem;
  }

  .payroll-runs-table-modern .payroll-runs-index-table thead th {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    font-size: 0.64rem;
  }

  .payroll-runs-table-modern .payroll-runs-index-table tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .payroll-runs-index-table .pr-col-actions {
    min-width: 12rem;
  }

  .payroll-runs-index-table .pr-col-status {
    min-width: 7.25rem;
  }

  .payroll-runs-actions-group .btn {
    width: auto;
    justify-content: initial;
  }
}

.payroll-run-lines-table .pr-col-employee {
  min-width: 10rem;
}

.hr-employees-index-table th,
.hr-employees-index-table td:not(.hr-col-name) {
  white-space: nowrap;
  vertical-align: middle;
}

.hr-employees-index-table .hr-col-name {
  vertical-align: middle;
  min-width: 8rem;
}

.hr-employees-index-table .hr-col-actions {
  min-width: 9rem;
}

.hr-employees-actions-group {
  flex-wrap: nowrap;
}

.hr-employees-index-table .hr-emp-col-name {
  min-width: 11rem;
}

.hr-employees-index-table .hr-emp-col-dept {
  min-width: 7rem;
}

.hr-employees-index-table .hr-emp-col-position {
  min-width: 7rem;
}

.hr-employees-index-table .hr-emp-col-status {
  min-width: 6.5rem;
}

.hr-employees-index-table .hr-emp-col-actions {
  min-width: 6.5rem;
  padding-right: 0.65rem !important;
}

.hr-employees-index-table .hr-emp-name-link:hover {
  color: var(--bs-primary) !important;
}

.hr-employees-filter-toolbar .hr-employees-filter-row {
  --bs-gutter-x: 0.5rem;
}

.hr-employees-filter-field .form-label {
  margin-bottom: 0.2rem;
}

@media (min-width: 992px) {
  .hr-employees-filter-toolbar {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 1.25rem;
  }

  .hr-employees-filter-toolbar > p:not(.w-100) {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: auto;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.75rem;
    width: auto;
    max-width: min(100%, 40rem);
    flex: 0 1 auto;
    margin-left: auto !important;
    --bs-gutter-x: 0;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-row > [class*="col-"] {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding: 0;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-field:not(.hr-employees-filter-search) .form-select {
    width: 10.5rem;
    min-width: 10.5rem;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-search {
    flex: 1 1 14rem;
    min-width: 14rem;
    max-width: 20rem;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-search .form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .hr-employees-filter-toolbar .hr-employees-filter-actions {
    flex: 0 0 auto;
    padding-bottom: 0.125rem;
  }
}

.app-table-scroll-modern .hr-employees-index-table thead th {
  padding-top: 0.275rem;
  padding-bottom: 0.275rem;
  line-height: 1.1;
  font-size: 0.625rem;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.app-table-scroll-modern .hr-employees-index-table tbody td {
  padding-top: 0.275rem;
  padding-bottom: 0.275rem;
}

.app-table-scroll-modern .hr-employees-index-table tbody td.ps-4,
.app-table-scroll-modern .hr-employees-index-table thead th.ps-4 {
  padding-left: 0.65rem !important;
}

.app-table-scroll-modern .hr-employees-index-table tbody td.pe-4,
.app-table-scroll-modern .hr-employees-index-table thead th.pe-4 {
  padding-right: 0.65rem !important;
}

.users-index-table th,
.users-index-table td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.35rem 0.45rem;
}

.app-table-scroll-modern .users-index-table.app-data-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.users-index-table .users-col-name {
  width: auto;
  min-width: 7rem;
  max-width: 11rem;
  padding-left: 0.75rem !important;
}

.users-index-table .users-col-name > .d-flex {
  min-width: 0;
}

.users-index-table .users-col-name span:not(.user-avatar-wrap):not(.user-avatar-placeholder) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-index-table .users-col-username {
  width: 1%;
}

.users-index-table .users-col-email {
  width: auto;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-index-table .users-col-role,
.users-index-table .users-col-status,
.users-index-table .users-col-phone,
.users-index-table .users-col-created {
  width: 1%;
}

.users-index-table .users-col-actions {
  width: 1%;
  min-width: 0;
  padding-right: 0.75rem !important;
}

.users-index-table thead th {
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.users-actions-group {
  flex-wrap: nowrap;
}

.hr-deductions-catalog-table .hr-ded-col-rate {
  width: 9rem;
  max-width: 9rem;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.hr-deductions-catalog-table .hr-deduction-actions {
  min-width: 7.5rem;
}

.hr-deduction-row:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

/* Shared: expenses, tasks (and similar) � horizontal scroll on narrow viewports */
.app-table-scroll-modern > .app-table-scroll {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.app-table-scroll-modern .app-data-table {
  table-layout: fixed;
  width: 100%;
}

.app-table-scroll-modern .app-data-table th,
.app-table-scroll-modern .app-data-table td {
  overflow: hidden;
  vertical-align: middle;
}

.app-table-scroll-modern .expenses-index-table thead th,
.app-table-scroll-modern .tasks-index-table thead th {
  padding-top: 0.275rem;
  padding-bottom: 0.275rem;
  line-height: 1.1;
  font-size: 0.625rem;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Expenses & tasks � compact rows (match inventory index density) */
.app-table-scroll-modern.dashboard-table-wrap > .table-responsive {
  --app-table-body-row-est: 1.8125rem;
}

.app-table-scroll-modern .expenses-index-table tbody td,
.app-table-scroll-modern .tasks-index-table tbody td {
  padding-top: 0.225rem;
  padding-bottom: 0.225rem;
}

.app-table-scroll-modern .expenses-index-table tbody td.ps-4,
.app-table-scroll-modern .expenses-index-table thead th.ps-4 {
  padding-left: 0.65rem !important;
}

.app-table-scroll-modern .expenses-index-table tbody td.pe-4,
.app-table-scroll-modern .expenses-index-table thead th.pe-4 {
  padding-right: 0.65rem !important;
}

.app-table-scroll-modern .tasks-index-table .task-row-progress .progress.rounded-pill {
  height: 5px !important;
  margin-bottom: 0.125rem !important;
}

.app-table-scroll-modern .tasks-index-table .task-row-progress .small,
.app-table-scroll-modern .tasks-index-table .task-row-progress span.small {
  font-size: 0.5625rem !important;
  line-height: 1.15;
}

.app-table-scroll-modern .exp-col-amount.small,
.app-table-scroll-modern .exp-col-paid-progress .small,
.app-table-scroll-modern .exp-col-balance.small,
.app-table-scroll-modern .exp-col-date.small,
.app-table-scroll-modern .tasks-index-table .task-col-deadline.small,
.app-table-scroll-modern .tasks-index-table .task-col-category.small {
  font-size: 0.625rem !important;
}

.app-table-scroll-modern .expenses-index-table .status-pill,
.app-table-scroll-modern .tasks-index-table .status-pill {
  font-size: 0.5rem;
  line-height: 1.2;
  padding: 0.1rem 0.35rem;
}

.app-table-scroll-modern .tasks-index-table .status-pill.text-uppercase {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
}

.app-table-scroll-modern .tasks-index-table .task-col-category .badge.rounded-pill {
  font-size: 0.5rem;
  font-weight: 600;
  padding: 0.1rem 0.275rem;
  line-height: 1.2;
}

.app-table-scroll-modern .exp-actions-group,
.app-table-scroll-modern .task-actions-group {
  gap: 0.1875rem;
}

.app-table-scroll-modern .exp-actions-group .btn,
.app-table-scroll-modern .task-actions-group .btn {
  width: 1.875rem;
  height: 1.875rem;
  font-size: 0.65rem;
}

.app-table-scroll-modern .task-col-assignee {
  font-size: 0.625rem;
}

.app-table-scroll-modern .exp-title-link,
.app-table-scroll-modern .task-title-link {
  font-size: 0.75rem;
}

/* Expenses index � readable table type (overrides compact defaults above) */
.app-table-scroll-modern.expenses-table-modern {
  --app-table-body-row-est: 3.625rem;
}

/* Expenses list � vertical scroll after 10 body rows (sticky header inside scroll area) */
.app-table-scroll-modern.expenses-table-modern > .app-table-scroll {
  --app-table-visible-rows: 10;
  --app-table-head-est: 2.25rem;
  --app-table-body-row-est: 3.625rem;
  max-height: calc(var(--app-table-head-est) + var(--app-table-body-row-est) * var(--app-table-visible-rows));
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
}

.app-table-scroll-modern.expenses-table-modern > .app-table-scroll .expenses-index-table thead.sticky-top th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.app-table-scroll-modern .expenses-index-table {
  font-size: 0.8125rem;
}

.app-table-scroll-modern .expenses-index-table thead th {
  font-size: 0.75rem;
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  line-height: 1.25;
}

.app-table-scroll-modern .expenses-index-table tbody td {
  font-size: 0.8125rem;
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  line-height: 1.35;
}

.app-table-scroll-modern .expenses-index-table .exp-col-amount,
.app-table-scroll-modern .expenses-index-table .exp-col-balance,
.app-table-scroll-modern .expenses-index-table .exp-col-date,
.app-table-scroll-modern .expenses-index-table .exp-col-category,
.app-table-scroll-modern .expenses-index-table .exp-col-submitter,
.app-table-scroll-modern .expenses-index-table .exp-col-amount.small,
.app-table-scroll-modern .expenses-index-table .exp-col-balance.small,
.app-table-scroll-modern .expenses-index-table .exp-col-date.small,
.app-table-scroll-modern .expenses-index-table .exp-col-paid-progress,
.app-table-scroll-modern .expenses-index-table .exp-col-paid-progress .small,
.app-table-scroll-modern .expenses-index-table .exp-col-paid-progress span.small {
  font-size: 0.8125rem !important;
}

.app-table-scroll-modern .expenses-index-table .exp-col-paid-progress .task-row-progress .progress.rounded-pill {
  height: 7px !important;
  margin-bottom: 0.2rem !important;
}

.app-table-scroll-modern .expenses-index-table .exp-title-link {
  font-size: 0.875rem;
  font-weight: 600;
}

.app-table-scroll-modern .expenses-index-table .status-pill {
  font-size: 0.6875rem;
  line-height: 1.25;
  padding: 0.15rem 0.45rem;
}

.app-table-scroll-modern .expenses-index-table .exp-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  font-size: 0.8125rem;
}

.expenses-index-toolbar__search .form-control {
  min-width: 0;
}

/* Expenses module � mobile / iPhone layout */
.expenses-module {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.content-area > .expenses-module {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .expenses-module > .dashboard-table-wrap.expenses-table-modern {
    margin-left: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
    margin-right: calc(var(--app-wide-edge-gap) - var(--app-inline-padding));
    width: calc(100% + 2 * var(--app-inline-padding) - 2 * var(--app-wide-edge-gap));
    max-width: none;
    box-sizing: border-box;
    border-radius: 1rem;
    overflow: hidden;
  }
}

.expenses-module-hero__actions .btn {
  min-height: 2.75rem;
}

@media (min-width: 576px) {
  .expenses-module-hero__actions.row-cols-2 {
    flex-wrap: nowrap;
  }

  .expenses-module-hero__actions.row-cols-2 > .col {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
  }

  .expenses-module-hero__actions.row-cols-2 .btn {
    width: auto;
  }
}

.expenses-stat-tiles .expenses-stat-headline {
  gap: 0.5rem;
}

.expenses-stat-tiles .expenses-stat-headline .stat-value {
  flex-shrink: 0;
}

.expenses-stat-tiles .stat-label,
.expenses-stat-tiles .stat-progress-hint {
  overflow: hidden;
  text-overflow: ellipsis;
}

.expenses-stat-tiles .small.font-monospace {
  font-size: 0.6875rem;
  word-break: break-word;
}

.expenses-index-filter {
  margin-bottom: 1rem;
}

.expenses-bulk-actions-unified {
  gap: 0.65rem;
}

.expenses-index-table .exp-title-meta {
  line-height: 1.35;
  word-break: break-word;
}

.app-table-scroll-modern.expenses-table-modern > .app-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

@media (max-width: 991.98px) {
  .app-table-scroll-modern .expenses-index-table {
    min-width: 34rem;
  }

  .expenses-bulk-actions-unified {
    flex-direction: column;
    align-items: stretch;
  }

  .expenses-bulk-actions-unified .expense-index-bulk-bar {
    width: 100%;
  }

  .expenses-bulk-actions-unified .expenses-action-cards {
    width: 100%;
    justify-content: stretch !important;
  }

  .expenses-bulk-actions-unified .expenses-action-cards .expenses-action-card {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.75rem;
  }
}

@media (min-width: 768px) {
  .tasks-module-subnav-scrollbar {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .expenses-module .tasks-module-subnav-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .expenses-module .tasks-module-subnav-wrap::-webkit-scrollbar {
    display: none;
  }

  .expenses-module .tasks-module-subnav {
    display: inline-flex;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    border-radius: 1rem;
    padding: 0.35rem;
  }

  .expenses-module .tasks-module-subnav .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    justify-content: center;
    padding-inline: 0.75rem;
    font-size: 0.75rem;
  }

  .expenses-module .tasks-module-subnav .nav-link i {
    margin-right: 0.35rem !important;
  }

  .expenses-stat-tiles > [class*="col-"] {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .expenses-stat-tiles .dashboard-stat-card .card-body {
    padding: 0.85rem 0.9rem 0.85rem 1rem !important;
  }

  .expenses-stat-tiles .stat-icon {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.8rem;
  }

  .expenses-stat-tiles .stat-value {
    font-size: 1rem !important;
  }

  .app-table-scroll-modern .expenses-index-table {
    min-width: 18rem;
  }

  .app-table-scroll-modern .expenses-index-table .exp-col-title {
    min-width: 8.5rem;
    max-width: 14rem;
    white-space: normal;
  }

  .app-table-scroll-modern .expenses-index-table .exp-col-amount {
    min-width: 5.5rem;
    white-space: nowrap;
  }

  .app-table-scroll-modern .expenses-index-table .exp-col-status {
    min-width: 4.75rem;
  }

  .app-table-scroll-modern .expenses-index-table .exp-col-actions {
    min-width: 3.25rem;
    padding-right: 0.35rem !important;
  }

  .app-table-scroll-modern .expenses-index-table .exp-actions-group .btn {
    width: 2.375rem;
    height: 2.375rem;
    min-width: 2.375rem;
    min-height: 2.375rem;
  }

  .expenses-index-table .exp-col-bulk-check {
    padding-left: 0.35rem !important;
  }

  .expenses-index-table .exp-col-title.ps-4 {
    padding-left: 0.5rem !important;
  }
}

@media (max-width: 575.98px) {
  .expenses-module .tasks-module-subnav .nav-link span,
  .expenses-module .tasks-module-subnav .nav-link {
    font-size: 0.6875rem;
  }

  .expenses-module .tasks-module-subnav .nav-link i {
    display: none;
  }

  .expenses-stat-tiles .stat-progress-hint {
    font-size: 0.625rem;
  }
}

.expenses-bulk-actions-bar {
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.65) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.expenses-bulk-actions-unified {
  position: relative;
  z-index: 30;
  overflow: visible;
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.65) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.expenses-bulk-actions-unified + .dashboard-table-wrap.expenses-table-modern {
  position: relative;
  z-index: 1;
}

.tasks-panel__bulk-bar {
  position: relative;
  z-index: 30;
  overflow: visible;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.65) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.tasks-panel__bulk-bar + .dashboard-table-wrap.tasks-table-modern {
  position: relative;
  z-index: 1;
}

.tasks-panel__bulk-bar .expenses-bulk-actions-bar__hint {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#task-bulk-clear-btn {
  margin-left: auto;
}

.tasks-index-table .task-col-bulk-check .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.tasks-index-table tr.is-bulk-selected {
  background-color: rgba(236, 253, 245, 0.55);
}

.tasks-index-table tr.is-bulk-selected:hover {
  background-color: rgba(209, 250, 229, 0.65);
}

.expense-index-bulk-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-width: 0;
  overflow: visible;
}

.expense-index-bulk-dropdown {
  position: relative;
  z-index: 31;
}

.expenses-bulk-actions-unified .expenses-bulk-actions-bar__label {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  white-space: nowrap;
}

.expenses-bulk-actions-unified .expenses-bulk-actions-bar__hint {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-index-bulk-bar__sep {
  flex-shrink: 0;
  line-height: 1;
}

.expense-index-bulk-bar__count {
  font-size: 0.875rem;
  font-weight: 700;
  color: #047857;
  white-space: nowrap;
  flex-shrink: 0;
}

.expense-index-bulk-bar__total {
  font-size: 0.8125rem;
  white-space: nowrap;
  flex-shrink: 0;
}

#expense-bulk-clear-btn {
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .expense-index-bulk-bar {
    flex-wrap: wrap;
  }

  .expenses-bulk-actions-unified .expenses-bulk-actions-bar__hint {
    flex: 1 1 100%;
    white-space: normal;
  }

  #expense-bulk-clear-btn {
    margin-left: 0;
  }
}

.expense-index-bulk-dropdown__toggle.dropdown-toggle::after {
  margin-left: 0.45rem;
}

.expense-index-bulk-dropdown__menu {
  --bs-dropdown-zindex: 1080;
  z-index: 1080;
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
}

.expense-index-bulk-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

.expense-index-bulk-dropdown__item:disabled,
.expense-index-bulk-dropdown__item.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.expense-index-bulk-dropdown__item--approve:not(:disabled):hover,
.expense-index-bulk-dropdown__item--approve:not(:disabled):focus {
  background: rgba(34, 197, 94, 0.1);
  color: #047857;
}

.expense-index-bulk-dropdown__item--reject:not(:disabled):hover,
.expense-index-bulk-dropdown__item--reject:not(:disabled):focus {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.expense-index-bulk-dropdown__item--pay:not(:disabled):hover,
.expense-index-bulk-dropdown__item--pay:not(:disabled):focus {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.expenses-index-table .exp-col-bulk-check .form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.expenses-index-table tr.is-bulk-selected {
  background-color: rgba(236, 253, 245, 0.55);
}

.expenses-index-table tr.is-bulk-selected:hover {
  background-color: rgba(209, 250, 229, 0.65);
}

.expenses-actions-row:not(.expenses-bulk-actions-bar) .expenses-action-cards {
  margin-left: auto;
}

.expenses-bulk-actions-bar__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.expenses-bulk-actions-bar__eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4338ca;
}

.expenses-bulk-actions-bar__hint {
  font-size: 0.75rem;
  color: #64748b;
}

.expenses-action-cards {
  gap: 0.625rem;
}

.expenses-action-cards .expenses-action-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  flex-shrink: 0;
}

.expenses-action-cards .expenses-action-card--payment .expenses-action-card__badge {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

.expenses-action-cards .expenses-action-card--approve .expenses-action-card__badge {
  background: rgba(22, 163, 74, 0.16);
  color: #15803d;
}

.expenses-action-cards .expenses-action-card--reject .expenses-action-card__badge {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.expenses-action-cards .expenses-action-card {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.expenses-action-cards .expenses-action-card:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.expenses-action-cards .expenses-action-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.expenses-action-cards .expenses-action-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.45rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.expenses-action-cards .expenses-action-card__label {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.expenses-action-cards .expenses-action-card--payment {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.18);
}

.expenses-action-cards .expenses-action-card--payment:not(:disabled):hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.expenses-action-cards .expenses-action-card--payment .expenses-action-card__icon {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.expenses-action-cards .expenses-action-card--payment .expenses-action-card__label {
  color: #1d4ed8;
}

.expenses-action-cards .expenses-action-card--approve {
  border-color: rgba(22, 163, 74, 0.45);
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.16);
}

.expenses-action-cards .expenses-action-card--approve:not(:disabled):hover {
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.26);
}

.expenses-action-cards .expenses-action-card--approve .expenses-action-card__icon {
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
}

.expenses-action-cards .expenses-action-card--approve .expenses-action-card__label {
  color: #15803d;
}

.expenses-action-cards .expenses-action-card--reject {
  border-color: rgba(220, 38, 38, 0.45);
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.14);
}

.expenses-action-cards .expenses-action-card--reject:not(:disabled):hover {
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.24);
}

.expenses-action-cards .expenses-action-card--reject .expenses-action-card__icon {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.expenses-action-cards .expenses-action-card--reject .expenses-action-card__label {
  color: #b91c1c;
}

.expenses-action-cards .expenses-action-card--export {
  border-color: rgba(185, 28, 28, 0.4);
  background: linear-gradient(180deg, #fff7f7 0%, #ffe4e6 100%);
  box-shadow: 0 2px 10px rgba(185, 28, 28, 0.12);
}

.expenses-action-cards .expenses-action-card--export:not(:disabled):hover {
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.22);
}

.expenses-action-cards .expenses-action-card--export .expenses-action-card__icon {
  color: #fff;
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.3);
}

.expenses-action-cards .expenses-action-card--export .expenses-action-card__label {
  color: #991b1b;
}

@media (min-width: 1200px) {
  .app-table-scroll-modern .expenses-index-table {
    min-width: 58rem;
  }
}

@media (min-width: 992px) {
  .expenses-index-toolbar {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 1.25rem;
  }

  .expenses-index-toolbar__controls {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.75rem;
  }

  .expenses-index-toolbar__filters {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.75rem;
  }

  .expenses-index-toolbar__search {
    flex: 1 1 12rem;
    min-width: 12rem;
    max-width: 16rem;
  }

  .expenses-index-toolbar__search .form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

.app-table-scroll-modern .task-col-category .text-muted {
  font-size: 0.5625rem;
}

/* Tasks index � readable table type (overrides compact defaults above) */
.app-table-scroll-modern.tasks-table-modern {
  --app-table-body-row-est: 2.375rem;
}

.app-table-scroll-modern .tasks-index-table {
  font-size: 0.8125rem;
}

.app-table-scroll-modern .tasks-performance-table {
  min-width: 58rem;
}

.app-table-scroll-modern .tasks-performance-table thead th,
.app-table-scroll-modern .tasks-performance-table tbody td,
.app-table-scroll-modern .tasks-performance-table tfoot td {
  white-space: nowrap;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table thead th {
  font-size: 0.75rem;
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  line-height: 1.25;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table tbody td {
  font-size: 0.8125rem;
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  line-height: 1.35;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-col-assignee,
.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-col-deadline.small,
.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-col-category.small {
  font-size: 0.8125rem !important;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-row-progress .progress.rounded-pill {
  height: 7px !important;
  margin-bottom: 0.2rem !important;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-row-progress .small,
.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-row-progress span.small {
  font-size: 0.75rem !important;
  line-height: 1.25;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-title-link {
  font-size: 0.875rem;
  font-weight: 600;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .status-pill {
  font-size: 0.6875rem;
  line-height: 1.25;
  padding: 0.15rem 0.45rem;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .status-pill.text-uppercase {
  font-size: 0.6875rem;
}

.app-table-scroll-modern.tasks-table-modern .tasks-index-table .task-col-category .badge.rounded-pill {
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  line-height: 1.25;
}

.app-table-scroll-modern.tasks-table-modern .task-col-category .text-muted {
  font-size: 0.75rem;
}

.app-table-scroll-modern.tasks-table-modern .task-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  font-size: 0.8125rem;
}

.exp-title-link,
.task-title-link {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.task-col-reference {
  min-width: 6.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.exp-col-title {
  min-width: 9rem;
}

.exp-col-category {
  min-width: 6rem;
}

.exp-col-amount,
.exp-col-balance {
  white-space: nowrap;
}

.exp-col-paid-progress {
  min-width: 9rem;
}

.exp-paid-progress-cell .font-monospace {
  font-variant-numeric: tabular-nums;
}

.exp-col-status {
  min-width: 6rem;
  white-space: nowrap;
}

.exp-col-submitter {
  min-width: 7rem;
}

.exp-col-date {
  min-width: 6.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.exp-col-actions {
  min-width: 4.5rem;
  overflow: visible;
}

.exp-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.exp-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-col-title {
  min-width: 9rem;
}

.task-col-category {
  min-width: 7rem;
  white-space: nowrap;
}

.task-col-assignee {
  min-width: 7rem;
}

.task-col-priority,
.task-col-status {
  white-space: nowrap;
}

.task-col-progress {
  min-width: 7.5rem;
}

.task-col-deadline {
  min-width: 6rem;
}

.task-col-actions {
  min-width: 6.5rem;
  overflow: visible;
}

.task-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.task-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1199.98px) {
  .app-table-scroll-modern > .app-table-scroll:not(.tasks-table-scroll) {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    scrollbar-gutter: stable;
  }

  .app-table-scroll-modern.tasks-table-modern > .tasks-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    max-height: calc(var(--app-table-head-est, 2.5rem) + var(--app-table-body-row-est, 3.75rem) * var(--app-table-visible-rows, 10));
    scrollbar-gutter: stable;
  }

  .app-table-scroll-modern.expenses-table-modern > .app-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
  }

  .app-table-scroll-modern .expenses-index-table {
    min-width: 34rem;
  }

  .app-table-scroll-modern .app-data-table {
    table-layout: auto;
    width: max-content;
  }

  .app-table-scroll-modern .tasks-index-table {
    min-width: 50rem;
  }

  .tasks-module .tasks-table-modern .tasks-index-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
  }

  .tasks-module .tasks-table-modern .tasks-index-table:not(.tasks-index-table--with-category) {
    min-width: 66rem;
  }

  .tasks-module .tasks-table-modern .tasks-index-table.tasks-index-table--with-category {
    min-width: 74rem;
  }

  .app-table-scroll-modern .payroll-runs-index-table {
    min-width: 54rem;
  }

  .app-table-scroll-modern .payroll-run-lines-table {
    min-width: 58rem;
  }

  .app-table-scroll-modern .hr-employees-index-table {
    min-width: 44rem;
  }

  .app-table-scroll-modern .users-index-table {
    min-width: 44rem;
  }

  .app-table-scroll-modern .leave-index-table {
    min-width: 52rem;
  }

  .app-table-scroll-modern .credits-index-table {
    min-width: 54rem;
  }

  .app-table-scroll-modern .payslips-index-table {
    min-width: 32rem;
  }

  .app-table-scroll-modern .app-data-table > thead > tr > th,
  .app-table-scroll-modern .app-data-table > tbody > tr > td {
    display: table-cell !important;
  }

  .exp-col-title {
    min-width: 10rem;
  }

  .exp-col-category {
    min-width: 6.5rem;
  }

  .exp-col-paid-progress {
    min-width: 9.5rem;
  }

  .exp-col-balance {
    min-width: 6.5rem;
  }

  .exp-col-submitter {
    min-width: 7.5rem;
  }

  .exp-col-actions {
    min-width: 4.5rem;
    padding-right: 0.5rem;
  }

  .task-col-title {
    min-width: 10rem;
  }

  .task-col-category {
    min-width: 7.5rem;
  }

  .task-col-assignee {
    min-width: 7.5rem;
  }

  .task-col-actions {
    min-width: 7rem;
    padding-right: 0.5rem;
  }

  .exp-title-link,
  .task-title-link {
    max-width: 11rem;
  }
}

/* Task view � single column when no action sidebar (team / completed tasks) */
.task-view-page--solo {
  max-width: 56rem;
}

.task-view-complete-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow: hidden;
  padding: 1.1rem 1.25rem 1.15rem;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 42%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.08);
}

.task-view-complete-banner--celebrate {
  border-color: rgba(5, 150, 105, 0.28);
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 38%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.12);
}

.task-view-complete-banner__glow {
  position: absolute;
  top: -2.5rem;
  right: -1.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.28) 0%, rgba(52, 211, 153, 0) 70%);
  pointer-events: none;
}

.task-view-complete-banner__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  color: #047857;
  background: linear-gradient(145deg, #ffffff 0%, #a7f3d0 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
  font-size: 1.15rem;
}

.task-view-complete-banner--celebrate .task-view-complete-banner__icon {
  color: #b45309;
  background: linear-gradient(145deg, #fffbeb 0%, #fde68a 100%);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22);
}

.task-view-complete-banner__body {
  position: relative;
  z-index: 1;
}

.task-view-complete-banner__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #059669;
}

.task-view-complete-banner--celebrate .task-view-complete-banner__eyebrow {
  color: #d97706;
}

.task-view-complete-banner__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #064e3b;
}

.task-view-complete-banner--celebrate .task-view-complete-banner__title {
  color: #14532d;
}

.task-view-complete-banner__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #166534;
}

.task-view-complete-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.task-view-complete-banner__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #065f46;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.task-view-complete-banner__note {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  color: #92400e;
  background: rgba(255, 251, 235, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.task-view-page .task-team-work-card {
  margin-top: 1.25rem;
}

/* .app-card � same shell as dashboard chart/panel cards (use on settings, forms, views) */
.dashboard-chart-card,
.dashboard-panel,
.app-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
  /* Shorter default .card-body height when no explicit p-* utilities */
  --bs-card-spacer-y: 0.75rem;
}

.app-card > .card-body.p-4,
.dashboard-chart-card > .card-body.p-4 {
  padding-top: 1.125rem !important;
  padding-bottom: 1.125rem !important;
}

.app-card > .card-body.p-4.p-lg-5 {
  padding-top: 1.125rem !important;
  padding-bottom: 1.125rem !important;
}

@media (min-width: 992px) {
  .app-card > .card-body.p-4.p-lg-5 {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
}

.app-card > .card-header.py-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.dashboard-panel > .card-body.border-bottom.py-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.app-card .card-header {
  background: #fff;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

/* Reports hub � Chart.js canvases */
.report-chart-wrap {
  position: relative;
  min-height: 220px;
  max-height: 320px;
}
.report-chart-wrap--tall {
  min-height: 280px;
  max-height: 420px;
}
.report-chart-wrap--short {
  min-height: 180px;
  max-height: 240px;
}

.app-card .table thead th,
.dashboard-table-wrap thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #64748b;
  border-bottom-color: rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.dashboard-panel .list-group-item {
  border-color: rgba(15, 23, 42, 0.06);
  padding-top: 0.6375rem;
  padding-bottom: 0.6375rem;
}

.dashboard-panel .list-group-item:hover {
  background: #f8fafc;
}

.dashboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #e0e7ff, #cffafe);
  color: #3730a3;
}

/* User profile avatars (photo or colored initials) */
.user-avatar-wrap {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.user-avatar-img {
  object-fit: cover;
  display: block;
}

.user-avatar-placeholder {
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.user-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  font-size: 0.8rem;
}

.user-avatar--md {
  width: 3.25rem;
  height: 3.25rem;
  min-width: 3.25rem;
  font-size: 1rem;
}

.user-avatar--lg {
  width: 4rem;
  height: 4rem;
  min-width: 4rem;
  font-size: 1.25rem;
}

.user-avatar--sidebar {
  width: 4.5rem;
  height: 4.5rem;
  min-width: 4.5rem;
  font-size: 1.45rem;
}

.user-avatar-placeholder[data-avatar-tone="0"] {
  background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%);
}

.user-avatar-placeholder[data-avatar-tone="1"] {
  background: linear-gradient(145deg, #0891b2 0%, #0e7490 100%);
}

.user-avatar-placeholder[data-avatar-tone="2"] {
  background: linear-gradient(145deg, #db2777 0%, #be185d 100%);
}

.user-avatar-placeholder[data-avatar-tone="3"] {
  background: linear-gradient(145deg, #ea580c 0%, #c2410c 100%);
}

.user-avatar-placeholder[data-avatar-tone="4"] {
  background: linear-gradient(145deg, #7c3aed 0%, #5b21b6 100%);
}

.user-avatar-placeholder[data-avatar-tone="5"] {
  background: linear-gradient(145deg, #059669 0%, #047857 100%);
}

.sidebar-user .user-avatar-wrap,
.sidebar-user .user-avatar-placeholder {
  margin-left: auto;
  margin-right: auto;
}

.dashboard-table-wrap {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  min-width: 0;
}

.dashboard-table-wrap > .table-responsive {
  --app-table-visible-rows: 10;
  --app-table-head-est: 2.55rem;
  --app-table-body-row-est: 2.42rem;
  max-height: calc(var(--app-table-head-est) + var(--app-table-body-row-est) * var(--app-table-visible-rows));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

/* Supplier rows (avatars, chips) run taller � tune row estimate */
.suppliers-table-modern.dashboard-table-wrap > .suppliers-table-scroll {
  --app-table-body-row-est: 2.9rem;
  --app-table-head-est: 2.6rem;
}

/* Supplier statement � stock received (compact body, cap at ~10 rows) */
.supplier-statement-receipt-modern.dashboard-table-wrap > .table-responsive {
  --app-table-visible-rows: 10;
  --app-table-head-est: 2.35rem;
  --app-table-body-row-est: 2.08rem;
}

/* Headers: pin cells when thead has no Bootstrap .sticky-top (e.g. dashboard, users list) */
.dashboard-table-wrap > .table-responsive thead:not(.sticky-top) th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.1);
}

/* Slightly tighter default body rows � not supplier / expenses-tasks / inventory (inventory sets its own density) */
.dashboard-table-wrap:not(.suppliers-table-modern):not(.app-table-scroll-modern):not(.inventory-table-modern) > .table-responsive .table tbody td {
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
}

.dashboard-table-wrap:not(.suppliers-table-modern):not(.app-table-scroll-modern):not(.inventory-table-modern) > .table-responsive .table thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
  .content-area > .dashboard-table-wrap,
  .dashboard-table-wrap {
    overflow: visible;
  }

  .dashboard-table-wrap > .table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
  }
}

.dashboard-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #94a3b8;
}

.dashboard-empty i {
  font-size: 2rem;
  opacity: 0.5;
}

/* Installation report: searchable location list (Bootstrap dropdown-item buttons inside <ul>) */
.ir-install-loc-menu,
.task-inventory-picker-menu {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.ir-install-loc-menu li,
.task-inventory-picker-menu .dropdown-item {
  margin: 0;
}

.task-inventory-picker-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.1a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.95rem;
  padding-right: 2.25rem;
}

.task-inventory-picker {
  position: relative;
}

.task-inventory-picker-menu.is-floating {
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.15);
}

#taskCreateModal .task-inventory-line:focus-within {
  position: relative;
  z-index: 2;
}

#taskInventorySerialModal {
  z-index: 1095;
}

#taskInventorySerialModal .modal-footer {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

#taskInventorySerialModalSave:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#appNotifyModal.show,
#appConfirmModal.show {
  z-index: 1100 !important;
}

#appConfirmModal.show .modal-dialog,
#appNotifyModal.show .modal-dialog {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Parent modals stay visible but must not cover app confirm / notify dialogs */
.modal.app-modal-stack-behind {
  pointer-events: none;
}

.modal.app-modal-stack-behind .modal-dialog {
  pointer-events: none;
}

#taskCreateModal.modal.show,
#taskEditModal.modal.show {
  z-index: 1075;
}

#taskCreateModal.modal.show .modal-dialog,
#taskEditModal.modal.show .modal-dialog {
  position: relative;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

#appB2cOtpModal.show {
  z-index: 1115 !important;
}

#appB2cOtpModal.show .modal-dialog {
  position: relative;
  z-index: 1;
}

/* Scrollable Bootstrap modals: when <form> wraps .modal-body + .modal-footer, the form must
   shrink (min-height: 0) or the body never gets overflow and the footer stays off-screen. */
.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
}

.modal-dialog-scrollable .modal-content > form .modal-footer {
  flex-shrink: 0;
}

/* ��� App feedback & confirm modals ��� */
.app-modal-dialog {
  max-width: 420px;
}

.app-modal-sheet {
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.app-modal-sheet--confirm {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
}

.app-modal-accent {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}

.app-modal-accent--success {
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
}

.app-modal-accent--error {
  background: linear-gradient(90deg, #be123c, #f43f5e, #fb7185);
}

.app-modal-accent--warning {
  background: linear-gradient(90deg, #b45309, #f59e0b, #fbbf24);
}

.app-modal-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.app-modal-icon--success {
  background: linear-gradient(145deg, #059669, #10b981);
}

.app-modal-icon--error {
  background: linear-gradient(145deg, #be123c, #e11d48);
}

.app-modal-icon--warning {
  background: linear-gradient(145deg, #b45309, #f59e0b);
  color: #fffbeb;
}

.app-modal-icon--warning i {
  color: inherit;
}

.app-modal-close {
  opacity: 0.55;
}

.app-modal-close:hover {
  opacity: 1;
}

.app-modal .modal-footer .btn.rounded-pill {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-body .app-modal-sheet {
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

/* Settings � tab navigation */
.settings-nav-tabs {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.settings-nav-tabs .nav-link {
  color: #64748b;
  font-weight: 600;
  border: 1px solid transparent;
  margin-bottom: -1px;
}

.settings-nav-tabs .nav-link:hover {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.06);
}

.settings-nav-tabs .nav-link.active {
  color: #0f172a;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08) rgba(15, 23, 42, 0.08) #fff;
}

.settings-nav-tabs .cron-tab-badge {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  padding: 0.2em 0.55em;
  vertical-align: middle;
}

.settings-nav-tabs .cron-tab-badge .cron-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.2rem;
  margin-bottom: 0.05rem;
}

/* Settings � alerts tab */
.settings-alerts-shell {
  --alerts-radius: 1rem;
  --alerts-border: rgba(15, 23, 42, 0.07);
  --alerts-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.settings-alerts-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--alerts-radius);
  border: 1px solid var(--alerts-border);
  background:
    radial-gradient(ellipse 90% 120% at 0% 0%, rgba(59, 130, 246, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 70% 100% at 100% 100%, rgba(16, 185, 129, 0.07) 0%, transparent 50%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--alerts-shadow);
  position: relative;
  overflow: hidden;
}

.settings-alerts-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #6366f1, #10b981);
}

.settings-alerts-hero__main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: min(100%, 18rem);
}

.settings-alerts-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  flex-shrink: 0;
}

.settings-alerts-hero__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.settings-alerts-hero__text {
  margin: 0;
  max-width: 36rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
}

.settings-alerts-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.settings-alerts-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 0.1rem;
  align-items: center;
  min-width: 7.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--alerts-border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
}

.settings-alerts-stat__icon {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
}

.settings-alerts-stat--email .settings-alerts-stat__icon {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.settings-alerts-stat--sms .settings-alerts-stat__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.settings-alerts-stat__value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.settings-alerts-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.settings-alerts-group {
  border-radius: var(--alerts-radius);
  border: 1px solid var(--alerts-border);
  background: #fff;
  box-shadow: var(--alerts-shadow);
  overflow: hidden;
}

.settings-alerts-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
}

.settings-alerts-group__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.settings-alerts-group__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.settings-alerts-group--expenses .settings-alerts-group__icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(251, 191, 36, 0.08) 100%);
  color: #d97706;
}

.settings-alerts-group--tasks .settings-alerts-group__icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, rgba(99, 102, 241, 0.08) 100%);
  color: #2563eb;
}

.settings-alerts-group--leave .settings-alerts-group__icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(192, 132, 252, 0.08) 100%);
  color: #9333ea;
}

.settings-alerts-group--inventory .settings-alerts-group__icon {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(56, 189, 248, 0.08) 100%);
  color: #0284c7;
}

.settings-alerts-group--security .settings-alerts-group__icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(248, 113, 113, 0.08) 100%);
  color: #dc2626;
}

.settings-alerts-group__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.settings-alerts-group__meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.settings-alerts-group__channels {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.72rem;
}

.settings-alerts-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
}

.settings-alerts-channel--email {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.settings-alerts-channel--sms {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}

.settings-alerts-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

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

.settings-alerts-item:hover {
  background: rgba(248, 250, 252, 0.85);
}

.settings-alerts-item.is-active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0%, rgba(255, 255, 255, 0) 42%);
}

.settings-alerts-item__label {
  font-size: 0.86rem;
  font-weight: 500;
  color: #334155;
  line-height: 1.45;
}

.settings-alerts-item__toggles {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.settings-alerts-pill {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.settings-alerts-pill__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.settings-alerts-pill__surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.82rem;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.settings-alerts-pill:hover .settings-alerts-pill__surface {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.14);
}

.settings-alerts-pill__input:focus-visible + .settings-alerts-pill__surface {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.settings-alerts-pill--email .settings-alerts-pill__input:checked + .settings-alerts-pill__surface {
  color: #fff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.settings-alerts-pill--sms .settings-alerts-pill__input:checked + .settings-alerts-pill__surface {
  color: #fff;
  border-color: #059669;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.26);
}

.settings-alerts-pill--na {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  user-select: none;
}

.settings-alerts-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--alerts-radius);
  border: 1px solid var(--alerts-border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: var(--alerts-shadow);
}

.settings-alerts-footer__hint {
  font-size: 0.82rem;
  color: #64748b;
}

.settings-alerts-save {
  padding-inline: 1.25rem;
  border-radius: 0.65rem;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

@media (max-width: 991.98px) {
  .settings-alerts-stats {
    width: 100%;
  }

  .settings-alerts-stat {
    flex: 1 1 7.5rem;
  }
}

@media (max-width: 575.98px) {
  .settings-alerts-hero {
    padding: 1.1rem;
  }

  .settings-alerts-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .settings-alerts-item__toggles {
    width: 100%;
    justify-content: flex-end;
  }

  .settings-alerts-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-alerts-save {
    width: 100%;
  }
}

/* Settings � SMS tab (matches Alerts shell design) */
.settings-sms-shell {
  --sms-accent: #059669;
  --sms-accent-2: #7c3aed;
}

.settings-sms-hero::before {
  background: linear-gradient(90deg, #059669, #10b981, #7c3aed);
}

.settings-sms-hero__icon {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

.settings-sms-stat--provider .settings-alerts-stat__icon {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.settings-sms-stat--status .settings-alerts-stat__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.settings-sms-stat--sender .settings-alerts-stat__icon {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.settings-sms-stat__value--text {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.settings-sms-issues {
  padding: 0.85rem 1rem;
  border-radius: var(--alerts-radius);
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.settings-sms-issues__title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b91c1c;
}

.settings-sms-issues__list {
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: #991b1b;
}

.settings-sms-ready {
  padding: 0.65rem 0.9rem;
  border-radius: 0.65rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.settings-sms-group__body {
  padding: 1rem 1.1rem 1.1rem;
}

.settings-sms-group__icon--provider {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16) 0%, rgba(168, 85, 247, 0.08) 100%);
  color: #7c3aed;
}

.settings-sms-group__icon--connection {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.08) 100%);
  color: #059669;
}

.settings-sms-group__icon--advanced {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16) 0%, rgba(99, 102, 241, 0.08) 100%);
  color: #2563eb;
}

.settings-sms-group__icon--test {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(56, 189, 248, 0.08) 100%);
  color: #0284c7;
}

.settings-sms-preset-hint a {
  text-decoration: none;
}

.settings-sms-preset-hint a:hover {
  text-decoration: underline;
}

/* Settings � SMS tab (vico admin field-card layout) */
.settings-sms-page .settings-field-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.settings-sms-page .settings-field-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}

.settings-sms-page .settings-field-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.settings-sms-page .settings-field-card__icon--provider {
  background: #ede9fe;
  color: #7c3aed;
}

.settings-sms-page .settings-field-card__icon--connection {
  background: #d1fae5;
  color: #059669;
}

.settings-sms-page .settings-field-card__icon--balance {
  background: #fef3c7;
  color: #d97706;
}

.settings-sms-page .settings-field-card__icon--advanced {
  background: #dbeafe;
  color: #2563eb;
}

.settings-sms-page .settings-field-card__icon--test {
  background: #e0f2fe;
  color: #0284c7;
}

.settings-sms-page .settings-field-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.15rem;
}

.settings-sms-page .settings-field-card__hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.settings-sms-page .settings-field-card__body {
  padding: 1.15rem;
}

/* Settings � Payments tab (STK / C2B field cards) */
.settings-payments-page .settings-field-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.settings-payments-page .settings-field-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}

.settings-payments-page .settings-field-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.settings-payments-page .settings-field-card__icon--stk {
  background: #dbeafe;
  color: #2563eb;
}

.settings-payments-page .settings-field-card__icon--c2b {
  background: #d1fae5;
  color: #059669;
}

.settings-payments-page .settings-field-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.settings-payments-page .settings-field-card__hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.15rem 0 0;
}

.settings-payments-page .settings-field-card__body {
  padding: 1.15rem;
}

.settings-payments-page .settings-secret-input {
  position: relative;
}

.settings-payments-page .settings-secret-input .form-control {
  position: relative;
  z-index: 2;
}

.settings-payments-page .settings-secret-input__dots {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #334155;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
  z-index: 3;
}

.settings-payments-page .settings-secret-input--saved:not(.is-editing) .form-control {
  color: transparent;
  caret-color: #334155;
}

.settings-payments-page .settings-secret-input--saved:not(.is-editing) .form-control::placeholder {
  color: transparent;
}

.settings-payments-page .settings-secret-input--saved.is-editing .settings-secret-input__dots {
  display: none;
}

.settings-payments-page .settings-secret-input .form-control {
  border-right: 0;
}

.settings-payments-page .settings-secret-input .btn {
  border-color: #e2e8f0;
}

.settings-payments-page .settings-secret-input .form-control:focus {
  box-shadow: none;
}

.settings-payments-page .settings-secret-input:focus-within {
  border-radius: 0.375rem;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.settings-sms-page .settings-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  color: inherit;
}

.settings-sms-page .settings-toggle-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.settings-sms-page .settings-toggle-card__icon--enable {
  background: #d1fae5;
  color: #059669;
}

.settings-sms-page .settings-toggle-card__icon--alerts {
  background: #e0e7ff;
  color: #4f46e5;
}

.settings-sms-page .settings-toggle-card__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-sms-page .settings-toggle-card--link:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.settings-sms-page .settings-toggle-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem;
}

.settings-sms-page .settings-toggle-card__hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.settings-sms-page .settings-toggle-card__switch {
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.settings-sms-page .settings-toggle-card__switch .form-check-input {
  width: 2.75rem;
  height: 1.4rem;
  cursor: pointer;
}

.settings-sms-page .settings-toggle-card__chev {
  flex-shrink: 0;
  color: #64748b;
  padding-top: 0.2rem;
}

.settings-sms-page .settings-tip-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.settings-sms-page .settings-tip-card__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.65rem;
}

.settings-sms-page .settings-tip-card__text {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

.settings-sms-page .settings-tip-card__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.settings-sms-page .settings-tip-card__list li + li {
  margin-top: 0.35rem;
}

.settings-sms-actions {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.cron-status-panel {
  border-width: 1px !important;
}

.cron-status-panel__indicator {
  padding-top: 0.15rem;
}

.cron-status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  vertical-align: middle;
  background: #94a3b8;
}

.cron-status-dot--lg {
  width: 0.85rem;
  height: 0.85rem;
}

.cron-status-dot--ok {
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  animation: cron-status-pulse 2s ease-out infinite;
}

.cron-status-dot--stale {
  background: #ca8a04;
}

.cron-status-dot--never {
  background: #94a3b8;
}

@keyframes cron-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  }
  70% {
    box-shadow: 0 0 0 0.45rem rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.cron-status-panel__help summary {
  cursor: pointer;
  user-select: none;
}

/* ��� Mobile & touch ��� */
#mobileNav.mobile-nav-drawer.offcanvas-start {
  --bs-offcanvas-width: min(var(--mobile-nav-width), calc(100vw - 1rem));
  top: 0;
  height: 100%;
  max-height: 100dvh;
  z-index: 1050;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: 8px 0 40px rgba(15, 23, 42, 0.14);
}

.offcanvas-backdrop {
  z-index: 1040 !important;
  backdrop-filter: blur(2px);
}

#mobileNav .offcanvas-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#mobileNav .mobile-nav-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  height: 0;
  padding: max(0.45rem, env(safe-area-inset-top, 0px)) 0.75rem 0;
  background: transparent;
  border-bottom: 0 !important;
  pointer-events: none;
}

#mobileNav .mobile-nav-close-wrap {
  display: inline-flex;
  pointer-events: auto;
}

#mobileNav .mobile-nav-close-btn {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.625rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #f1f5f9;
  color: #334155;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#mobileNav .mobile-nav-close-btn i {
  font-size: 1rem;
  line-height: 1;
}

#mobileNav .mobile-nav-close-btn:hover {
  background: #e2e8f0;
  border-color: rgba(15, 23, 42, 0.22);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

#mobileNav .mobile-nav-user {
  flex-shrink: 0;
  margin: 0.1rem 0.75rem 0.35rem;
  padding: 0.85rem !important;
  border-radius: 0.875rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07) 0%, rgba(124, 58, 237, 0.04) 100%);
}

#mobileNav .mobile-nav-user-email {
  font-size: 0.8125rem;
  line-height: 1.35;
  margin-top: 0.1rem;
}

#mobileNav .mobile-nav-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0.15rem;
}

#mobileNav .nav-link {
  min-height: 2.85rem;
  margin-bottom: 0.125rem;
}

#mobileNav .mobile-reports-group .collapse .nav-link {
  font-size: 0.8125rem;
  min-height: 2.65rem;
  padding-left: 0.85rem !important;
}

#mobileNav .mobile-nav-sub-list {
  position: relative;
  margin: 0.2rem 0.5rem 0.35rem 0.85rem;
  padding: 0.15rem 0 0.15rem 0.65rem;
  border-left: 2px solid rgba(99, 102, 241, 0.22);
}

/* Small horizontal branch from vertical rail into each sub-list item */
.sidebar-reports-sub .nav-link,
#mobileNav .mobile-nav-sub-list .nav-link {
  position: relative;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.sidebar-reports-sub .nav-link::after,
#mobileNav .mobile-nav-sub-list .nav-link::after {
  content: "";
  position: absolute;
  left: -0.65rem;
  top: 50%;
  width: 0.625rem;
  height: 2px;
  background: rgba(99, 102, 241, 0.32);
  transform: translateY(-50%);
  border-radius: 1px;
  pointer-events: none;
}

#mobileNav .mobile-nav-sub-list .nav-link {
  border-radius: 0.5rem !important;
  margin-bottom: 0;
}

#mobileNav .mobile-nav-sub-list .nav-link:last-child {
  border-bottom: none;
}

#mobileNav .mobile-nav-sub-list .nav-link.active {
  border-bottom-color: transparent;
}

#mobileNav .mobile-nav-sub-list .nav-link.active + .nav-link {
  border-top: none;
}

.sidebar-reports-sub .nav-link:last-child,
#mobileNav .mobile-nav-sub-list .nav-link:last-child {
  border-bottom: none;
}

#mobileNav .mobile-reports-group .collapse .nav-link i.me-2 {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  font-size: 0.75rem;
}

#mobileNav .mobile-reports-group {
  margin-bottom: 0.25rem;
}

#mobileNav .offcanvas-header,
#mobileNav .mobile-nav-scroll,
#mobileNav .mobile-nav-footer,
#mobileNav .mobile-nav-user {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

#mobileNav .mobile-nav-footer {
  flex-shrink: 0;
  padding-top: 0.65rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.offcanvas-start .offcanvas-body {
  padding-bottom: 0;
}

@media (max-width: 1199.98px) {
  .topbar-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-app-name {
    font-size: 0.875em;
  }
}

@media (max-width: 575.98px) {
  .topbar-title {
    font-size: clamp(0.75rem, 3.2vw, 0.9375rem);
    line-height: 1.35;
  }

  .topbar-app-name {
    font-size: 0.8125rem;
  }

  .topbar-page-name {
    font-size: inherit;
  }

  .app-page-toolbar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .app-page-toolbar > p {
    text-align: left;
  }

  .app-page-toolbar > .btn,
  .app-page-toolbar > a.btn,
  .app-page-toolbar > form {
    width: 100%;
  }

  .app-page-toolbar > form .btn {
    width: 100%;
  }

  .app-page-toolbar > form.app-toolbar-search .btn {
    width: auto;
  }

  .app-page-toolbar .d-grid {
    width: 100%;
  }

  .app-page-toolbar .badge {
    align-self: flex-start;
    width: auto;
  }

  .dashboard-hero {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .payroll-hero-actions .btn,
  .hr-hero-actions .btn {
    font-size: 0.8125rem;
  }

  .payroll-hero-actions .btn .fa-solid.me-2,
  .hr-hero-actions .btn .fa-solid.me-2 {
    margin-right: 0.35rem !important;
  }

  .dashboard-hero-action {
    font-size: 0.8125rem;
  }
}

@media (max-width: 575.98px) {
  .settings-nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
    margin-bottom: 1rem !important;
    scrollbar-width: thin;
  }

  .settings-nav-tabs .nav-item {
    flex-shrink: 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  .table .btn-sm,
  .table .btn-group-sm > .btn {
    min-height: 2.375rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .table td.text-end .d-inline-flex {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }
}

/* Expense detail � two columns on phone (col-6), denser grid on md+ */
.expense-detail-meta .expense-detail-label {
  font-weight: 600;
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Expense view: collapsible payment sections */
.expense-payout-accordion .accordion-button:focus {
  box-shadow: none;
}
.expense-collapse-chevron {
  transition: transform 0.2s ease;
}
.expense-collapse-toggle[aria-expanded="true"] .expense-collapse-chevron {
  transform: rotate(180deg);
}

/* Reports: individual report picker (accordion + selectable list) */
.reports-individual-accordion .accordion-item {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.reports-individual-accordion .accordion-button {
  background: #f8fafc;
  box-shadow: none;
}

.reports-individual-accordion .accordion-button:not(.collapsed) {
  background: #fff;
  color: inherit;
}

.reports-indiv-group-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  flex-shrink: 0;
}

.reports-indiv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0 0.85rem 1.15rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.reports-indiv-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.5rem 0.85rem 0;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
}

.reports-indiv-item-main:hover,
.reports-indiv-item:hover {
  background: rgba(79, 70, 229, 0.04);
}

.reports-indiv-item-main.is-selected,
.reports-indiv-item.is-selected {
  background: rgba(79, 70, 229, 0.08);
  box-shadow: inset 3px 0 0 #4f46e5;
}

.reports-indiv-item-check {
  width: 1.1rem;
  color: #cbd5e1;
  font-size: 0.55rem;
  line-height: 1;
  flex-shrink: 0;
}

.reports-indiv-item.is-selected .reports-indiv-item-check,
.reports-indiv-item-main.is-selected .reports-indiv-item-check {
  color: #4f46e5;
  font-size: 0.95rem;
}

.reports-indiv-item-open {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.reports-indiv-item-main:hover .reports-indiv-item-open,
.reports-indiv-item-main.is-selected .reports-indiv-item-open,
.reports-indiv-item:hover .reports-indiv-item-open,
.reports-indiv-item.is-selected .reports-indiv-item-open {
  opacity: 1;
}

.reports-indiv-pdf {
  min-width: 2.25rem;
}

/* Supplier create / edit modals */
@media (min-width: 576px) {
  .supplier-form-modal .modal-dialog {
    --bs-modal-width: 920px;
    max-width: min(920px, calc(100vw - 2rem));
  }
}

.supplier-form-modal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.supplier-form-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--bs-primary-bg-subtle, #e7f0ff);
  color: var(--bs-primary, #0d6efd);
  font-size: 1.15rem;
}

.supplier-form-section {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
  padding: 1.15rem 1.25rem;
}

.supplier-form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0;
}

.supplier-form-modal .form-control-lg {
  border-radius: 0.625rem;
}

@media (max-width: 991.98px) {
  .supplier-form-modal .supplier-form-section {
    height: auto !important;
  }
}

/* Supplier pay modal � payout method picker */
.supplier-pay-methods-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}

.supplier-pay-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  align-items: stretch;
}

.supplier-pay-methods .supplier-pay-method-btn {
  width: 100%;
  min-width: 0;
}

.supplier-pay-method-btn {
  border-radius: 0.875rem !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.supplier-pay-method-btn__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(15, 23, 42, 0.05);
  font-size: 1.125rem;
}

.supplier-pay-method-btn.active .supplier-pay-method-btn__icon-wrap {
  background: rgba(37, 99, 235, 0.12);
}

.supplier-pay-method-btn__label {
  font-size: 0.9375rem;
  line-height: 1.3;
}

.supplier-pay-method-btn__hint {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
  font-size: 0.8125rem;
}

.supplier-pay-method-btn .supplier-pay-method-btn__check {
  opacity: 0;
  font-size: 1.125rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: scale(0.85);
}

.supplier-pay-method-btn:hover {
  border-color: rgba(37, 99, 235, 0.3) !important;
  background: rgba(248, 250, 252, 1) !important;
}

.supplier-pay-method-btn.active {
  border-color: rgba(37, 99, 235, 0.45) !important;
  background: rgba(239, 246, 255, 0.98) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 1px 3px rgba(37, 99, 235, 0.08);
}

.supplier-pay-method-btn.active .supplier-pay-method-btn__check {
  opacity: 1;
  transform: scale(1);
}

/* Phones & small screens � single column, full-width tap targets */
@media (max-width: 575.98px) {
  .supplier-pay-modal-dialog.modal-fullscreen-sm-down .modal-content {
    border-radius: 1rem 1rem 0 0;
  }

  .supplier-pay-modal-dialog.modal-fullscreen-sm-down .modal-header {
    padding-top: 1.25rem;
  }

  .supplier-pay-modal-dialog.modal-fullscreen-sm-down .modal-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .supplier-pay-modal-dialog.modal-fullscreen-sm-down .modal-footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
  }

  .supplier-pay-methods {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .supplier-pay-method-btn {
    min-height: 3.5rem;
    padding: 0.875rem 1rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }

  .supplier-pay-method-btn:active:not(.active) {
    transform: scale(0.99);
    background: rgba(248, 250, 252, 1) !important;
  }

  .supplier-pay-method-btn__icon-wrap {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
  }

  .supplier-pay-method-btn__label {
    font-size: 1rem;
  }

  .supplier-pay-method-btn__hint {
    -webkit-line-clamp: 1;
  }

  #supplierPayModal .supplier-pay-methods-label {
    margin-bottom: 0.625rem;
  }

  #supplierPayModal #pay_method_instructions {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem !important;
  }
}

/* Small tablets � keep two columns when modal is wide enough */
@media (min-width: 576px) and (max-width: 767.98px) {
  .supplier-pay-methods {
    gap: 0.5rem;
  }

  .supplier-pay-method-btn {
    padding: 0.75rem !important;
    gap: 0.5rem !important;
  }

  .supplier-pay-method-btn__icon-wrap {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  .supplier-pay-method-btn__label {
    font-size: 0.875rem;
  }
}

/* Expense create page � full content width */
.expense-create-page {
  max-width: none;
  width: 100%;
}

.expense-create-card {
  border-radius: 1rem !important;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.expense-create-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--bs-primary-bg-subtle, #e7f0ff);
  color: var(--bs-primary, #0d6efd);
  font-size: 1.15rem;
}

.expense-form-section {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
  padding: 1.15rem 1.25rem;
}

.expense-form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0;
}

.expense-create-form .form-control-lg,
.expense-create-form .form-select-lg {
  border-radius: 0.625rem;
}

.expense-receipt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 12rem;
  padding: 1.5rem 1rem;
  border: 2px dashed rgba(37, 99, 235, 0.28);
  border-radius: 0.875rem;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.expense-receipt-drop:hover,
.expense-receipt-drop:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(239, 246, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.expense-receipt-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.15rem;
}

.expense-receipt-drop-title {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.9375rem;
}

.expense-receipt-drop-hint {
  font-size: 0.8125rem;
  color: #64748b;
}

.expense-receipt-drop-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-create-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

@media (min-width: 1200px) {
  .expense-receipt-drop {
    min-height: 14.5rem;
  }

  .expense-create-form .expense-form-section {
    padding: 1.35rem 1.5rem;
  }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
  .expense-create-form .expense-receipt-drop {
    min-height: 9rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 1.25rem 1.5rem;
    text-align: left;
  }

  .expense-create-form .expense-receipt-drop-icon {
    flex-shrink: 0;
  }

  .expense-create-form .expense-receipt-drop-title,
  .expense-create-form .expense-receipt-drop-hint {
    flex: 1 1 auto;
    min-width: 8rem;
  }

  .expense-create-form .expense-receipt-drop-name {
    flex: 1 1 100%;
    margin-top: 0.15rem;
  }
}

@media (max-width: 575.98px) {
  .expense-create-footer {
    flex-direction: column;
    align-items: stretch !important;
  }

  .expense-create-footer .d-flex {
    width: 100%;
  }

  .expense-create-footer .btn {
    flex: 1 1 auto;
  }
}

/* Expense view page */
.expense-view-page {
  max-width: none;
  width: 100%;
}

.expense-view-card {
  border-radius: 1rem !important;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.expense-view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--bs-primary-bg-subtle, #e7f0ff);
  color: var(--bs-primary, #0d6efd);
  font-size: 1.15rem;
}

.expense-view-icon-sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.95rem;
}

.expense-view-stat {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  height: 100%;
}

.expense-view-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.expense-view-stat-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.expense-view-progress {
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.expense-view-progress .progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.expense-receipt-preview img {
  max-height: 20rem;
  width: auto;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.expense-view-log-card {
  position: sticky;
  top: 1rem;
}

.expense-payment-log-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.expense-payment-log-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 1199.98px) {
  .expense-view-log-card {
    position: static;
  }
}

/* Suppliers list � modern table */
.suppliers-table-modern {
  --sup-row-pad-y: 0.85rem;
}

.suppliers-table-modern .suppliers-index-table {
  table-layout: fixed;
  width: 100%;
}

.suppliers-table-modern .suppliers-index-table thead th {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.suppliers-table-modern .suppliers-index-table tbody td {
  padding-top: var(--sup-row-pad-y);
  padding-bottom: var(--sup-row-pad-y);
  border-bottom-color: rgba(15, 23, 42, 0.05);
}

.suppliers-table-modern .suppliers-index-table tbody tr {
  transition: background-color 0.15s ease;
}

.suppliers-table-modern .suppliers-index-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.9);
}

.suppliers-index-table th,
.suppliers-index-table td {
  overflow: hidden;
  vertical-align: middle;
}

.suppliers-index-table th.sup-col-actions,
.suppliers-index-table td.sup-col-actions {
  overflow: visible;
}

.suppliers-index-table .sup-col-supplier {
  width: 22%;
  min-width: 8rem;
}

.suppliers-index-table .sup-col-contact {
  width: 16%;
  min-width: 7.5rem;
}

.suppliers-index-table .sup-col-max-qty {
  width: 4.5rem;
}

.suppliers-index-table .sup-col-unpaid {
  width: 11rem;
}

.suppliers-index-table .sup-col-catalog {
  width: 3.5rem;
}

.suppliers-index-table .sup-col-updated {
  width: 6.5rem;
  max-width: 6.5rem;
  font-variant-numeric: tabular-nums;
}

.suppliers-index-table .sup-col-actions {
  width: 9.5rem;
  min-width: 9.5rem;
  overflow: visible;
}

.sup-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.sup-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1d4ed8;
  background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.sup-name-cell {
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sup-contact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sup-contact-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.sup-contact-line i {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  font-size: 0.65rem;
  color: #475569;
  background: #f1f5f9;
}

.sup-contact-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sup-metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.sup-metric-pill--items {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.12);
}

.sup-balance {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.25rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.sup-balance-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.sup-balance-cap {
  color: #94a3b8;
  font-size: 0.75rem;
}

.sup-balance-unpaid--clear {
  color: #059669;
  font-weight: 600;
}

.sup-balance-unpaid--due {
  color: #b45309;
  font-weight: 600;
}

.sup-updated-time {
  display: block;
  font-size: 0.8125rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sup-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.sup-actions-group .btn {
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.sup-actions-group form {
  display: inline-flex;
  margin: 0;
}

.suppliers-index-table .sup-col-max-qty,
.suppliers-index-table .sup-col-catalog,
.suppliers-index-table .sup-col-unpaid,
.suppliers-index-table .sup-col-updated {
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .suppliers-table-modern .suppliers-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
  }

  .suppliers-table-modern .suppliers-index-table {
    table-layout: auto;
    width: max-content;
    min-width: 58rem;
  }

  .suppliers-index-table th,
  .suppliers-index-table td {
    display: table-cell !important;
  }

  .suppliers-index-table th.sup-col-actions,
  .suppliers-index-table td.sup-col-actions {
    overflow: visible;
  }

  .suppliers-index-table .sup-col-supplier {
    width: auto;
    min-width: 10rem;
  }

  .suppliers-index-table .sup-col-contact {
    width: auto;
    min-width: 10rem;
  }

  .suppliers-index-table .sup-col-max-qty {
    width: auto;
    min-width: 4.75rem;
  }

  .suppliers-index-table .sup-col-unpaid {
    width: auto;
    min-width: 11.5rem;
  }

  .suppliers-index-table .sup-col-catalog {
    width: auto;
    min-width: 3.75rem;
  }

  .suppliers-index-table .sup-col-updated {
    width: auto;
    min-width: 6.75rem;
    max-width: none;
  }

  .suppliers-index-table .sup-col-actions {
    width: auto;
    min-width: 11rem;
    padding-right: 0.5rem;
  }

  .sup-name-cell,
  .sup-contact-text {
    max-width: 11rem;
  }
}

.supplier-catalog-table {
  table-layout: fixed;
  width: 100%;
}

.supplier-catalog-table th,
.supplier-catalog-table td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.supplier-catalog-table .cat-col-item {
  width: 42%;
}

.supplier-catalog-table .cat-col-sku {
  width: 22%;
}

.supplier-catalog-table .cat-col-cost {
  width: 16%;
}

.supplier-catalog-table .cat-col-actions {
  width: 20%;
  overflow: visible;
  text-overflow: clip;
}

.supplier-catalog-table .cat-item-cell,
.supplier-catalog-table .cat-sku-cell {
  max-width: 100%;
}

/* HR leave � modern timeline / approval tables */
.hr-leave-table-modern.dashboard-table-wrap > .table-responsive,
.hr-leave-table-modern.dashboard-table-wrap > .app-table-scroll {
  --app-table-body-row-est: 2.85rem;
  --app-table-visible-rows: 12;
}

.leave-index-table th,
.leave-index-table td:not(.leave-col-employee) {
  white-space: nowrap;
  vertical-align: middle;
}

.leave-index-table .leave-col-employee {
  vertical-align: middle;
  min-width: 9rem;
}

.leave-index-table .leave-col-dates {
  min-width: 8rem;
}

.leave-index-table .leave-col-requested {
  min-width: 6.5rem;
}

.leave-index-table .leave-col-actions {
  min-width: 5.5rem;
}

.hr-leave-table-modern .leave-index-table tbody tr {
  transition: background-color 0.15s ease;
}

.hr-leave-table-modern .leave-index-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.95);
}

.hr-leave-table-modern .leave-index-table thead th {
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-leave-table-modern .leave-table-toolbar-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e0e7ff, #dbeafe);
  color: #4338ca;
  flex-shrink: 0;
}

.hr-leave-table-modern .leave-emp-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #e0e7ff, #cffafe);
  color: #3730a3;
}

.hr-leave-table-modern .leave-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}

.hr-leave-table-modern .leave-date-primary {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.8125rem;
}

.hr-leave-table-modern .leave-date-secondary {
  font-size: 0.6875rem;
  color: #64748b;
}

.hr-leave-table-modern .leave-expiry-cell {
  font-size: 0.8125rem;
  color: #475569;
}

.hr-leave-table-modern .leave-expiry-cell i {
  opacity: 0.55;
}

.leave-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.125rem;
  height: 2.125rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #f1f5f9;
  color: #334155;
  line-height: 1;
}

.leave-countdown--urgent {
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  color: #b45309;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.leave-countdown--ended {
  background: #e2e8f0;
  color: #64748b;
}

.leave-countdown--muted {
  background: transparent;
  color: #94a3b8;
  min-width: auto;
  font-weight: 500;
}

.hr-leave-table-modern .leave-countdown-hint {
  font-size: 0.625rem;
  color: #94a3b8;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.hr-leave-table-modern .leave-actions-group {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.hr-leave-table-modern .leave-actions-group .btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-table-scroll-modern.hr-leave-table-modern .leave-index-table .status-pill {
  font-size: 0.6875rem;
  padding: 0.25rem 0.65rem;
}

/* HR credits index � compact date filters (~half default width) */
.credits-index-toolbar input.credits-filter-date,
input.credits-filter-date.form-control-sm {
  width: 6.75rem;
  min-width: 6.75rem;
  max-width: 6.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.credits-index-table th,
.credits-index-table td:not(.cr-col-employee) {
  white-space: nowrap;
  vertical-align: middle;
}

.credits-index-table .cr-col-employee {
  vertical-align: middle;
  min-width: 9rem;
}

.credits-index-table .cr-col-reference {
  min-width: 6.5rem;
}

.credits-index-table .cr-col-principal,
.credits-index-table .cr-col-paid,
.credits-index-table .cr-col-balance {
  min-width: 6rem;
}

.credits-index-table .cr-col-installments {
  min-width: 6.5rem;
}

.credits-index-table .cr-col-actions {
  min-width: 5rem;
}

.payslips-index-table th,
.payslips-index-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.payslips-index-table .ps-col-period {
  min-width: 10rem;
}

.payslips-index-table .ps-col-gross,
.payslips-index-table .ps-col-net {
  min-width: 6rem;
}

.payslips-index-table .ps-col-actions {
  min-width: 10rem;
}

.hr-self-payslips-actions-group {
  flex-wrap: nowrap;
}

/* HR portal � alerts card: compact height, scroll after 8 items */
.hr-portal-alerts-card {
  height: auto;
  align-self: flex-start;
}

.hr-portal-alerts-scroll {
  --hr-alert-row-est: 5.75rem;
  --hr-alert-visible-rows: 8;
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(var(--hr-alert-row-est) * var(--hr-alert-visible-rows));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.hr-portal-alerts-list .hr-portal-alert-item {
  padding: 0.65rem 1rem;
  min-height: var(--hr-alert-row-est);
  max-height: var(--hr-alert-row-est);
  overflow: hidden;
  box-sizing: border-box;
}

.hr-portal-alert-body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
}

.hr-portal-alert-meta {
  font-size: 0.72rem;
  line-height: 1.25;
}

.hr-portal-alerts-scroll .dashboard-empty {
  min-height: 0;
  padding: 1rem 1.25rem;
}

.hr-portal-alerts-scroll .dashboard-empty i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem !important;
}

/* Roles � Permissions tab accordion */
.role-perm-accordion-item {
  border-radius: 0.75rem !important;
}

.role-perm-accordion-btn {
  gap: 0.65rem;
  align-items: center;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.role-perm-accordion-btn:not(.collapsed) {
  box-shadow: none;
}

.role-perm-accordion-btn::after {
  flex-shrink: 0;
  margin-left: 0.35rem;
}

.role-perm-accordion-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.role-perm-accordion-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5rem;
  row-gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.role-perm-accordion-title {
  font-size: 0.9rem;
  line-height: 1.25;
}

.role-perm-accordion-tier {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

/* Roles � permissions matrix (column flow avoids row-height gaps between short/tall groups) */
.role-perm-matrix {
  column-gap: 0.75rem;
}

@media (min-width: 768px) {
  .role-perm-matrix {
    column-count: 2;
  }
}

.role-perm-group {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.035);
}

.role-perm-matrix > .role-perm-group:last-child {
  margin-bottom: 0;
}

.role-perm-group-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.role-perm-group-title {
  font-size: 0.8125rem;
}

.role-perm-group-head .small {
  font-size: 0.7rem !important;
}

.role-perm-group-icon {
  --role-perm-accent: #64748b;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--role-perm-accent);
  background: color-mix(in srgb, var(--role-perm-accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--role-perm-accent) 22%, transparent);
}

.role-perm-list {
  padding: 0.25rem 0.65rem 0.5rem;
}

.role-perm-row {
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.role-perm-row .form-check {
  min-height: 0;
  padding-left: 1.35rem;
}

.role-perm-row .form-check-input {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.15rem;
  cursor: pointer;
}

.role-perm-row .form-check-label {
  cursor: pointer;
  width: 100%;
}

.role-perm-row-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #0f172a;
  line-height: 1.3;
}

.role-perm-row-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 0.1rem;
  margin-bottom: 0.15rem;
}

.role-perm-row--readonly {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.role-perm-form-actions {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.role-perm-list--readonly .role-perm-row--readonly {
  padding-left: 0.15rem;
}

/* ��� Reports: Expenses (modern hub) ��� */
.reports-exp-hero {
  border-radius: 1rem;
  background: linear-gradient(90deg, #eef2ff 0%, #f0fdfa 100%);
  border: 1px solid rgba(79, 70, 229, 0.12);
  box-shadow: none;
  overflow: hidden;
}

.reports-exp-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.35rem 1.2rem;
}

.reports-exp-hero__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0;
}

.reports-exp-hero__dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
  margin: 0 0.35rem;
  vertical-align: middle;
}

.reports-exp-hero__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.reports-exp-hero__lead {
  font-size: 0.9rem;
  color: #475569;
}

.reports-exp-hero__lead strong {
  color: #0f172a;
}

.reports-exp-hero__scope {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  font-weight: 500;
  font-size: 0.7rem;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.reports-exp-hero__range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.reports-exp-hero__range-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.reports-exp-hero__field .form-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.reports-exp-hero__field .form-control {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  min-width: 10.5rem;
  font-size: 0.875rem;
  box-shadow: none;
}

.reports-exp-hero__field .form-control:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

.reports-exp-hero__apply {
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.45rem 1rem;
}

.reports-exp-filters {
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  overflow: hidden;
}

.reports-exp-filters__head {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.reports-exp-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 1rem;
}

.reports-exp-filters__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.reports-exp-filters__label i {
  color: #4f46e5;
  font-size: 0.75rem;
}

.reports-exp-filters__item .form-select {
  border-radius: 0.65rem;
  border-color: rgba(15, 23, 42, 0.1);
  font-size: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.reports-exp-filters__item .form-select:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.reports-exp-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reports-exp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 500;
}

.reports-exp-chip__key {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.reports-exp-grouped {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafbfc;
}

.reports-exp-grouped__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reports-exp-grouped__table {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: auto;
  /* header row + 5 data rows (table-sm) */
  max-height: calc(2.35rem + 5 * 2.125rem);
}

.reports-exp-grouped__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.reports-exp-kpi .stat-value {
  font-size: 1.2rem;
}

.reports-exp-payroll-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #eef2ff 0%, #f0fdfa 100%);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.reports-exp-payroll-banner__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.reports-exp-payroll-banner__value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.reports-exp-payroll-banner__note {
  max-width: 28rem;
  color: #475569;
}

.reports-exp-chart-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.reports-exp-chart-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.reports-exp-chart-card--featured {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.reports-exp-chart-card__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.reports-exp-chart-slot {
  position: relative;
  min-height: 200px;
  max-height: 260px;
  margin-top: 1rem;
}

.reports-exp-chart-card--featured .reports-exp-chart-slot {
  min-height: 240px;
  max-height: 300px;
  margin-top: 0.75rem;
}

.reports-exp-chart-card:has(.reports-exp-stat-legend) .reports-exp-chart-slot {
  min-height: 180px;
  max-height: 200px;
}

.reports-exp-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: inherit;
  padding: 1.5rem;
  color: #94a3b8;
  background: repeating-linear-gradient(
    -45deg,
    #f8fafc,
    #f8fafc 8px,
    #f1f5f9 8px,
    #f1f5f9 16px
  );
  border-radius: 0.75rem;
  border: 1px dashed rgba(15, 23, 42, 0.1);
}

.reports-exp-chart-empty i {
  font-size: 1.75rem;
  color: #cbd5e1;
  margin-bottom: 0.65rem;
}

.reports-exp-chart-empty__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.reports-exp-chart-empty__hint {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 14rem;
}

.reports-exp-stat-legend__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

.reports-exp-stat-legend__item + .reports-exp-stat-legend__item {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.reports-exp-stat-legend__label {
  color: #64748b;
  font-weight: 500;
}

.reports-exp-stat-legend__value {
  color: #0f172a;
  font-weight: 600;
}

.reports-exp-download-panel {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 50%, #eef2ff 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.reports-exp-export-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.reports-exp-export-row + .reports-exp-export-row {
  margin-top: 0.65rem;
}

.reports-exp-export-row__info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.reports-exp-export-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  font-size: 1rem;
  flex-shrink: 0;
}

.reports-exp-export-row__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}

.reports-exp-export-row__desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.reports-exp-export-row__btns .btn {
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  border-color: rgba(15, 23, 42, 0.1);
}

.reports-exp-export-row__btns .btn:hover {
  background: #f8fafc;
  border-color: rgba(79, 70, 229, 0.25);
}

.reports-exp-chart-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.reports-exp-chart-badge {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
}

.reports-exp-export-card {
  background: linear-gradient(160deg, #f8fafc 0%, #fff 55%, #eef2ff 100%);
}

.reports-export-actions .reports-export-btn {
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.reports-export-form--compact .col-12 {
  margin-top: 0;
}

.reports-exp-table-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.reports-exp-table-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.reports-exp-table-card__foot {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafbfc;
}

.reports-exp-table__title {
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.reports-exp-table__title:hover {
  color: #4f46e5;
}

.reports-exp-table__category {
  font-size: 0.8rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
}

.reports-exp-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #94a3b8;
}

.reports-exp-empty i {
  font-size: 2rem;
  opacity: 0.45;
  margin-bottom: 0.75rem;
  display: block;
}

.reports-exp-empty--inline {
  padding: 1.5rem;
}

@media (max-width: 767.98px) {
  .reports-exp-hero__inner {
    padding: 1.25rem;
  }

  .reports-exp-hero__title {
    font-size: 1.35rem;
  }

  .reports-exp-hero__range {
    width: 100%;
  }

  .reports-exp-hero__apply {
    width: 100%;
  }
}

/* Ticketing platforms modal */
.ticketing-platform-modal {
  border-radius: 1rem;
  overflow: hidden;
}

.ticketing-platform-modal__header {
  padding: 1.25rem 1.5rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.ticketing-platform-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.ticketing-platform-grid {
  display: grid;
  gap: 0.75rem;
}

.ticketing-platform-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ticketing-platform-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.ticketing-platform-card.is-protected {
  border-color: rgba(79, 70, 229, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
}

.ticketing-platform-card__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 5.5rem;
}

.ticketing-platform-card__example {
  flex: 1 1 6rem;
  min-width: 0;
  max-width: 10rem;
}

.ticketing-platform-card__stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ticketing-platform-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.ticketing-platform-card__actions .btn {
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .ticketing-platform-card {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .ticketing-platform-card__example {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }

  .ticketing-platform-card__actions {
    margin-left: 0;
  }
}

.ticketing-platform-badge-protected {
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.ticketing-platform-form-panel {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.95rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ticketing-platform-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 0.95rem;
  background: #f8fafc;
}

.ticketing-auto-ref-badge {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

/* Create task modal � modal-lg size, full color styling */
.task-create-modal {
  border-radius: 1rem;
  overflow: hidden;
}

.task-create-modal__header {
  padding: 1rem 1.25rem 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
}

.task-create-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.2);
  flex-shrink: 0;
}

.task-create-modal__body {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.task-create-modal__section {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem 0.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.task-create-modal__section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
}

.task-create-modal__section-title i {
  color: #2563eb;
  opacity: 0.9;
}

.task-create-modal__optional {
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.task-create-modal__form .form-control,
.task-create-modal__form .form-select {
  border-color: #e2e8f0;
}

.task-create-modal__form .form-control:focus,
.task-create-modal__form .form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.task-create-modal__footer {
  padding: 0.75rem 1rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0 !important;
}

.task-create-deadline-input.is-invalid {
  border-color: #f59e0b;
  background-color: #fffbeb;
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.15);
}

.task-create-deadline-input.is-invalid:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.2);
}

/* Create task modal � keep due time visible on phones (scroll + time input sizing). */
#taskCreateModal .task-create-modal__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.task-create-modal-dialog.modal-fullscreen-sm-down .modal-content {
  min-height: 100%;
}

.task-create-modal-dialog.modal-fullscreen-sm-down .task-create-modal__body {
  flex: 1 1 auto;
  min-height: 0;
}

.task-create-deadline-row .task-create-deadline-time-input,
.task-create-deadline-row input[type="time"] {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}

.task-create-deadline-row input[type="date"],
.task-create-deadline-row input[type="time"] {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .task-create-deadline-row .form-text {
    font-size: 0.75rem;
  }
}

.task-team-work-card .task-team-slots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem 1.25rem;
}

@media (min-width: 768px) {
  .task-team-work-card .task-team-slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-team-work-card .task-team-slots-grid--single {
    grid-template-columns: 1fr;
  }
}

.task-team-work-card .task-team-slot {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  min-width: 0;
}

.task-team-work-card .task-team-slot:hover {
  border-color: rgba(79, 70, 229, 0.18);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.task-team-work-card .task-reallocate-form {
  width: 100%;
}

.task-team-work-card .task-slot-history summary {
  user-select: none;
}

.tc-work-slot-row {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Team work slot templates modal */
.team-work-slot-modal {
  border-radius: 1.125rem;
  overflow: hidden;
}

.team-work-slot-modal__header {
  padding: 1.25rem 1.5rem 0.75rem;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
}

.team-work-slot-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  flex-shrink: 0;
  color: #fff;
  font-size: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22);
}

.team-work-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.team-work-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-work-slot-card:hover {
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}

.team-work-slot-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.team-work-slot-form-panel {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.team-work-slot-empty {
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.65);
}

/* Task teams page */
.task-teams-page .task-teams-hero {
  position: relative;
  border-radius: 1.125rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(79, 70, 229, 0.12);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9) 0%, rgba(236, 253, 245, 0.75) 100%);
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.08);
}

.task-teams-page .task-teams-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(6, 182, 212, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(79, 70, 229, 0.1), transparent 50%);
  pointer-events: none;
}

.task-teams-page .task-teams-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.125rem;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.task-teams-page .task-teams-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6366f1;
}

.task-teams-page .task-teams-hero__subtitle {
  max-width: 36rem;
  line-height: 1.55;
}

.task-teams-stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4338ca;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.task-teams-stat-chip--active {
  color: #047857;
  border-color: rgba(5, 150, 105, 0.2);
  background: rgba(236, 253, 245, 0.9);
}

.task-teams-modal {
  border-radius: 1rem;
  overflow: hidden;
}

.task-teams-modal__header {
  padding: 1rem 1.25rem 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.task-teams-modal__body {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.task-teams-modal__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.25rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0 !important;
}

.task-teams-modal__footer-status {
  flex: 1 1 auto;
  min-width: min(100%, 14rem);
}

.task-teams-modal__footer-status .form-check-label {
  color: #475569;
  line-height: 1.35;
}

.task-teams-modal__footer-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 575.98px) {
  .task-teams-modal__footer-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

.task-teams-form-card {
  border-radius: 1.125rem;
  border: 1px solid var(--tasks-border, #e2e8f0);
  background: #fff;
  box-shadow: var(--tasks-shadow, 0 4px 20px rgba(15, 23, 42, 0.06));
  overflow: hidden;
}

.task-teams-form-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.task-teams-form-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.2);
  flex-shrink: 0;
}

.task-teams-form-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.task-teams-form-card__footer {
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid #f1f5f9;
}

.task-teams-form-section {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.task-teams-form-section__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
}

.task-teams-form-section__title i {
  color: #4f46e5;
  opacity: 0.9;
}

.task-teams-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-teams-member-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.task-teams-member-row__fields {
  display: grid;
  grid-template-columns: 1fr minmax(6.5rem, 7.5rem) minmax(8rem, 1fr);
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.task-teams-role__slot {
  font-weight: 500;
  opacity: 0.9;
}

.tc-work-slot-row .badge {
  font-size: 0.8125rem;
  font-weight: 600;
}

.task-teams-member-remove {
  width: 2rem;
  height: 2rem;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-teams-list-panel .tasks-panel__header::before {
  background: linear-gradient(180deg, #4f46e5, #7c3aed);
}

.task-teams-list {
  display: flex;
  flex-direction: column;
}

.task-teams-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--tasks-border, #e2e8f0);
  transition: background 0.18s ease;
}

.task-teams-card:last-child {
  border-bottom: none;
}

.task-teams-card:hover {
  background: linear-gradient(90deg, rgba(238, 242, 255, 0.45) 0%, transparent 100%);
}

.task-teams-card--editing {
  background: linear-gradient(90deg, rgba(224, 231, 255, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
  box-shadow: inset 4px 0 0 #4f46e5;
}

.task-teams-card--inactive {
  opacity: 0.72;
}

.task-teams-card__main {
  flex: 1;
  min-width: min(100%, 16rem);
}

.task-teams-card__name {
  font-size: 0.975rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.task-teams-card__desc {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.45;
}

.task-teams-card__members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.task-teams-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.task-teams-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.task-teams-status--active {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.task-teams-status--inactive {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.task-teams-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.task-teams-role__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.task-teams-role--lead {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.task-teams-role--reviewer {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.task-teams-role--member {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.task-teams-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  font-size: 1.25rem;
  color: #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed #cbd5e1;
}

@media (max-width: 575.98px) {
  .task-teams-member-row__fields {
    grid-template-columns: 1fr;
  }

  .task-teams-card {
    flex-direction: column;
  }

  .task-teams-card__actions {
    width: 100%;
  }

  .task-teams-card__actions .btn {
    flex: 1;
  }
}

/* ?? System logs (modern activity stream) ?? */
.syslog-count-badge {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.45rem 0.85rem;
  color: #1e40af;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe !important;
}

.syslog-filters {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}

.syslog-filters__control,
.syslog-filters select.syslog-filters__control,
.syslog-filters input.syslog-filters__control {
  background-color: #fff;
  color: #1e293b;
  color-scheme: light;
}

.syslog-filters__control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.syslog-filters__control:-webkit-autofill,
.syslog-filters__control:-webkit-autofill:hover,
.syslog-filters__control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #1e293b;
  caret-color: #1e293b;
}

.syslog-filters input[type="date"].syslog-filters__control {
  appearance: none;
  -webkit-appearance: none;
}

.syslog-filters input.syslog-filters__search {
  appearance: none;
  -webkit-appearance: none;
}

.syslog-filters__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(10rem, 1.6fr) auto;
  gap: 0.75rem 0.85rem;
  align-items: end;
}

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

  .syslog-filters__field--user {
    grid-column: span 2;
  }

  .syslog-filters__field--search {
    grid-column: span 2;
  }

  .syslog-filters__actions {
    grid-column: span 2;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .syslog-filters__row {
    gap: 0.65rem 0.75rem;
  }
}

.syslog-filters__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.syslog-filters__control {
  font-size: 0.8125rem;
  border-color: #e2e8f0;
  border-radius: 0.5rem;
  min-height: 2.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.syslog-filters__control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.syslog-filters__search-wrap {
  position: relative;
}

.syslog-filters__search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #94a3b8;
  pointer-events: none;
}

.syslog-filters__search {
  padding-left: 2.1rem;
}

.syslog-filters__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.15rem;
}

.syslog-filters__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  user-select: none;
}

.syslog-filters__live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: syslog-live-pulse 2s ease infinite;
}

.syslog-filters__live.is-busy .syslog-filters__live-dot {
  background: #3b82f6;
  animation: syslog-live-spin 0.8s linear infinite;
  box-shadow: none;
  border: 2px solid rgba(59, 130, 246, 0.25);
  border-top-color: #3b82f6;
  width: 0.55rem;
  height: 0.55rem;
}

@keyframes syslog-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

@keyframes syslog-live-spin {
  to { transform: rotate(360deg); }
}

.syslog-stream.is-loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.syslog-stream.is-loading .syslog-stream__body {
  min-height: 8rem;
}

.syslog-results {
  min-height: 4rem;
}

.syslog-stream__error {
  margin: 0;
  padding: 1.25rem 1rem;
  font-size: 0.8125rem;
  color: #fca5a5;
}

.syslog-stream {
  --syslog-bg: #080808;
  --syslog-border: rgba(255, 255, 255, 0.06);
  --syslog-muted: #6b7280;
  --syslog-user: #22d3ee;
  --syslog-target: #fb923c;
  --syslog-msg: #f3f4f6;
  --syslog-ip: #9ca3af;
  --syslog-verb-ok: #4ade80;
  --syslog-verb-warn: #fbbf24;
  --syslog-verb-danger: #f87171;
  background: var(--syslog-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.syslog-stream__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, #161616 0%, #111111 100%);
  border-bottom: 1px solid var(--syslog-border);
  font-family: "JetBrains Mono", "Cascadia Mono", "Consolas", "Courier New", monospace;
}

.syslog-stream__dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.syslog-stream__dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.syslog-stream__dot--red {
  background: #ff5f57;
}

.syslog-stream__dot--yellow {
  background: #febc2e;
}

.syslog-stream__dot--green {
  background: #28c840;
}

.syslog-stream__title {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.syslog-stream__title-icon {
  margin-right: 0.35rem;
  color: #4ade80;
  font-size: 0.6875rem;
}

.syslog-stream__header-meta {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
}

.syslog-stream.is-loading .syslog-stream__header-meta {
  color: #60a5fa;
}

.syslog-stream__body {
  padding: 0.85rem 1rem 1rem;
  max-height: min(70vh, 44rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  font-family: "JetBrains Mono", "Cascadia Mono", "Consolas", "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  scroll-behavior: smooth;
}

.syslog-stream__body--empty {
  padding: 2rem 1.25rem;
}

.syslog-stream__empty-title {
  margin: 0 0 0.35rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f87171;
}

.syslog-stream__empty-text {
  color: #9ca3af;
  font-size: 0.8125rem;
}

.syslog-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45rem 0.55rem;
  padding: 0.28rem 0.45rem;
  margin: 0 -0.45rem;
  border-radius: 0.35rem;
  transition: background 0.12s ease;
  white-space: nowrap;
  width: max-content;
  min-width: 100%;
}

.syslog-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.syslog-row + .syslog-row {
  margin-top: 0.05rem;
}

.syslog-row__ts {
  color: var(--syslog-muted);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.syslog-row__verb {
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 4.25rem;
}

.syslog-row__verb--ok {
  color: var(--syslog-verb-ok);
}

.syslog-row__verb--warn {
  color: var(--syslog-verb-warn);
}

.syslog-row__verb--danger {
  color: var(--syslog-verb-danger);
}

.syslog-row__user {
  color: var(--syslog-user);
  flex-shrink: 0;
}

.syslog-row__user-val {
  color: #67e8f9;
}

.syslog-row__target {
  color: var(--syslog-target);
  flex-shrink: 0;
}

.syslog-row__ip {
  color: var(--syslog-ip);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.syslog-row__msg {
  color: var(--syslog-msg);
  flex: 0 0 auto;
}

.syslog-row__ctx {
  position: relative;
  flex-shrink: 0;
}

.syslog-row__ctx-btn {
  list-style: none;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  user-select: none;
}

.syslog-row__ctx-btn::-webkit-details-marker {
  display: none;
}

.syslog-row__ctx-btn:hover {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.14);
}

.syslog-row__ctx[open] .syslog-row__ctx-btn {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.35);
}

.syslog-row__ctx-body {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2;
  width: min(22rem, calc(100vw - 3rem));
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: #d1d5db;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-height: 9rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.syslog-stream__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  background: #0f0f0f;
  border-top: 1px solid var(--syslog-border);
}

.syslog-pager__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.syslog-pager__summary {
  font-size: 0.75rem;
  color: #9ca3af;
}

.syslog-pager__summary strong {
  color: #e5e7eb;
  font-weight: 600;
}

.syslog-pager__per-page-label {
  margin: 0;
}

.syslog-pager__per-page {
  width: auto;
  min-width: 6.5rem;
  font-size: 0.75rem;
  padding: 0.2rem 1.75rem 0.2rem 0.55rem;
  min-height: 1.85rem;
  background-color: #141414;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  color-scheme: dark;
}

.syslog-pager__per-page:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.syslog-pager__page {
  font-size: 0.75rem;
}

.syslog-pager__nav {
  margin-left: auto;
}

.syslog-stream__footer .pagination .page-link {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.syslog-stream__footer .pagination .page-link:hover {
  background: #1a1a1a;
  color: #e5e7eb;
}

.syslog-stream__footer .pagination .page-item.active .page-link {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

@media (max-width: 575.98px) {
  .syslog-stream__body {
    font-size: 0.75rem;
    padding: 0.65rem 0.75rem 0.85rem;
  }

  .syslog-row__verb {
    min-width: 3.5rem;
  }
}

/* �� Tasks module (dashboard, list, performance) �� */
.tasks-module {
  --tasks-accent: #4f46e5;
  --tasks-accent-2: #06b6d4;
  --tasks-accent-soft: rgba(79, 70, 229, 0.08);
  --tasks-surface: #ffffff;
  --tasks-border: rgba(15, 23, 42, 0.06);
  --tasks-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --tasks-shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.1);
  min-width: 0;
}

/* Hero */
.tasks-module .tasks-module-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: none;
}

.tasks-module .tasks-module-hero.dashboard-hero::before {
  display: none;
}

.tasks-module-hero__bg {
  display: none;
}

.tasks-module-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  flex-shrink: 0;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: none;
  font-size: 1.125rem;
}

.tasks-module-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6366f1;
}

.tasks-module-hero__subtitle {
  max-width: 42rem;
  line-height: 1.55;
}

.tasks-module-hero__heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.tasks-module-hero__heading-row .tasks-module-hero__subtitle {
  max-width: none;
  font-size: 0.9375rem;
}

@media (min-width: 768px) {
  .tasks-module-hero__heading-row {
    flex-wrap: nowrap;
  }

  .tasks-module-hero__heading-row .tasks-module-hero__subtitle {
    white-space: nowrap;
  }
}

.tasks-period-chip {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4338ca;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.tasks-module-hero__actions .btn {
  backdrop-filter: blur(8px);
}

@media (max-width: 991.98px) {
  .tasks-module-hero__actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
  }

  .tasks-module-hero__actions .btn {
    width: 100%;
    justify-content: center;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    font-size: 0.8125rem;
  }

  .tasks-module-hero__actions .btn.text-nowrap {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

/* Sub-nav */
.tasks-module-subnav-outer {
  margin-bottom: 1.5rem;
}

.tasks-module-subnav-wrap {
  margin-bottom: 0;
}

.tasks-module-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow:
    0 4px 20px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@media (max-width: 767.98px) {
  .tasks-module-subnav-outer {
    margin-bottom: 1.25rem;
  }

  .tasks-module-subnav-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tasks-module-subnav-wrap::-webkit-scrollbar {
    display: none;
  }

  .tasks-module-subnav-scrollbar {
    display: block;
    margin-top: 0.35rem;
    padding: 0 0.15rem;
  }

  .tasks-module-subnav-scrollbar.is-hidden {
    display: none;
  }

  .tasks-module-subnav-scrollbar__track {
    position: relative;
    height: 3px;
    border-radius: 999px;
    background: #e2e8f0;
    touch-action: none;
  }

  .tasks-module-subnav-scrollbar__thumb {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    min-width: 1.5rem;
    border-radius: 999px;
    background: #94a3b8;
    will-change: transform, width;
  }

  .tasks-module-subnav {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    max-width: none;
    border-radius: 1rem;
    padding: 0.35rem;
  }

  .tasks-module-subnav .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }

  .tasks-module-subnav .nav-link i {
    margin-right: 0.35rem !important;
  }
}

@media (max-width: 575.98px) {
  .tasks-module-subnav .nav-link {
    padding: 0.45rem 0.7rem;
    font-size: 0.6875rem;
  }

  .tasks-module-subnav .nav-link i {
    display: none;
  }
}

.tasks-module-subnav .nav-link {
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

/* Per-section accent (inactive + active gradients) */
.tasks-subnav-link {
  --ts-accent: #64748b;
  --ts-bg: rgba(100, 116, 139, 0.1);
  --ts-border: rgba(100, 116, 139, 0.18);
  --ts-shadow: rgba(100, 116, 139, 0.28);
  --ts-gradient: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: var(--ts-accent);
}

.tasks-subnav-link--dashboard {
  --ts-accent: #4f46e5;
  --ts-bg: rgba(79, 70, 229, 0.1);
  --ts-border: rgba(79, 70, 229, 0.18);
  --ts-shadow: rgba(79, 70, 229, 0.35);
  --ts-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #7c3aed 100%);
}

.tasks-subnav-link--list {
  --ts-accent: #2563eb;
  --ts-bg: rgba(37, 99, 235, 0.1);
  --ts-border: rgba(37, 99, 235, 0.18);
  --ts-shadow: rgba(37, 99, 235, 0.32);
  --ts-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.tasks-subnav-link--backlog {
  --ts-accent: #7c3aed;
  --ts-bg: rgba(124, 58, 237, 0.1);
  --ts-border: rgba(124, 58, 237, 0.18);
  --ts-shadow: rgba(124, 58, 237, 0.3);
  --ts-gradient: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
}

.tasks-subnav-link--escalated {
  --ts-accent: #dc2626;
  --ts-bg: rgba(220, 38, 38, 0.1);
  --ts-border: rgba(220, 38, 38, 0.2);
  --ts-shadow: rgba(220, 38, 38, 0.32);
  --ts-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.tasks-subnav-link--calendar {
  --ts-accent: #0891b2;
  --ts-bg: rgba(8, 145, 178, 0.1);
  --ts-border: rgba(8, 145, 178, 0.18);
  --ts-shadow: rgba(8, 145, 178, 0.3);
  --ts-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.tasks-subnav-link--performance {
  --ts-accent: #16a34a;
  --ts-bg: rgba(22, 163, 74, 0.1);
  --ts-border: rgba(22, 163, 74, 0.18);
  --ts-shadow: rgba(22, 163, 74, 0.3);
  --ts-gradient: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.tasks-subnav-link--teams {
  --ts-accent: #0d9488;
  --ts-bg: rgba(13, 148, 136, 0.1);
  --ts-border: rgba(13, 148, 136, 0.18);
  --ts-shadow: rgba(13, 148, 136, 0.3);
  --ts-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
}

.tasks-subnav-link:hover:not(.active) {
  color: var(--ts-accent);
  background: var(--ts-bg);
  border-color: var(--ts-border);
  transform: translateY(-1px);
}

.tasks-subnav-link.active {
  color: #fff;
  background: var(--ts-gradient);
  border-color: transparent;
  box-shadow: 0 6px 20px var(--ts-shadow);
}

.tasks-subnav-link.active:hover {
  color: #fff;
  transform: translateY(-1px);
}

.tasks-module-subnav__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ts-accent);
  background: var(--ts-bg);
  border: 1px solid var(--ts-border);
}

.tasks-module-subnav__count--alert {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(248, 113, 113, 0.45);
}

.tasks-subnav-link.active .tasks-module-subnav__count {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.28);
}

.tasks-subnav-link.active .tasks-module-subnav__count--alert {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.3);
}

.tasks-subnav-link:hover:not(.active) .tasks-module-subnav__count {
  background: color-mix(in srgb, var(--ts-bg) 70%, #fff);
}

/* Stat cards */
.tasks-stat-card-link {
  display: block;
  height: 100%;
  border-radius: 1.125rem;
  transition: transform 0.2s ease;
}

.tasks-stat-card-link:hover {
  transform: none;
}

.tasks-stat-card-link:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

.tasks-module .tasks-stat-card {
  --tile-accent: #4f46e5;
  border-radius: 1.125rem;
  border: 1px solid var(--tasks-border);
  background: #fff;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.tasks-module .tasks-stat-card:not(.tasks-stat-card-link *) {
  transition: border-color 0.2s ease;
}

.tasks-module .tasks-stat-card:hover,
.tasks-stat-card-link:hover .tasks-stat-card {
  transform: none;
  box-shadow: none;
  border-color: color-mix(in srgb, var(--tile-accent) 28%, #e2e8f0);
}

.tasks-stat-card__glow {
  display: none;
}

.tasks-module .tasks-stat-card .stat-icon,
.tasks-module .tasks-stat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.875rem;
  font-size: 0.9rem;
  box-shadow: none;
  background: color-mix(in srgb, var(--tile-accent) 14%, #ffffff) !important;
  color: var(--tile-accent) !important;
}

.tasks-module .tasks-stat-card .stat-icon i,
.tasks-module .tasks-stat-card__icon i {
  color: inherit;
}

.tasks-module .tasks-stat-card .stat-value {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media (min-width: 1200px) {
  .tasks-module .tasks-stat-card .stat-value {
    font-size: 1.2rem;
  }
}

.tasks-module .tasks-stat-card.is-active {
  border-color: color-mix(in srgb, var(--tile-accent) 40%, #e2e8f0) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tile-accent) 12%, transparent) !important;
}

.tasks-module .tasks-stat-card .stat-progress {
  height: 5px;
  background: rgba(15, 23, 42, 0.06);
}

@media (max-width: 767.98px) {
  .tasks-stat-grid {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.65rem;
  }

  .tasks-stat-grid .tasks-stat-card .card-body {
    padding: 0.85rem 0.7rem !important;
  }

  .tasks-stat-grid .tasks-stat-card .stat-label {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem !important;
  }

  .tasks-stat-grid .tasks-stat-card .stat-value {
    font-size: 1rem;
    line-height: 1.15;
  }

  .tasks-stat-grid .tasks-stat-card .stat-icon,
  .tasks-stat-grid .tasks-stat-card__icon {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
  }

  .tasks-stat-grid .tasks-stat-card .stat-progress-wrap {
    margin-top: 0.65rem !important;
  }

  .tasks-stat-grid .tasks-stat-card .stat-progress-hint {
    font-size: 0.6875rem;
    line-height: 1.25;
    margin-top: 0.35rem !important;
  }

  .tasks-stat-grid .tasks-stat-card .stat-label,
  .tasks-stat-grid .tasks-stat-card .stat-progress-hint {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* Filter card */
.tasks-filter-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--tasks-border);
  background: #fff;
  box-shadow: none;
}

.tasks-filter-card::before {
  display: none;
}

.tasks-filter-card .form-control,
.tasks-filter-card .form-select {
  border-radius: 0.5rem;
  border-color: rgba(15, 23, 42, 0.1);
  background: #fff;
  min-height: calc(1.5em + 0.5rem + 2px);
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.tasks-filter-card .form-control:focus,
.tasks-filter-card .form-select:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.tasks-filter-card .form-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.tasks-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
  width: 100%;
}

.tasks-filter-field {
  min-width: 0;
}

.tasks-filter-field .form-control,
.tasks-filter-field .form-select {
  width: 100%;
}

.tasks-filter-field--full {
  grid-column: 1 / -1;
}

.tasks-filter-grid--inline-end {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
  width: 100%;
}

.tasks-filter-grid--inline-end .tasks-filter-field {
  min-width: 0;
  width: 100%;
}

.tasks-filter-grid--inline-end .tasks-filter-field--search {
  width: 100%;
  min-width: 0;
}

/* Staff view: 3 fields � search spans full width on second row */
.tasks-filter-grid--inline-end .tasks-filter-field--search:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.tasks-filter-grid--inline-end .tasks-filter-field--full {
  grid-column: auto;
}

@media (min-width: 992px) {
  .tasks-filter-grid--inline-end {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tasks-filter-grid--inline-end .tasks-filter-field {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    width: auto;
    min-width: 0;
  }

  .tasks-filter-grid--inline-end .tasks-filter-field .form-label {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tasks-filter-grid--inline-end .tasks-filter-field {
    min-width: 8.5rem;
  }

  .tasks-filter-grid--inline-end .tasks-filter-field--search {
    min-width: 9.5rem;
    width: 12rem;
  }

  .tasks-filter-grid--inline-end .tasks-filter-field--search:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .tasks-filter-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }
}

/* Callouts */
.tasks-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1.35rem;
  padding: 1.1rem 1.35rem;
  border-radius: 1.125rem;
  border: 1px solid rgba(79, 70, 229, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, #f5f3ff 55%, #eef2ff 100%);
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
}

.tasks-callout--info {
  border-color: rgba(6, 182, 212, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.08);
}

.tasks-callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  flex-shrink: 0;
  color: #4f46e5;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.12);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.tasks-callout--info .tasks-callout__icon {
  color: #0891b2;
  border-color: rgba(6, 182, 212, 0.15);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

/* Panels & tables */
.tasks-panel {
  border-radius: 1.125rem;
  border: 1px solid var(--tasks-border);
  background: var(--tasks-surface);
  box-shadow: var(--tasks-shadow);
  overflow: hidden;
  min-width: 0;
}

.tasks-backlog-table-wrap {
  min-width: 0;
}

.tasks-backlog-table-wrap .app-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.tasks-backlog-table {
  min-width: 44rem;
  white-space: nowrap;
}

.tasks-backlog-table th,
.tasks-backlog-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.tasks-backlog-table .task-backlog-col-title {
  white-space: normal;
  min-width: 9rem;
}

.tasks-backlog-table .task-backlog-col-title .text-truncate {
  max-width: 14rem;
}

.tasks-backlog-table .task-backlog-col-ref {
  min-width: 5.5rem;
}

.tasks-backlog-table .task-backlog-col-priority {
  min-width: 5.5rem;
}

.tasks-backlog-table .task-backlog-col-actions {
  min-width: 9rem;
}

@media (max-width: 767.98px) {
  .tasks-backlog-table {
    min-width: 36rem;
  }

  .tasks-backlog-table .task-backlog-col-title .text-truncate {
    max-width: 11rem;
  }

  .tasks-backlog-table .task-backlog-col-actions .btn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.tasks-panel__header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem 1.1rem 1.5rem;
  border-bottom: 1px solid var(--tasks-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.tasks-panel__header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #4f46e5, #06b6d4);
}

.tasks-panel__header > div {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.tasks-panel__title {
  margin: 0;
  font-size: 0.975rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}

.tasks-panel__subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  white-space: nowrap;
}

.tasks-list-workflow-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.tasks-panel__header--with-workflow {
  flex-wrap: nowrap;
  gap: 1rem;
}

.tasks-panel__header--with-workflow > div:first-child {
  flex-shrink: 0;
}

.tasks-list-workflow {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
}

.tasks-list-workflow .nav-link {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tasks-list-workflow .nav-link i {
  opacity: 0.88;
}

.tasks-list-workflow__tab--all i { color: #64748b; }
.tasks-list-workflow__tab--created i { color: #6366f1; }
.tasks-list-workflow__tab--awaiting-review i { color: #d97706; }
.tasks-list-workflow__tab--approved i { color: #059669; }
.tasks-list-workflow__tab--rejected i { color: #e11d48; }

.tasks-list-workflow__tab--all:hover {
  color: #334155;
  background: rgba(100, 116, 139, 0.08);
}

.tasks-list-workflow__tab--created:hover {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.08);
}

.tasks-list-workflow__tab--awaiting-review:hover {
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
}

.tasks-list-workflow__tab--approved:hover {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
}

.tasks-list-workflow__tab--rejected:hover {
  color: #be123c;
  background: rgba(244, 63, 94, 0.08);
}

.tasks-list-workflow__tab--all.active {
  color: #1e40af;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
}

.tasks-list-workflow__tab--created.active {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.12);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.14);
}

.tasks-list-workflow__tab--awaiting-review.active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
}

.tasks-list-workflow__tab--approved.active {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.14);
}

.tasks-list-workflow__tab--rejected.active {
  color: #be123c;
  background: rgba(244, 63, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.12);
}

.tasks-list-workflow__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #64748b;
  background: rgba(148, 163, 184, 0.16);
}

.tasks-list-workflow__tab--all.active .tasks-list-workflow__count {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.16);
}

.tasks-list-workflow__tab--created.active .tasks-list-workflow__count {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.16);
}

.tasks-list-workflow__tab--awaiting-review.active .tasks-list-workflow__count {
  color: #d97706;
  background: rgba(245, 158, 11, 0.18);
}

.tasks-list-workflow__tab--approved.active .tasks-list-workflow__count {
  color: #059669;
  background: rgba(16, 185, 129, 0.16);
}

.tasks-list-workflow__tab--rejected.active .tasks-list-workflow__count {
  color: #e11d48;
  background: rgba(244, 63, 94, 0.14);
}

@media (max-width: 767.98px) {
  .tasks-panel__header--with-workflow {
    flex-wrap: wrap;
  }

  .tasks-list-workflow-wrap {
    flex: 1 1 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .tasks-list-workflow {
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    margin-left: 0;
  }
}

.tasks-module .dashboard-table-wrap.tasks-table-modern,
.tasks-module .dashboard-table-wrap.tasks-performance-panel {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

/* Chart cards */
.tasks-module .tasks-chart-card {
  border-radius: 1.125rem;
  border: 1px solid var(--tasks-border);
  background: #fff;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.tasks-module .tasks-chart-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #cbd5e1;
}

.tasks-module .tasks-chart-card .badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Performance table */
.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table thead th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table tbody tr {
  transition: background-color 0.15s ease;
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.65);
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table tbody tr:hover {
  background: var(--tasks-accent-soft);
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table tbody td:first-child {
  font-weight: 600;
  color: #0f172a;
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table tfoot td {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  font-weight: 600;
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table .perf-points-badge {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  border: 1px solid transparent;
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table .perf-points-badge--pos {
  color: #15803d;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.08));
  border-color: rgba(34, 197, 94, 0.2);
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table .perf-points-badge--neg {
  color: #b91c1c;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.06));
  border-color: rgba(239, 68, 68, 0.18);
}

.app-table-scroll-modern.tasks-performance-panel .tasks-performance-table .perf-points-badge--zero {
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.12);
}

/* Task list table polish */
.tasks-module .tasks-table-modern .tasks-index-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.tasks-module .tasks-table-modern .tasks-index-table:not(.tasks-index-table--with-category) {
  min-width: 66rem;
}

.tasks-module .tasks-table-modern .tasks-index-table.tasks-index-table--with-category {
  min-width: 74rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-title,
.tasks-module .tasks-table-modern .tasks-index-table .task-col-assignee {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-title-link {
  display: inline-block;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  vertical-align: bottom;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-num {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-reference {
  width: 7.25rem;
  min-width: 7.25rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-title {
  width: auto;
  min-width: 9rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-category {
  width: auto;
  min-width: 7rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-assignee {
  width: auto;
  min-width: 7rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-progress {
  width: auto;
  min-width: 7.5rem;
  white-space: normal;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-priority {
  width: auto;
  min-width: 6.25rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-deadline {
  width: auto;
  min-width: 6.5rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-status {
  width: auto;
  min-width: 5rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-uploaded {
  width: auto;
  min-width: 7rem;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-actions {
  width: auto;
  min-width: 7.75rem;
  overflow: visible;
}

.tasks-module .tasks-table-modern .tasks-index-table th,
.tasks-module .tasks-table-modern .tasks-index-table td {
  overflow: visible;
  white-space: nowrap;
}

.tasks-module .tasks-table-modern .tasks-index-table .task-col-progress,
.tasks-module .tasks-table-modern .tasks-index-table .task-col-progress .task-row-progress {
  white-space: normal;
}

.tasks-module .tasks-table-modern .tasks-index-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.tasks-module .tasks-table-modern .tasks-index-table tbody tr {
  transition: background-color 0.15s ease;
  height: auto;
}

.tasks-module .tasks-table-modern .tasks-index-table tbody td {
  overflow: visible !important;
  max-width: none;
  text-overflow: clip;
  vertical-align: middle;
}

.tasks-module .tasks-table-modern .tasks-index-table tbody .task-title-link {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.tasks-module .tasks-table-modern .tasks-index-table tbody tr:hover {
  background: var(--tasks-accent-soft);
}

/* Task list � vertical scroll for rows; horizontal scroll when columns need more room */
.tasks-module .tasks-table-modern > .tasks-table-scroll {
  --app-table-visible-rows: 10;
  --app-table-head-est: 2.5rem;
  --app-table-body-row-est: 3.75rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(var(--app-table-head-est) + var(--app-table-body-row-est) * var(--app-table-visible-rows));
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
}

.tasks-module .tasks-table-modern > .tasks-table-scroll .tasks-index-table thead.sticky-top th {
  position: sticky;
  top: 0;
  z-index: 3;
}

@media (max-width: 575.98px) {
  .tasks-module-hero__icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
}

/* Settings � SMS setup mode cards */
.sms-setup-options {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
  .sms-setup-options {
    grid-template-columns: 1fr;
  }
}

.sms-setup-option {
  display: block;
  margin: 0;
  cursor: pointer;
}

.sms-setup-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sms-setup-option__card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.75rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.sms-setup-option__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0f172a;
}

.sms-setup-option__hint {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}

.sms-setup-option__input:checked + .sms-setup-option__card {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 1px var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.04);
}

.sms-setup-option__input:focus-visible + .sms-setup-option__card {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.sms-setup-panel {
  margin-top: 0.25rem;
}

/* Settings � SMS provider cards (Mobile Sasa, BlessedTexts) */
.sms-provider-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
  .sms-provider-grid {
    grid-template-columns: 1fr;
  }
}

.sms-provider-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.85rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.sms-provider-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.sms-provider-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.sms-provider-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1rem;
  flex-shrink: 0;
}

.sms-provider-card--mobile-sasa .sms-provider-card__icon {
  background: #d1fae5;
  color: #059669;
}

.sms-provider-card--blessed-texts .sms-provider-card__icon {
  background: #ede9fe;
  color: #7c3aed;
}

.sms-provider-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.sms-provider-card__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.sms-provider-card__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
}

.sms-provider-card.is-active .sms-provider-card__badge {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.sms-provider-card__desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
}

.sms-provider-universal {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 0.75rem;
  background: rgba(248, 250, 252, 0.8);
  color: #475569;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sms-provider-universal:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #fff;
}

.sms-provider-universal.is-active {
  border-style: solid;
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
  color: #1e293b;
}

/* Expense bulk modals � above backdrop on iOS (modals moved to body via app.js) */
#expenseBulkPayModal.modal.show,
#expenseBulkRejectModal.modal.show {
  z-index: 1070 !important;
}

#expenseBulkPayModal.modal.show .modal-dialog,
#expenseBulkRejectModal.modal.show .modal-dialog {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* �� Expense bulk payment modal �� */
.expense-bulk-pay-modal-dialog {
  max-width: min(1140px, calc(100vw - 1.5rem));
}

.expense-bulk-pay-modal-dialog .modal-content {
  max-width: 100%;
  overflow-x: clip;
}

.expense-bulk-pay-modal {
  border-radius: 1rem;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.expense-bulk-pay-modal__header {
  position: relative;
  align-items: flex-start;
  padding: 1.25rem 3.25rem 1rem 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 45%, #f8fafc 100%);
}

.expense-bulk-pay-modal__header .btn-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  margin: 0 !important;
}

.expense-bulk-pay-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  flex-shrink: 0;
}

.expense-bulk-pay-modal__body {
  padding: 0 1.5rem 1.5rem;
  min-width: 0;
  overflow-x: clip;
}

.expense-bulk-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.expense-bulk-pay-chip--accent {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.25);
}

.expense-bulk-pay-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.35rem;
  border-radius: 0.9rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.expense-bulk-pay-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.expense-bulk-pay-tab:hover {
  background: rgba(255, 255, 255, 0.65);
}

.expense-bulk-pay-tab.active {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.expense-bulk-pay-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.expense-bulk-pay-tab__icon--mpesa {
  color: #047857;
  background: #d1fae5;
}

.expense-bulk-pay-tab__icon--manual {
  color: #1d4ed8;
  background: #dbeafe;
}

.expense-bulk-pay-tab__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.expense-bulk-pay-tab__label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.2;
}

.expense-bulk-pay-tab__hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

.expense-bulk-pay-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  color: #334155;
  line-height: 1.45;
}

.expense-bulk-pay-banner i {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.expense-bulk-pay-banner--mpesa {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.expense-bulk-pay-banner--mpesa i {
  color: #059669;
}

.expense-bulk-pay-banner--manual {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.expense-bulk-pay-banner--manual i {
  color: #2563eb;
}

.expense-bulk-pay-panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.expense-bulk-pay-panel--list {
  padding: 0;
  overflow: hidden;
}

.expense-bulk-pay-panel__title {
  margin-bottom: 0.85rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.expense-bulk-pay-panel--list .expense-bulk-pay-panel__title {
  margin-bottom: 0;
}

.expense-bulk-pay-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.75rem;
}

.expense-bulk-pay-method-card {
  display: block;
  margin: 0;
  cursor: pointer;
}

.expense-bulk-pay-method-card__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  height: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.expense-bulk-pay-method-card:hover .expense-bulk-pay-method-card__body {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.expense-bulk-pay-method-card__input:checked + .expense-bulk-pay-method-card__body {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb, 0 8px 22px rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.expense-bulk-pay-method-card__input:focus-visible + .expense-bulk-pay-method-card__body {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.expense-bulk-pay-method-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  font-size: 1rem;
  color: var(--bulk-method-accent, #2563eb);
  background: color-mix(in srgb, var(--bulk-method-accent, #2563eb) 12%, white);
  flex-shrink: 0;
}

.expense-bulk-pay-method-card__label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.25;
}

.expense-bulk-pay-method-card__hint {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.expense-bulk-pay-method-card__check {
  margin-left: auto;
  font-size: 1.1rem;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.12s ease;
}

.expense-bulk-pay-method-card__input:checked + .expense-bulk-pay-method-card__body .expense-bulk-pay-method-card__check {
  color: #2563eb;
  transform: scale(1.05);
}

.expense-bulk-pay-proof-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 9.5rem;
  padding: 1rem;
  border: 2px dashed rgba(37, 99, 235, 0.28);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.expense-bulk-pay-proof-drop:hover,
.expense-bulk-pay-proof-drop:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(239, 246, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.expense-bulk-pay-proof-drop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.expense-bulk-pay-proof-drop__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
}

.expense-bulk-pay-proof-drop__hint {
  font-size: 0.75rem;
  color: #64748b;
}

.expense-bulk-pay-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
}

.expense-bulk-pay-select-all-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.expense-bulk-pay-list {
  --expense-bulk-pay-head-h: 2.25rem;
  --expense-bulk-pay-row-h: 3.5rem;
  --expense-bulk-pay-visible-rows: 6;
  max-height: calc(
    var(--expense-bulk-pay-head-h) + var(--expense-bulk-pay-visible-rows) * var(--expense-bulk-pay-row-h)
  );
  overflow: auto;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.expense-bulk-pay-table {
  width: 100%;
  table-layout: auto;
  white-space: nowrap;
}

.expense-bulk-pay-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom-width: 1px;
  white-space: nowrap;
  height: var(--expense-bulk-pay-head-h);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.22);
}

.expense-bulk-pay-table tbody tr {
  height: var(--expense-bulk-pay-row-h);
}

.expense-bulk-pay-table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}

.expense-bulk-pay-table__check {
  width: 2.5rem;
}

.expense-bulk-pay-table__check .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.expense-bulk-pay-table__title {
  max-width: 14rem;
}

.expense-bulk-pay-table__title-text {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
  white-space: nowrap;
  max-width: 14rem;
}

.expense-bulk-pay-table__id {
  white-space: nowrap;
}

.expense-bulk-pay-table__submitter {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-bulk-pay-table__amount {
  font-weight: 700;
  color: #0f172a;
}

.expense-bulk-pay-table__phone {
  min-width: 11rem;
}

.expense-bulk-pay-table__phone-input {
  min-width: 10.5rem;
}

.expense-bulk-pay-table__phone-input .input-group-text {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.expense-bulk-pay-row:not(.is-selected) {
  opacity: 0.55;
  background: #f8fafc;
}

.expense-bulk-pay-row.is-selected {
  background: #fff;
}

.expense-bulk-pay-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.expense-bulk-pay-footer__eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.expense-bulk-pay-footer__count {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.expense-bulk-pay-footer__dot {
  color: #94a3b8;
}

.expense-bulk-pay-footer__total {
  font-weight: 700;
  font-size: 1.05rem;
  color: #047857;
}

.expense-bulk-pay-table__meta {
  line-height: 1.35;
  white-space: normal;
}

.expense-bulk-pay-table__meta .badge {
  font-size: 0.65rem;
  vertical-align: middle;
}

@media (max-width: 575.98px) {
  #expenseBulkPayModal.modal.show {
    align-items: stretch;
    padding: 0 !important;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down {
    height: 100%;
    height: 100dvh;
    margin: 0;
    max-width: none;
    width: 100%;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .modal-content,
  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__header .expense-bulk-pay-chip {
    display: none;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__header {
    flex: 0 0 auto;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 2.75rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    z-index: 5;
    background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 45%, #f8fafc 100%);
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__header .text-secondary.small {
    display: none;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__header .modal-title {
    font-size: 1rem;
    margin-bottom: 0.35rem !important;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.95rem;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__header .btn-close {
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: 0.85rem;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 1rem 0;
    scroll-padding-bottom: 7.5rem;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-list.table-responsive {
    overflow-x: visible;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .tab-content {
    min-height: 0;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .expense-bulk-pay-modal-dialog.modal-fullscreen-sm-down .expense-bulk-pay-banner {
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
    margin-bottom: 0.75rem !important;
  }

  .expense-bulk-pay-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.3rem;
    margin-bottom: 0.75rem !important;
  }

  .expense-bulk-pay-tab {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.65rem 0.4rem;
    gap: 0.35rem;
  }

  .expense-bulk-pay-tab__text {
    align-items: center;
  }

  .expense-bulk-pay-tab__hint {
    font-size: 0.6875rem;
    line-height: 1.25;
  }

  .expense-bulk-pay-method-grid {
    grid-template-columns: 1fr;
  }

  .expense-bulk-pay-panel--list {
    border: none;
    background: transparent;
    border-radius: 0;
  }

  .expense-bulk-pay-panel--list .expense-bulk-pay-panel__title {
    padding: 0 0 0.5rem;
    margin-bottom: 0;
  }

  .expense-bulk-pay-list {
    --expense-bulk-pay-row-h: auto;
    max-height: none;
    overflow: visible;
  }

  .expense-bulk-pay-table--from-index thead {
    display: none;
  }

  .expense-bulk-pay-table--from-index {
    white-space: normal;
  }

  .expense-bulk-pay-table--from-index tbody tr {
    display: block;
    height: auto;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .expense-bulk-pay-table--from-index tbody tr:first-child {
    padding-top: 0.25rem;
  }

  .expense-bulk-pay-table--from-index tbody td {
    display: block;
    white-space: normal;
    padding: 0.15rem 0;
    border: none;
    max-width: none;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__title {
    max-width: none;
    padding-bottom: 0.35rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__title-text {
    max-width: none;
    white-space: normal;
    font-size: 0.9375rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__amount {
    text-align: left !important;
    font-size: 0.95rem;
    padding-top: 0.25rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__amount::before {
    content: 'Balance: ';
    font-weight: 600;
    color: #64748b;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.35rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__phone {
    min-width: 0;
    padding-top: 0.5rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__phone::before {
    content: 'M-Pesa phone';
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
  }

  .expense-bulk-pay-table--from-index .expense-bulk-pay-table__phone-input {
    min-width: 0;
    width: 100%;
  }

  .expense-bulk-pay-footer {
    position: sticky;
    bottom: 0;
    z-index: 4;
    flex-direction: column;
    align-items: stretch;
    margin: 1rem -1rem 0;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    border: none;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
  }

  .expense-bulk-pay-footer [data-bulk-pay-submit] {
    width: 100%;
    min-height: 2.75rem;
  }
}

/* �� User create / edit modals �� */
@media (min-width: 576px) {
  .user-form-modal .modal-dialog {
    --bs-modal-width: 920px;
    max-width: min(920px, calc(100vw - 2rem));
  }
}

.user-form-modal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.user-form-modal__header {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  padding: 1.25rem 3.25rem 1rem 1.5rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 50%, #f8fafc 100%);
}

.user-form-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  margin: 0 !important;
  z-index: 2;
}

.user-form-modal__header-grid {
  --bs-gutter-x: 1.25rem;
}

.user-form-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.22);
}

.user-form-modal__icon--edit {
  background: linear-gradient(135deg, #6366f1 0%, #0d9488 100%);
}

.user-form-modal__body {
  padding: 0 1.5rem 1.25rem;
}

.user-form-modal__footer {
  padding: 0.875rem 1.5rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  gap: 0.5rem;
}

.user-form-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(13, 148, 136, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.user-form-preview--header {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  min-height: 100%;
}

.user-form-preview__avatar-wrap {
  flex-shrink: 0;
}

.user-form-preview__avatar,
.user-form-preview__avatar-wrap img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
}

.user-form-preview__name {
  font-size: 1.05rem;
  line-height: 1.25;
}

.user-form-preview__role {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.user-form-preview__email {
  max-width: 14rem;
}

.user-form-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.35rem;
  border-radius: 0.9rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.user-form-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-form-tab:hover {
  background: rgba(255, 255, 255, 0.65);
}

.user-form-tab.active {
  background: #fff;
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.user-form-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.user-form-tab__icon--profile {
  color: #4338ca;
  background: #eef2ff;
}

.user-form-tab__icon--access {
  color: #0f766e;
  background: #ccfbf1;
}

.user-form-tab__text {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.user-form-tab__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
}

.user-form-tab__hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.25;
  white-space: nowrap;
}

.user-form-tab__hint::before {
  content: '�';
  margin-right: 0.35rem;
  color: #94a3b8;
  font-weight: 700;
}

.user-form-section {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
  padding: 1rem 1.15rem;
}

.user-form-section__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.user-form-section .form-control,
.user-form-section .form-select {
  border-radius: 0.625rem;
  border-color: rgba(15, 23, 42, 0.1);
}

.user-form-section .form-control:focus,
.user-form-section .form-select:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.12);
}

.user-form-avatar-upload__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1.5px dashed rgba(99, 102, 241, 0.28);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.user-form-avatar-upload__zone:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: #fff;
}

.user-form-avatar-upload__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 0.95rem;
}

.user-form-avatar-upload__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.user-form-avatar-upload__hint {
  font-size: 0.75rem;
  color: #64748b;
}

.user-edit-modal .user-perm-matrix-wrap {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.875rem;
  padding: 1rem 1.15rem;
}

@media (max-width: 575.98px) {
  .user-form-modal__header,
  .user-form-modal__body,
  .user-form-modal__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .user-form-modal__header {
    padding-right: 3rem;
  }

  .user-form-modal__close {
    top: 1rem;
    right: 1rem;
  }

  .user-form-tabs {
    grid-template-columns: 1fr;
  }

  .user-form-preview--header {
    margin-top: 0.25rem;
  }
}

/* �� Task view action mode toggle (submit work / request inventory) �� */
.task-action-card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.task-action-card--work-mode {
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.12), 0 8px 24px rgba(15, 23, 42, 0.06);
}

.task-action-card--inventory-mode {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 10px 28px rgba(37, 99, 235, 0.1);
}

.task-action-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.4rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.task-action-mode-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: transparent;
  color: #64748b;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.task-action-mode-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
  color: #334155;
}

.task-action-mode-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.task-action-mode-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.task-action-mode-btn__icon--work {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.task-action-mode-btn__icon--inventory {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.task-action-mode-btn__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.task-action-mode-btn__label {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}

.task-action-mode-btn__meta {
  font-size: 0.72rem;
  line-height: 1.3;
  color: #94a3b8;
}

.task-action-mode-btn.is-active[data-mode="work"] {
  background: #fff;
  border-color: rgba(22, 163, 74, 0.28);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.14);
  color: #166534;
  transform: translateY(-1px);
}

.task-action-mode-btn.is-active[data-mode="work"] .task-action-mode-btn__meta {
  color: #4ade80;
}

.task-action-mode-btn.is-active[data-mode="work"] .task-action-mode-btn__icon--work {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.28);
}

.task-action-mode-btn.is-active[data-mode="inventory"] {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14);
  color: #1e40af;
  transform: translateY(-1px);
}

.task-action-mode-btn.is-active[data-mode="inventory"] .task-action-mode-btn__meta {
  color: #60a5fa;
}

.task-action-mode-btn.is-active[data-mode="inventory"] .task-action-mode-btn__icon--inventory {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}

@media (max-width: 575.98px) {
  .task-action-mode-toggle {
    grid-template-columns: 1fr;
  }

  .task-action-mode-btn {
    min-height: 3.25rem;
  }

  .task-action-mode-btn__meta {
    display: none;
  }
}

/* �� Task submission review (approve / send back) �� */
.task-review-panel {
  background: linear-gradient(135deg, #fffbeb 0%, #f8fafc 55%, #fff 100%);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 0.875rem;
  padding: 1rem 1.15rem;
}

.list-group-item.task-review-panel {
  border-left: 0;
  border-right: 0;
}

.task-review-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.task-review-panel__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

.task-review-panel__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.task-review-panel__meta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.task-review-panel__quote {
  padding: 0.65rem 0.85rem;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 3px solid #f59e0b;
}

.task-review-panel__photo-img {
  display: block;
  max-height: 180px;
  width: auto;
  border-radius: 0.625rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.task-review-decision {
  margin-top: 0.25rem;
}

.task-review-comment {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.task-review-comment__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
}

.task-review-comment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
}

.task-review-comment__input {
  border-radius: 0.625rem;
  border-color: rgba(15, 23, 42, 0.1);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 4.5rem;
}

.task-review-comment__input:focus {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.12);
}

.task-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.task-review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.task-review-btn:active {
  transform: scale(0.98);
}

.task-review-btn--approve {
  color: #fff;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.task-review-btn--approve:hover {
  color: #fff;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.32);
}

.task-review-btn--edit {
  color: #475569;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.task-review-btn--edit:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.18);
}

.task-review-btn--reject {
  color: #b91c1c;
  background: #fff;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.task-review-btn--reject:hover {
  color: #991b1b;
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.5);
}

.task-review-reject {
  margin-top: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.task-review-reject__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 0.45rem;
}

.task-review-reject__input {
  margin-bottom: 0.65rem;
}

.task-review-reject__input:focus {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.1);
}

.task-review-btn--reject-submit {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.22);
}

.task-review-btn--reject-submit:hover {
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

@media (max-width: 575.98px) {
  .task-review-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .task-review-toolbar .task-review-btn {
    width: 100%;
  }
}

/* Task calendar */
.tasks-cal-card,
.tasks-cal-day-panel {
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.tasks-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.tasks-cal-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  padding: 0.25rem 0;
}

.tasks-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.tasks-cal-cell {
  min-height: 5.5rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  background: #fff;
}

.tasks-cal-cell--pad {
  border-color: transparent;
  background: transparent;
  min-height: 0;
}

.tasks-cal-cell--day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0.35rem 0.35rem 0.3rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: left;
}

.tasks-cal-cell--day:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.tasks-cal-cell--day.is-today {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.04);
}

.tasks-cal-cell--day.has-tasks {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.06) 0%, #fff 70%);
}

.tasks-cal-cell--day.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
  background: rgba(59, 130, 246, 0.08);
}

.tasks-cal-cell__num {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.tasks-cal-cell__tasks {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
  margin-top: auto;
}

.tasks-cal-cell__task {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.18rem 0.28rem;
  border-radius: 0.4rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.12);
  min-width: 0;
}

.tasks-cal-cell__task-kind {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1d4ed8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tasks-cal-cell__task-title {
  font-size: 0.62rem;
  line-height: 1.25;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tasks-cal-cell__more {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  padding: 0.1rem 0.2rem;
}

.tasks-cal-cell__count {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #166534;
  background: rgba(34, 197, 94, 0.16);
}

.tasks-cal-day-panel__eyebrow {
  letter-spacing: 0.06em;
}

.tasks-cal-day-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.tasks-cal-day-user__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  cursor: default;
}

.tasks-cal-day-user__avatar--img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tasks-cal-day-user__avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="0"] {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="1"] {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="2"] {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="3"] {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="4"] {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.tasks-cal-day-user__avatar--initials[data-avatar-tone="5"] {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.tasks-cal-day-list {
  min-height: 12rem;
  overflow: auto;
}

.tasks-cal-task-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.85rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.85rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tasks-cal-task-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  color: inherit;
  transform: translateY(-1px);
}

.tasks-cal-task-item__time {
  flex: 0 0 3.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  border-right: 1px dashed rgba(15, 23, 42, 0.1);
  padding-right: 0.5rem;
}

.tasks-cal-task-item__clock {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tasks-cal-task-item__kind {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
}

.tasks-cal-task-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.tasks-cal-task-item__category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  margin-bottom: 0.35rem;
}

.tasks-cal-task-item__title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tasks-cal-task-item__meta {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tasks-cal-task-item__badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}

.tasks-cal-task-item__badges .status-pill {
  flex-shrink: 0;
  white-space: nowrap;
}

.tasks-cal-task-item__chev {
  align-self: center;
  flex-shrink: 0;
  color: rgba(15, 23, 42, 0.25);
  font-size: 0.75rem;
}

.tasks-cal-team-bar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.tasks-cal-team-bar__label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .tasks-cal-team-bar {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }

  .tasks-cal-team-bar__label {
    padding-top: 0.55rem;
  }
}

.tasks-cal-team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  flex: 1 1 auto;
  align-items: flex-end;
}

.tasks-cal-member-chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  padding: 0.15rem 0.35rem;
  font: inherit;
  color: #0f172a;
  cursor: pointer;
  max-width: 9rem;
  transition: transform 0.15s ease;
}

.tasks-cal-member-chip:hover {
  transform: translateY(-2px);
}

.tasks-cal-member-chip__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tasks-cal-member-chip__avatar--img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tasks-cal-member-chip__avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="0"] {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="1"] {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="2"] {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="3"] {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="4"] {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.tasks-cal-member-chip__avatar--initials[data-avatar-tone="5"] {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.tasks-cal-member-chip:hover .tasks-cal-member-chip__avatar,
.tasks-cal-member-chip.is-active .tasks-cal-member-chip__avatar {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), 0 8px 20px rgba(59, 130, 246, 0.15);
}

.tasks-cal-member-chip.is-active .tasks-cal-member-chip__avatar {
  transform: scale(1.05);
}

.tasks-cal-member-chip__label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--bs-secondary-color);
  white-space: normal;
  word-break: break-word;
}

.tasks-cal-member-chip.is-active .tasks-cal-member-chip__label {
  color: #1d4ed8;
}

.tasks-cal-member-chip__tooltip {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  z-index: 5;
  min-width: 7rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  background: #0f172a;
  color: #fff;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.tasks-cal-member-chip__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
}

.tasks-cal-member-chip__tooltip-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.tasks-cal-member-chip__tooltip-role {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.72);
}

.tasks-cal-member-chip:hover .tasks-cal-member-chip__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 575.98px) {
  .tasks-cal-member-chip__avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .tasks-cal-member-chip {
    max-width: 7.5rem;
  }

  .tasks-cal-member-chip__label {
    font-size: 0.62rem;
  }
}

@media (max-width: 575.98px) {
  .tasks-cal-cell {
    min-height: 4.5rem;
  }

  .tasks-cal-cell__num {
    font-size: 0.75rem;
  }

  .tasks-cal-cell__task-title {
    -webkit-line-clamp: 1;
  }
}

/* Sales & marketing module � uses workspace light palette, not dark standalone theme */
.dashboard-hero--compact {
  padding-top: 0.625rem !important;
  padding-bottom: 0.625rem !important;
}

.dashboard-hero--compact h2,
.dashboard-hero--compact .h5 {
  letter-spacing: -0.01em;
}

.sales-kanban-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 576px) {
  .sales-kanban-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.625rem;
  }
}

.sales-kanban-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  border-radius: 0.625rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sales-kanban-stat--total {
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  border-color: transparent;
}

.sales-kanban-stat--total .sales-kanban-stat__value,
.sales-kanban-stat--total .sales-kanban-stat__label {
  color: #fff;
}

.sales-kanban-stat__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
}

.sales-kanban-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: capitalize;
  margin-top: 0.125rem;
}

.sales-kanban-stat--new .sales-kanban-stat__value { color: #2563eb; }
.sales-kanban-stat--reviewing .sales-kanban-stat__value { color: #b45309; }
.sales-kanban-stat--approved .sales-kanban-stat__value { color: #047857; }
.sales-kanban-stat--rejected .sales-kanban-stat__value { color: #dc2626; }

.sales-kanban-column__body {
  min-height: 12rem;
  max-height: 28rem;
  overflow-y: auto;
  background: #f8fafc;
}

.sales-kanban-card {
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: none;
}

.sales-tier-info {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.15) !important;
}

.sales-tier-card {
  transition: box-shadow 0.15s ease;
}

.sales-tier-card:hover {
  box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.08) !important;
}

.sales-activity-list li:last-child {
  border-bottom: none !important;
}

/* Agent wallet / applications � scroll tables after 10 rows */
.sales-wallet-table-wrap > .table-responsive,
.sales-applications-table-wrap > .table-responsive {
  --app-table-visible-rows: 10;
  --app-table-head-est: 2.55rem;
  --app-table-body-row-est: 2.42rem;
  max-height: calc(var(--app-table-head-est) + var(--app-table-body-row-est) * var(--app-table-visible-rows));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

.sales-applications-table-wrap > .table-responsive {
  --app-table-body-row-est: 2.85rem;
}

.sales-wallet-table-wrap > .table-responsive thead th,
.sales-applications-table-wrap > .table-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bs-table-bg, #f8f9fa);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
}

.sales-wallet-table-wrap table,
.sales-applications-table-wrap table {
  width: max-content;
  min-width: 100%;
}

.sales-wallet-table-wrap table th,
.sales-wallet-table-wrap table td,
.sales-applications-table-wrap table th,
.sales-applications-table-wrap table td {
  white-space: nowrap;
  vertical-align: middle;
}

.sales-wallet-table-wrap table .badge,
.sales-applications-table-wrap table .badge {
  white-space: nowrap;
}

.sales-applications-table-wrap table td .btn {
  white-space: nowrap;
}

/* Withdrawals / commissions / agents � side-scroll on narrow viewports (no column wrap) */
.sales-withdrawals-table-wrap > .table-responsive,
.sales-commissions-table-wrap.table-responsive,
.sales-agents-table-wrap > .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.sales-withdrawals-table-wrap thead th,
.sales-commissions-table-wrap thead th,
.sales-agents-table-wrap thead th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 2;
}

.sales-withdrawals-table-wrap tbody td,
.sales-commissions-table-wrap tbody td,
.sales-agents-table-wrap tbody td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  vertical-align: middle;
  font-size: 0.8125rem;
}

.sales-withdrawals-table-wrap tbody td .btn-sm,
.sales-commissions-table-wrap tbody td .btn-sm,
.sales-agents-table-wrap tbody td .btn-sm {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Desktop: stretch to card width. Narrow viewports: min-width + side-scroll. */
.sales-withdrawals-table-wrap table,
.sales-commissions-table-wrap table,
.sales-agents-table-wrap table {
  table-layout: auto;
  width: 100%;
  min-width: 100%;
}

.sales-withdrawals-table-wrap table th,
.sales-withdrawals-table-wrap table td,
.sales-commissions-table-wrap table th,
.sales-commissions-table-wrap table td,
.sales-agents-table-wrap table th,
.sales-agents-table-wrap table td {
  white-space: nowrap;
  vertical-align: middle;
}

.sales-withdrawals-table-wrap table .badge,
.sales-commissions-table-wrap table .badge,
.sales-agents-table-wrap table .badge {
  white-space: nowrap;
}

.sales-withdrawals-table-wrap .sw-col-actions .d-flex,
.sales-commissions-table-wrap .sc-col-actions .d-flex,
.sales-agents-table-wrap .sa-col-actions .d-flex {
  flex-wrap: nowrap !important;
  justify-content: flex-end;
}

/* Let the first content column absorb extra desktop width */
.sales-withdrawals-table-wrap .sw-col-agent,
.sales-commissions-table-wrap .sc-col-agent {
  width: 100%;
}

.sales-withdrawals-table-wrap .sw-col-check {
  width: 2.5rem;
  min-width: 2.5rem;
}

.sales-withdrawals-table-wrap .sw-col-agent {
  min-width: 10rem;
}

.sales-withdrawals-table-wrap .sw-col-amount {
  min-width: 6.5rem;
}

.sales-withdrawals-table-wrap .sw-col-requested {
  min-width: 8rem;
}

.sales-withdrawals-table-wrap .sw-col-status {
  min-width: 5.5rem;
}

.sales-withdrawals-table-wrap .sw-col-actions {
  min-width: 12rem;
}

.sales-withdrawals-bulk-bar {
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
}

.sales-commissions-table-wrap .sc-col-agent {
  min-width: 10rem;
}

.sales-commissions-table-wrap .sc-agent-group-row {
  cursor: pointer;
  background: #f8fafc;
}

.sales-commissions-table-wrap .sc-agent-group-row:hover {
  background: #f1f5f9;
}

.sales-commissions-table-wrap .sc-agent-group-row.is-open {
  background: #eef2ff;
}

.sales-commissions-table-wrap .sc-agent-chevron {
  display: inline-block;
  width: 1rem;
  transition: transform 0.15s ease;
}

.sales-commissions-table-wrap .sc-agent-group-row.is-open .sc-agent-chevron {
  transform: rotate(90deg);
}

.sales-commissions-table-wrap .sc-col-earned,
.sales-commissions-table-wrap .sc-col-paid,
.sales-commissions-table-wrap .sc-col-balance {
  min-width: 7rem;
}

.sales-commissions-table-wrap .sc-col-actions {
  min-width: 5.5rem;
}

.sales-commissions-table-wrap .sc-agent-detail-row > td {
  background: #f8fafc;
  border-top: 0;
}

.sales-commissions-table-wrap .sc-agent-detail-panel {
  margin: 0 0.75rem 0.75rem 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.sales-commissions-table-wrap .sc-agent-clients-table {
  min-width: 36rem;
}

.sales-commissions-table-wrap .sc-agent-clients-table thead th {
  background: #f1f5f9;
  position: static;
}

.sales-commissions-table-wrap .sc-agent-clients-table tbody td {
  white-space: nowrap;
}

/* Agents � balanced fixed columns (avoid left-side stretch gaps) */
.sales-agents-table-wrap table {
  table-layout: fixed;
}

.sales-agents-table-wrap table th,
.sales-agents-table-wrap table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-agents-table-wrap table th.sa-col-actions,
.sales-agents-table-wrap table td.sa-col-actions,
.sales-agents-table-wrap table th.sa-col-check,
.sales-agents-table-wrap table td.sa-col-check {
  overflow: visible;
  text-overflow: clip;
}

.sales-agents-table-wrap .sa-col-check {
  width: 2.25rem;
  min-width: 2.25rem;
}

.sales-agents-table-wrap .sa-col-agent {
  width: 14%;
  min-width: 8.75rem;
}

.sales-agents-table-wrap .sa-col-agent-code {
  width: 6.5%;
  min-width: 5.25rem;
}

.sales-agents-table-wrap .sa-col-contact {
  width: 8%;
  min-width: 6.5rem;
}

.sales-agents-table-wrap .sa-contact-phone {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.sales-agents-table-wrap .sa-contact-has-email {
  cursor: help;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.3);
}

.sa-contact-email-popup {
  min-width: 11rem;
  z-index: 2000;
}

.sales-agents-table-wrap .sa-col-location {
  width: 9%;
  min-width: 5.5rem;
}

.sales-agents-table-wrap .sa-col-tier {
  width: 7%;
  min-width: 5rem;
}

.sales-agents-table-wrap .sa-col-sales,
.sales-agents-table-wrap .sa-col-earnings,
.sales-agents-table-wrap .sa-col-paid,
.sales-agents-table-wrap .sa-col-wallet {
  width: 8.5%;
  min-width: 6.5rem;
}

.sales-agents-table-wrap .sa-col-status {
  width: 6%;
  min-width: 4.75rem;
}

.sales-agents-table-wrap .sa-col-actions {
  width: 6.5rem;
  min-width: 6.5rem;
}

@media (max-width: 1199.98px) {
  .sales-withdrawals-table-wrap table,
  .sales-commissions-table-wrap table,
  .sales-agents-table-wrap table {
    width: max-content;
  }

  .sales-withdrawals-table-wrap table {
    min-width: 42rem;
  }

  .sales-commissions-table-wrap > table {
    min-width: 36rem;
  }

  .sales-agents-table-wrap table {
    table-layout: auto;
    min-width: 64rem;
  }

  .sales-withdrawals-table-wrap .sw-col-agent,
  .sales-commissions-table-wrap .sc-col-agent {
    width: auto;
  }

  .sales-agents-table-wrap .sa-col-agent,
  .sales-agents-table-wrap .sa-col-agent-code,
  .sales-agents-table-wrap .sa-col-contact,
  .sales-agents-table-wrap .sa-col-location,
  .sales-agents-table-wrap .sa-col-tier,
  .sales-agents-table-wrap .sa-col-sales,
  .sales-agents-table-wrap .sa-col-earnings,
  .sales-agents-table-wrap .sa-col-paid,
  .sales-agents-table-wrap .sa-col-wallet,
  .sales-agents-table-wrap .sa-col-status {
    width: auto;
  }
}

/* Agent applications � compact modern rows */
.sales-app-onboarding-table-wrap table th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.sales-app-onboarding-table-wrap table td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  vertical-align: middle;
  font-size: 0.8125rem;
}

/* Applications status tabs � fixed-friendly column widths */
.sales-app-onboarding-table-wrap table.sales-apps-status-table {
  table-layout: fixed;
  width: 100%;
  min-width: 56rem;
}

.sales-app-onboarding-table-wrap .sales-app-col-check {
  width: 2.5rem;
}

.sales-app-onboarding-table-wrap .sales-app-col-name {
  width: 14%;
}

.sales-app-onboarding-table-wrap .sales-app-col-agent-no {
  width: 7rem;
  white-space: nowrap;
}

.sales-app-onboarding-table-wrap .sales-app-col-email {
  width: 18%;
}

.sales-app-onboarding-table-wrap .sales-app-col-phone {
  width: 9rem;
}

.sales-app-onboarding-table-wrap .sales-app-col-location {
  width: 12%;
}

.sales-app-onboarding-table-wrap .sales-app-col-submitted {
  width: 9.5rem;
}

.sales-app-onboarding-table-wrap table td .btn-sm {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  font-size: 0.75rem;
}

/* Keep Actions visible on Approved / Rejected (and other tabs) while the table scrolls sideways */
.sales-app-onboarding-table-wrap table th.sales-app-actions-col,
.sales-app-onboarding-table-wrap table td.sales-app-actions-col {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -6px 0 10px -8px rgba(15, 23, 42, 0.35);
  white-space: nowrap;
  min-width: 6.5rem;
}

.sales-app-onboarding-table-wrap table thead th.sales-app-actions-col {
  z-index: 4;
  background: #f1f5f9;
}

.sales-app-onboarding-table-wrap table td.sales-app-actions-col:has(.dropdown.show) {
  z-index: 40;
}

/* Actions menu must sit above sticky headers / table scroll clips */
.dropdown-menu.sales-app-actions-menu {
  z-index: 2000 !important;
  position: fixed !important;
}

/* Agents � keep Actions dropdown visible while the table scrolls sideways */
.sales-agents-table-wrap table th.sa-col-actions,
.sales-agents-table-wrap table td.sa-col-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -6px 0 10px -8px rgba(15, 23, 42, 0.35);
  white-space: nowrap;
  min-width: 6.5rem;
}

.sales-agents-table-wrap table thead th.sa-col-actions {
  z-index: 4;
  background: #f1f5f9;
}

.sales-agents-table-wrap table td.sa-col-actions:has(.dropdown.show) {
  z-index: 40;
}

.dropdown-menu.sa-actions-menu {
  z-index: 2000 !important;
  position: fixed !important;
}

/* Clients � compact modern rows */
.sales-clients-table-wrap table th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.sales-clients-table-wrap table td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  vertical-align: middle;
  font-size: 0.8125rem;
}

.sales-clients-table-wrap table td .btn-sm {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  font-size: 0.75rem;
}

/* Clients � show phone/email in a popup on hover over the client name.
   JS moves .sc-client-contact-popup to <body> and fixed-positions it, so it
   floats above the scrollable table instead of being clipped by it. */
.sc-client-name-wrap {
  cursor: default;
}

.sc-client-name-trigger {
  border-bottom: 1px dashed rgba(15, 23, 42, 0.3);
}

.sc-client-contact-popup {
  min-width: 11rem;
  z-index: 2000;
}

/* Packages � compact modern rows */
.sales-packages-table-wrap table th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.sales-packages-table-wrap table td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  vertical-align: middle;
  font-size: 0.8125rem;
}

.sales-packages-table-wrap table td .btn-sm {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  font-size: 0.75rem;
}

.sales-wallet-tabs .nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  margin-bottom: -1px;
  white-space: nowrap;
}

.sales-wallet-tabs-outer {
  margin-bottom: 0;
  padding: 0.35rem 0.5rem 0;
}

.sales-wallet-tabs-outer .tasks-module-subnav-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sales-wallet-tabs-outer .tasks-module-subnav-wrap::-webkit-scrollbar {
  display: none;
}

.sales-wallet-tabs {
  flex-wrap: nowrap;
  width: max-content;
  max-width: none;
  padding: 0 0.25rem;
}

.sales-wallet-tabs .nav-item {
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  .sales-wallet-tabs .nav-link {
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
  }

  .sales-wallet-tabs-outer .tasks-module-subnav-scrollbar {
    display: block;
    margin-top: 0.15rem;
    padding: 0 0.5rem 0.35rem;
  }

  .sales-wallet-stat-tiles .stat-label {
    font-size: 0.6875rem;
  }

  .sales-wallet-stat-tiles .stat-value {
    font-size: 1.0625rem;
  }
}

@media (max-width: 575.98px) {
  .sales-wallet-tabs .nav-link {
    padding: 0.65rem 0.8rem;
    font-size: 0.875rem;
  }

  .sales-wallet-tabs .nav-link i {
    margin-right: 0.35rem !important;
    font-size: 0.9em;
  }
}

.sales-wallet-tabs-outer .tasks-module-subnav-scrollbar.is-hidden {
  display: none;
}

.sales-wallet-tabs .nav-link.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: transparent;
}

/* Wallet overview stat tiles � balanced on phone & tablet */
.sales-wallet-stat-tiles .row {
  --bs-gutter-x: 0.65rem;
  --bs-gutter-y: 0.65rem;
}

.sales-wallet-stat-tiles .row:last-child {
  margin-bottom: 1rem !important;
}

.sales-wallet-stat-tiles .dashboard-stat-card > .card-body {
  padding: 0.85rem 0.9rem !important;
}

.sales-wallet-stat-tiles .stat-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.25;
  hyphens: auto;
}

.sales-wallet-stat-tiles .stat-value {
  font-size: 0.9375rem;
  line-height: 1.2;
  word-break: break-word;
}

.sales-wallet-stat-tiles .stat-icon {
  width: 2.125rem;
  height: 2.125rem;
  font-size: 0.8rem;
}

.sales-wallet-stat-tiles .dashboard-stat-card > .card-body > .d-flex {
  align-items: flex-start;
  gap: 0.5rem;
}

@media (max-width: 575.98px) {
  .sales-wallet-stat-tiles .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .sales-wallet-stat-tiles .dashboard-stat-card .stat-label {
    font-size: 0.6875rem;
  }

  .sales-wallet-stat-tiles .dashboard-stat-card .stat-value {
    font-size: 1.125rem;
  }
}

@media (max-width: 767.98px) {
  .sales-wallet-stat-tiles .dashboard-stat-card .stat-label,
  .sales-wallet-stat-tiles .dashboard-stat-card .stat-progress-hint {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    line-height: 1.25;
  }

  .sales-wallet-stat-tiles .dashboard-stat-card .stat-value {
    line-height: 1.2;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .sales-wallet-stat-tiles .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .sales-wallet-stat-tiles .row > [class*="col-"]:last-child:nth-child(5) {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .sales-wallet-stat-tiles .stat-value {
    font-size: 1.0125rem;
  }
}

/* �� Clients: invite tab �� */
.sales-invite-shell {
  display: grid;
  grid-template-columns: minmax(0, 16.5rem) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid #e9ecef;
}

.sales-invite-aside {
  padding: 1.5rem 1.25rem;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  color: #212529;
}

.sales-invite-aside-badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.sales-invite-aside-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
}

.sales-invite-aside-lead {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6c757d;
  margin: 0 0 1.15rem;
}

.sales-invite-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sales-invite-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #495057;
}

.sales-invite-step-num {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
}

.sales-invite-main {
  padding: 1.35rem 1.25rem 1.5rem;
  background: #fff;
}

@media (min-width: 768px) {
  .sales-invite-main {
    padding: 1.5rem 1.5rem 1.75rem;
  }
}

.sales-invite-agent-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.15rem;
  border-radius: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #212529;
}

.sales-invite-agent-chip > i {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dee2e6;
  color: #6c757d;
}

.sales-invite-section-label {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.65rem;
}

.sales-invite-field {
  margin-bottom: 1.15rem;
}

.sales-invite-packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}

.sales-invite-package {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.sales-invite-package-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sales-invite-package-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 4.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sales-invite-package:hover .sales-invite-package-body {
  border-color: #adb5bd;
}

.sales-invite-package-input:checked + .sales-invite-package-body,
.sales-invite-package-input:focus-visible + .sales-invite-package-body {
  border-color: #0d6efd;
  background: #f8f9fa;
}

.sales-invite-package-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.25;
}

.sales-invite-package-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sales-invite-package-price {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #495057;
}

.sales-invite-package-comm {
  font-size: 0.75rem;
  color: #6c757d;
}

.sales-invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid #e9ecef;
}

@media (max-width: 767.98px) {
  .sales-invite-shell {
    grid-template-columns: 1fr;
  }

  .sales-invite-aside {
    border-right: 0;
    border-bottom: 1px solid #e9ecef;
    padding: 1.15rem 1.1rem;
  }

  .sales-invite-aside-lead {
    margin-bottom: 0.85rem;
  }
}

/* �� Point of sale (modern terminal) �� */
.pos-terminal {
  --pos-ink: #0f172a;
  --pos-muted: #64748b;
  --pos-line: #e2e8f0;
  --pos-surface: #f8fafc;
  --pos-accent: #2563eb;
  --pos-success: #16a34a;
  padding-bottom: 1.5rem;
}

.pos-terminal-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.125rem 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--pos-line);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pos-terminal-hero-main {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.pos-terminal-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.pos-terminal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pos-ink);
}

.pos-terminal-subtitle {
  font-size: 0.8125rem;
  color: var(--pos-muted);
}

.pos-terminal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.pos-terminal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 0.625rem;
  background: #fff;
  border: 1px solid var(--pos-line);
  min-width: 4.5rem;
}

.pos-terminal-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pos-ink);
  font-feature-settings: "tnum" 1;
}

.pos-terminal-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pos-muted);
}

.pos-terminal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(24rem, 30rem);
  gap: 1.25rem;
  align-items: start;
}

.pos-catalog-panel,
.pos-cart-panel {
  overflow: hidden;
  border-radius: 1rem !important;
}

.pos-catalog-toolbar {
  padding: 1rem 1.125rem 0.75rem;
  border-bottom: 1px solid var(--pos-line);
  background: #fff;
}

.pos-catalog-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pos-catalog-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pos-muted);
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 1;
}

.pos-catalog-search .form-control {
  padding-left: 2.35rem;
  border-radius: 999px;
  border-color: var(--pos-line);
  background: var(--pos-surface);
  font-size: 0.875rem;
}

.pos-catalog-search .form-control:focus {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pos-catalog-search-clear {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.8125rem;
}

.pos-catalog-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--pos-muted);
}

.pos-catalog-body {
  background: var(--pos-surface);
}

.pos-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr));
  gap: 0.75rem;
  max-height: calc(100vh - 13.5rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.125rem 1.125rem;
}

.pos-catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--pos-muted);
}

.pos-catalog-empty-icon {
  font-size: 2rem;
  opacity: 0.35;
  margin-bottom: 0.75rem;
}

.pos-product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--pos-line);
  border-radius: 0.875rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 5.25rem;
}

.pos-product-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.pos-product-card:active,
.pos-product-card--added {
  border-color: var(--pos-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.pos-product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 0;
  margin-bottom: 0.25rem;
}

.pos-product-card-top:empty {
  display: none;
}

.pos-product-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.pos-product-badge--serial {
  background: #fef3c7;
  color: #b45309;
}

.pos-product-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pos-ink);
  margin-bottom: auto;
  padding-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-product-price {
  display: block;
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pos-accent);
}

.pos-cart-panel {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
}

.pos-cart-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.pos-cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--pos-line);
  background: linear-gradient(180deg, #fff, #fafbfc);
}

.pos-cart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pos-ink);
}

.pos-cart-subtitle {
  font-size: 0.75rem;
  color: var(--pos-muted);
  margin-top: 0.1rem;
}

.pos-cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--pos-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-feature-settings: "tnum" 1;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.pos-cart-mobile-history {
  padding: 0;
  font-size: 0.8125rem;
  text-decoration: none;
  align-self: center;
}

.pos-mobile-search-wrap {
  position: relative;
}

.pos-mobile-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pos-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.pos-mobile-search-wrap .form-control {
  padding-left: 2.1rem;
}

.pos-mobile-picker {
  margin-top: 0.5rem;
  max-height: 10rem;
  overflow: auto;
  border: 1px solid var(--pos-line);
  border-radius: 0.5rem;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.pos-mobile-picker-empty {
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  color: var(--pos-muted);
}

.pos-mobile-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.pos-mobile-pick-row:last-child {
  border-bottom: none;
}

.pos-mobile-pick-row:active {
  background: #f0fdf4;
}

.pos-mobile-pick-name {
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 0;
}

.pos-mobile-pick-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pos-accent);
  white-space: nowrap;
}

.pos-cart-body {
  padding: 0.875rem 1.125rem;
  overflow: auto;
  max-height: calc(100vh - 20rem);
}

.pos-cart-section + .pos-cart-section {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f1f5f9;
}

.pos-cart-section--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.pos-cart-section--lines {
  border-top: none;
  padding-top: 0;
}

.pos-cart-section-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pos-ink);
}

.pos-cart-section-heading i {
  font-size: 0.75rem;
  color: var(--pos-accent);
}

.pos-cart-section--payment {
  margin-left: -1.125rem;
  margin-right: -1.125rem;
  margin-bottom: -0.875rem;
  padding: 0.875rem 1.125rem 1rem;
  background: var(--pos-surface);
  border-top: 1px solid #f1f5f9;
}

.pos-payment-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-discount-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pos-discount-row .pos-field-label {
  flex-shrink: 0;
  margin-bottom: 0;
}

.pos-discount-row .pos-discount-input {
  max-width: 9rem;
}

.pos-field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-field-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #94a3b8;
}

.pos-field-input {
  border-color: var(--pos-line);
  border-radius: 0.5rem;
}

.pos-field-input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pos-cart-lines-wrap {
  border: 1px solid var(--pos-line);
  border-radius: 0.75rem;
  background: var(--pos-surface);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.pos-cart-lines {
  /* ~4 rows before scrolling: row height (~2.9rem) x4 + 3 gaps (0.4rem) + container padding (1rem) */
  max-height: 14rem;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem;
}

.pos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.75rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--pos-muted);
  white-space: normal;
}

.pos-cart-empty i {
  font-size: 1.25rem;
  opacity: 0.45;
}

.pos-cart-row {
  padding: 0;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid var(--pos-line);
  overflow: hidden;
}

.pos-cart-row + .pos-cart-row {
  margin-top: 0.4rem;
}

.pos-cart-row-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.5rem;
}

.pos-cart-row-name {
  flex: 1 1 auto;
  min-width: 3.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pos-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-cart-row-serials {
  font-size: 0.65rem;
  color: #94a3b8;
  margin: -0.15rem 0.5rem 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: normal;
  overflow-wrap: break-word;
}

.pos-cart-row-unit {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--pos-muted);
  flex-shrink: 0;
}

.pos-cart-row-unit .pos-cart-price-input {
  width: 4.25rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.pos-cart-row-qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.pos-cart-row-total {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pos-ink);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 4rem;
  text-align: right;
}

.pos-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--pos-line);
  border-radius: 0.375rem;
  background: #fff;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--pos-ink);
  cursor: pointer;
}

.pos-qty-btn:hover {
  background: var(--pos-surface);
  border-color: #cbd5e1;
}

.pos-qty-value {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
}

.pos-cart-remove {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 0.375rem;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.75rem;
  cursor: pointer;
}

.pos-cart-remove:hover {
  background: #fee2e2;
}

.pos-payment-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.pos-payment-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--pos-line);
  border-radius: 0.625rem;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--pos-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pos-payment-pill i {
  font-size: 0.9rem;
}

.pos-payment-pill:hover {
  border-color: #cbd5e1;
  background: var(--pos-surface);
}

.pos-payment-pill.active {
  border-color: var(--pos-accent);
  background: #eff6ff;
  color: var(--pos-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.pos-discount-input .input-group-text {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--pos-surface);
  border-color: var(--pos-line);
  color: var(--pos-muted);
}

.pos-cart-checkout {
  margin-top: auto;
  padding: 1rem 1.125rem 1.125rem;
  border-top: 1px solid var(--pos-line);
  background: linear-gradient(180deg, #fafbfc, #fff);
}

.pos-cart-totals {
  margin-bottom: 0.875rem;
}

.pos-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--pos-muted);
  padding: 0.15rem 0;
}

.pos-cart-total-row--discount {
  color: #dc2626;
}

.pos-cart-total-row--grand {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--pos-line);
  font-size: 1rem;
  font-weight: 700;
  color: var(--pos-ink);
}

.pos-cart-total-row--grand span:last-child {
  font-size: 1.125rem;
  color: var(--pos-success);
}

.pos-checkout-btn {
  border-radius: 0.75rem !important;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.pos-checkout-btn:disabled {
  box-shadow: none;
}

.pos-serial-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}

.pos-serial-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--pos-line);
  border-radius: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.8125rem;
}

.pos-serial-option:hover {
  background: var(--pos-surface);
}

.pos-serial-modal .modal-content {
  border-radius: 1rem;
}

@media (max-width: 991.98px) {
  .pos-terminal-layout {
    grid-template-columns: 1fr;
  }

  .pos-cart-panel {
    position: static;
  }

  .pos-catalog-grid {
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  }

  .pos-cart-body {
    max-height: none;
  }

  /* Sticky checkout bar � always visible on phone/tablet while scrolling */
  body.pos-terminal-page .content-area {
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
  }

  body.pos-terminal-page .pos-cart-checkout {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    margin: 0;
    padding: 0.75rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--pos-line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.1);
  }

  body.pos-terminal-page .pos-cart-totals {
    margin-bottom: 0.65rem;
  }

  body.pos-terminal-page .pos-cart-total-row:not(.pos-cart-total-row--grand) {
    display: none;
  }

  body.pos-terminal-page .pos-cart-total-row--grand {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    font-size: 0.9375rem;
  }

  body.pos-terminal-page .pos-checkout-btn {
    min-height: 2.75rem;
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  body.pos-terminal-page .topbar-datetime-pill {
    display: none !important;
  }

  body.pos-terminal-page .pos-terminal-hero {
    display: none !important;
  }

  body.pos-terminal-page .pos-terminal-layout {
    grid-template-columns: 1fr;
  }

  body.pos-terminal-page .pos-cart-panel {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: static;
  }

  body.pos-terminal-page .pos-mobile-add {
    margin-top: 0;
  }

  body.pos-terminal-page .pos-seller-hint {
    padding: 0 0 0.5rem;
  }

  body.pos-terminal-page .pos-cart-body {
    max-height: none;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .pos-terminal-hero {
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
  }

  .pos-terminal-hero-main {
    gap: 0.65rem;
  }

  .pos-terminal-hero-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .pos-cart-head,
  .pos-cart-body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .pos-cart-section--grid {
    grid-template-columns: 1fr;
  }

  .pos-payment-pills {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .pos-payment-pill {
    font-size: 0.625rem;
    padding: 0.5rem 0.2rem;
  }

  .pos-payment-pill i {
    font-size: 0.85rem;
  }
}

/* Legacy aliases */
.pos-catalog-item {
  border-radius: 0.75rem !important;
}

.pos-cart-card {
  position: sticky;
  top: 1rem;
}

.pos-receipt-card {
  max-width: 42rem;
}

/* �� POS receipt (screen + print) �� */
.pos-receipt-page {
  padding-bottom: 2rem;
}

.pos-receipt-sheet {
  --pos-receipt-ink: #0f172a;
  --pos-receipt-muted: #64748b;
  --pos-receipt-line: #e2e8f0;
  --pos-receipt-accent: #0f172a;
  position: relative;
  max-width: 22rem;
  margin: 0 auto;
  padding: 1.25rem 1.125rem 1.5rem;
  background: #fff;
  color: var(--pos-receipt-ink);
  font-size: 0.8125rem;
  line-height: 1.45;
  border: 1px solid var(--pos-receipt-line);
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1.25rem rgba(15, 23, 42, 0.08);
  font-feature-settings: "tnum" 1;
}

.pos-receipt-sheet--void {
  border-color: #fecaca;
}

.pos-receipt-void-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: -0.25rem 0 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px dashed #f87171;
  border-radius: 0.375rem;
  background: #fef2f2;
  color: #b91c1c;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pos-receipt-void-banner small {
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: #991b1b;
}

.pos-receipt-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.pos-receipt-brand-logo {
  margin-bottom: 0.625rem;
}

.pos-receipt-logo-img {
  display: inline-block;
  max-height: 3.25rem;
  max-width: 11rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.pos-receipt-brand-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pos-receipt-brand-sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--pos-receipt-muted);
}

.pos-receipt-brand-contact {
  margin: 0.5rem 0 0;
  font-style: normal;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--pos-receipt-muted);
}

.pos-receipt-doc-head {
  text-align: center;
  margin-bottom: 0.875rem;
}

.pos-receipt-doc-label {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--pos-receipt-line);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pos-receipt-muted);
}

.pos-receipt-doc-number {
  margin-top: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pos-receipt-doc-meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--pos-receipt-muted);
}

.pos-receipt-doc-meta-sep {
  margin: 0 0.25rem;
  opacity: 0.6;
}

.pos-receipt-divider {
  height: 0;
  margin: 0.875rem 0;
  border: none;
  border-top: 1px dashed var(--pos-receipt-line);
}

.pos-receipt-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

.pos-receipt-party {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pos-receipt-party--full {
  grid-column: 1 / -1;
}

.pos-receipt-party-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pos-receipt-muted);
}

.pos-receipt-party-value {
  font-weight: 600;
  font-size: 0.8125rem;
  word-break: break-word;
}

.pos-receipt-party-value--muted {
  font-weight: 500;
  color: var(--pos-receipt-muted);
}

.pos-receipt-party-sub {
  font-size: 0.7rem;
  color: var(--pos-receipt-muted);
}

.pos-receipt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.pos-receipt-table thead th {
  padding: 0 0 0.4rem;
  border-bottom: 1px solid var(--pos-receipt-accent);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-receipt-muted);
  text-align: left;
}

.pos-receipt-table thead th.pos-receipt-col-qty,
.pos-receipt-table thead th.pos-receipt-col-amt {
  text-align: right;
}

.pos-receipt-table tbody tr + tr td {
  border-top: 1px dotted var(--pos-receipt-line);
}

.pos-receipt-table tbody td {
  padding: 0.55rem 0;
  vertical-align: top;
}

.pos-receipt-item-cell {
  padding-right: 0.35rem !important;
}

.pos-receipt-item-name {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.pos-receipt-item-sku,
.pos-receipt-item-serial,
.pos-receipt-item-unit {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: var(--pos-receipt-muted);
  line-height: 1.35;
}

.pos-receipt-item-unit {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pos-receipt-col-qty {
  width: 2rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--pos-receipt-muted);
}

.pos-receipt-col-amt {
  width: 5.25rem;
  text-align: right;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.pos-receipt-totals {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pos-receipt-accent);
}

.pos-receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: var(--pos-receipt-muted);
}

.pos-receipt-total-row--discount {
  color: #b91c1c;
}

.pos-receipt-total-row--grand {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--pos-receipt-line);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pos-receipt-ink);
}

.pos-receipt-total-row--grand span:last-child {
  font-size: 1.0625rem;
}

.pos-receipt-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

.pos-receipt-payment-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pos-receipt-foot {
  margin-top: 1.125rem;
  padding-top: 0.875rem;
  border-top: 1px dashed var(--pos-receipt-line);
  text-align: center;
}

.pos-receipt-thanks {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pos-receipt-foot-note {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: var(--pos-receipt-muted);
}

@media (min-width: 576px) {
  .pos-receipt-sheet {
    max-width: 24rem;
    padding: 1.5rem 1.375rem 1.75rem;
  }
}

@media print {
  @page {
    margin: 10mm 8mm;
    size: auto;
  }

  body.app-layout,
  body.bg-light {
    background: #fff !important;
  }

  .sidebar,
  .sidebar-modern,
  .topbar,
  .dashboard-hero,
  .d-print-none,
  .app-site-footer,
  .mobile-nav-drawer,
  .offcanvas,
  .app-modals-root {
    display: none !important;
  }

  .app-wrapper {
    display: block !important;
    gap: 0 !important;
  }

  main.content-area,
  .content-area {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .pos-receipt-page {
    padding: 0 !important;
  }

  .pos-receipt-sheet {
    max-width: 72mm;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 9pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pos-receipt-sheet--void::after {
    content: "VOID";
    position: absolute;
    inset: 35% 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(185, 28, 28, 0.18);
    border: 3px solid rgba(185, 28, 28, 0.22);
    transform: rotate(-18deg);
    pointer-events: none;
  }

  .pos-receipt-void-banner {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
  }

  .pos-receipt-logo-img {
    max-height: 42px;
    max-width: 160px;
  }

  .pos-receipt-table thead th,
  .pos-receipt-totals {
    border-color: #000 !important;
  }

  .pos-receipt-divider {
    border-top-color: #cbd5e1 !important;
  }

  .pos-receipt-card {
    box-shadow: none !important;
    border: none !important;
  }
}

@media (max-width: 991.98px) {
  .pos-cart-card {
    position: static;
  }

  .pos-catalog-grid {
    max-height: 22rem;
  }
}

/* PWA install banner � floating on mobile (Android / iOS) */
.pwa-install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1085;
  padding: 0 0.65rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.pwa-install-banner:not(.d-none) {
  display: block;
  pointer-events: auto;
}

.auth-body .pwa-install-banner {
  left: 0 !important;
  right: 0 !important;
}

.pwa-install-banner__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 16px 40px rgba(15, 23, 42, 0.14);
}

.pwa-install-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #2563eb;
  color: #fff;
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.pwa-install-banner__main {
  flex: 1 1 auto;
  min-width: 0;
}

.pwa-install-banner__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  padding-right: 0.25rem;
}

.pwa-install-banner__text {
  font-size: 0.8125rem;
  color: #475569;
  margin-top: 0.2rem;
  line-height: 1.45;
  word-break: break-word;
}

.pwa-install-banner__actions {
  flex-shrink: 0;
  align-self: center;
  margin-top: 0;
}

.pwa-install-banner__actions .btn {
  white-space: nowrap;
  font-weight: 600;
  min-height: 2.25rem;
  min-width: 4.75rem;
}

.pwa-install-banner__install--manual {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.pwa-install-banner__text--pulse {
  animation: pwa-install-hint-pulse 0.8s ease-in-out 2;
}

@keyframes pwa-install-hint-pulse {
  0%,
  100% {
    color: #475569;
  }

  50% {
    color: #2563eb;
  }
}

.pwa-install-banner__dismiss {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -0.15rem -0.35rem 0 0;
  padding: 0;
  line-height: 1;
  font-size: 1.1rem;
  text-decoration: none !important;
  opacity: 0.55;
}

.pwa-install-banner__dismiss:hover {
  opacity: 1;
}

@media (max-width: 991.98px) {
  .pwa-install-banner {
    left: 0 !important;
    right: 0 !important;
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    max-width: 100vw;
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(0.85rem, calc(0.5rem + env(safe-area-inset-bottom, 0px)));
  }

  .pwa-install-banner__inner {
    max-width: none;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 0.8rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
  }

  .pwa-install-banner__icon {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
  }

  .pwa-install-banner__title {
    font-size: 0.9rem;
  }

  .pwa-install-banner__text {
    font-size: 0.78rem;
  }

  .pwa-install-banner__main {
    flex: 1 1 auto;
    min-width: 0;
  }

  .pwa-install-banner__actions {
    width: auto;
    padding-left: 0;
    align-self: center;
  }

  .pwa-install-banner__actions:not(.d-none) + .pwa-install-banner__dismiss {
    margin-left: -0.15rem;
  }

  .pwa-install-banner__inner:has(.pwa-install-banner__actions:not(.d-none)) .pwa-install-banner__text {
    font-size: 0.75rem;
  }

  body.pwa-install-banner-visible .content-area,
  body.pwa-install-banner-visible.auth-body {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 575.98px) {
  .pwa-install-banner__inner {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 1200px) {
  body:not(.auth-body) .pwa-install-banner {
    left: var(--sidebar-width, 272px);
  }
}

@media (min-width: 992px) {
  body.pwa-install-banner-visible .content-area {
    padding-bottom: 5.5rem;
  }

  body.auth-body.pwa-install-banner-visible {
    padding-bottom: 5.5rem;
  }
}

/* �� In-app Documentation �� */
.page-docs .docs-shell {
  max-width: 1180px;
  margin-inline: auto;
  animation: docs-fade-up 0.45s ease both;
}

.page-docs .docs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.page-docs .docs-hero.dashboard-hero {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.page-docs .docs-hero__glow {
  position: absolute;
  inset: -50% -15% auto auto;
  width: min(18rem, 55%);
  height: min(10rem, 70%);
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-docs .docs-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 90%);
  pointer-events: none;
  z-index: 0;
}

.page-docs .docs-breadcrumb {
  font-size: 0.75rem;
}

.page-docs .docs-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.page-docs .docs-breadcrumb a:hover {
  text-decoration: underline;
}

.page-docs .docs-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.page-docs .docs-hero__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.15rem;
  animation: docs-fade-up 0.5s ease 0.05s both;
}

.page-docs .docs-hero__title-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  flex-shrink: 0;
}

.page-docs .docs-hero__desc {
  max-width: 36rem;
  line-height: 1.4;
  font-size: 0.875rem;
}

.page-docs .docs-search-wrap {
  min-width: min(100%, 16rem);
  animation: docs-fade-up 0.5s ease 0.1s both;
}

.page-docs .docs-search {
  position: relative;
  display: flex;
  align-items: center;
}

.page-docs .docs-search > i {
  position: absolute;
  left: 0.75rem;
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}

.page-docs .docs-search .form-control {
  padding-left: 2.1rem;
  padding-right: 2.25rem;
  min-height: 2.15rem;
  border-radius: 0.7rem;
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-docs .docs-search .form-control:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.page-docs .docs-search__hint {
  position: absolute;
  right: 0.55rem;
  font-size: 0.65rem;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.3rem;
  padding: 0.05rem 0.3rem;
}

.page-docs .docs-rail {
  top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.page-docs .docs-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.page-docs .docs-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.page-docs .docs-panel__head--clickable {
  list-style: none;
  cursor: pointer;
  margin: 0;
}

.page-docs .docs-panel__head--clickable::-webkit-details-marker {
  display: none;
}

.page-docs .docs-panel__count {
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
}

.page-docs .docs-panel__body {
  padding: 0 0.55rem 0.75rem;
}

.page-docs .docs-group__label {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  padding: 0.55rem 0.55rem 0.25rem;
}

.page-docs .docs-guide {
  position: relative;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0.7rem;
  margin-bottom: 0.25rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.page-docs .docs-guide:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

.page-docs .docs-guide.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
  border-color: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

.page-docs .docs-guide__icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}

.page-docs .docs-guide.is-active .docs-guide__icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.page-docs .docs-guide__title {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}

.page-docs .docs-guide__desc {
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #64748b;
  margin-top: 0.15rem;
}

.page-docs .docs-guide.is-active .docs-guide__desc {
  color: rgba(29, 78, 216, 0.75);
}

.page-docs .docs-guide__now {
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2563eb;
}

.page-docs .docs-outline {
  padding: 0 0.45rem 0.75rem;
  max-height: min(52vh, 28rem);
  overflow: auto;
}

.page-docs .docs-outline__link {
  display: block;
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.page-docs .docs-outline__link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.page-docs .docs-outline__link.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-left-color: #2563eb;
  font-weight: 600;
}

.page-docs .docs-outline__link.level-3 {
  padding-left: 1.15rem;
  font-size: 0.78rem;
  color: #64748b;
}

.page-docs .docs-outline-mobile__chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.page-docs details.docs-outline-mobile[open] .docs-outline-mobile__chevron {
  transform: rotate(180deg);
}

.page-docs .docs-article {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1.1rem;
  padding: 1.5rem 1.65rem 2.25rem;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.05);
  animation: docs-fade-up 0.55s ease 0.08s both;
}

.page-docs .docs-article .docs-heading {
  scroll-margin-top: 5rem;
}

.page-docs .docs-article > p:first-child {
  font-size: 1.02rem;
  color: #64748b;
  line-height: 1.7;
}

.page-docs .docs-article h2 {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.page-docs .docs-article h2:first-of-type {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: 0;
}

.page-docs .docs-article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.4rem;
  color: #1e293b;
}

.page-docs .docs-article h4,
.page-docs .docs-article h5,
.page-docs .docs-article h6 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-top: 1.1rem;
}

.page-docs .docs-article p,
.page-docs .docs-article li {
  color: #334155;
  line-height: 1.7;
}

.page-docs .docs-article ul,
.page-docs .docs-article ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.page-docs .docs-article li + li {
  margin-top: 0.25rem;
}

.page-docs .docs-article code {
  font-size: 0.86em;
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.page-docs .docs-article .docs-code {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  overflow: auto;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-docs .docs-article .docs-code code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
}

.page-docs .docs-article .table-responsive {
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-bottom: 1rem;
}

.page-docs .docs-article table {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.page-docs .docs-article thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  border-bottom-width: 1px;
}

.page-docs .docs-article tbody tr:hover {
  background: #f8fafc;
}

.page-docs .docs-article hr {
  margin: 1.75rem 0;
  opacity: 0.12;
}

.page-docs .docs-article a {
  color: #2563eb;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.page-docs .docs-article a:hover {
  color: #1d4ed8;
}

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

@media (max-width: 991.98px) {
  .page-docs .docs-article {
    padding: 1.1rem 1rem 1.6rem;
  }

  .page-docs .docs-search-wrap {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-docs .docs-shell,
  .page-docs .docs-hero__title,
  .page-docs .docs-search-wrap,
  .page-docs .docs-article {
    animation: none;
  }

  .page-docs .docs-guide {
    transition: none;
  }
}
