:root {
  --brand-ink: #12233f;
  --brand-ink-hover: #1d3557;
  --brand-warm: #8d5537;
  --brand-mist: #eaf4ff;
  --blue: var(--brand-ink);
  --blue-hover: var(--brand-ink-hover);
  --surface: #f3f7fb;
  --card: #fff;
  --text: var(--brand-ink);
  --secondary: #5f6b7c;
  --muted: #7e8998;
  --border: rgba(18, 35, 63, .11);
  --danger: #c9342b;
  --success: #21873a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface); }
body {
  min-height: 100vh; margin: 0; color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(141, 85, 55, .13), transparent 26rem),
    radial-gradient(circle at 90% 8%, rgba(234, 244, 255, .96), transparent 34rem),
    var(--surface);
  font: 14px/1.55 "Cabinet Grotesk", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }

.auth-header {
  height: 58px; border-bottom: 1px solid rgba(18, 35, 63, .06); background: rgba(246, 250, 253, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.auth-header__inner {
  width: min(1080px, calc(100% - 40px)); height: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -.015em; }
.brand-mark {
  width: 30px; height: 30px; overflow: hidden; border: 1px solid rgba(18, 35, 63, .1); border-radius: 10px;
  background: var(--brand-mist); box-shadow: 0 5px 14px rgba(18, 35, 63, .12);
}
.brand-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.share-link {
  min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; color: var(--text); background: rgba(0, 0, 0, .055);
  text-decoration: none; font-size: 12px; font-weight: 620; transition: background .2s, transform .2s;
}
.share-link:hover { background: rgba(0, 0, 0, .095); }
.share-link:active { transform: scale(.97); }
.share-link:focus-visible, .brand:focus-visible { outline: 3px solid rgba(141, 85, 55, .28); outline-offset: 3px; }
.share-link svg { width: 13px; height: 13px; }

.auth-main {
  width: min(980px, calc(100% - 40px)); min-height: calc(100vh - 58px); margin: 0 auto;
  padding: 64px 0 76px; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(380px, 1fr); gap: 72px; align-items: center;
}
.auth-panel { width: 100%; max-width: 460px; justify-self: end; }
.auth-portrait {
  position: relative; min-height: 520px; overflow: hidden; border: 1px solid rgba(255,255,255,.92); border-radius: 36px;
  background: linear-gradient(155deg, rgba(234,244,255,.96), rgba(255,255,255,.75)); box-shadow: 0 28px 75px rgba(18,35,63,.13);
}
.auth-portrait::after { content: ''; position: absolute; left: -14%; right: -14%; bottom: -31%; height: 58%; border-radius: 50%; background: rgba(141,85,55,.1); }
.auth-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-portrait__copy { position: absolute; z-index: 2; left: 30px; right: 30px; bottom: 28px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.auth-portrait__copy b { display: block; margin-bottom: 4px; font-size: 15px; }
.auth-portrait__copy span { color: var(--secondary); font-size: 12px; }
.auth-kicker { margin: 0 0 10px; color: var(--brand-warm); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: 38px; line-height: 1.08; letter-spacing: -.045em; }
.auth-intro { margin: 14px 0 28px; color: var(--secondary); font-size: 15px; line-height: 1.65; }
.setup-notice {
  margin: 0 0 20px; padding: 13px 15px; border: 1px solid rgba(255, 159, 10, .2);
  border-radius: 14px; color: #87530a; background: #fff8e8; font-size: 12.5px;
}

.auth-form {
  padding: 26px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 24px;
  background: rgba(255, 255, 255, .88); box-shadow: 0 20px 60px rgba(18, 35, 63, .09), 0 2px 12px rgba(18, 35, 63, .04);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.field { margin-bottom: 18px; }
.field:last-of-type { margin-bottom: 22px; }
label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 650; }
input[type="password"] {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); background: rgba(255, 255, 255, .94); outline: none; transition: border-color .18s, box-shadow .18s;
}
input[type="password"]:hover { border-color: rgba(18, 35, 63, .2); }
input[type="password"]:focus { border-color: var(--brand-warm); box-shadow: 0 0 0 4px rgba(141, 85, 55, .13); }
.field-hint { margin: 7px 1px 0; color: var(--muted); font-size: 11px; }
.primary-button {
  width: 100%; min-height: 46px; border: 0; border-radius: 999px; color: #fff; background: var(--blue);
  font-weight: 650; cursor: pointer; box-shadow: 0 6px 16px rgba(18, 35, 63, .2); transition: background .2s, transform .2s;
}
.primary-button:hover { background: var(--blue-hover); }
.primary-button:active { transform: scale(.985); }
.primary-button:focus-visible, .secondary-button:focus-visible { outline: 3px solid rgba(141, 85, 55, .28); outline-offset: 3px; }
.secondary-form { margin-top: 14px; text-align: center; }
.secondary-button {
  min-height: 38px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--secondary); background: rgba(255, 255, 255, .7); cursor: pointer;
}
.secondary-button:hover { color: var(--text); background: #fff; }
.message { margin: 0 0 18px; padding: 11px 13px; border-radius: 12px; font-size: 12px; }
.message--error { border: 1px solid rgba(255, 59, 48, .16); color: var(--danger); background: rgba(255, 59, 48, .06); }
.message--success { border: 1px solid rgba(52, 199, 89, .18); color: var(--success); background: rgba(52, 199, 89, .07); }
.auth-footnote { margin: 18px 4px 0; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 600px) {
  .auth-header__inner { width: calc(100% - 28px); }
  .auth-main { width: min(100% - 28px, 460px); padding: 34px 0 64px; grid-template-columns: 1fr; gap: 28px; }
  .auth-portrait { min-height: 210px; border-radius: 26px; }
  .auth-portrait img { object-position: center 22%; }
  .auth-portrait__copy { left: 16px; right: 16px; bottom: 14px; padding: 12px 14px; border-radius: 15px; }
  .auth-panel { justify-self: stretch; }
  h1 { font-size: 32px; }
  .auth-form { padding: 21px; border-radius: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
