/* ============================================================
   CiCC Mail Hub — Auth Form Styles v1
   Self-contained: does NOT depend on theme CSS tokens.
   Branding: CiCC green #059669, navy #0D2B52, white canvas
   ============================================================ */

.cmh-auth-page {
  min-height: 100vh;
  background: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cmh-auth-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.06);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* Header: logo + tagline */
.cmh-auth-header {
  background: #0D2B52;
  color: #ffffff;
  padding: 32px 28px 28px;
  text-align: center;
}

.cmh-auth-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cmh-auth-logo .cmh-logo-dot {
  width: 8px;
  height: 8px;
  background: #00BCF2;
  border-radius: 50%;
  display: inline-block;
}

.cmh-auth-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #ffffff;
}

.cmh-auth-header .cmh-auth-header-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #ffffff;
}

.cmh-auth-header p {
  font-size: 13px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.cmh-auth-header .cmh-tagline {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #6474b8;
  margin-top: 10px;
}

/* Form body */
.cmh-auth-body {
  padding: 28px;
}

.cmh-auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cmh-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmh-auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;;
}

.cmh-auth-field input[type="email"],
.cmh-auth-field input[type="password"],
.cmh-auth-field input[type="text"],
.cmh-auth-field input[type="tel"] {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  color: #0f172a;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cmh-auth-field input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.cmh-auth-field input::placeholder {
  color: #94a3b8;
}

.cmh-auth-field .required {
  color: #ef4444;
}

.cmh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.cmh-btn--primary {
  background: #059669;
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 10px;
  width: 100%;
}

.cmh-btn--primary:hover {
  background: #047857;
}

.cmh-btn--secondary {
  background: transparent;
  color: #059669;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.cmh-btn--secondary:hover {
  background: #f0fdf4;
}

/* Auth messages */
.cmh-auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.cmh-auth-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

/* Message (preferences) */
.cmh-auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.cmh-auth-message.cmh-auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.cmh-auth-message.cmh-auth-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Danger button */
.cmh-btn--danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 13px 24px;
  border-radius: 10px;
  width: auto;
}

.cmh-btn--danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Links */
.cmh-auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.cmh-auth-links a {
  color: #059669;
  text-decoration: none;
  font-weight: 500;
}

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

.cmh-auth-links .cmh-auth-secondary {
  color: #475569;
}

/* Divider */
.cmh-auth-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  font-size: 12px;
  color: #94a3b8;
}

.cmh-auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.cmh-auth-divider span {
  background: #ffffff;
  padding: 0 12px;
  position: relative;
}

/* Social login buttons */
.cmh-social-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d1d5db;
}

.cmh-social-google {
  background: #ffffff;
  color: #1f2937;
}

.cmh-social-google:hover {
  background: #f8fafc;
}

/* Preferences form */
.cmh-prefs-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
}

.cmh-prefs-wrap h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0D2B52;
  margin: 0 0 6px;
  text-align: center;
}

.cmh-prefs-wrap > p {
  font-size: 14px;
  color: #475569;
  text-align: center;
  margin: 0 0 20px;
}

.cmh-prefs-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cmh-prefs-options label.cmh-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s;
}

.cmh-prefs-options label.cmh-checkbox-label:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.cmh-prefs-options input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #059669;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .cmh-auth-card {
    border-radius: 12px;
    max-width: 100%;
  }
  .cmh-auth-header {
    padding: 26px 20px 22px;
  }
  .cmh-auth-body {
    padding: 24px;
  }
  .cmh-auth-links {
    flex-direction: column;
    gap: 6px;
  }
  .cmh-prefs-wrap {
    padding: 16px;
  }
  .cmh-prefs-options label.cmh-checkbox-label {
    padding: 10px 12px;
  }
}
