/* Portal login styles kept separate from dashboard workspace styles. */
.portal-login-shell {
  align-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(212, 175, 55, 0.08), transparent 32%),
    radial-gradient(circle at 82% 88%, rgba(59, 130, 246, 0.06), transparent 36%),
    #03060f;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
  padding: 2rem;
}

.portal-login-brand {
  align-items: center;
  display: flex;
  gap: 1rem;
  left: 2rem;
  position: fixed;
  top: 1.5rem;
  z-index: 2;
}

.portal-login-mark {
  align-items: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 14px;
  color: #d4af37;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 1000;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.portal-login-brand strong {
  color: #fff;
  display: block;
  font-size: 0.9rem;
}

.portal-login-brand small {
  color: #94a3b8;
  display: block;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-top: 0.2rem;
  text-transform: uppercase;
}

.portal-login-card {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  box-shadow: 0 32px 100px -36px rgba(0, 0, 0, 0.9);
  display: grid;
  gap: 1.15rem;
  max-width: 31rem;
  padding: 1.5rem;
  width: min(100%, 31rem);
}

.portal-login-head span,
.portal-login-select span,
.portal-login-form label > span {
  color: #d4af37;
  display: block;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.18em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.portal-login-head h2 {
  color: #fff;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 0.96;
  margin: 0;
}

.portal-login-head p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0.75rem 0 0;
}

.portal-login-select select,
.portal-login-form input {
  background: rgba(3, 6, 15, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  outline: none;
  padding: 0.85rem 0.95rem;
  width: 100%;
}

.portal-profile-list {
  display: grid;
  gap: 0.65rem;
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.portal-profile-option {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #cbd5e1;
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.85rem;
  text-align: left;
}

.portal-profile-option.active {
  background: rgba(212, 175, 55, 0.11);
  border-color: rgba(212, 175, 55, 0.35);
}

.portal-profile-avatar {
  align-items: center;
  background: #d4af37;
  border-radius: 10px;
  color: #06101f;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 1000;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.portal-profile-copy {
  min-width: 0;
}

.portal-profile-copy strong {
  color: #fff;
  display: block;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-profile-copy small,
.portal-profile-perms {
  color: #94a3b8;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-profile-perms {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.portal-login-form {
  display: grid;
  gap: 0.8rem;
}

.portal-remember-row {
  align-items: center;
  color: #cbd5e1;
  display: flex;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-remember-row input {
  accent-color: #d4af37;
  width: auto;
}

.portal-login-submit {
  background: #d4af37;
  border: 0;
  border-radius: 12px;
  color: #06101f;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 1000;
  letter-spacing: 0.05em;
  padding: 0.95rem 1rem;
  text-transform: uppercase;
}

.portal-login-actions {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding-top: 1rem;
}

.portal-login-actions button {
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-login-actions small {
  color: #64748b;
  font-size: 0.68rem;
  text-align: right;
}

@media (max-width: 720px) {
  .portal-login-shell {
    align-items: flex-start;
    padding: 6rem 1rem 1rem;
  }

  .portal-login-brand {
    left: 1rem;
    position: absolute;
    top: 1rem;
  }

  .portal-profile-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .portal-profile-perms {
    grid-column: 2;
    justify-self: start;
  }

  .portal-login-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-login-actions small {
    text-align: left;
  }
}
