html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --portal-bg: #f3f5fb;
  --portal-surface: rgba(255,255,255,.86);
  --portal-surface-strong: #ffffff;
  --portal-border: rgba(15,23,42,.08);
  --portal-border-strong: rgba(15,23,42,.14);
  --portal-shadow: 0 20px 60px rgba(15,23,42,.08);
  --portal-shadow-soft: 0 10px 24px rgba(15,23,42,.05);
  --portal-text: #111827;
  --portal-muted: #667085;
  --portal-navy: #0d1326;
  --portal-navy-2: #111a33;
  --portal-blue: #2563eb;
  --portal-blue-dark: #1d4ed8;
  --portal-green: #22c55e;
  --portal-orange: #f59e0b;
  --portal-radius: 20px;
  --portal-radius-sm: 14px;
  --portal-sidebar-width: 248px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(37,99,235,.25);
}

html, body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: var(--portal-text);
  background:
    radial-gradient(1200px 520px at -10% -10%, rgba(37,99,235,.09), transparent 48%),
    radial-gradient(900px 460px at 100% 0%, rgba(15,23,42,.06), transparent 40%),
    linear-gradient(180deg, #f7f9fe 0%, #eef2f8 100%);
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.gss-title {
  font-family: inherit;
  color: var(--portal-text);
}

.text-muted, .gss-muted, .muted {
  color: var(--portal-muted) !important;
}

[id^="details-wrap-"] {
  font-weight: normal;
}
[id^="details-wrap-"] strong,
[id^="details-wrap-"] b,
[id^="details-wrap-"] .fw-bold {
  font-weight: normal !important;
}

.portal-shell {
  min-height: 100vh;
}

.portal-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--portal-sidebar-width);
  background:
    radial-gradient(220px 260px at 10% 0%, rgba(99,102,241,.08), transparent 68%),
    radial-gradient(220px 260px at 50% 100%, rgba(37,99,235,.08), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,249,254,.98) 100%);
  color: var(--portal-text);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(15,23,42,.08);
  box-shadow: 14px 0 40px rgba(15,23,42,.08);
  z-index: 1025;
}

.portal-main-shell {
  min-height: 100vh;
}

@media (min-width: 992px) {
  .portal-main-shell {
    margin-left: var(--portal-sidebar-width);
  }
}

.portal-page-shell {
  padding: 20px 22px 28px;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px 14px;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(243,245,251,.92) 0%, rgba(243,245,251,.72) 100%);
  border-bottom: 1px solid rgba(15,23,42,.05);
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
}

.portal-topbar-mobile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.portal-brand.mobile {
  color: var(--portal-text);
}

.portal-brand-logo {
  max-height: 34px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.portal-brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.1;
}

.portal-brand-sub {
  margin-top: 2px;
  font-size: .84rem;
  color: var(--portal-muted);
}

.portal-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.portal-nav.mobile {
  margin-top: 6px;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  color: #334155;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, color .18s ease, box-shadow .18s ease;
}

.portal-nav-link:hover {
  color: #0f172a;
  background: rgba(15,23,42,.045);
  border-color: rgba(15,23,42,.08);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  transform: translateY(-1px);
}

.portal-nav-link.active {
  color: #111827;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.96));
  border-color: rgba(99,102,241,.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 12px 28px rgba(15,23,42,.10);
}

.portal-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.portal-nav-icon svg,
.portal-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(15,23,42,.08);
}

.portal-user-mini,
.portal-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-user-chip {
  padding: 8px 10px 8px 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  box-shadow: var(--portal-shadow-soft);
}

.portal-user-text {
  display: grid;
  line-height: 1.15;
}

.portal-user-text strong,
.portal-user-name {
  font-size: .92rem;
  font-weight: 800;
}

.portal-user-text span,
.portal-user-meta {
  font-size: .76rem;
  color: var(--portal-muted);
}

.portal-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f2a44 0%, #111827 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 8px 18px rgba(15,23,42,.16);
}

.portal-avatar-sm {
  width: 38px;
  height: 38px;
  font-size: .82rem;
}

.portal-selector-wrap {
  min-width: min(100%, 420px);
  max-width: 420px;
  width: 100%;
}

.portal-selector,
.portal-logout-btn,
.portal-menu-btn {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  box-shadow: var(--portal-shadow-soft);
}

.portal-selector {
  width: 100%;
  min-height: 48px;
  padding: 0 46px 0 16px;
  color: var(--portal-text);
  font-weight: 700;
}

.portal-logout-btn,
.portal-menu-btn {
  min-height: 46px;
  padding: 0 16px;
  color: var(--portal-text);
  font-weight: 800;
}

.portal-menu-btn {
  width: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-mobile-canvas {
  background:
    radial-gradient(220px 260px at 10% 0%, rgba(99,102,241,.08), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(247,249,254,.99) 100%);
  color: var(--portal-text);
}

.portal-mobile-canvas .offcanvas-header {
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.gss-wrap,
.dash-wrap {
  max-width: 1400px !important;
  margin: 0 auto;
}

.main-order-section,
.card,
.gss-card,
.stmt,
.tile,
.widget-card,
.dashboard-panel {
  box-shadow: var(--portal-shadow-soft);
}

.table,
.table > :not(caption) > * > * {
  border-color: rgba(15,23,42,.08);
}

.table thead th {
  color: #475467;
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .portal-topbar {
    padding: 14px 14px 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .portal-topbar-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .portal-selector-wrap {
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }

  .portal-page-shell {
    padding: 12px 10px 20px;
  }

  .gss-wrap,
  .dash-wrap {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 15px;
  }

  .portal-user-chip {
    display: none !important;
  }

  .portal-logout-btn {
    min-height: 44px;
    padding-inline: 14px;
  }
}


.portal-mobile-canvas .btn-close {
  filter: none;
  opacity: .8;
}
