:root{
  --brand: #1273eb;
  --brandDark: #0f62c8;
  --text: #0f172a;
  --muted: #64748b;
  --card: rgba(255,255,255,0.96);
  --shadow: 0 18px 50px rgba(0,0,0,.22);
  --radius: 16px;
}

/* Page background */
body{
  margin: 0;
  min-height: 100vh;
  background: url(image/wallpaperA.jpg) center / cover no-repeat fixed;
  font-family: sans-serif;
}

/* Overlay to improve contrast */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 0;
}

/* Wrapper */
.auth-wrap{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

/* Card */
.auth-card{
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Header */
.auth-header{
  padding: 18px 18px 14px 18px;
  background: linear-gradient(135deg, var(--brand), #1b88ff);
  color: #fff;
}

.auth-brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.2);
  padding: 6px;
}

.auth-title{
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .2px;
  line-height: 1.1;
}

.auth-subtitle{
  font-size: 13px;
  opacity: .95;
  margin-top: 2px;
}

/* Body */
.auth-body{
  padding: 18px;
}

/* Labels + help */
.auth-label{
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
}

.auth-help{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #b91c1c;
}

/* Inputs */
.auth-input{
  height: 46px;
  border-radius: 12px !important;
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: none !important;
}

.auth-input:focus{
  border-color: rgba(18,115,235,.55);
  box-shadow: 0 0 0 3px rgba(18,115,235,.18) !important;
}

/* invalid */
.is-invalid{
  border-color: rgba(220,53,69,.65) !important;
}
.is-invalid:focus{
  box-shadow: 0 0 0 3px rgba(220,53,69,.15) !important;
}

/* Fix input-group spacing for Bootstrap 3 */
.auth-input-group .auth-input{
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.auth-input-group .input-group-btn .auth-eye-btn{
  height: 46px;
  border: 1px solid rgba(15,23,42,.14);
  border-left: 0;
  background: #f8fafc;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 0 14px;
}
.auth-eye-btn i{
  font-size: 18px;
  color: #334155;
}

/* Alert */
.auth-alert{
  background: rgba(220,53,69,.10);
  border: 1px solid rgba(220,53,69,.25);
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 13px;
}

/* Remember row */
.auth-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
}

.auth-check{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #334155;
  user-select: none;
}
.auth-check input{
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-link{
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
.auth-link:hover{
  text-decoration: underline;
}

/* Button */
.auth-btn{
  height: 48px;
  border-radius: 12px;
  font-weight: 900;
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
}
.auth-btn:hover{
  background: var(--brandDark);
  border-color: var(--brandDark);
  color: #fff;
}
.auth-btn:disabled{
  opacity: .78;
  cursor: not-allowed;
}

.auth-spinner{
  margin-left: 8px;
}

/* Footer */
.auth-footer{
  margin-top: 12px;
}
.auth-back{
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 800;
}
.auth-back:hover{
  text-decoration: underline;
}

/* Accessibility focus */
a:focus, button:focus, input:focus{
  outline: 3px solid rgba(18,115,235,.25);
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 420px){
  .auth-body{ padding: 14px; }
  .auth-row{ flex-direction: column; align-items: flex-start; }
}
