/* Auth page styles (login) */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1F2A38;
  padding: 1rem;
}

.auth-card {
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
}

.auth-card > a:first-child {
  display: block;
  background: #1F2A38;
  text-align: center;
  padding: 1rem 1rem 0.7rem 1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-logo {
  display: inline-block;
  width: min(86%, 320px);
  height: auto;
  margin: 0;
}

.auth-body {
  background: var(--color-card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--color-text);
}

.auth-card .auth-subtitle {
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin: 0 0 1.5rem 0;
}

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

.auth-form .form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.auth-form .form-field input,
.auth-form .form-field select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: white;
}

.auth-form .form-field input:focus,
.auth-form .form-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.auth-form .btn-login {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
}

.auth-form .btn-login:hover {
  background: #2563eb;
}

.auth-form .btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-error {
  background: #fef2f2;
  color: var(--color-danger);
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-error.visible {
  display: block;
}

.auth-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-info.visible {
  display: block;
}

.auth-success {
  background: #f0fdf4;
  color: var(--color-success);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-success.visible {
  display: block;
}

.auth-links {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--color-primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin: 1.25rem 0 0 0;
}

.auth-register-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-register-link:hover {
  text-decoration: underline;
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

.auth-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-warning.visible {
  display: block;
  animation: warningBlink 0.4s ease-in-out 3;
}

@keyframes warningBlink {
  0%, 100% { background: #fffbeb; border-color: #fcd34d; }
  50% { background: #fef3c7; border-color: #f59e0b; }
}

/* Updates link under title */
.updates-link {
  text-align: center;
  margin: -0.1rem 0 0.25rem 0;
}

.updates-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.7rem;
}

.updates-link a:hover {
  text-decoration: underline;
}

/* Updates popup overlay */
.updates-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.updates-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 380px;
  margin: 1rem;
}

.updates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.updates-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text-light);
  padding: 0 0.25rem;
  line-height: 1;
}

.updates-close:hover {
  color: var(--color-text);
}

.updates-body {
  padding: 0.75rem 1rem;
}

.updates-entry {
  font-size: 0.8rem;
  color: var(--color-text);
  line-height: 1.5;
}

.updates-date {
  color: var(--color-text-light);
}
