/*
 * Mahsoob brand layer on top of AdminLTE 4 (both directions).
 * Colours come from the Mahsoob logo.
 */
:root {
  --mahsoob-navy: #1e3b8b;
  --mahsoob-blue: #3b82f6;
  --mahsoob-light: #93c5fd;
  --bs-primary: #1e3b8b;
  --bs-primary-rgb: 30, 59, 139;
  --bs-link-color: #1e3b8b;
  --bs-link-color-rgb: 30, 59, 139;
  --bs-link-hover-color: #3b82f6;
  --bs-link-hover-color-rgb: 59, 130, 246;
}

.btn-primary {
  --bs-btn-bg: var(--mahsoob-navy);
  --bs-btn-border-color: var(--mahsoob-navy);
  --bs-btn-hover-bg: #17306f;
  --bs-btn-hover-border-color: #17306f;
  --bs-btn-active-bg: #142a62;
  --bs-btn-active-border-color: #142a62;
  --bs-btn-disabled-bg: var(--mahsoob-navy);
  --bs-btn-disabled-border-color: var(--mahsoob-navy);
}

.text-bg-primary,
.bg-primary {
  background-color: var(--mahsoob-navy) !important;
}

/* Sidebar in the brand navy instead of AdminLTE's grey */
.app-sidebar[data-bs-theme="dark"] {
  --lte-sidebar-bg: #172f70;
  background-color: #172f70 !important;
}

.app-sidebar .sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.app-sidebar .brand-link .brand-image {
  border-radius: 0.5rem;
  opacity: 1;
}

.app-sidebar .nav-link.active {
  background-color: var(--mahsoob-blue) !important;
  color: #fff !important;
}

/* Sign-in page */
.login-page {
  background: linear-gradient(160deg, #eef4ff 0%, #dbe7ff 100%);
}

.login-logo img {
  max-width: 280px;
  height: auto;
}

.validation-summary-valid {
  display: none;
}

.login-box .card {
  border-top: 3px solid var(--mahsoob-navy);
}

/* Small helpers */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.module-card .card-body i {
  font-size: 2rem;
  color: var(--mahsoob-navy);
}

/* Setup screens */
.rights-table td,
.rights-table th {
  text-align: center;
  vertical-align: middle;
}

.rights-table td:first-child,
.rights-table th:first-child {
  text-align: start;
}

.audit-details {
  max-width: 420px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Voucher entry: let the account search list show below the line on wide screens */
@media (min-width: 992px) {
  .table-responsive:has(> .voucher-lines) {
    overflow: visible;
  }
}

.voucher-lines .account-results {
  max-height: 260px;
  overflow-y: auto;
}

.report-table td,
.report-table th {
  white-space: nowrap;
}
