:root {
  color-scheme: light;
  --ink: #0b1833;
  --muted: #627089;
  --line: #d9e2ef;
  --panel: rgba(255, 255, 255, 0.94);
  --brand: #0f2b5b;
  --blue: #1f5fbf;
  --teal: #12a38c;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --success: #0f7a4f;
  --success-bg: #ecfdf3;
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 43, 91, 0.92), rgba(31, 95, 191, 0.68)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
}

.auth-page.auth-admin {
  background:
    linear-gradient(135deg, rgba(8, 23, 51, 0.94), rgba(69, 39, 160, 0.62)),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
}

.auth-page.auth-partner {
  background:
    linear-gradient(135deg, rgba(9, 53, 64, 0.94), rgba(18, 163, 140, 0.58)),
    url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
}

.auth-page.auth-reset {
  background:
    linear-gradient(135deg, rgba(15, 43, 91, 0.94), rgba(18, 163, 140, 0.54)),
    url("https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
}

.auth-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  align-items: center;
  gap: 32px;
}

.auth-shell-compact {
  grid-template-columns: minmax(320px, 520px);
  justify-content: center;
}

.auth-visual {
  color: #fff;
  padding: 24px;
}

.auth-brand {
  display: inline-flex;
  width: 138px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.18);
}

.auth-brand.compact {
  margin-bottom: 22px;
}

.auth-brand img {
  max-width: 100%;
  max-height: 100%;
}

.auth-kicker,
.auth-role {
  margin: 28px 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-role {
  color: var(--blue);
  margin: 0 0 10px;
}

.auth-visual h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.9;
}

.auth-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.auth-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.22);
  backdrop-filter: blur(14px);
}

.auth-panel h1,
.auth-panel h2 {
  margin: 0;
  color: var(--brand);
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: 0;
}

.auth-copy {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.75;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: #24324a;
  font-weight: 800;
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
}

.auth-form input:focus {
  outline: 3px solid rgba(31, 95, 191, 0.18);
  border-color: var(--blue);
}

.auth-form-row {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 6px;
}

.auth-form-row a,
.auth-links a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-form-row a:hover,
.auth-links a:hover {
  text-decoration: underline;
}

.auth-form button,
.auth-button-secondary {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  color: #fff;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(31, 95, 191, 0.22);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.auth-links.single {
  justify-content: center;
}

.auth-alert,
.auth-success {
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 18px;
  line-height: 1.65;
}

.auth-alert {
  border: 1px solid #ffd2cc;
  background: var(--danger-bg);
  color: var(--danger);
}

.auth-success {
  border: 1px solid #b7ebc6;
  background: var(--success-bg);
  color: var(--success);
}

.auth-alert p,
.auth-success p {
  margin: 0;
}

.auth-success p {
  margin-top: 6px;
}

.auth-page.auth-register-premium {
  color: #f6e6b0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  background:
    radial-gradient(circle at top, rgba(172, 126, 43, 0.26), transparent 34%),
    linear-gradient(135deg, #050505 0%, #11100c 45%, #000 100%);
}

.register-premium-shell {
  width: min(100% - 32px, 640px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0;
  display: grid;
  place-items: center;
}

.register-premium-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #c99a3b;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(39, 29, 13, 0.96), rgba(3, 3, 3, 0.98));
  padding: clamp(22px, 3.4vw, 36px);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 231, 166, 0.16);
}

.register-premium-panel::before,
.register-premium-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.register-premium-panel::before {
  inset: 10px;
  border: 1px solid rgba(230, 190, 103, 0.48);
  border-radius: 6px;
}

.register-premium-panel::after {
  width: 280px;
  height: 280px;
  right: -130px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 175, 85, 0.28), transparent 62%);
}

.register-premium-brand,
.register-premium-kicker,
.register-premium-panel h1,
.register-premium-copy,
.register-premium-profile,
.register-premium-form,
.register-premium-message,
.register-premium-button {
  position: relative;
  z-index: 1;
}

.register-premium-brand {
  display: inline-flex;
  width: 118px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(214, 173, 79, 0.65);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 4px;
}

.register-premium-brand img {
  max-width: 100%;
  max-height: 100%;
}

.register-premium-kicker {
  margin: 22px 0 6px;
  color: #c99a3b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.register-premium-panel h1 {
  margin: 0;
  color: #f8dda0;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(214, 173, 79, 0.24);
}

.register-premium-copy {
  margin: 20px 0;
  color: #e9d8af;
  font-size: 15px;
  line-height: 1.7;
}

.register-premium-profile {
  display: grid;
  gap: 10px;
  margin: 24px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(201, 154, 59, 0.45);
  background: rgba(0, 0, 0, 0.25);
}

.register-premium-profile div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.register-premium-profile dt {
  color: #c99a3b;
  font-weight: 800;
}

.register-premium-profile dd {
  margin: 0;
  color: #fff4d2;
  overflow-wrap: anywhere;
}

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

.register-premium-form label {
  color: #f3d48a;
  font-weight: 800;
}

.register-premium-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(201, 154, 59, 0.68);
  border-radius: 4px;
  background: rgba(8, 8, 8, 0.88);
  color: #fff8df;
  padding: 10px 12px;
  font: inherit;
}

.register-premium-form input:focus {
  outline: 3px solid rgba(201, 154, 59, 0.25);
  border-color: #f0c56b;
}

.register-premium-form button,
.register-premium-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0c56b;
  border-radius: 4px;
  background: linear-gradient(135deg, #7c5418, #d2a046 48%, #80571c);
  color: #070707;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(177, 124, 31, 0.25);
}

.register-premium-form button:hover,
.register-premium-button:hover {
  filter: brightness(1.08);
}

.register-premium-message {
  margin: 22px 0 18px;
  border: 1px solid rgba(201, 154, 59, 0.58);
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  color: #f8dda0;
  line-height: 1.8;
}

.register-premium-message strong {
  display: block;
  margin-bottom: 8px;
  color: #ffe9a8;
  font-size: 18px;
}

.register-premium-message p {
  margin: 0;
}

.register-premium-message.error {
  border-color: rgba(255, 129, 98, 0.58);
  color: #ffd2c7;
}

@media (max-width: 820px) {
  .auth-shell {
    width: min(100% - 24px, 520px);
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
  }

  .auth-visual {
    padding: 10px 4px 0;
  }

  .auth-visual h1 {
    font-size: 38px;
  }

  .auth-lead {
    font-size: 15px;
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-panel h1,
  .auth-panel h2 {
    font-size: 28px;
  }

  .register-premium-shell {
    width: min(100% - 24px, 560px);
    padding: 24px 0;
  }

  .register-premium-profile div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Premium operation theme */
body.auth-page,
.auth-page.auth-admin,
.auth-page.auth-partner,
.auth-page.auth-reset {
  background:
    radial-gradient(circle at 18% 14%, rgba(52, 211, 255, .22), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(31, 95, 191, .26), transparent 30%),
    linear-gradient(135deg, #030811 0%, #071525 48%, #0b1f35 100%);
}
body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(94, 231, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 231, 255, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 72%);
}
.auth-visual {
  position: relative;
  padding: 32px;
  border: 1px solid rgba(94, 231, 255, .18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}
.auth-kicker { color: #66e7ff; }
.auth-visual h1 { color: #f8fbff; text-shadow: 0 20px 70px rgba(94,231,255,.2); }
.auth-lead { color: rgba(229, 246, 255, .86); }
.auth-metrics span {
  border-color: rgba(94,231,255,.28);
  background: rgba(94,231,255,.1);
  color: #ecfeff;
}
.auth-panel {
  border-color: rgba(94,231,255,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,248,255,.92));
  border-radius: 16px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .3);
}
.auth-role { color: #0ea5e9; }
.auth-form input {
  border-radius: 12px;
  background: #f8fbff;
}
.auth-form button,
.auth-button-secondary {
  border-radius: 12px;
  background: linear-gradient(135deg, #0f2b5b, #1f7cff 55%, #22d3ee);
  box-shadow: 0 18px 42px rgba(31, 124, 255, .24);
}
