:root {
  --black: #11110f;
  --black-soft: #181713;
  --cream: #f4f0e7;
  --cream-2: #ebe4d7;
  --yellow: #f5c400;
  --yellow-soft: #ffd84a;
  --white: #ffffff;
  --muted: #625d53;
  --border: #d8cfbd;
  --danger: #9f2f2f;
  --success: #24663d;
  --shadow: 0 20px 50px rgba(17, 17, 15, 0.12);
  --shadow-soft: 0 12px 30px rgba(17, 17, 15, 0.08);
  --radius: 18px;
  --radius-small: 11px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--black);
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 196, 0, 0.14), transparent 28rem),
    linear-gradient(145deg, var(--cream), #f8f5ee 58%, var(--cream-2));
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

.portal-header {
  min-height: 72px;
  padding: 8px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(244, 240, 231, 0.92);
  border-bottom: 1px solid rgba(17, 17, 15, 0.1);
  backdrop-filter: blur(16px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
}

.portal-brand img {
  width: 132px;
  height: auto;
  display: block;
}

.environment-label {
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--black-soft);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 17, 15, 0.1);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.18);
}

.portal-main {
  min-height: calc(100vh - 72px);
}

.login-view {
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 7vw, 88px) clamp(20px, 5vw, 72px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.75fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  margin-right: 9px;
  display: inline-block;
  vertical-align: middle;
  background: var(--yellow);
}

.login-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-intro {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.logic-preview {
  margin-top: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logic-preview span:not(.logic-arrow) {
  padding: 9px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.logic-arrow {
  color: var(--muted);
  font-weight: 900;
}

.access-note {
  max-width: 660px;
  margin-top: 30px;
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(124, 98, 0, 0.22);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius-small);
}

.access-note span {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card {
  padding: clamp(26px, 4vw, 40px);
  display: grid;
  gap: 10px;
  background: var(--white);
  border: 1px solid rgba(17, 17, 15, 0.09);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.card-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.lock-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--yellow);
  background: var(--black);
  border-radius: 50%;
  font-size: 0.7rem;
}

.login-card label {
  margin-top: 6px;
  color: var(--black-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--black);
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.login-button {
  min-height: 50px;
  margin-top: 12px;
  padding: 0 20px;
  color: var(--white);
  background: var(--black);
  border: 1px solid var(--black);
  border-radius: var(--radius-small);
  box-shadow: 0 14px 30px rgba(17, 17, 15, 0.16);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.login-button:hover,
.login-button:focus-visible {
  border-color: rgba(245, 196, 0, 0.64);
  background: var(--black-soft);
  transform: translateY(-1px);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.forgot-password-button {
  width: max-content;
  margin: 0 auto;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.forgot-password-button:hover,
.forgot-password-button:focus-visible {
  color: var(--black);
  border-color: var(--yellow);
}

.forgot-password-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.message {
  min-height: 0;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-line;
}

.message:not(:empty) {
  padding: 11px 12px;
  background: #fffaf0;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.message.is-error:not(:empty) {
  color: var(--danger);
  background: #fff1f1;
  border-color: #e2b8b8;
}

.message.is-success:not(:empty) {
  color: var(--success);
  background: #edf8f1;
  border-color: #b9d8c5;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

@media (max-width: 1000px) {
  .login-panel {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .login-copy {
    text-align: center;
  }

  .login-intro,
  .access-note {
    margin-left: auto;
    margin-right: auto;
  }

  .logic-preview {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .portal-header {
    min-height: 64px;
    padding-inline: 16px;
  }

  .portal-brand img {
    width: 116px;
  }

  .environment-label {
    font-size: 0.64rem;
  }

  .portal-main,
  .login-view {
    min-height: calc(100vh - 64px);
  }

  .login-view {
    padding: 30px 16px;
  }

  .login-card {
    padding: 24px;
  }

  .login-copy h1 {
    font-size: clamp(2.15rem, 14vw, 3.4rem);
  }
}
