/**
 * Auth Pages Stylesheet
 * PRIVATE.ME Authentication (Login & Signup)
 *
 * Brand Colors:
 * - Green: #10B981 (primary)
 * - Dark Background: #080C15
 * - Card Background: #0D1320
 * - Border: #1E2A3A
 * - Text: #F9FAFB
 * - Muted Text: #9CA3AF
 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #080C15;
  color: #F9FAFB;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.logo-text {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.logo-text .private {
  color: #F9FAFB;
}

.logo-text .me {
  font-weight: 400;
  color: #9CA3AF;
}

/* Auth Card */
.auth-card {
  background: #0D1320;
  border: 1px solid #1E2A3A;
  border-radius: 16px;
  padding: 40px 32px;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #F9FAFB;
  margin-bottom: 24px;
  text-align: center;
}

/* Form */
.auth-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1E2A3A;
  border-radius: 8px;
  color: #F9FAFB;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s;
}

.form-input::placeholder {
  color: #6B7280;
}

.form-input:focus {
  outline: none;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.05);
}

.form-input:hover:not(:focus) {
  border-color: #2A3A4A;
}

.form-input[aria-invalid="true"] {
  border-color: #EF4444;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.error-message {
  color: #EF4444;
  font-size: 13px;
  margin-top: 6px;
}

.help-text {
  font-size: 14px;
  color: #9CA3AF;
  margin-bottom: 20px;
  text-align: center;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary {
  background: #10B981;
  color: #080C15;
}

.btn-primary:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: rgba(16, 185, 129, 0.3);
  cursor: not-allowed;
}

.btn-primary.loading {
  opacity: 0.8;
}

.btn-sso {
  background: rgba(255, 255, 255, 0.03);
  color: #F9FAFB;
  border: 1px solid #1E2A3A;
  margin-bottom: 12px;
}

.btn-sso:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #2A3A4A;
  transform: translateY(-1px);
}

.btn-sso:active {
  transform: translateY(0);
}

.btn-sso svg {
  flex-shrink: 0;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: #6B7280;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #1E2A3A;
}

.divider:not(:empty)::before {
  margin-right: 16px;
}

.divider:not(:empty)::after {
  margin-left: 16px;
}

/* SSO Buttons */
.sso-buttons {
  margin-bottom: 24px;
}

/* Footer Link */
.footer-link {
  text-align: center;
  font-size: 14px;
  color: #9CA3AF;
  margin-top: 24px;
}

.footer-link a {
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
}

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

/* Messages */
#message-container {
  margin-bottom: 20px;
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.message a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.message a:hover {
  opacity: 0.9;
}

.message-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.message-error {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
