:root {
  --rb-purple: #734b83;
  --rb-blue: #053e84;
  --rb-light: #f7f5fa;
  --rb-border: #e5e1eb;
  --rb-text: #25334a;
  --rb-muted: #667085;
  --bs-primary: #053e84;
  --bs-primary-rgb: 5, 62, 132;
  --bs-body-font-family: "Segoe UI", Arial, sans-serif;
  --bs-body-font-size: 14px;
}
body {
  font: 14px/1.55 "Segoe UI", Arial, sans-serif !important;
  color: var(--rb-text);
  background: #f7f8fc;
}
body h1,
body .h1 {
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.4;
  color: var(--rb-blue);
}
body h2,
body h3,
body h4,
body h5,
body h6 {
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.5;
}
body p,
body input,
body select,
body textarea,
body button,
body .btn {
  font-size: 14px;
}
body small,
body .small,
body .form-text {
  font-size: 12px !important;
}
body [class$="-wrap"] {
  font-family: inherit !important;
}
a {
  color: var(--rb-blue);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--rb-purple);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #734b8380;
  outline-offset: 3px;
}
.btn,
button[type="submit"],
.btn-purple,
.btn-test {
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  min-height: 38px;
}
.btn-primary,
.btn-purple,
.btn-test,
button[type="submit"] {
  background: var(--rb-purple) !important;
  border-color: var(--rb-purple) !important;
  color: white !important;
}
.btn-primary:hover,
.btn-purple:hover,
button[type="submit"]:hover {
  background: var(--rb-blue) !important;
  border-color: var(--rb-blue) !important;
}
.btn i,
button i,
.db-sidenav a i {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  vertical-align: middle;
  margin-right: 6px;
}
.form-control,
.form-select,
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
select,
textarea {
  border: 1px solid var(--rb-border);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--rb-text);
  background-color: white;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--rb-purple);
  box-shadow: 0 0 0 3px #734b831a;
}
label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
table {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
table th {
  font-size: 12px !important;
  color: var(--rb-blue);
  background: var(--rb-light);
}
table td,
table th {
  padding: 12px !important;
  vertical-align: middle;
  border-color: var(--rb-border) !important;
}
table tfoot {
  background: var(--rb-light);
  font-weight: 700;
}
.table-responsive {
  overflow-x: auto;
}
.header {
  background: white !important;
  border-bottom: 1px solid var(--rb-border);
  box-shadow: 0 2px 12px #053e8408;
  min-height: 76px;
}
.header .info-section {
  background: white !important;
  color: var(--rb-blue) !important;
}
.header .company-name,
.header .user-info {
  color: var(--rb-blue) !important;
}
.header .logo-section {
  min-width: 180px;
}
.header .db-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.pb-header {
  background: var(--rb-blue) !important;
  padding: 12px 20px;
}
.pb-header h2 {
  color: white !important;
  margin: 0;
}
.db-sidenav {
  background: white !important;
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 20px #053e8408;
}
.db-sidenav a {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  margin: 4px 0;
  padding: 12px;
  color: var(--rb-blue) !important;
  text-decoration: none;
  font-size: 14px;
}
.db-sidenav a.active,
.db-sidenav a:hover {
  background: var(--rb-purple) !important;
  color: white !important;
}
.dashboard-main > section > .row {
  margin-top: 20px !important;
}
.card,
.main-running,
.page_border {
  border: 1px solid var(--rb-border);
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 20px #053e8408;
}
.portal-notice {
  width: calc(100% - 32px);
  margin: 12px 16px;
  border-radius: 8px;
}
.login_page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #734b8310, #053e8410);
}
.login_page .page_border {
  padding: 32px;
  width: min(100%, 480px);
}
.login_page .logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.header {
  position: sticky;
  height: auto;
  top: 0;
}
.header .logo-section {
  background: var(--rb-blue);
  padding: 16px;
}
.dashboard-main {
  padding-top: 0;
}
.dashboard-main .pb-header {
  position: static;
  top: auto;
  height: auto;
  width: auto;
  margin: 0 !important;
}
.dashboard-main .db-text {
  padding-top: 0;
  text-align: left;
}
.dashboard-main .db-sidenav {
  position: sticky;
  top: 96px;
  width: 100%;
  height: auto;
  min-height: 180px;
}
.db-sidenav a {
  box-shadow: none;
}
.avs-btn-danger,
.vl-file-pdf {
  background: var(--rb-purple) !important;
  color: white !important;
}
@media (max-width: 991px) {
  .dashboard-main .db-sidenav {
    position: fixed;
    width: 240px;
    left: -260px;
    top: 80px;
    z-index: 1000;
    padding-top: 32px;
  }
  .dashboard-main .db-sidenav.open {
    left: 12px;
  }
  .db-sidenav a {
    top: 0;
  }
  .hamburger-btn {
    position: static !important;
    margin: 8px 16px;
    padding: 8px 12px;
    border: 1px solid var(--rb-border);
    border-radius: 8px;
    background: white;
    color: var(--rb-blue);
  }
  .close-btn {
    color: var(--rb-blue);
    right: 8px !important;
  }
  .avs-form-row {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 767px) {
  .header {
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  .header .info-section {
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
  }
  body [class$="-wrap"] {
    padding: 16px !important;
  }
  .avs-loc-btn,
  .gq-loc-btn,
  .vl-acc-btn {
    flex-wrap: wrap;
    gap: 12px;
  }
  .avs-loc-body,
  .gq-loc-body,
  .vl-acc-body {
    overflow-x: auto;
  }
  .login_img {
    display: none;
  }
}
.portal-body {
  background: #f6f7fb;
}
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: white;
  border-bottom: 1px solid var(--rb-border);
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 216px;
  flex-shrink: 0;
  color: var(--rb-blue);
  font-weight: 700;
  text-decoration: none;
}
.portal-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.portal-company {
  flex: 1;
  color: var(--rb-blue);
  font-weight: 600;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rb-muted);
  font-size: 12px;
}
.portal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}
.portal-sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  background: white;
  border-right: 1px solid var(--rb-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.portal-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--rb-blue);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.portal-sidebar nav a i {
  width: 18px;
  text-align: center;
}
.portal-sidebar nav a.active {
  background: var(--rb-purple);
  color: white;
}
.portal-sidebar nav a:hover:not(.active) {
  background: var(--rb-light);
}
.portal-sidebar-note {
  margin-top: auto;
  border-top: 1px solid var(--rb-border);
  padding: 16px 12px 0;
  color: var(--rb-muted);
  font-size: 10px;
}
.portal-content {
  min-width: 0;
  padding: 28px;
}
.portal-content > [class*="col-"] {
  width: 100%;
  max-width: none;
}
.portal-content [class$="-wrap"] {
  padding: 0 !important;
  max-width: none;
}
.portal-content .main-running {
  margin: 0;
  padding: 24px;
}
.portal-content .portal-notice {
  width: 100%;
  margin: 0 0 20px;
  font-size: 12px;
  padding: 12px 16px;
}
.portal-content h1 {
  margin-bottom: 6px;
}
.portal-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.portal-page-header p {
  margin: 0;
  color: var(--rb-muted);
  font-size: 12px;
}
.portal-menu,
.portal-close {
  display: none;
  border: 0;
  background: var(--rb-light);
  color: var(--rb-blue);
  padding: 8px 12px;
  border-radius: 8px;
}
@media (max-width: 991px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    position: fixed;
    left: -260px;
    width: 240px;
    z-index: 110;
    transition: left 0.2s;
  }
  .portal-sidebar.open {
    left: 0;
  }
  .portal-menu,
  .portal-close {
    display: block;
  }
  .portal-close {
    align-self: flex-end;
    margin-bottom: 12px;
  }
  .portal-content {
    padding: 20px;
  }
  .portal-topbar {
    gap: 12px;
    padding: 12px 16px;
  }
  .portal-brand {
    width: auto;
    flex: 1;
  }
  .portal-company {
    display: none;
  }
}
@media (max-width: 575px) {
  .portal-user {
    display: none;
  }
  .portal-content {
    padding: 16px;
  }
}
.portal-content .lor-section {
  background: white !important;
  color: var(--rb-blue);
  border: 1px solid var(--rb-border);
  border-radius: 10px;
  padding: 24px;
}
.portal-content .lor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.portal-content .lor-row input[type="file"] {
  max-width: 100%;
}
.portal-content .btn-secondary {
  background: var(--rb-purple) !important;
  border-color: var(--rb-purple) !important;
  color: white !important;
}
.portal-content .container {
  max-width: none;
  padding: 0;
}
/* Shared brand-blue navigation for both admin and user portals. */
.portal-topbar,
.portal-sidebar {
  background: #053e84;
}
.portal-brand,
.portal-company,
.portal-user,
.portal-sidebar nav a {
  color: #fff;
}
.portal-brand img {
  background: white;
  border-radius: 8px;
  padding: 3px;
}
.portal-sidebar nav a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}
.portal-sidebar nav a.active {
  background: #734b83;
  color: white;
}
.portal-sidebar-note {
  color: rgba(255, 255, 255, 0.8);
  border-top-color: rgba(255, 255, 255, 0.2);
}
.portal-menu,
.portal-close {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}
#company-details, #report-downloads { scroll-margin-top:100px; }
.portal-next-section { outline:2px solid #734B83; outline-offset:3px; }
