:root {
  --ink: #1e2f42;
  --line: #d6e0e8;
  --paper: #f5f4f7;
  --blue: #4a86b9;
  --navy: #1e2f42;
  --navy-panel: #273e57;
  --cream: #fff9d9;
  --red: #c41024;
  --shadow: 0 18px 45px rgba(30, 47, 66, 0.1);
}

html {
  background: var(--paper);
}

.sidenav {
  background: var(--navy);
  padding-top: 18px;
}

.portal-brand {
  justify-content: center;
  padding: 0 5px;
}

.portal-brand img {
  width: 156px;
  max-width: 156px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
}

.portal-brand .portal-name {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.portal-brand .portal-name b {
  color: var(--cream);
}

.nav-label {
  color: var(--cream);
  opacity: 0.78;
  margin-top: 30px;
}

.side-links a {
  color: rgba(255, 255, 255, 0.82);
}

.side-links a:hover,
.side-links a.active {
  color: #fff;
  background: var(--navy-panel);
  box-shadow: inset 3px 0 0 var(--blue);
}

.side-links i {
  color: #8fb6d6;
}

.side-links a.active i {
  color: var(--cream);
}

.avatar {
  background: var(--blue);
  color: #fff;
}

.topbar {
  border-bottom-color: #d9e2ea;
}

.top-actions {
  gap: 24px;
  margin-left: auto;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.header-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-user-text strong,
.header-user-text small {
  display: block;
}

.header-user-text strong {
  font-size: 13px;
  line-height: 1.2;
}

.header-user-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}

.header-user form {
  margin: 0;
}

.header-signout {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px;
  font-size: 18px;
  cursor: pointer;
}

.header-signout:hover,
.header-user-link:hover .person-icon {
  color: var(--blue);
  stroke: var(--blue);
}

.guest-brand {
  flex-direction: row;
  gap: 15px;
}

.guest-brand img {
  width: 68px;
  max-height: 64px;
  height: auto;
  object-fit: contain;
}

.guest-brand .portal-name {
  color: var(--navy);
  font-size: 18px;
}

.guest-brand .portal-name b,
.mobile-brand span {
  color: var(--blue);
}

.primary {
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(74, 134, 185, 0.28);
}

.eyebrow,
.app-tag {
  color: var(--blue);
}

input:focus,
select:focus,
textarea:focus {
  outline-color: rgba(74, 134, 185, 0.18);
  border-color: var(--blue);
}

.login-shell aside {
  background: linear-gradient(145deg, var(--navy), var(--navy-panel) 62%, #365f84);
}

.login-shell aside p {
  color: #d6e3ef;
}

.login-bubbles {
  position: absolute;
  top: 34px;
  left: 54px;
  right: auto;
  width: clamp(210px, 25vw, 300px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.2));
}

.secure-pill i {
  background: #299568;
}

@media (max-width: 850px) {
  .portal-brand {
    padding: 0;
    align-items: center;
  }

  .portal-brand img {
    width: 46px;
    max-width: 46px;
  }
}

@media (max-width: 560px) {
  .guest-brand img {
    width: 54px;
  }

  .secure-pill,
  .header-user-text {
    display: none;
  }

  .top-actions {
    gap: 8px;
  }

  .header-user {
    padding-left: 0;
    border-left: 0;
  }
}

/* Allow every authenticated detail page to use the available workspace width. */
.authenticated main {
  width: calc(100% - 32px);
  max-width: none;
}

@media (max-width: 560px) {
  .authenticated main {
    width: calc(100% - 24px);
  }
}
