/* Audious — authentication screens
   Login + Register, aligned with the V34 frontend visual language. */

.auth-page{
  color-scheme:dark;
  /*
   * Authentication screens consume the active theme instead of owning a
   * second hard-coded palette.
   */
  --auth-bg:var(--bg,#080b0f);
  --auth-panel:var(--surface,#151920);
  --auth-panel-2:var(--surface-2,#1b2028);
  --auth-line:var(--line,#272d36);
  --auth-line-strong:var(--line-strong,#343c47);
  --auth-text:var(--text,#f4f6f8);
  --auth-soft:var(--soft,#c8cdd4);
  --auth-muted:var(--muted,#929aa6);
  --auth-muted-2:var(--muted-2,#68717d);
  --auth-accent:var(--accent,#89a8d8);
  --auth-accent-strong:var(--accent-strong,var(--auth-accent));
  --auth-accent-soft:var(--accent-soft,rgba(137,168,216,.12));
  --auth-input:var(--surface-2,#1b2028);
  --auth-danger:var(--danger,#cf7e83);
  --auth-success:#a8e5bd;
  --auth-accent-ink:#101217;
  --auth-radius:var(--radius,16px);
  --auth-radius-sm:var(--radius-sm,11px);
  --auth-shadow:var(--shadow,0 14px 38px rgba(0,0,0,.24));
  --auth-sans:var(--sans,Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);
  --auth-mono:var(--mono,ui-monospace,"SF Mono",Menlo,Monaco,monospace);

  min-height:100svh;
  margin:0;
  padding:0;
  background:
    radial-gradient(circle at 8% 0%,var(--auth-accent-soft),transparent 34rem),
    radial-gradient(circle at 100% 100%,rgba(255,255,255,.025),transparent 30rem),
    var(--auth-bg);
  color:var(--auth-text);
  font-family:var(--auth-sans);
  overflow-x:hidden;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after{
  box-sizing:border-box;
}

.auth-shell{
  min-height:100svh;
  display:grid;
  grid-template-columns:minmax(330px,.78fr) minmax(480px,1.22fr);
}

.auth-brand-panel{
  position:relative;
  min-height:100%;
  padding:42px clamp(30px,5vw,74px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  border-right:1px solid var(--auth-line);
  background:
    linear-gradient(155deg,var(--auth-accent-soft),transparent 40%),
    var(--auth-panel);
}

.auth-brand-panel::after{
  content:"";
  position:absolute;
  width:480px;
  height:480px;
  left:-180px;
  bottom:-210px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:50%;
  box-shadow:
    0 0 0 58px rgba(255,255,255,.018),
    0 0 0 118px rgba(255,255,255,.010);
  pointer-events:none;
}

.auth-brand{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:14px;
  color:var(--auth-text);
  text-decoration:none;
}

.auth-brand-mark{
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 48px;
  overflow:hidden;
  border:1px solid var(--auth-line-strong);
  border-radius:var(--auth-radius-sm);
  background:var(--auth-panel-2);
}

.auth-brand-logo{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}

.auth-eq{
  height:22px;
  display:flex;
  align-items:center;
  gap:3px;
}

.auth-eq i{
  width:3px;
  display:block;
  border-radius:999px;
  background:var(--auth-accent);
}

.auth-eq i:nth-child(1){height:9px}
.auth-eq i:nth-child(2){height:18px}
.auth-eq i:nth-child(3){height:13px}
.auth-eq i:nth-child(4){height:21px}
.auth-eq i:nth-child(5){height:11px}

.auth-brand-name{
  font-family:var(--auth-mono);
  font-size:17px;
  font-weight:800;
  letter-spacing:.15em;
}

.auth-brand-copy{
  position:relative;
  z-index:1;
  max-width:490px;
  margin:auto 0;
  padding:70px 0;
}

.auth-brand-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 18px;
  color:var(--auth-muted);
  font-family:var(--auth-mono);
  font-size:11px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.auth-brand-kicker::before{
  content:"";
  width:22px;
  height:1px;
  background:var(--auth-muted);
}

.auth-brand-copy h2{
  max-width:420px;
  margin:0;
  font-size:clamp(34px,4.2vw,64px);
  line-height:.98;
  letter-spacing:-.045em;
}

.auth-brand-copy p{
  max-width:420px;
  margin:22px 0 0;
  color:var(--auth-muted);
  font-size:14px;
  line-height:1.7;
}

.auth-wave{
  position:relative;
  z-index:1;
  height:58px;
  display:flex;
  align-items:center;
  gap:4px;
  opacity:.34;
}

.auth-wave span{
  width:2px;
  height:var(--h);
  display:block;
  border-radius:999px;
  background:linear-gradient(to bottom,var(--auth-accent),var(--auth-muted));
}

.auth-brand-foot{
  position:relative;
  z-index:1;
  color:var(--auth-muted);
  font-size:10px;
  letter-spacing:.06em;
}

.auth-main{
  min-width:0;
  padding:42px clamp(28px,6vw,92px);
  display:flex;
  align-items:center;
  justify-content:center;
}

.auth-card{
  width:min(100%,520px);
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}

.auth-card-header{
  margin-bottom:32px;
}

.auth-card-header .eyebrow{
  display:block;
  margin-bottom:10px;
  color:var(--auth-muted);
  font-family:var(--auth-mono);
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.auth-card-header h1{
  margin:0;
  font-size:clamp(30px,4vw,44px);
  line-height:1.05;
  letter-spacing:-.035em;
}

.auth-card-header p{
  margin:12px 0 0;
  color:var(--auth-muted);
  font-size:13px;
  line-height:1.6;
}

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

.auth-field{
  display:grid;
  gap:8px;
}

.auth-field-head{
  min-height:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.auth-field label{
  color:var(--auth-soft);
  font-size:11px;
  font-weight:650;
}

.auth-input-wrap{
  position:relative;
}

.auth-input-icon{
  position:absolute;
  z-index:2;
  top:50%;
  left:15px;
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  color:var(--auth-muted);
  transform:translateY(-50%);
  pointer-events:none;
}

.auth-input-icon svg{
  width:16px;
  height:16px;
  display:block;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"]{
  width:100%;
  height:50px;
  padding:0 46px 0 43px;
  border:1px solid var(--auth-line);
  border-radius:var(--auth-radius-sm);
  outline:0;
  background:var(--auth-input);
  color:var(--auth-text);
  font:inherit;
  font-size:13px;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.auth-field input::placeholder{
  color:var(--auth-muted-2);
}

/*
 * Desktop Chrome/Safari may repaint stored login credentials with the browser
 * autofill background. Keep autofilled fields inside the Audious dark palette.
 */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--auth-text) !important;
  caret-color:var(--auth-text) !important;
  -webkit-box-shadow:0 0 0 1000px var(--auth-input) inset !important;
  box-shadow:0 0 0 1000px var(--auth-input) inset !important;
  border-color:var(--auth-line) !important;
  transition:background-color 99999s ease-out 0s;
}

.auth-field input:autofill{
  color:var(--auth-text) !important;
  background:var(--auth-input) !important;
  border-color:var(--auth-line) !important;
  box-shadow:0 0 0 1000px var(--auth-input) inset !important;
}

.auth-field input:hover{
  border-color:var(--auth-line-strong);
}

.auth-field input:focus{
  border-color:var(--auth-accent);
  background:var(--auth-input);
  box-shadow:0 0 0 3px var(--auth-accent-soft);
}

.auth-password-toggle{
  position:absolute;
  z-index:3;
  top:50%;
  right:9px;
  min-width:31px;
  height:31px;
  padding:0 8px;
  border:0;
  border-radius:var(--auth-radius-sm);
  background:transparent;
  color:var(--auth-muted);
  font:inherit;
  font-size:10px;
  cursor:pointer;
  transform:translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle[aria-pressed="true"]{
  background:var(--auth-accent-soft);
  color:var(--auth-text);
}

.auth-hint{
  margin:0;
  color:var(--auth-muted-2);
  font-size:10px;
}

.auth-submit{
  width:100%;
  min-height:50px;
  margin-top:4px;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid var(--auth-accent);
  border-radius:var(--auth-radius-sm);
  background:var(--auth-accent);
  color:var(--auth-accent-ink);
  box-shadow:0 8px 22px rgba(0,0,0,.16);
  font:inherit;
  font-size:12px;
  font-weight:800;
  letter-spacing:.015em;
  cursor:pointer;
  transition:transform .12s ease,filter .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease;
}

.auth-submit:hover:not(:disabled){
  border-color:var(--auth-accent-strong);
  background:var(--auth-accent);
  box-shadow:0 10px 26px rgba(0,0,0,.22);
  filter:brightness(1.06);
  transform:translateY(-1px);
}

.auth-submit:active:not(:disabled){
  filter:brightness(.96);
  transform:translateY(0);
}

.auth-submit:disabled{
  opacity:.48;
  cursor:not-allowed;
}

.auth-message{
  min-height:0;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:var(--auth-radius-sm);
  color:var(--auth-soft);
  font-size:11px;
  line-height:1.55;
  opacity:0;
  transform:translateY(-3px);
  transition:opacity .15s ease,transform .15s ease,padding .15s ease;
}

.auth-message:not(:empty){
  min-height:38px;
  padding:10px 12px;
  opacity:1;
  transform:none;
  border:1px solid var(--auth-line);
  background:var(--auth-panel-2);
}

.auth-message.error:not(:empty){
  border-color:rgba(255,156,156,.24);
  background:rgba(120,37,37,.10);
  color:#ffc1c1;
}

.auth-message.ok:not(:empty){
  border-color:rgba(168,229,189,.20);
  background:rgba(35,104,61,.10);
  color:#bceacb;
}

.auth-message .verify{
  margin-top:10px;
}

.auth-message .verify .btn,
.auth-message .verify a{
  min-height:34px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--auth-line-strong);
  border-radius:var(--auth-radius-sm);
  background:var(--auth-panel-2);
  color:var(--auth-text);
  text-decoration:none;
  font-size:10px;
  font-weight:700;
}

.auth-bottom{
  margin-top:26px;
  padding-top:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-top:1px solid var(--auth-line);
}

.auth-foot{
  color:var(--auth-muted);
  font-size:11px;
}

.auth-foot a{
  margin-left:5px;
  color:var(--auth-text);
  font-weight:700;
  text-decoration:none;
}

.auth-foot a:hover{
  text-decoration:underline;
}

.auth-lang{
  margin:0;
  display:flex;
  gap:5px;
}

.auth-lang .lang-btn{
  width:30px;
  height:28px;
  display:grid;
  place-items:center;
  border:1px solid var(--auth-line);
  border-radius:var(--auth-radius-sm);
  background:var(--auth-input);
  color:var(--auth-muted);
  text-decoration:none;
  font-size:9px;
  font-weight:700;
}

.auth-lang .lang-btn:hover{
  border-color:var(--auth-line-strong);
  background:var(--auth-panel-2);
  color:var(--auth-text);
}

.auth-lang .lang-btn.active{
  border-color:var(--auth-accent);
  background:var(--auth-accent);
  color:var(--auth-accent-ink);
}

.auth-card a:focus-visible,
.auth-card button:focus-visible,
.auth-card input:focus-visible{
  outline:2px solid var(--auth-accent);
  outline-offset:2px;
}

.auth-submit .spinner{
  width:13px;
  height:13px;
  display:inline-block;
  border:2px solid rgba(16,18,23,.28);
  border-top-color:var(--auth-accent-ink);
  border-radius:50%;
  animation:auth-spin .65s linear infinite;
}

@keyframes auth-spin{
  to{transform:rotate(360deg)}
}

@media(max-width:860px){
  .auth-shell{
    display:block;
    min-height:100svh;
  }

  .auth-brand-panel{
    min-height:auto;
    padding:20px 20px 0;
    border-right:0;
    background:transparent;
  }

  .auth-brand-panel::after,
  .auth-brand-copy,
  .auth-wave,
  .auth-brand-foot{
    display:none;
  }

  .auth-brand-mark{
    width:43px;
    height:43px;
    flex-basis:43px;
    border-radius:var(--auth-radius-sm);
  }

  .auth-brand-name{
    font-size:15px;
  }

  .auth-main{
    padding:44px 20px 34px;
    align-items:flex-start;
  }

  .auth-card{
    width:100%;
    max-width:540px;
  }

  .auth-card-header{
    margin-bottom:27px;
  }

  .auth-card-header h1{
    font-size:32px;
  }
}

@media(max-width:520px){
  .auth-brand-panel{
    padding:16px 16px 0;
  }

  .auth-main{
    padding:38px 16px 28px;
  }

  .auth-card-header h1{
    font-size:29px;
  }

  .auth-field input[type="text"],
  .auth-field input[type="email"],
  .auth-field input[type="password"]{
    height:52px;
    font-size:14px;
  }

  .auth-submit{
    min-height:52px;
  }

  .auth-bottom{
    align-items:flex-start;
    flex-direction:column;
  }

  .auth-lang{
    align-self:flex-start;
  }
}
