:root {
  --portal-bg: #071015;
  --portal-panel: rgba(9, 15, 20, 0.94);
  --portal-panel-strong: rgba(6, 11, 15, 0.98);
  --portal-border: rgba(225, 171, 62, 0.28);
  --portal-border-strong: rgba(246, 200, 100, 0.58);
  --portal-text: #f7f1e5;
  --portal-muted: #b6c4ca;
  --portal-soft: #8397a1;
  --portal-accent: #e2a22b;
  --portal-accent-strong: #f6d57f;
  --portal-steel: #91b3c2;
  --portal-shadow: 0 30px 70px rgba(2, 7, 10, 0.52);
}

html.body-full-height,
html.body-full-height body {
  min-height: 100%;
  background: var(--portal-bg);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

body {
  color: var(--portal-text);
}

.login-container.portal-login-page {
  float: none;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(240, 177, 58, 0.24), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(145, 179, 194, 0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(138, 88, 27, 0.18), transparent 28%),
    linear-gradient(135deg, #071015 0%, #112631 52%, #070b0e 100%);
}

.portal-login-page .login-box {
  width: 100%;
  max-width: 1380px;
  margin: 0;
  padding: 0;
}

.portal-login-shell {
  display: flex;
  min-height: calc(100vh - 56px);
  border: 1px solid rgba(235, 186, 86, 0.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(8, 13, 18, 0.92);
  box-shadow: var(--portal-shadow);
}

.portal-login-panel {
  position: relative;
  z-index: 2;
  width: 470px;
  max-width: 100%;
  padding: 54px 54px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(8, 15, 20, 0.98) 0%, rgba(11, 20, 26, 0.96) 100%);
}

.portal-login-main {
  width: 100%;
  max-width: 360px;
}

.portal-login-main > .login-title {
  display: none;
}

.portal-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.portal-login-logo img {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}

.portal-login-kicker {
  margin-bottom: 14px;
  color: var(--portal-accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.portal-login-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 35px;
  line-height: 1.05;
  font-weight: 700;
}

.portal-login-text {
  margin: 0 0 28px;
  color: var(--portal-muted);
  font-size: 15px;
  line-height: 1.65;
}

.portal-login-form .form-group {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 18px;
}

.portal-login-form .col-md-12,
.portal-login-form .col-md-6 {
  float: none;
  width: 100%;
  padding: 0;
}

.portal-login-form .portal-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.portal-login-form label {
  margin: 0;
  color: #f3e5c8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.portal-login-form .portal-link-inline,
.portal-login-form .portal-secondary-link,
.portal-login-footer a {
  color: var(--portal-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.portal-login-form .portal-link-inline {
  font-size: 12px;
  font-weight: 600;
}

.portal-login-form .portal-link-inline:hover,
.portal-login-form .portal-secondary-link:hover,
.portal-login-footer a:hover {
  color: #ffe0a2;
}

.portal-login-form .form-control {
  height: 56px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  background: rgba(145, 179, 194, 0.07);
  color: #ffffff;
  font-size: 16px;
  padding: 0 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-login-form .form-control::placeholder {
  color: var(--portal-soft);
}

.portal-login-form .form-control:focus {
  border-color: var(--portal-border-strong);
  background: rgba(145, 179, 194, 0.1);
  box-shadow: 0 0 0 4px rgba(226, 162, 43, 0.14);
}

.portal-login-actions {
  margin-top: 8px;
}

.portal-login-form .form-group:last-child {
  margin-top: 6px;
}

.portal-login-form .form-group:last-child .col-md-6:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-login-form .btn-link.btn-block.portal-secondary-link {
  display: inline-flex;
  width: auto;
  padding: 0;
  text-align: left;
}

.portal-login-submit {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #b66b12 0%, #e2a22b 48%, #f7d884 100%);
  color: #241508;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 42px rgba(202, 123, 20, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.portal-login-submit:hover,
.portal-login-submit:focus {
  color: #1a0d03;
  transform: translateY(-1px);
  box-shadow: 0 20px 48px rgba(194, 123, 22, 0.3);
  filter: saturate(1.05);
}

.portal-login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.portal-login-links--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.portal-login-prompt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.6;
}

.portal-login-form .portal-secondary-link {
  font-size: 13px;
  color: var(--portal-accent);
  text-decoration: none;
}

.portal-login-links--stacked .portal-secondary-link {
  display: inline;
  line-height: inherit;
  font-weight: 600;
}

.portal-login-footer {
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #9fb1ba;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.portal-login-footer strong {
  color: #f1e3c7;
  font-weight: 600;
}

.portal-login-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-auth-panel {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 50px 54px 42px;
}

.portal-auth-main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.portal-auth-shell {
  width: 100%;
  max-width: 860px;
  min-height: auto;
  margin: 0 auto;
}

.portal-auth-shell .portal-login-visual,
.portal-auth-panel .portal-login-footer {
  display: none;
}

.portal-login-note {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 162, 43, 0.18);
  border-radius: 16px;
  background: rgba(145, 179, 194, 0.055);
  color: #d7e0e4;
  font-size: 13px;
  line-height: 1.6;
}

.portal-terms-form .form-group,
.portal-register-form .form-group {
  margin-left: 0;
  margin-right: 0;
}

.portal-terms-textarea {
  min-height: 430px;
  padding: 18px;
  resize: none;
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
}

.portal-check-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 22px;
  color: #e8dcc9;
  font-size: 14px;
}

.portal-check-option label {
  margin: 0;
}

.portal-check-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--portal-accent);
}

.portal-terms-consent {
  margin-bottom: 22px;
  color: #e8dcc9;
  font-size: 14px;
}

.portal-terms-consent > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-terms-consent label {
  margin: 0;
  display: flex;
  align-items: center;
}

.portal-terms-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--portal-accent);
}

.portal-terms-form .portal-terms-consent + br {
  display: none;
}

.portal-terms-form .portal-login-submit {
  margin-top: 4px;
}

.portal-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-register-field--full {
  grid-column: 1 / -1;
}

.portal-capitalize {
  text-transform: capitalize;
}

.portal-field-tip {
  margin: 10px 0 0;
  color: #becbd1;
  font-size: 12px;
  line-height: 1.6;
}

.portal-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.portal-page-actions .portal-secondary-link {
  display: inline-flex;
  width: auto;
  padding: 0;
  text-align: left;
}

.portal-page-actions .portal-login-submit {
  width: auto;
  min-width: 220px;
}

.portal-status-title {
  margin: 0 0 14px;
  color: #fff7e8;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.portal-login-page .alert {
  margin: 18px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 1px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: #f4ede3;
  box-shadow: none;
}

.portal-login-page .alert.text-center {
  text-align: left;
}

.portal-login-page .alert span {
  display: block;
  line-height: 1.7;
}

.portal-login-page .alert-success {
  border-color: rgba(101, 187, 112, 0.3);
  background: rgba(57, 110, 53, 0.16);
}

.portal-login-page .alert-danger {
  border-color: rgba(219, 96, 96, 0.3);
  background: rgba(110, 43, 43, 0.18);
}

.portal-login-page .alert-warning {
  border-color: rgba(226, 162, 43, 0.3);
  background: rgba(118, 76, 22, 0.2);
}

.portal-legacy-hidden {
  display: none !important;
}

.portal-login-visual {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 46%, rgba(246, 190, 90, 0.28), transparent 17%),
    radial-gradient(circle at 70% 18%, rgba(145, 179, 194, 0.24), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(93, 126, 139, 0.18), transparent 28%),
    linear-gradient(160deg, #10212b 0%, #182e39 42%, #0b1217 100%);
}

.portal-login-visual::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  left: -170px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 215, 143, 0.18) 0%, rgba(145, 179, 194, 0.12) 30%, transparent 62%),
    repeating-radial-gradient(circle, rgba(246, 213, 127, 0.12) 0 3px, transparent 3px 34px);
  opacity: 0.75;
  filter: blur(1px);
}

.portal-login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 11, 15, 0.1) 0%, rgba(6, 11, 15, 0.04) 28%, rgba(6, 11, 15, 0.34) 100%),
    radial-gradient(circle at 20% 52%, rgba(255, 214, 144, 0.34), transparent 8%);
}

.portal-visual-ring,
.portal-visual-ring::before,
.portal-visual-ring::after {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(176, 204, 214, 0.16);
}

.portal-visual-ring {
  width: 420px;
  height: 420px;
  left: 5%;
  top: calc(50% - 210px);
  box-shadow: 0 0 40px rgba(226, 162, 43, 0.13);
}

.portal-visual-ring::before,
.portal-visual-ring::after {
  content: "";
  inset: 30px;
}

.portal-visual-ring::after {
  inset: 85px;
}

.portal-visual-content {
  position: absolute;
  left: 9%;
  bottom: 11%;
  z-index: 1;
  max-width: 420px;
}

.portal-visual-content h2 {
  margin: 0 0 10px;
  color: #fff2d0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.portal-visual-content p {
  margin: 0;
  color: rgba(219, 232, 237, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 1160px) {
  .portal-login-panel {
    width: 440px;
    padding: 44px 38px 30px;
  }

  .portal-auth-panel {
    max-width: 760px;
    padding: 44px 38px 34px;
  }

  .portal-login-title {
    font-size: 31px;
  }
}

@media (max-width: 900px) {
  .login-container.portal-login-page {
    padding: 16px;
  }

  .portal-login-shell {
    min-height: auto;
    flex-direction: column;
  }

  .portal-login-panel {
    width: 100%;
    padding: 34px 24px 28px;
  }

  .portal-login-main {
    max-width: none;
  }

  .portal-auth-panel {
    width: 100%;
  }

  .portal-login-footer {
    margin-top: 32px;
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-login-visual {
    min-height: 320px;
  }

  .portal-visual-ring {
    width: 320px;
    height: 320px;
    left: -40px;
    top: 40px;
  }

  .portal-visual-content {
    left: 24px;
    right: 24px;
    bottom: 24px;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .portal-login-links,
  .portal-login-form .portal-label-row,
  .portal-page-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-register-grid {
    grid-template-columns: 1fr;
  }

  .portal-page-actions .portal-login-submit {
    width: 100%;
    min-width: 0;
  }

  .portal-login-title {
    font-size: 28px;
  }

  .portal-login-logo img {
    width: 190px;
  }

  .portal-login-visual {
    min-height: 250px;
  }

  .portal-visual-content h2 {
    font-size: 22px;
  }

  .portal-visual-content p {
    font-size: 14px;
  }
}
