/*
 * Shared styles for public auth pages (login, register, passwords, 2FA).
 * No Bootstrap / Inspinia — loaded with Tailwind via layouts/auth.
 */

html {
  font-size: 16px;
  --font-geist-sans: "Geist", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-geist-sans);
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  margin: 0;
}

a {
  text-decoration: none;
}

a:hover,
a:focus {
  color: inherit;
}

.auth-login-logo {
  width: 220px;
  height: auto;
  display: block;
}

.auth-title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: #111827;
}

.auth-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #374151;
}

/* Card: border-gray-200, no shadow */
.auth-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: none;
  background-color: #ffffff;
}

.auth-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #111827;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
  opacity: 1;
}

.auth-input:focus {
  border-color: #e62b4d;
  box-shadow: 0 0 0 1px #e62b4d;
  outline: none;
}

.auth-submit {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
  background-color: #db1546;
  border: none;
  border-radius: 0.375rem;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.auth-submit:hover {
  background-color: #b80e39;
}

.auth-submit:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #e62b4d;
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #fca5a5;
  border-radius: 0.375rem;
  background-color: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}

.auth-alert-success {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #86efac;
  border-radius: 0.375rem;
  background-color: #f0fdf4;
  color: #166534;
  font-size: 0.875rem;
}

.auth-hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: #6b7280;
}

.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.auth-checkbox {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  accent-color: #db1546;
  cursor: pointer;
}

.auth-checkbox-label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.375rem;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
}

.auth-inline-link {
  color: #db1546;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-inline-link:hover,
.auth-inline-link:focus {
  color: #b80e39;
}

/* Signpost for misdirected arrivals (legacy HA/client links to /login) */
.auth-signpost {
  padding: 1.25rem 1.25rem 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #f9fafb;
}

.auth-signpost-intro {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
}

.auth-signpost-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-signpost-list > li + li {
  margin-top: 0.5rem;
}

.auth-signpost-link {
  display: block;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #ffffff;
  color: #111827;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-signpost-link:hover,
.auth-signpost-link:focus {
  border-color: #db1546;
  background-color: #fff5f7;
  color: #111827;
  outline: none;
}

.auth-signpost-link:focus-visible {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #e62b4d;
}

.auth-signpost-link-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.375rem;
  color: #db1546;
}

.auth-signpost-link:hover .auth-signpost-link-title,
.auth-signpost-link:focus .auth-signpost-link-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-signpost-link-desc {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 400;
  color: #6b7280;
}
.text-center {
  text-align: center;
}
.font-bold {
  font-weight: 700;
}
.alert-success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.text-danger {
  color: #ed5565;
}
.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

#loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
}

#loader-overlay .auth-loader {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #db1546;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}
