:root {
  --paper: #f7f3ec;
  --paper-strong: #eee5d7;
  --surface: #fffdfa;
  --surface-soft: #f1eadf;
  --text: #303b3e;
  --text-soft: #647075;
  --slate: #405157;
  --slate-deep: #344348;
  --gold: #a87d32;
  --gold-dark: #7b591f;
  --gold-soft: #d8c39a;
  --line: #ddd3c4;
  --error: #93433c;
  --error-bg: #fbefed;
  --white: #ffffff;
  --shadow-sm: 0 12px 32px rgba(52, 67, 72, .07);
  --shadow-md: 0 28px 64px rgba(52, 67, 72, .14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --container: 1120px;
  --header-height: 92px;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2,
p,
small,
strong,
span,
label,
a,
button {
  -webkit-hyphens: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--slate-deep);
  color: var(--white);
  text-decoration: none;
  translate: 0 -180%;
  transition: translate .2s ease;
}

.skip-link:focus {
  translate: 0 0;
}

.client-header {
  position: relative;
  z-index: 20;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(168, 125, 50, .18);
  background: rgba(247, 243, 236, .98);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 12px;
}

.brand {
  width: 304px;
  flex: 0 0 auto;
  cursor: default;
}

.brand img {
  width: 100%;
  height: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate-deep);
  background: rgba(255, 253, 250, .72);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.back-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: var(--gold-soft);
  background: var(--surface);
  color: var(--gold-dark);
}

.client-main {
  position: relative;
  min-height: calc(100vh - var(--header-height) - 86px);
  min-height: calc(100dvh - var(--header-height) - 86px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(58px, 7vw, 94px) 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(216, 195, 154, .2), transparent 28%),
    radial-gradient(circle at 88% 78%, rgba(64, 81, 87, .1), transparent 30%),
    linear-gradient(135deg, var(--paper) 0%, var(--surface-soft) 100%);
}

.page-decoration {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(168, 125, 50, .18);
  border-radius: 50%;
  pointer-events: none;
}

.page-decoration::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(168, 125, 50, .1);
  border-radius: inherit;
}

.page-decoration--left {
  top: -200px;
  left: -180px;
}

.page-decoration--right {
  right: -170px;
  bottom: -220px;
}

.access-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  align-items: center;
  gap: clamp(46px, 8vw, 96px);
}

.access-intro {
  min-width: 0;
  max-width: 620px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 15px;
  color: var(--slate);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.eyebrow--gold {
  color: var(--gold-dark);
}

.access-intro h1 {
  margin-bottom: 20px;
  color: var(--slate-deep);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.65rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-align: center;
}

.intro-text {
  max-width: 590px;
  margin: 0 auto 34px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  text-align: center;
}

.access-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 14px;
  border: 1px solid rgba(168, 125, 50, .2);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 250, .7);
  text-align: center;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  color: var(--gold-dark);
  background: rgba(216, 195, 154, .12);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item strong,
.feature-item small {
  display: block;
}

.feature-item strong {
  margin-bottom: 4px;
  color: var(--slate-deep);
  font-size: .84rem;
  line-height: 1.35;
}

.feature-item small {
  color: var(--text-soft);
  font-size: .72rem;
  line-height: 1.5;
}

.login-card {
  position: relative;
  min-width: 0;
  padding: clamp(34px, 4vw, 48px);
  border: 1px solid rgba(168, 125, 50, .22);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 250, .96);
  box-shadow: var(--shadow-md);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border: 1px solid rgba(168, 125, 50, .08);
  border-radius: calc(var(--radius-md) - 8px);
  pointer-events: none;
}

.login-card__mark {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.login-card__mark img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.login-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  text-align: center;
}

.login-heading h2 {
  margin-bottom: 10px;
  color: var(--slate-deep);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
}

.login-heading > p:last-child {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: .92rem;
  text-align: center;
}

.login-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--slate-deep);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.3;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  color: var(--sage, #73837d);
  translate: 0 -50%;
  pointer-events: none;
}

.input-icon svg,
.password-toggle svg,
.login-message svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-field input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-field input:hover {
  border-color: #c9bca9;
}

.form-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(168, 125, 50, .12);
  background: var(--white);
}

.form-field input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(147, 67, 60, .08);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  translate: 0 -50%;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--surface-soft);
  color: var(--gold-dark);
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.login-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(147, 67, 60, .22);
  border-radius: 10px;
  background: var(--error-bg);
  color: var(--error);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.login-message[hidden] {
  display: none;
}

.login-message svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, translate .2s ease;
}

.button--primary {
  background: var(--slate-deep);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(52, 67, 72, .16);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--slate);
  box-shadow: 0 14px 30px rgba(52, 67, 72, .2);
  translate: 0 -1px;
}

.security-note {
  position: relative;
  z-index: 1;
  max-width: 340px;
  margin: 20px auto 0;
  color: var(--text-soft);
  font-size: .72rem;
  line-height: 1.55;
  text-align: center;
}

.client-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
}

.footer-inner p {
  margin: 0;
  color: var(--text-soft);
  font-size: .74rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 920px) {
  :root {
    --header-height: 82px;
  }

  .brand {
    width: 270px;
  }

  .access-layout {
    max-width: 680px;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .access-intro {
    max-width: 680px;
    margin-inline: auto;
  }

  .login-card {
    width: min(100%, 520px);
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: auto;
  }

  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .client-header {
    min-height: 0;
  }

  .header-inner {
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    padding-block: 12px 14px;
  }

  .brand {
    width: min(100%, 274px);
  }

  .back-link {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: .78rem;
  }

  .client-main {
    min-height: 0;
    padding: 48px 0 54px;
  }

  .access-layout {
    gap: 34px;
  }

  .access-intro h1 {
    margin-bottom: 16px;
    font-size: clamp(2.35rem, 14vw, 3.2rem);
  }

  .intro-text {
    margin-bottom: 26px;
    font-size: .96rem;
    line-height: 1.7;
  }

  .access-features {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-item {
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 16px;
    text-align: left;
  }

  .feature-item > div {
    flex: 1;
  }

  .login-card {
    padding: 32px 20px;
    border-radius: 18px;
  }

  .login-card::before {
    inset: 12px;
  }

  .login-heading {
    margin-bottom: 24px;
  }

  .login-heading h2 {
    font-size: 1.9rem;
  }

  .form-field input {
    height: 54px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    padding-block: 18px;
  }

  .page-decoration {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(calc(100% - 22px), var(--container));
  }

  .brand {
    width: min(100%, 250px);
  }

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

  .login-message {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
