:root{
  color-scheme: light;
  --auth-bg: #f6f7fb;
  --auth-surface: #ffffff;
  --auth-panel: rgba(255, 255, 255, 0.86);
  --auth-ink: #17202a;
  --auth-muted: #64717f;
  --auth-border: rgba(23, 32, 42, 0.12);
  --auth-primary: #126f76;
  --auth-primary-dark: #0d555b;
  --auth-accent: #d76d4f;
  --auth-danger-bg: #fff0ed;
  --auth-danger-ink: #96301f;
  --auth-success-bg: #ecf8f0;
  --auth-success-ink: #1f6b38;
  --auth-shadow: 0 24px 70px rgba(27, 39, 53, 0.16);
}

*{
  box-sizing: border-box;
}

html{
  min-height: 100%;
}

body.auth-page{
  margin: 0;
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--auth-ink);
  background:
    linear-gradient(130deg, rgba(18, 111, 118, 0.10), transparent 34%),
    linear-gradient(310deg, rgba(215, 109, 79, 0.13), transparent 30%),
    var(--auth-bg);
}

.auth-shell,
.auth-page .shell{
  width: min(100%, 1040px);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
  animation: auth-in 420ms ease both;
}

.auth-visual,
.auth-page .hero{
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: space-between;
  gap: 36px;
  min-height: 100%;
  padding: 44px;
  overflow: hidden;
  color: #f8fbfc;
  background:
    linear-gradient(150deg, rgba(13, 33, 48, 0.96), rgba(18, 111, 118, 0.88)),
    linear-gradient(35deg, rgba(215, 109, 79, 0.48), transparent);
}

.auth-visual::before,
.auth-visual::after,
.auth-page .hero::before,
.auth-page .hero::after{
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: rotate(-12deg);
}

.auth-visual::before,
.auth-page .hero::before{
  width: 320px;
  height: 320px;
  right: -110px;
  top: -80px;
}

.auth-visual::after,
.auth-page .hero::after{
  width: 220px;
  height: 220px;
  left: -72px;
  bottom: -62px;
}

.brand-lockup{
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo{
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(4, 18, 30, 0.22);
}

.brand-logo img{
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name{
  display: grid;
  gap: 3px;
}

.brand-name strong{
  font-size: 1rem;
  font-weight: 750;
}

.brand-name span,
.auth-kicker,
.auth-page .eyebrow{
  color: rgba(248, 251, 252, 0.68);
  font-size: 0.82rem;
}

.auth-copy{
  display: grid;
  gap: 18px;
  max-width: 430px;
}

.auth-kicker{
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 700;
}

.auth-copy h1,
.auth-page .hero h1{
  margin: 0;
  font-size: 3rem;
  line-height: 1.03;
  font-weight: 780;
  letter-spacing: 0;
}

.auth-copy p,
.auth-page .hero p{
  margin: 0;
  max-width: 35rem;
  color: rgba(248, 251, 252, 0.76);
  font-size: 1rem;
  line-height: 1.65;
}

.auth-steps,
.auth-page .meta,
.auth-page .hero ul{
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-steps li,
.auth-page .meta div,
.auth-page .hero li{
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(248, 251, 252, 0.82);
  font-size: 0.94rem;
}

.auth-steps li::before,
.auth-page .meta div::before,
.auth-page .hero li::before{
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(215, 109, 79, 0.18);
}

.auth-panel,
.auth-page .panel{
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 48px;
  background: var(--auth-surface);
}

.auth-panel-header{
  display: grid;
  gap: 8px;
}

.auth-panel h2,
.auth-page .panel h2{
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: 0;
}

.auth-panel p,
.auth-page .panel p{
  margin: 0;
  color: var(--auth-muted);
  line-height: 1.55;
}

.auth-form,
.auth-page form{
  display: grid;
  gap: 17px;
}

.field,
.auth-page label{
  display: grid;
  gap: 8px;
  color: var(--auth-ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.auth-page input{
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--auth-ink);
  background: #fbfcfd;
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus,
.auth-page input:focus{
  border-color: rgba(18, 111, 118, 0.76);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(18, 111, 118, 0.12);
}

.auth-actions,
.auth-page .actions,
.auth-page .panel-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.auth-button,
.auth-page button{
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--auth-primary), #17919a);
  box-shadow: 0 16px 30px rgba(18, 111, 118, 0.26);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.auth-button:hover:not(:disabled),
.auth-page button:hover:not(:disabled){
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(18, 111, 118, 0.31);
}

.auth-button:active:not(:disabled),
.auth-page button:active:not(:disabled){
  transform: translateY(0);
}

.auth-button:disabled,
.auth-page button:disabled{
  opacity: 0.58;
  cursor: wait;
}

.auth-link,
.auth-page .link{
  color: var(--auth-primary-dark);
  font-weight: 720;
  text-decoration: none;
}

.auth-link:hover,
.auth-page .link:hover{
  text-decoration: underline;
}

.auth-message,
.auth-page .error,
.auth-page .note,
.auth-page .message{
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.auth-message.error,
.auth-page .error,
.auth-page .message.error,
.auth-page .message{
  color: var(--auth-danger-ink);
  background: var(--auth-danger-bg);
  border-color: rgba(150, 48, 31, 0.14);
}

.auth-message.success,
.auth-message.note,
.auth-page .note,
.auth-page .message.success{
  color: var(--auth-success-ink);
  background: var(--auth-success-bg);
  border-color: rgba(31, 107, 56, 0.13);
}

.auth-status,
.auth-page .status{
  min-height: 22px;
  color: var(--auth-muted);
  font-size: 0.95rem;
}

.hidden{
  display: none !important;
}

@keyframes auth-in{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 880px){
  body.auth-page{
    padding: 18px;
  }

  .auth-shell,
  .auth-page .shell{
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-visual,
  .auth-panel,
  .auth-page .hero,
  .auth-page .panel{
    padding: 30px 24px;
  }

  .auth-copy h1,
  .auth-page .hero h1{
    font-size: 2.2rem;
  }
}

@media (max-width: 520px){
  .auth-visual,
  .auth-page .hero{
    gap: 28px;
  }

  .auth-copy h1,
  .auth-page .hero h1{
    font-size: 1.95rem;
  }

  .auth-actions,
  .auth-page .actions,
  .auth-page .panel-actions{
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .auth-button,
  .auth-page button{
    width: 100%;
  }
}

/* Modern auth refresh */
:root{
  --auth-bg: #eef3f2;
  --auth-surface: #ffffff;
  --auth-panel: #ffffff;
  --auth-ink: #111827;
  --auth-muted: #667085;
  --auth-border: rgba(17, 24, 39, 0.10);
  --auth-primary: #111827;
  --auth-primary-dark: #111827;
  --auth-accent: #28b5a4;
  --auth-danger-bg: #fff4f2;
  --auth-danger-ink: #a23a2a;
  --auth-success-bg: #effaf5;
  --auth-success-ink: #1f7a45;
  --auth-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
}

body.auth-page{
  padding: 34px;
  background:
    linear-gradient(115deg, rgba(40, 181, 164, 0.13), transparent 38%),
    linear-gradient(295deg, rgba(215, 109, 79, 0.12), transparent 34%),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.035) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(17, 24, 39, 0.025) 0 1px, transparent 1px 72px),
    var(--auth-bg);
}

.auth-shell,
.auth-page .shell{
  width: min(100%, 1080px);
  min-height: 650px;
  grid-template-columns: minmax(0, 1fr) 430px;
  border-radius: 8px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
  animation: auth-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-visual,
.auth-page .hero{
  padding: 52px;
  gap: 40px;
  color: #f9fbfb;
  background:
    linear-gradient(145deg, rgba(12, 18, 28, 0.98), rgba(17, 41, 48, 0.94)),
    linear-gradient(55deg, rgba(40, 181, 164, 0.42), transparent);
}

.auth-visual::before,
.auth-page .hero::before{
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  opacity: 0.48;
  transform: none;
  background:
    linear-gradient(120deg, transparent 0 45%, rgba(255, 255, 255, 0.07) 45% 46%, transparent 46% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 54px);
}

.auth-visual::after,
.auth-page .hero::after{
  display: none;
}

.brand-lockup{
  gap: 12px;
}

.brand-logo{
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.brand-logo img{
  width: 29px;
  height: 29px;
}

.brand-name strong{
  font-size: 0.98rem;
}

.brand-name span,
.auth-kicker,
.auth-page .eyebrow{
  color: rgba(249, 251, 251, 0.66);
  font-size: 0.78rem;
}

.auth-copy{
  gap: 16px;
  max-width: 455px;
  align-self: center;
}

.auth-page .eyebrow,
.auth-kicker{
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-copy h1,
.auth-page .hero h1{
  font-size: 3.35rem;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-copy p,
.auth-page .hero p{
  max-width: 34rem;
  color: rgba(249, 251, 251, 0.72);
  font-size: 1.02rem;
  line-height: 1.68;
}

.auth-panel,
.auth-page .panel{
  padding: 58px 50px;
  gap: 22px;
  background: #ffffff;
}

.auth-panel > div:first-child,
.auth-page .panel > div:first-child{
  display: grid;
  gap: 8px;
}

.auth-panel h2,
.auth-page .panel h2{
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-panel p,
.auth-page .panel p{
  color: var(--auth-muted);
  font-size: 0.96rem;
}

.auth-page .forms,
.auth-page .form-card,
.auth-page .form-grid{
  width: 100%;
}

.auth-page .form-card.active{
  display: grid;
}

.auth-form,
.auth-page form{
  gap: 16px;
}

.field,
.auth-page label{
  gap: 7px;
  color: #1f2937;
  font-size: 0.88rem;
  font-weight: 760;
}

.field input,
.auth-page input{
  min-height: 50px;
  border-radius: 8px;
  border-color: rgba(17, 24, 39, 0.12);
  padding: 13px 14px;
  background: #f8fafb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.field input:hover,
.auth-page input:hover{
  background: #ffffff;
  border-color: rgba(17, 24, 39, 0.18);
}

.field input:focus,
.auth-page input:focus{
  border-color: rgba(40, 181, 164, 0.86);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(40, 181, 164, 0.13);
  transform: translateY(-1px);
}

.auth-actions,
.auth-page .actions,
.auth-page .panel-actions{
  align-items: center;
  padding-top: 6px;
}

.auth-button,
.auth-page button{
  min-height: 48px;
  border-radius: 8px;
  padding: 0 20px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.22);
  font-weight: 800;
}

.auth-button:hover:not(:disabled),
.auth-page button:hover:not(:disabled){
  background: #0b1220;
  box-shadow: 0 22px 38px rgba(17, 24, 39, 0.27);
}

.auth-link,
.auth-page .link{
  color: #0f766e;
  font-size: 0.93rem;
}

.auth-message,
.auth-page .error,
.auth-page .note,
.auth-page .message{
  border-radius: 8px;
  padding: 12px 13px;
}

.auth-page .foot{
  color: #7a8591;
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 880px){
  body.auth-page{
    padding: 18px;
  }

  .auth-shell,
  .auth-page .shell{
    grid-template-columns: 1fr;
  }

  .auth-visual,
  .auth-page .hero{
    min-height: 330px;
    padding: 34px 26px;
  }

  .auth-visual::after,
  .auth-page .hero::after{
    right: 26px;
    bottom: 26px;
    width: 160px;
    height: 92px;
  }

  .auth-panel,
  .auth-page .panel{
    padding: 34px 26px;
  }

  .auth-copy h1,
  .auth-page .hero h1{
    font-size: 2.35rem;
  }
}

@media (max-width: 520px){
  body.auth-page{
    padding: 0;
  }

  .auth-shell,
  .auth-page .shell{
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .auth-visual,
  .auth-page .hero{
    min-height: 300px;
  }

  .auth-visual::after,
  .auth-page .hero::after{
    display: none;
  }

  .auth-copy h1,
  .auth-page .hero h1{
    font-size: 2rem;
  }

  .auth-actions,
  .auth-page .actions,
  .auth-page .panel-actions{
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .auth-button,
  .auth-page button{
    width: 100%;
  }
}
