/* Deskio access portal — split login and help hub, 2026-07-22. */

html {
  min-width: 320px;
  background: #06091d;
}

body.portal-page {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #06091d;
  color: var(--cb-display-ink-dark);
  font-family: 'Cerebri Sans', Inter, system-ui, sans-serif;
}

.portal-page *,
.portal-page *::before,
.portal-page *::after {
  box-sizing: border-box;
}

.portal-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.portal-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portal-shell {
  display: grid;
  grid-template-columns: minmax(620px, 1.55fr) minmax(430px, .85fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.portal-login {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  background: #f4f5fa;
  box-shadow: 28px 0 80px rgba(0, 0, 0, .18);
}

.portal-login__toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(15, 19, 61, .09);
  background: rgba(255, 255, 255, .94);
  color: var(--cb-ink);
  backdrop-filter: blur(18px);
}

.portal-login__status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  letter-spacing: -.012em;
}

.portal-login__status > span {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 999px;
  background: #2dcf9f;
  box-shadow: 0 0 0 5px rgba(45, 207, 159, .12), 0 0 22px rgba(45, 207, 159, .36);
}

.portal-login__status b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.portal-login__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: none;
}

.portal-version-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 6px 10px 6px 12px;
  border: 1px solid rgba(15, 19, 61, .12);
  border-radius: 999px;
  background: #fff;
  color: #303759;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, translate .2s ease;
}

.portal-version-toggle__track {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  border-radius: 999px;
  background: #cbd0dc;
  box-shadow: inset 0 0 0 1px rgba(15, 19, 61, .08);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.portal-version-toggle__track > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(13, 17, 48, .25);
  transition: translate .2s cubic-bezier(.16, 1, .3, 1);
}

.portal-version-toggle[aria-checked="true"] {
  border-color: rgba(37, 16, 243, .22);
  background: #f4f2ff;
  color: var(--cb-primary);
}

.portal-version-toggle[aria-checked="true"] .portal-version-toggle__track {
  background: var(--cb-primary);
  box-shadow: 0 0 0 4px rgba(37, 16, 243, .08);
}

.portal-version-toggle[aria-checked="true"] .portal-version-toggle__track > span {
  translate: 14px 0;
}

.portal-version-toggle:hover {
  border-color: rgba(37, 16, 243, .28);
  background: #f8f7ff;
  translate: 0 -1px;
}

.portal-login__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(37, 16, 243, .14);
  border-radius: 999px;
  background: #f4f2ff;
  color: var(--cb-primary);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, translate .2s ease;
}

.portal-login__open svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-login__open:hover {
  border-color: rgba(37, 16, 243, .28);
  background: #ebe8ff;
  translate: 0 -1px;
}

.portal-login__frame {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 42% 42%, rgba(93, 104, 255, .08), transparent 34%),
    #f4f5fa;
}

.portal-login iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #f4f5fa;
}

.portal-resources {
  position: relative;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 8%, rgba(86, 126, 255, .22), transparent 32%),
    radial-gradient(circle at 92% 46%, rgba(66, 187, 223, .12), transparent 34%),
    linear-gradient(155deg, #080c29 0%, #06091d 48%, #040615 100%);
  scrollbar-color: rgba(103, 224, 185, .38) transparent;
}

.portal-resources::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(42vw, 680px);
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(122, 151, 216, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 151, 216, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

.portal-resources__inner {
  width: min(100%, 650px);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin-inline: auto;
  padding: clamp(32px, 4vw, 62px) clamp(26px, 3.5vw, 54px) 28px;
}

.portal-resources__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  width: min(215px, 58%);
  min-height: 38px;
}

.portal-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.portal-language {
  position: relative;
  flex: none;
}

.portal-language::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid rgba(222, 230, 244, .76);
  border-bottom: 1.5px solid rgba(222, 230, 244, .76);
  pointer-events: none;
  rotate: 45deg;
  translate: 0 -70%;
}

.portal-language select {
  min-width: 78px;
  min-height: 40px;
  appearance: none;
  padding: 8px 32px 8px 14px;
  border: 1px solid rgba(196, 211, 238, .16);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, .055);
  color: #e7eefb;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portal-language option {
  background: #0c102a;
  color: #fff;
}

.portal-eyebrow {
  margin: clamp(42px, 6vh, 72px) 0 0;
  color: var(--cb-eyebrow-ink-dark);
  font-size: var(--cb-eyebrow-size);
  font-weight: var(--cb-eyebrow-weight);
  letter-spacing: var(--cb-eyebrow-tracking);
}

.portal-resources h1 {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--cb-display-ink-dark);
  font-family: var(--cb-display-font);
  font-size: var(--cb-title-section-side);
  font-weight: var(--cb-display-weight);
  letter-spacing: var(--cb-display-tracking);
  line-height: var(--cb-display-leading);
}

.portal-resources h1 em {
  font-style: normal;
  background: var(--cb-accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal-resources__lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--cb-lead-ink-dark);
  font-size: var(--cb-lead-section);
  font-weight: var(--cb-lead-weight);
  letter-spacing: var(--cb-lead-tracking);
  line-height: 1.28;
}

.portal-help {
  display: grid;
  gap: 26px;
  margin-top: 38px;
}

.portal-nav-label {
  margin: 0 0 10px;
  color: rgba(211, 221, 237, .62);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.portal-group__links {
  display: grid;
  gap: 9px;
}

.portal-resource {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 19px;
  align-items: center;
  gap: 13px;
  min-height: 66px;
  padding: 10px 13px 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(196, 211, 238, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  color: #e9effa;
  text-decoration: none;
  transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease, translate .22s ease;
}

.portal-resource::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(100deg, rgba(86, 126, 255, .11), rgba(66, 187, 223, .055), transparent 74%);
  transition: opacity .22s ease;
}

.portal-resource:hover {
  border-color: rgba(103, 224, 185, .3);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .17);
  translate: 0 -2px;
}

.portal-resource:hover::before {
  opacity: 1;
}

.portal-resource--featured {
  border-color: rgba(86, 126, 255, .34);
  background: linear-gradient(110deg, rgba(86, 126, 255, .16), rgba(66, 187, 223, .08));
}

.portal-resource--support {
  border-color: rgba(103, 224, 185, .22);
}

.portal-resource__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(151, 179, 231, .14);
  border-radius: 12px;
  background: rgba(88, 113, 202, .13);
  color: #8fa8ff;
}

.portal-resource--featured .portal-resource__icon,
.portal-resource--support .portal-resource__icon {
  color: #6fddc2;
  background: rgba(66, 187, 223, .12);
}

.portal-resource__icon svg,
.portal-resource__arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-resource__icon svg {
  width: 22px;
  height: 22px;
}

.portal-resource__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.portal-resource__copy strong {
  color: #edf3ff;
  font-size: 15px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.012em;
}

.portal-resource__copy small {
  color: rgba(203, 215, 234, .66);
  font-size: 12.5px;
  line-height: 1.27;
  font-weight: 400;
}

.portal-resource__arrow {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: rgba(211, 221, 237, .55);
  transition: color .2s ease, translate .2s ease;
}

.portal-resource:hover .portal-resource__arrow {
  color: #67e0b9;
  translate: 3px 0;
}

.portal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 34px;
  color: rgba(203, 215, 234, .48);
  font-size: 12px;
  line-height: 1.4;
}

.portal-footer a {
  color: inherit;
  text-decoration: none;
}

.portal-footer a:hover {
  color: #dce7f8;
}

.portal-page a:focus-visible,
.portal-page button:focus-visible,
.portal-page select:focus-visible,
.portal-page iframe:focus-visible {
  outline: 3px solid #67e0b9;
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  body.portal-page {
    overflow: auto;
  }

  .portal-shell {
    display: flex;
    flex-direction: column;
  }

  .portal-login {
    min-height: 780px;
  }

  .portal-resources {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .portal-resources::before {
    position: absolute;
    width: 100%;
  }

  .portal-resources__inner {
    width: min(100%, 780px);
  }

  .portal-eyebrow {
    margin-top: 48px;
  }
}

@media (max-width: 760px) {
  .portal-login {
    grid-template-rows: 56px minmax(0, 1fr);
    min-height: 720px;
  }

  .portal-login__toolbar {
    gap: 12px;
    padding-inline: 14px;
  }

  .portal-login__status {
    font-size: 12.5px;
  }

  .portal-login__open {
    min-height: 34px;
    padding-inline: 10px;
  }

  .portal-login__open span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .portal-version-toggle {
    padding-inline: 9px;
  }

  .portal-resources__inner {
    padding: 30px 18px 24px;
  }

  .portal-brand {
    width: 184px;
  }

  .portal-eyebrow {
    margin-top: 42px;
  }

  .portal-resources h1 {
    font-size: var(--cb-title-section-side);
  }

  .portal-resources__lead {
    font-size: var(--cb-lead-section);
  }

  .portal-help {
    gap: 24px;
    margin-top: 32px;
  }

  .portal-resource {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    gap: 11px;
    min-height: 68px;
    border-radius: 14px;
  }

  .portal-resource__icon {
    width: 40px;
    height: 40px;
  }

  .portal-resource__copy strong {
    font-size: 14.5px;
  }

  .portal-resource__copy small {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .portal-login {
    min-height: 680px;
  }

  .portal-login__status b {
    max-width: 120px;
  }

  .portal-version-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .portal-resources__topline {
    gap: 14px;
  }

  .portal-language select {
    min-width: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-login__open,
  .portal-version-toggle,
  .portal-version-toggle__track,
  .portal-version-toggle__track > span,
  .portal-resource,
  .portal-resource::before,
  .portal-resource__arrow {
    transition: none;
  }

  .portal-login__open:hover,
  .portal-version-toggle:hover,
  .portal-resource:hover,
  .portal-resource:hover .portal-resource__arrow {
    translate: none;
  }
}
