:root{
  --blue:#2563eb;
  --blue2:#1d4ed8;
  --text:#0f172a;
  --muted:rgba(15,23,42,.55);
  --card:rgba(255,255,255,.78);
  --border:rgba(15,23,42,.08);
  --shadow:0 30px 80px rgba(15,23,42,.10);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 450px at 50% 0%, rgba(37,99,235,.22), transparent 60%),
    linear-gradient(180deg, #f5f9ff 0%, #eef5ff 40%, #f6f9ff 100%);
}

.auth-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px 14px;
}

.auth-card{
  width:min(420px, 100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:30px;
  box-shadow:var(--shadow);
  overflow:hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-card::before{
  content:"";
  display:block;
  height:105px;
  background:
    radial-gradient(450px 180px at 30% 20%, rgba(37,99,235,.26), transparent 70%),
    radial-gradient(450px 180px at 80% 20%, rgba(59,130,246,.18), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0));
}

.auth-inner{
  padding:16px 16px 18px 16px;
  margin-top:-72px;
}

.auth-head{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
}

.app-logo{
  width:54px;height:54px;
  border-radius:18px;
  background:linear-gradient(180deg, #3b82f6, #1d4ed8);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  font-size:22px;
  box-shadow:0 18px 45px rgba(37,99,235,.22);
}

.app-name{font-weight:1000;font-size:22px;line-height:1}
.app-sub{color:rgba(15,23,42,.55);font-weight:900;margin-top:2px}

.auth-title{
  font-size:34px;
  font-weight:1000;
  letter-spacing:-.8px;
  margin:6px 0 4px 0;
}

.auth-desc{
  color:rgba(15,23,42,.55);
  font-weight:900;
  font-size:14px;
  line-height:1.35;
  margin-bottom:14px;
}

/* ===== CHAMPS PLUS PETITS (moins gros) ===== */
.field-card{
  background:rgba(255,255,255,.86);
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  padding:10px 12px;
  margin-bottom:10px;
}

.field-label{
  color:rgba(15,23,42,.45);
  font-weight:1000;
  font-size:14px;
  margin-bottom:6px;
}

.field-input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  font-size:17px;
  font-weight:1000;
  color:var(--text);
  padding:6px 6px 3px 6px;
}

.field-input::placeholder{
  color:rgba(15,23,42,.28);
  font-weight:1000;
}

/* Phone row */
.phone-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.country-box{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(248,250,252,.95);
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  padding:8px 10px;
  flex:0 0 auto;
}

.country-select{
  border:none;
  outline:none;
  background:transparent;
  font-weight:1000;
  font-size:14px;
  color:var(--text);
  cursor:pointer;
}

/* Password row */
.password-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.eye-btn{
  border:none;
  cursor:pointer;
  width:40px;height:40px;
  border-radius:14px;
  background:rgba(241,245,249,.95);
  border:1px solid rgba(15,23,42,.08);
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

/* Switcher */
.switcher{
  background:rgba(226,232,240,.60);
  border:1px solid rgba(15,23,42,.06);
  border-radius:999px;
  padding:7px;
  display:flex;
  gap:7px;
  margin:12px 0 14px 0;
}

.switch-btn{
  flex:1;
  border:none;
  cursor:pointer;
  padding:10px 12px;
  border-radius:999px;
  font-weight:1000;
  font-size:14px;
  color:rgba(15,23,42,.55);
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:.2s;
}

.switch-btn.active{
  background:rgba(255,255,255,.92);
  color:var(--text);
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}

/* Buttons */
.btn-primary{
  width:100%;
  padding:13px 16px;
  border:none;
  border-radius:999px;
  background:linear-gradient(180deg, #2f6fff, #1d4ed8);
  color:#fff;
  font-weight:1000;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 20px 55px rgba(37,99,235,.25);
  transition:.15s;
  margin-top:6px;
}

.btn-primary:active{transform:scale(.99)}

/* Links */
.links{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 4px 0 4px;
  font-weight:1000;
  font-size:16px;
}

.links a{
  color:var(--blue);
  text-decoration:none;
}

/* Terms */
.terms-box{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:8px 2px 12px 2px;
  font-weight:900;
  color:rgba(15,23,42,.70);
  font-size:14px;
}

.terms-box input{
  width:18px;height:18px;
  margin-top:2px;
  accent-color: var(--blue);
}

.terms-box a{
  color:var(--blue);
  text-decoration:none;
  font-weight:1000;
}

/* Loader */
.loader-overlay{
  position:fixed;inset:0;
  background:rgba(15,23,42,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.loader-box{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(15,23,42,.10);
  padding:18px 18px;
  border-radius:22px;
  width:min(320px, 86vw);
  text-align:center;
  box-shadow:0 30px 80px rgba(15,23,42,.25);
}

.spinner{
  width:38px;height:38px;border-radius:50%;
  border:4px solid rgba(59,130,246,.18);
  border-top-color: rgba(59,130,246,.95);
  margin:0 auto 10px auto;
  animation: spin 1s linear infinite;
}

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