@import url('https://fonts.googleapis.com/css2?family=Coiny&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --primary:#21449C;
  --primary-hover:#193B8B;
  --ink:#1F2937;
  --text:#444557;
  --muted:#757589;
  --line:#C5C5DB;
  --soft-blue:#3871C0;
  --white:#FFFFFF;
  --support-bg:#F8FAFD;
}

*{box-sizing:border-box}

html,
body{
  margin:0;
  width:100%;
  min-width:320px;
  min-height:100%;
  font-family:'Inter','Segoe UI',Arial,sans-serif;
  color:var(--ink);
  background:#EFF5FF;
  -webkit-font-smoothing:antialiased;
}

button,
input{
  font:inherit;
}

button,
a,
label{
  -webkit-tap-highlight-color:transparent;
}

button,
a{
  cursor:pointer;
}

a{
  color:inherit;
  text-decoration:none;
}

.auth-page{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  background:url('../images/auth-background.png') center center/cover no-repeat;
}

.auth-stage{
  position:relative;
  width:min(1440px,100vw);
  height:min(1024px,100vh);
  min-height:760px;
  margin:0 auto;
}

/* ===== LEFT CONTENT ===== */
.auth-intro{
  position:absolute;
  left:120px;
  top:117px;
  width:650px;
  z-index:2;
}

.auth-product-title{
  margin:0;
  font-family:'Coiny',cursive;
  font-weight:400;
  font-size:52px;
  line-height:1.07;
  letter-spacing:.1px;
  text-transform:uppercase;
}

.auth-product-title .title-dark{
  display:block;
  color:#273143;
}

.auth-product-title .title-blue{
  display:block;
  color:#21449C;
}

.auth-tagline{
  margin-top:29px;
  color:#444557;
  font-size:19px;
  line-height:1.52;
  font-weight:400;
}

.auth-tagline span{
  display:block;
}

.auth-hero{
  position:absolute;
  left:110px;
  bottom:204px;
  width:700px;
  height:auto;
  object-fit:contain;
  z-index:2;
  pointer-events:none;
  user-select:none;
}

.auth-copyright{
  position:absolute;
  left:0;
  right:0;
  bottom:122px;
  z-index:2;
  margin:0;
  text-align:center;
  color:#404B52;
  font-size:18px;
  line-height:1.3;
  font-weight:400;
}

/* ===== CARD ===== */
.auth-card{
  position:absolute;
  left:840px;
  top:146px;
  width:480px;
  min-height:670px;
  padding:56px 40px 28px;
  border:1px solid rgba(215,220,231,.78);
  border-radius:20px;
  background:rgba(255,255,255,.94);
  box-shadow:0 14px 36px rgba(43,67,115,.06);
  z-index:4;
}

.auth-logo{
  display:block;
  width:145px;
  max-height:60px;
  object-fit:contain;
  margin:0 auto 31px;
}

.auth-heading{
  margin:0;
  text-align:center;
  color:#1A1B26;
  font-size:29px;
  line-height:1.15;
  font-weight:700;
}

.auth-subtitle{
  margin:16px 0 38px;
  text-align:center;
  color:#757589;
  font-size:14px;
  line-height:1.45;
}

.auth-form{
  width:100%;
}

.field{
  margin-bottom:20px;
}

.input-wrap{
  position:relative;
  width:100%;
  height:53px;
  display:flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.74);
  transition:border-color .15s ease,box-shadow .15s ease;
}

.input-wrap:focus-within{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(33,68,156,.07);
}

.field-icon{
  width:43px;
  height:51px;
  flex:0 0 43px;
  display:grid;
  place-items:center;
  color:#7B8192;
}

.field-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.input-wrap input{
  min-width:0;
  height:51px;
  flex:1;
  padding:0 13px 0 0;
  border:0;
  outline:0;
  background:transparent;
  color:#2D3748;
  font-size:14px;
}

.input-wrap input::placeholder{
  color:#A4A8B6;
}

.password-toggle{
  width:45px;
  height:51px;
  flex:0 0 45px;
  border:0;
  background:transparent;
  color:#757B8D;
  display:grid;
  place-items:center;
}

.password-toggle svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.field-error{
  min-height:13px;
  margin-top:5px;
  color:#EF4444;
  font-size:10px;
}

.login-options{
  min-height:28px;
  margin:0 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.remember{
  display:flex;
  align-items:center;
  gap:8px;
  color:#444557;
  font-size:13px;
  white-space:nowrap;
  cursor:pointer;
}

.remember input{
  width:18px;
  height:18px;
  margin:0;
  accent-color:var(--primary);
}

.forgot-link{
  color:#21449C;
  font-size:13px;
  white-space:nowrap;
}

.forgot-link:hover{
  text-decoration:underline;
}

.auth-primary-button{
  width:100%;
  height:52px;
  border:0;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-size:16px;
  font-weight:600;
  transition:background .15s ease;
}

.auth-primary-button:hover{
  background:var(--primary-hover);
}

.support-card{
  width:100%;
  min-height:116px;
  margin-top:32px;
  padding:20px 20px;
  border:1px solid #E8EBF0;
  border-radius:12px;
  background:rgba(248,250,253,.92);
  display:flex;
  align-items:center;
  gap:17px;
}

.support-icon{
  width:49px;
  height:49px;
  flex:0 0 49px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#3871C0;
  background:#E6EDFF;
}

.support-icon svg{
  width:25px;
  height:25px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.support-content{
  min-width:0;
}

.support-label{
  margin-bottom:6px;
  color:#5D5D6F;
  font-size:13px;
}

.support-phone{
  margin-bottom:4px;
  color:#3871C0;
  font-size:20px;
  line-height:1;
  font-weight:700;
}

.support-time{
  color:#757589;
  font-size:12px;
  line-height:1.35;
}

.auth-page{
    overflow:auto;
  }
}

@media(max-width:1000px){
  .auth-page{
    overflow:auto;
  }

  .auth-stage{
    width:100%;
    height:auto;
    min-height:100vh;
    padding:50px 22px;
  }

  .auth-intro,
  .auth-hero,
  .auth-copyright,
  .auth-card{
    position:relative;
    left:auto;
    top:auto;
    bottom:auto;
  }

  .auth-intro{
    width:min(650px,100%);
    margin:0 auto 30px;
    text-align:center;
  }

  .auth-product-title{
    font-size:clamp(36px,7vw,52px);
  }

  .auth-tagline{
    font-size:16px;
  }

  .auth-hero{
    display:block;
    width:min(700px,90vw);
    margin:0 auto 34px;
  }

  .auth-card{
    width:min(480px,100%);
    min-height:auto;
    margin:0 auto;
  }

  .auth-copyright{
    margin:34px auto 0;
    font-size:14px;
  }
}


/* Trang quên mật khẩu: vị trí theo đúng ảnh tham chiếu */
.forgot-card{
  min-height:670px;
}

.forgot-user-field{
  margin-bottom:2px;
}

.forgot-submit{
  margin-top:0;
}

.forgot-support{
  margin-top:32px;
}


/* ===== Desktop large-content fit =====
   Giữ nguyên background; phóng lớn CONTENT và tận dụng chiều cao viewport. */
@media (min-width:1001px){
  html,
  body{
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden;
  }

  .auth-page{
    width:100vw;
    height:100vh;
    min-height:0;
    overflow:hidden;
    /* background giữ nguyên */
  }

  .auth-stage{
    position:relative !important;
    left:auto !important;
    top:auto !important;
    width:min(1600px,100vw) !important;
    height:100vh !important;
    min-height:0 !important;
    margin:0 auto !important;
    transform:none !important;
  }

  /* Khối giới thiệu lớn hơn và sát phía trên hơn */
  .auth-intro{
    left:clamp(70px,6vw,110px) !important;
    top:clamp(54px,8vh,82px) !important;
    width:720px !important;
  }

  .auth-product-title{
    font-size:60px !important;
    line-height:1.04 !important;
  }

  .auth-tagline{
    margin-top:27px !important;
    font-size:20px !important;
    line-height:1.5 !important;
  }

  /* Cụm laptop/sách/cây/bút được phóng lớn */
  .auth-hero{
    left:clamp(66px,5.5vw,100px) !important;
    bottom:clamp(88px,11vh,112px) !important;
    width:760px !important;
  }

  /* Card lớn hơn, nhưng vẫn nằm trọn 1 viewport */
  .auth-card{
    left:auto !important;
    right:clamp(55px,5vw,90px) !important;
    top:50% !important;
    width:500px !important;
    min-height:620px !important;
    padding:45px 40px 24px !important;
    transform:translateY(-50%) !important;
  }

  .auth-logo{
    width:155px !important;
    max-height:62px !important;
    margin-bottom:25px !important;
  }

  .auth-heading{
    font-size:31px !important;
  }

  .auth-subtitle{
    margin:13px 0 29px !important;
    font-size:14px !important;
  }

  .field{
    margin-bottom:16px !important;
  }

  .input-wrap{
    height:51px !important;
  }

  .field-icon{
    height:49px !important;
  }

  .input-wrap input{
    height:49px !important;
    font-size:14px !important;
  }

  .password-toggle{
    height:49px !important;
  }

  .login-options{
    margin-bottom:16px !important;
  }

  .auth-primary-button{
    height:51px !important;
  }

  .support-card{
    min-height:102px !important;
    margin-top:25px !important;
    padding:16px 18px !important;
  }

  /* Bản quyền sát mép dưới hơn để giảm khoảng trống */
  .auth-copyright{
    bottom:30px !important;
    font-size:17px !important;
  }
}

/* Laptop desktop thấp: chỉ thu nhẹ content, background vẫn giữ nguyên */
@media (min-width:1001px) and (max-height:780px){
  .auth-intro{
    top:42px !important;
  }

  .auth-product-title{
    font-size:55px !important;
  }

  .auth-tagline{
    margin-top:20px !important;
    font-size:18px !important;
  }

  .auth-hero{
    bottom:76px !important;
    width:690px !important;
  }

  .auth-card{
    width:470px !important;
    min-height:590px !important;
    padding:36px 36px 20px !important;
  }

  .auth-logo{
    width:145px !important;
    margin-bottom:18px !important;
  }

  .auth-heading{
    font-size:28px !important;
  }

  .auth-subtitle{
    margin:10px 0 22px !important;
  }

  .support-card{
    margin-top:18px !important;
    min-height:94px !important;
  }

  .auth-copyright{
    bottom:24px !important;
    font-size:15px !important;
  }
}


/* ===== Cân giữa hai khối desktop ===== */
@media (min-width:1001px){
  /* Đưa toàn bộ content bên trái gần tâm hơn */
  .auth-intro{
    left:clamp(105px,8.2vw,145px) !important;
  }

  .auth-hero{
    left:clamp(100px,7.7vw,138px) !important;
  }

  /* Đưa card bên phải gần tâm hơn */
  .auth-card{
    right:clamp(95px,7.2vw,130px) !important;
  }
}

@media (min-width:1001px) and (max-width:1500px){
  .auth-intro{
    left:95px !important;
  }

  .auth-hero{
    left:88px !important;
  }

  .auth-card{
    right:82px !important;
  }
}

/* ===== RESPONSIVE AUTH REFINEMENT: tablet/mobile only ===== */
@media (max-width:1000px){
  html,body{min-width:0!important;overflow-x:hidden}
  .auth-page{min-height:100vh;overflow:auto;background:url('../images/auth-background.png') center/cover no-repeat!important}
  .auth-stage{width:100%!important;height:auto!important;min-height:100vh!important;padding:34px 22px 28px!important}
  .auth-intro{width:min(650px,100%)!important;margin:0 auto 22px!important;text-align:center}.auth-product-title{font-size:clamp(34px,6.5vw,50px)!important}.auth-tagline{margin-top:18px!important;font-size:16px!important}
  .auth-hero{width:min(620px,86vw)!important;margin:0 auto 22px!important}.auth-card{width:min(480px,100%)!important;min-height:auto!important;margin:0 auto!important;padding:36px 34px 26px!important}.auth-copyright{margin:26px auto 0!important;font-size:13px!important;padding:0 10px}
  .input-wrap input{font-size:16px!important}
}
@media (max-width:600px){
  .auth-stage{padding:24px 14px 22px!important}.auth-product-title{font-size:34px!important}.auth-tagline{font-size:14px!important}.auth-hero{width:min(520px,96vw)!important}.auth-card{padding:28px 20px 22px!important;border-radius:16px!important}.auth-logo{width:135px!important;margin-bottom:18px!important}.auth-heading{font-size:26px!important}.auth-subtitle{margin:10px 0 22px!important}.input-wrap{height:50px!important}.support-card{margin-top:20px!important;padding:14px!important}.support-phone{font-size:17px!important}.login-options{gap:8px}.remember,.forgot-link{font-size:12px!important}}
