:root {
  color-scheme: dark;
  --auth-bg: #080d12;
  --auth-panel: #111a22;
  --auth-line: #263743;
  --auth-text: #e7eff4;
  --auth-muted: #8b9aa5;
  --auth-mint: #44d5ad;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--auth-text); background: var(--auth-bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--auth-mint); outline-offset: 3px; }
[hidden] { display: none !important; }

.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(300px, .9fr) minmax(380px, 1.1fr); }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 72px); overflow: hidden; border-right: 1px solid #1a2933; background: radial-gradient(ellipse at 32% 54%, rgba(42,129,111,.19), transparent 52%), #0b1319; }
.auth-brand::after { position: absolute; right: -170px; bottom: 12%; width: 400px; height: 400px; border: 1px solid rgba(68,213,173,.09); border-radius: 50%; content: ""; box-shadow: 0 0 0 40px rgba(68,213,173,.025), 0 0 0 80px rgba(68,213,173,.02); pointer-events: none; }
.auth-logo { position: relative; z-index: 1; display: inline-flex; width: fit-content; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.auth-logo > span:last-child { display: grid; gap: 5px; }
.auth-logo strong { font-size: 13px; letter-spacing: .18em; }
.auth-logo small { color: #6e7f8a; font-size: 8px; letter-spacing: .2em; }
.auth-mark { display: grid; width: 36px; height: 36px; grid-template: 1fr 1fr / 1fr 1fr; gap: 3px; padding: 7px; border: 1px solid #337e71; border-radius: 11px; background: #102720; transform: rotate(-4deg); }
.auth-mark i { border-radius: 2px; background: var(--auth-mint); }
.auth-mark i:nth-child(2) { opacity: .6; }.auth-mark i:nth-child(3) { opacity: .42; }.auth-mark i:nth-child(4) { background: #d0f4e7; }
.brand-message { position: relative; z-index: 1; max-width: 500px; margin: auto 0; padding: 80px 0; }
.eyebrow { color: #6b8d8a; font-size: 9px; font-weight: 750; letter-spacing: .19em; }
.brand-message h1 { margin: 20px 0 15px; font-size: clamp(34px, 5vw, 57px); font-weight: 570; line-height: 1.08; letter-spacing: -.045em; }
.brand-message > p:last-child { max-width: 370px; color: #8b9aa5; font-size: 14px; line-height: 1.8; }
.brand-foot { display: flex; align-items: center; gap: 9px; color: #71818d; font-size: 11px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-mint); box-shadow: 0 0 14px rgba(68,213,173,.65); }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 22px; }
.auth-card { width: min(100%, 430px); padding: clamp(24px, 4vw, 42px); border: 1px solid var(--auth-line); border-radius: 20px; background: linear-gradient(160deg, rgba(19,30,39,.98), rgba(13,21,28,.98)); box-shadow: 0 22px 80px rgba(0,0,0,.25); }
.auth-card h2 { margin: 8px 0 10px; font-size: 25px; font-weight: 620; letter-spacing: -.025em; }
.muted { margin: 0 0 25px; color: var(--auth-muted); font-size: 12px; line-height: 1.7; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: #c5d0d7; font-size: 11px; font-weight: 620; }
.auth-form input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #2a3a46; border-radius: 9px; color: var(--auth-text); background: #0b131a; }
.auth-form input:focus { border-color: #3a9c83; outline: none; box-shadow: 0 0 0 3px rgba(68,213,173,.1); }
.field-hint { margin: -7px 0 0; color: #70818d; font-size: 10px; line-height: 1.6; }
.primary-button { display: inline-flex; min-height: 43px; justify-content: center; align-items: center; padding: 10px 14px; border: 1px solid #3c9d83; border-radius: 9px; color: #062019; background: linear-gradient(135deg, #58dfb8, #39c59e); font-size: 12px; font-weight: 750; cursor: pointer; }
.primary-button:hover { filter: brightness(1.06); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.text-button { margin-top: 19px; padding: 4px 0; border: 0; color: var(--auth-mint); background: transparent; font-size: 11px; cursor: pointer; }
.notice { margin: 0 0 18px; padding: 11px 13px; border: 1px solid #32524d; border-radius: 9px; color: #bcead9; background: #112520; font-size: 11px; line-height: 1.6; }
.notice.error { border-color: #74434a; color: #f2c3c8; background: #2a171c; }
.auth-main footer { width: min(100%, 430px); margin-top: 20px; color: #566671; font-size: 10px; text-align: center; }

.account-launcher { position: fixed; z-index: 5000; top: 12px; right: 14px; min-height: 35px; padding: 7px 11px; border: 1px solid #344650; border-radius: 9px; color: #d8e4e9; background: rgba(12,20,26,.95); font-size: 10px; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.account-scrim { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2,7,10,.78); backdrop-filter: blur(7px); }
.account-dialog { width: min(100%, 680px); max-height: min(85vh, 760px); overflow: auto; padding: 22px; border: 1px solid #33454f; border-radius: 15px; color: var(--auth-text); background: #101a21; box-shadow: 0 25px 100px #0009; }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.account-head h2 { margin: 0; font-size: 18px; }
.account-head p { margin: 5px 0 0; color: var(--auth-muted); font-size: 11px; }
.account-close, .account-action { min-height: 32px; padding: 6px 10px; border: 1px solid #344650; border-radius: 7px; color: #dce6eb; background: #17232b; font-size: 10px; cursor: pointer; }
.account-section { margin-top: 18px; padding-top: 17px; border-top: 1px solid #263741; }
.account-section h3 { margin: 0 0 12px; font-size: 13px; }
.account-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.account-form label { display: grid; gap: 6px; color: #b8c7cf; font-size: 10px; }
.account-form input { min-width: 0; min-height: 36px; padding: 8px 9px; border: 1px solid #31434d; border-radius: 7px; color: #e7eff4; background: #0a1218; }
.account-form .wide { grid-column: 1 / -1; }
.account-form input[aria-invalid="true"] { border-color: #f38e99; }
.entry-field-error {
  position: relative;
  align-self: start;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 7px 9px;
  border: 1px solid #ae5866;
  border-radius: 7px;
  background: #321c26;
  color: #ffc9cf;
  font-size: .8rem;
  line-height: 1.4;
}
.entry-field-error::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 13px;
  width: 7px;
  height: 7px;
  border-top: 1px solid #ae5866;
  border-left: 1px solid #ae5866;
  background: #321c26;
  transform: rotate(45deg);
}
.account-notice { min-height: 18px; margin: 9px 0 0; color: #8dbcae; font-size: 10px; }
.user-list { display: grid; gap: 8px; }
.user-row { display: grid; grid-template-columns: minmax(140px,1fr) minmax(120px,1fr) auto auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid #263741; border-radius: 8px; background: #0c141a; }
.user-name { font-size: 11px; font-weight: 700; }.user-meta { margin-top: 4px; color: #7d8d98; font-size: 9px; overflow-wrap: anywhere; }
.user-status { color: #9ab0bb; font-size: 9px; }.account-action.approve { border-color: #3c806e; color: #9de6ce; }.account-action.remove { border-color: #74434a; color: #f0aab2; }

@media (max-width: 740px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { min-height: 175px; padding: 22px 24px; border-right: 0; border-bottom: 1px solid #1a2933; }
  .brand-message { padding: 25px 0 6px; }.brand-message h1 { margin: 10px 0 6px; font-size: 29px; }.brand-message > p:last-child { display: none; }
  .brand-foot { position: absolute; top: 28px; right: 24px; font-size: 9px; }
  .auth-main { padding: 22px 16px 30px; }
  .user-row { grid-template-columns: 1fr auto; }.user-status { grid-column: 1; }.user-row .account-action { grid-column: 2; grid-row: 1 / span 2; }
  .account-form { grid-template-columns: 1fr; }.account-form .wide { grid-column: auto; }
}
