:root{
  --c1:#142850;
  --c2:#27496D;
  --c3:#0C7B93;
  --c4:#00A8CC;

  --bg:#E9F2FF;
  --card:#ffffff;
  --ink:#1f2937;
  --muted:#6b7280;
}

*{box-sizing:border-box;margin:0;padding:0;font-family:Inter,system-ui,Segoe UI,Roboto,Arial;}

body{
  min-height:100vh;
  background:var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* khung gradient giống mockup */
.auth-shell{
  width:min(1200px, 100%);
  height:min(640px, 90vh);
  background:radial-gradient(circle at 0% 0%, #7cc4ff 0, #407bff 30%, #906bff 60%, #f0f7ff 100%);
  border-radius:32px;
  padding:40px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 20px 50px rgba(15,23,42,0.35);
}

/* card trắng ở giữa */
.auth-card{
  width:min(420px, 100%);
  background:var(--card);
  border-radius:20px;
  padding:32px 32px 28px;
  box-shadow:0 12px 30px rgba(15,23,42,0.18);
}

.auth-logo{
  text-align:center;
  font-weight:700;
  color:var(--c2);
  margin-bottom:18px;
}

.auth-form{
  display:none;
}
.auth-form.active{
  display:block;
}

.auth-form h1{
  font-size:20px;
  text-align:center;
  margin-bottom:4px;
}
.subtitle{
  text-align:center;
  font-size:13px;
  color:var(--muted);
  margin-bottom:20px;
}

/* input */
.auth-form label{
  display:block;
  font-size:13px;
  font-weight:600;
  margin-bottom:10px;
  color:var(--ink);
}
.auth-form label span{
  display:block;
  margin-bottom:6px;
}
.auth-form input{
  width:100%;
  border-radius:12px;
  border:1px solid #e5e7eb;
  padding:10px 12px;
  font-size:14px;
  outline:none;
  transition:.15s;
}
.auth-form input:focus{
  border-color:var(--c3);
  box-shadow:0 0 0 1px rgba(12,123,147,0.15);
}

.password-row{
  display:flex;
  align-items:center;
}

/* hàng remember + quên mật khẩu */
.row{
  display:flex;
  align-items:center;
}
.row.between{
  justify-content:space-between;
  margin:6px 0 16px;
}
.remember{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:var(--muted);
}
.remember input{
  width:14px;height:14px;
}

.link-small{
  font-size:12px;
  color:var(--c3);
  text-decoration:none;
}
.link-small:hover{ text-decoration:underline; }

/* button */
.btn{
  width:100%;
  border-radius:999px;
  border:none;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
  margin-top:4px;
}
.btn.primary{
  background:linear-gradient(135deg,#5b7bff,#6f5bff);
  color:#fff;
  margin-top:4px;
}
.btn.primary:hover{
  filter:brightness(1.04);
}
.btn.ghost{
  margin-top:10px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  color:#111827;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.g-icon{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  color:#DB4437; /* đỏ Google */
}

/* switch form */
.switch{
  margin-top:14px;
  font-size:13px;
  color:var(--muted);
  text-align:center;
}
.link-switch{
  border:none;
  background:transparent;
  color:var(--c3);
  cursor:pointer;
  font-weight:600;
  font-size:13px;
}
.link-switch:hover{
  text-decoration:underline;
}

/* responsive nhỏ */
@media (max-width:768px){
  .auth-shell{
    width:100%;
    height:100vh;
    border-radius:0;
  }
}
.error-msg{
  background:#fee2e2;
  color:#b91c1c;
  padding:10px;
  border-radius:10px;
  font-size:14px;
  margin-bottom:10px;
  text-align:center;
}
/* ================================
   BIẾN TẤT CẢ NÚT LINK THÀNH TEXT
================================ */
.link-small,
.link-switch,
.auth-form .switch button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #0a4f70 !important;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    box-shadow: none !important;
}

/* Hiệu ứng nhỏ cho link hover */
.link-small:hover,
.link-switch:hover,
.auth-form .switch button:hover {
    text-decoration: underline;
}
.pw-wrapper {
  position: relative;
}

.pw-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  font-size: 18px;
  opacity: 0.7;
}

.toggle-pw:hover {
  opacity: 1;
}
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  max-width: 310px;
  animation: fadeIn .25s ease-out;
}

@keyframes fadeIn {
  from { opacity:0; transform: scale(.9); }
  to { opacity:1; transform: scale(1); }
}
/* Ẩn nút reveal password mặc định của Edge */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}
