:root {
  color-scheme: light;
  --teal-950: #063f47;
  --teal-900: #075b64;
  --teal-800: #08747b;
  --teal-600: #13a0a8;
  --cyan: #4bc2e8;
  --ink: #12263a;
  --muted: #65768a;
  --line: #d8e4ec;
  --danger: #b53b3b;
  --danger-bg: #fff0f0;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: #edf4f7;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

button, input { font: inherit; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(480px, 1.08fr);
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 108px);
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(75, 194, 232, 0.35), transparent 30%),
    linear-gradient(145deg, var(--teal-950), var(--teal-800));
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -155px;
  bottom: -165px;
  border: 54px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 54px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 900;
  letter-spacing: -1px;
}

.eyebrow, .mobile-brand {
  margin: 0 0 13px;
  color: #9ee8ee;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.1px;
}

.brand-panel h1 {
  margin: 0;
  max-width: 600px;
  font-size: clamp(36px, 4.2vw, 62px);
  line-height: 1.17;
  letter-spacing: -1.7px;
}

.brand-copy {
  max-width: 570px;
  margin: 26px 0 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.8;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.feature-row span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 46px 28px;
  background: #ffffff;
}

.form-wrap { width: min(100%, 440px); }

.mobile-brand { display: none; color: var(--teal-800); }

.form-wrap h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.6px;
}

.form-intro {
  margin: 8px 0 30px;
  color: var(--muted);
}

.setup-notice {
  display: grid;
  gap: 3px;
  margin: -12px 0 22px;
  padding: 11px 13px;
  border: 1px solid #b8e2e3;
  border-radius: 9px;
  background: #edfafa;
  color: var(--teal-900);
  font-size: 12px;
}

.setup-notice[hidden] { display: none; }
.setup-notice span { color: var(--muted); font-size: 11px; line-height: 1.5; }

form { display: grid; }

label {
  margin: 0 0 7px;
  color: #34495e;
  font-size: 13px;
  font-weight: 850;
}

input {
  width: 100%;
  margin: 0 0 20px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfe;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

input:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(19, 160, 168, 0.11);
}

.form-message {
  min-height: 21px;
  margin: -5px 0 12px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.form-message:not(:empty) {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--danger-bg);
}

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8, 116, 123, 0.18);
}

.primary-button:hover { filter: brightness(1.05); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }

.form-footer {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

a { color: var(--teal-800); font-weight: 850; }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; padding: 36px 22px; }
  .mobile-brand { display: block; }
}

@media (max-width: 420px) {
  .form-wrap h2 { font-size: 28px; }
  .form-intro { margin-bottom: 24px; }
  input { margin-bottom: 17px; }
}
