:root{
  --bg: #07111f;
  --bg-soft: #0c1728;
  --card: rgba(10, 20, 35, 0.86);
  --card-border: rgba(255,255,255,.08);
  --text: #f5f7fb;
  --text-soft: rgba(245,247,251,.72);
  --input: rgba(255,255,255,.05);
  --input-border: rgba(255,255,255,.10);
  --primary: #4f8cff;
  --primary-strong: #2f6ef2;
  --danger-bg: rgba(255, 82, 82, 0.12);
  --danger-border: rgba(255, 82, 82, 0.35);
  --danger-text: #ffb4b4;
  --shadow: 0 20px 60px rgba(0,0,0,.38);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*{
  box-sizing: border-box;
}

html, body{
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Inter, Poppins, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79,140,255,.20), transparent 30%),
    radial-gradient(circle at bottom right, rgba(47,110,242,.16), transparent 28%),
    linear-gradient(180deg, #050d18 0%, #091322 100%);
  color: var(--text);
}

body.auth-page{
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.auth-bg{
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(79,140,255,.12), transparent 60%),
    radial-gradient(700px 320px at 85% 85%, rgba(79,140,255,.08), transparent 60%);
}

.auth-shell{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card{
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.auth-brand{
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand__logo{
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .3px;
}

.auth-brand__text{
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: .95rem;
}

.auth-header{
  margin-bottom: 24px;
}

.auth-header h1{
  margin: 0 0 8px;
  font-size: 1.9rem;
  line-height: 1.1;
}

.auth-header p{
  margin: 0;
  color: var(--text-soft);
  font-size: .96rem;
}

.auth-alert{
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: .94rem;
  line-height: 1.45;
}

.auth-alert--error{
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.auth-form{
  display: grid;
  gap: 18px;
}

.auth-field{
  display: grid;
  gap: 8px;
}

.auth-field label{
  font-size: .92rem;
  color: var(--text);
  font-weight: 600;
}

.auth-field input{
  width: 100%;
  height: 50px;
  border: 1px solid var(--input-border);
  background: var(--input);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-field input::placeholder{
  color: rgba(255,255,255,.38);
}

.auth-field input:focus{
  border-color: rgba(79,140,255,.7);
  box-shadow: 0 0 0 4px rgba(79,140,255,.14);
  background: rgba(255,255,255,.07);
}

.auth-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-link{
  color: #9fc1ff;
  text-decoration: none;
  font-size: .92rem;
}

.auth-link:hover{
  color: #c7daff;
  text-decoration: underline;
}

.auth-btn{
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 12px 28px rgba(47,110,242,.30);
}

.auth-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.auth-btn:active{
  transform: translateY(0);
}

.auth-footer{
  margin-top: 22px;
  text-align: center;
}

.auth-footer p{
  margin: 0;
  color: rgba(255,255,255,.45);
  font-size: .84rem;
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-password-toggle:hover {
  color: #fff;
}

.auth-password-toggle i{
  font-size: 1.2rem;
}


@media (max-width: 520px){
  .auth-card{
    padding: 26px 18px;
    border-radius: 20px;
  }

  .auth-header h1{
    font-size: 1.65rem;
  }

  .auth-brand__logo{
    font-size: 1.5rem;
  }
}


.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:active,
.auth-field input:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);

  background: var(--input) !important;

  /* -webkit-box-shadow: 0 0 0 1000px var(--input) inset !important; */
  /* box-shadow: 0 0 0 1000px var(--input) inset !important; */

  border: 1px solid var(--input-border) !important;

  transition: background-color 9999s ease-in-out 0s;
}
/* .auth-field input, */
/* .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(--text) !important;
  caret-color: var(--text);

  background: var(--input) !important;

  -webkit-box-shadow: 0 0 0 1000px var(--input) inset !important;
  box-shadow: 0 0 0 1000px var(--input) inset !important;

  border: 1px solid var(--input-border) !important;

  transition: background-color 9999s ease-in-out 0s;
} */