:root {
  --ink: #edf2ea;
  --muted: #93a49a;
  --gold: #d7b96f;
  --gold-light: #f1d491;
  --deep: #06130f;
  --panel: rgba(8, 27, 21, .92);
  --line: rgba(215, 185, 111, .25);
  --danger: #f09a90;
  --success: #91d6a5;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--deep); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(31, 115, 83, .22), transparent 36%),
    radial-gradient(circle at 90% 80%, rgba(176, 127, 49, .14), transparent 34%),
    linear-gradient(135deg, #06100d, #0a211a 60%, #07120f);
  font-family: Manrope, system-ui, sans-serif;
}

button, input, select { font: inherit; }
button { color: inherit; }

.login-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(540px, 1.18fr);
  width: min(1320px, calc(100% - 48px));
  min-height: 100vh;
  margin: auto;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 48px;
  border-inline: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 48, 36, .7), rgba(4, 18, 14, .86));
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: .24em;
}

.login-logo span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 21px;
}

.login-logo b { font-size: 13px; }
.brand-copy { max-width: 500px; padding: 80px 0; }
.eyebrow, .card-kicker { color: var(--gold); font: 500 12px/1.4 "DM Mono", monospace; letter-spacing: .25em; }

.brand-copy h1 {
  margin: 20px 0;
  color: #f4eee0;
  font-family: Georgia, serif;
  font-size: clamp(54px, 5.5vw, 90px);
  font-weight: 400;
  line-height: .96;
}

.brand-copy p { max-width: 440px; color: #aab8af; font-size: 16px; line-height: 1.8; }
.brand-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brand-stats div { padding: 16px 10px; border-top: 1px solid var(--line); }
.brand-stats b { display: block; color: var(--gold-light); font-family: Georgia, serif; font-size: 25px; }
.brand-stats span { color: var(--muted); font: 500 9px/1.4 "DM Mono", monospace; letter-spacing: .12em; }

.form-panel { display: grid; place-items: center; padding: 48px 64px; border-right: 1px solid var(--line); }
.login-card { width: min(100%, 650px); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: 0 30px 80px rgba(0, 0, 0, .32); }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 34px; padding: 5px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 13px; background: rgba(0, 0, 0, .2); }
.auth-tab { padding: 13px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font: 700 12px/1 "DM Mono", monospace; letter-spacing: .14em; }
.auth-tab.active { color: #172019; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 6px 24px rgba(215, 185, 111, .14); }
.auth-pane.hidden { display: none; }
.auth-pane h2 { margin: 8px 0 5px; color: #f4eee0; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.card-intro { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-group { min-width: 0; margin-bottom: 18px; }
.register-grid .field-group { margin-bottom: 0; }
.full-width { grid-column: 1 / -1; }
.field-group label, .gender-fieldset legend { display: block; margin-bottom: 8px; color: #b7c2bb; font: 500 10px/1.3 "DM Mono", monospace; letter-spacing: .17em; }
.field-wrap { display: flex; align-items: center; min-height: 52px; padding: 0 13px; border: 1px solid rgba(210, 223, 215, .16); border-radius: 11px; background: rgba(1, 10, 7, .45); transition: border-color .2s, box-shadow .2s; }
.field-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215, 185, 111, .1); }
.field-wrap > span { flex: 0 0 auto; margin-right: 10px; color: var(--gold); }
.field-wrap input { width: 100%; min-width: 0; padding: 14px 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.field-wrap select { width:100%; min-width:0; padding:14px 0; border:0; outline:0; color:var(--ink); background:#071712; cursor:pointer; }
.field-group label small { color:#71837a; font-size:8px; letter-spacing:.08em; }
.field-wrap input::placeholder { color: #5e7066; }
.private-value { position: relative; flex: 1; min-width: 0; }
.privacy-mask { position: absolute; inset: 0; display: none; align-items: center; overflow: hidden; color: var(--ink); pointer-events: none; letter-spacing: .13em; white-space: nowrap; }
.privacy-field.masked input { color: transparent; caret-color: var(--gold-light); }
.privacy-field.masked .privacy-mask { display: flex; }
.password-toggle, .privacy-toggle { flex: 0 0 auto; padding: 7px; border: 0; color: var(--gold-light); background: transparent; cursor: pointer; font: 600 9px/1 "DM Mono", monospace; letter-spacing: .05em; }
.privacy-toggle { font-size: 16px; filter: grayscale(.35); }
.field-hint, .password-rule { display: block; margin: 7px 2px 0; color: #71837a; font-size: 11px; }
.gender-fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 0; border: 0; }
.gender-fieldset legend { width: 100%; }
.gender-fieldset label { position: relative; cursor: pointer; }
.gender-fieldset input { position: absolute; opacity: 0; }
.gender-fieldset span { display: block; padding: 10px 13px; border: 1px solid rgba(210, 223, 215, .16); border-radius: 999px; color: var(--muted); font: 600 9px/1 "DM Mono", monospace; letter-spacing: .07em; }
.gender-fieldset input:checked + span { border-color: var(--gold); color: var(--gold-light); background: rgba(215, 185, 111, .1); }
.gender-fieldset input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.form-message { min-height: 18px; margin: 12px 2px; font-size: 12px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.auth-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 8px; padding: 17px 20px; border: 1px solid var(--gold-light); border-radius: 12px; color: #172019; background: linear-gradient(135deg, var(--gold-light), var(--gold)); cursor: pointer; font: 800 12px/1 "DM Mono", monospace; letter-spacing: .12em; }
.auth-submit:disabled { opacity: .55; cursor: wait; }
.auth-submit i { font: normal 22px/1 sans-serif; }
.legal-note { display: block; margin-top: 22px; color: #82958a; text-align: center; font-size: 20px; line-height: 1.45; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; width: min(720px, calc(100% - 32px)); }
  .brand-panel { min-height: auto; padding: 32px; border-bottom: 0; }
  .brand-copy { padding: 55px 0 35px; }
  .brand-copy h1 { font-size: clamp(48px, 13vw, 78px); }
  .form-panel { padding: 0 0 40px; border: 0; }
}

@media (max-width: 600px) {
  .login-shell { width: 100%; }
  .brand-panel { padding: 24px; border-inline: 0; }
  .brand-copy { padding: 44px 0 24px; }
  .brand-stats { display: none; }
  .form-panel { padding: 0 14px 28px; }
  .login-card { padding: 24px 18px; border-radius: 18px; }
  .register-grid { grid-template-columns: 1fr; gap: 14px; }
  .full-width { grid-column: auto; }
  .auth-pane h2 { font-size: 32px; }
  .gender-fieldset span { padding: 9px 11px; font-size: 8px; }
  .auth-tab { padding-inline: 7px; font-size: 9px; letter-spacing: .08em; }
  .legal-note { font-size: 20px; }
}
