/* themes/mytheme/login/resources/css/style.css */

/* Page background */
body {
  background-color: #f8f9fa;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Centered full-height container */
.vh-100 {
  height: 100vh !important;
}

/* Card styling to match dashboard */
.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Card inner spacing */
.card-body {
  padding: 2rem;
}

/* Logo alignment */
.card-body .text-center img {
  max-height: 40px;
}

/* Form spacing */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

/* Inputs */
.form-control {
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
}

/* Invalid state */
.form-control.is-invalid {
  border-color: #dc3545;
  padding-right: 2.25rem; /* space for the icon */
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
}

.invalid-feedback {
  display: block;
  font-size: 0.875rem;
}

/* Checkbox & link row */
.form-check-input {
  margin-top: 0.3rem;
}

.form-check-label {
  margin-left: 0.375rem;
}

.d-flex.justify-content-between a.small {
  text-decoration: none;
  color: #0d6efd;
}

.d-flex.justify-content-between a.small:hover {
  text-decoration: underline;
}

.btn {
  padding: 0.75rem !important;
}

/* Primary button */
.btn-primary {
  background-color: #21355c;
  border-color: #21355c;
  border-radius: 0.375rem;
  font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #21355c;
  border-color: #21355c;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Full-width submit */
.w-100 {
  width: 100% !important;
}

/* Footer registration link */
#kc-registration-container {
  padding-top: 1rem;
}

#kc-registration-container .small {
  font-size: 0.875rem;
}

#kc-username {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6c757d;
}

#kc-attempted-username {
  font-weight: 600;
  color: #212529;
}

#reset-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  min-height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid #21355c;
  color: #21355c;
  background: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

#reset-login:hover {
  background: #21355c;
  color: #ffffff;
}

/* Social login buttons */
#kc-social-providers .btn-outline-secondary {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
}

#kc-social-providers .gap-2 > * {
  margin: 0 0.25rem;
}


/* ─── Narrow & center the login card ─── */
body {
  display: flex !important;
  align-items: center !important;    /* vertical centering */
  justify-content: center !important; /* horizontal centering */
  height: 100dvh !important;
}

@media (min-width: 576px) {
body > div {
  max-width: 360px;
  width: 100%;
  margin: auto;  /* auto on all sides = full centering */
}
}

@media (max-width: 575px) {
  body > div {
    max-width: 100%;
    width: 100%;
    padding: 2rem;
    margin: auto;  /* auto on all sides = full centering */
  }
}

/* OTP form */
.kc-otp-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
  text-align: center;
  font-size: 1.125rem;
}

.kc-otp-help {
  color: #6c757d;
}
