/*
 * The login page as Botble's dark guest layout (Tabler data-bs-theme="dark"),
 * on Bootstrap 4. --auth-primary is Settings → Admin appearance → Primary color.
 */
:root {
  --auth-primary: #007bff;
  --auth-bg: #111827;
  --auth-text: #e5e7eb;
  --auth-muted: #9ca3af;
  --auth-border: #374151;
  --auth-danger: #d63939;
}

body.auth-page {
  margin: 0;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 20px;
  color: var(--auth-text);
  background: var(--auth-bg);
}

.auth-form-column {
  border-top: 2px solid var(--auth-primary);
}

.auth-container {
  width: 100%;
  max-width: 30rem;
  margin: 2rem auto;
  padding: 0 .5rem;
}

@media (min-width: 992px) {
  .auth-container {
    padding: 0 2rem;
  }
}

.auth-logo {
  max-width: 100%;
  height: auto;
}

.auth-heading {
  margin: 0 0 1rem;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  color: var(--auth-text);
}

.auth-page .form-group {
  margin-bottom: 1rem;
}

.auth-page label:not(.custom-control-label) {
  display: block;
  margin-bottom: .5rem;
  font-weight: 500;
  color: var(--auth-text);
}

.auth-page label.required::after {
  content: "*";
  margin-left: .5rem;
  color: var(--auth-danger);
}

.auth-page .form-control {
  height: 40px;
  padding: 9px 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--auth-text);
  background-color: var(--auth-bg);
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  box-shadow: none;
}

.auth-page .form-control::placeholder {
  color: var(--auth-muted);
  opacity: 1;
}

.auth-page .form-control:focus {
  color: var(--auth-text);
  background-color: var(--auth-bg);
  border-color: color-mix(in srgb, var(--auth-primary) 60%, var(--auth-bg));
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--auth-primary) 25%, transparent);
}

.auth-page .form-control.is-invalid {
  padding-right: 16px;
  background-image: none;
  border-color: var(--auth-danger);
}

/* Keep autofilled fields dark. */
.auth-page .form-control:-webkit-autofill {
  -webkit-text-fill-color: var(--auth-text);
  caret-color: var(--auth-text);
  box-shadow: 0 0 0 1000px var(--auth-bg) inset;
}

.auth-page .invalid-feedback {
  display: block;
  margin-top: .25rem;
  font-size: 12px;
  color: var(--auth-danger);
}

.auth-password {
  position: relative;
}

.auth-password .form-control,
.auth-password .form-control.is-invalid {
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 40px;
  padding: 0;
  color: var(--auth-muted);
  background: transparent;
  border: 0;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: var(--auth-text);
  outline: 0;
}

.auth-check {
  position: relative;
  min-height: 20px;
  margin-bottom: .75rem;
  padding-left: 32px;
}

.auth-check input {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  background: var(--auth-bg) no-repeat center / 14px;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
}

.auth-check input:checked {
  background-color: var(--auth-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8.5l3 3l5-6'/%3e%3c/svg%3e");
  border-color: var(--auth-primary);
}

.auth-check input:focus {
  outline: 0;
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--auth-primary) 25%, transparent);
}

.auth-page .auth-check label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.auth-footer {
  margin-top: 2rem;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  height: 40px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #f9fafb;
  background-color: var(--auth-primary);
  border: 1px solid transparent;
  border-radius: 6px;
}

.auth-submit:hover,
.auth-submit:focus {
  color: #fff;
  background-color: color-mix(in srgb, var(--auth-primary) 85%, #000);
}

.auth-submit:focus {
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--auth-primary) 25%, transparent);
}

.auth-cover {
  position: absolute;
  inset: 0;
  background: #fff no-repeat center / cover;
}

.auth-cover-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0 2rem 1.5rem 0;
  color: #fff;
}

.auth-cover-caption h1 {
  margin: 0 0 .25rem;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #fff;
}

.auth-cover-caption p {
  margin: 0 0 1rem;
}
