/* Custom styles for login/register pages */
html, body { height: 100%; }

/* Background gradient fallback */
body.auth-bg {
  background: #f6f8fb;
  background-image: linear-gradient(180deg, #fbfcfe 0%, #f3f5f9 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Optional photo background */
body.auth-bg.has-photo {
  background: #f6f8fb center/cover no-repeat fixed;
  /* JPG fallback */
  background-image: url('../images/login/login-bg.jpg');
  /* Prefer WebP if available */
  background-image: image-set(url('../images/login/login-bg.webp') type('image/webp'), url('../images/login/login-bg.jpg') type('image/jpeg'));
  position: relative;
}

/* Soft white overlay for readability */
body.auth-bg.has-photo::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.85);
  z-index: 0; pointer-events: none;
}

/* Keep page content above overlay */
.container { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; }

/* Login container styles */
.login-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.login-box {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
}

.login-box h2 {
  color: #1a2b47;
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}
.login-box h2::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: #e9eef3;
  margin-left: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  flex: 1;
  height: 44px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #ddd;
}

.input-group-addon {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-left: none;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-radius: 0 4px 4px 0;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}
.form-actions .btn { flex: 1; }

.btn-danger {
  background-color: #e74c3c;
  border-color: #e74c3c;
}

.btn-default {
  background-color: #fff;
  border-color: #d7dbe0;
  color: #1a2b47;
}

.register-link { display: contents; }

.login-footer {
  text-align: center;
  margin-top: 20px;
  color: #777;
}

.login-footer a {
  color: #666;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Captcha styles */
.captcha-block { margin-top: 20px; }
.captcha-block label { display:block; margin-bottom:8px; color:#666; font-size: 14px; font-weight: 500; }
.captcha-block .input-group { width: 100%; }
.captcha-block canvas { border:1px solid #ddd; border-radius:4px; background:#fff; margin-top: 10px; width: 100%; height: auto; }