/* ============================================================================
   Auth-family stylesheet — error pages (400/403/404/500), login, maintenance.
   Linked only from layouts/auth_base.html. Deliberately separate from
   evergreen.css: these pages never load evergreen.css (which carries global
   body/typography rules meant for the dashboard shell), so keeping this
   family isolated avoids repainting them.
   ============================================================================ */

/* Page reset — extracted from accounts/login.html */
html, body {
  height: 100%;
  margin: 0;
}

/* Loading overlay — extracted from layouts/auth_base.html */
#loading-overlay2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  visibility: hidden;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid var(--eg-brand);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Error cards (400.html, 403.html, 404.html, 500.html, maintenance.html) ----------
   Deduplicated: these 5 templates each carried a near-identical copy of this
   rule set. Union of every selector any of them used. */
.error-card {
  background: var(--eg-card);
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.12);
  padding: 48px 44px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.error-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 22px;
}

.error-icon-neutral { background: var(--eg-pos-bg); color: var(--eg-brand); }
.error-icon-danger { background: var(--eg-neg-bg); color: var(--eg-neg); }

.error-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--eg-ink);
  margin-bottom: 10px;
}

.error-subtitle {
  font-size: 15px;
  color: var(--eg-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

/* maintenance.html's subtitle sits above a status pill, so it originally
   carried a smaller bottom margin (24px vs. 30px everywhere else). */
.error-page--maintenance .error-subtitle {
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.error-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--eg-brand);
  color: #fff;
  padding: 12px 30px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.error-btn-primary:hover {
  background: var(--eg-brand-active);
  color: #fff;
  transform: translateY(-2px);
}

.error-btn-secondary {
  color: var(--eg-brand);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.error-btn-secondary:hover { text-decoration: underline; }

.error-footer-text {
  margin-top: 26px;
  font-size: 13px;
  color: var(--eg-muted);
}

.error-footer-text a { color: var(--eg-brand); text-decoration: none; }
.error-footer-text a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .error-card { padding: 36px 24px; }
}

/* ---------- Maintenance-only status pill ---------- */
.error-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--eg-pos-bg);
  color: var(--eg-brand);
  padding: 8px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 30px;
}

.error-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eg-brand);
  animation: errorBlink 1.5s ease-in-out infinite;
}

@keyframes errorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Login form (accounts/login.html) ---------- */
.big-checkbox {
  width: 20px;
  height: 20px;
}

.form-check-label.fw-bold {
  font-weight: bold;
  font-size: 16px;
  margin-left: 5px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--eg-ink);
}

input[type="text"], input[type="password"], input[type="email"] {
  width: 100%;
  padding: 10px 40px 10px 10px;
  border: 1px solid var(--eg-border);
  border-radius: 30px;
  outline: none;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  border-color: var(--eg-brand);
  box-shadow: 0 0 5px rgba(22, 68, 44, 0.5);
}

/* Default unchecked border */
.icheck-success > input:first-child + label::before {
  border-color: var(--eg-brand);
}

/* Focus on input (keyboard tab or click) */
.icheck-success > input:first-child:focus + label::before {
  border-color: var(--eg-brand);
  box-shadow: 0 0 0 3px rgba(22, 68, 44, 0.25);
}

/* Checked state */
.icheck-success > input:first-child:checked + label::before {
  background-color: var(--eg-brand);
  border-color: var(--eg-brand);
}

/* Hover on checkbox area */
.icheck-success > input:first-child + label::before {
  border-color: var(--eg-brand) !important;
}

.icheck-success label {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.icheck-success > input:first-child + label::before {
  transform: scale(0.8);
  margin-right: 6px;
}
