/* shared.css — base reset, typography, auth page styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page, #f0f2f5);
  color: var(--text-primary, #333);
  min-height: 100vh;
}

/* Auth card layout (login, register, reset, etc.) */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px;
}
.auth-card {
  background: var(--bg-card, #fff);
  border-radius: 12px; padding: 40px 36px;
  width: 100%; max-width: 440px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-logo {
  display: flex; justify-content: center; margin-bottom: 0;
}
.auth-logo img { height: 128px; }
.auth-title {
  text-align: center; margin-bottom: 2px; line-height: 1.1;
}
.auth-title .brand-near { font-size: 42px; font-weight: 700; color: #1a73e8; letter-spacing: -0.5px; }
.auth-title .brand-view { font-size: 42px; font-weight: 300; color: var(--text-primary, #333); letter-spacing: -0.5px; }
.auth-title .brand-prefix { font-size: 16px; font-weight: 500; color: var(--text-muted, #666); }
.auth-subtitle {
  font-size: 14px; color: var(--text-muted, #999); text-align: center;
  margin-bottom: 28px; letter-spacing: 1.5px; font-weight: 600;
}

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary, #555); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 14px; font-size: 15px;
  border: 1px solid var(--border, #ccc); border-radius: 6px;
  outline: none; font-family: 'DM Sans', sans-serif;
  background: var(--bg-input, #fff); color: var(--text-primary, #333);
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}
.form-input.error { border-color: #d93025; }
.form-hint {
  font-size: 12px; color: var(--text-muted, #999); margin-top: 4px;
}
.form-error {
  font-size: 12px; color: #d93025; margin-top: 4px;
}

/* Password field with toggle */
.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-muted, #999); font-size: 13px; font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}
.password-toggle:hover { color: var(--text-primary, #333); }

/* Password strength meter */
.strength-meter { height: 4px; border-radius: 2px; background: var(--border, #e0e0e0); margin-top: 6px; overflow: hidden; }
.strength-meter-fill { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.strength-meter-fill[data-score="0"] { width: 10%; background: #d93025; }
.strength-meter-fill[data-score="1"] { width: 25%; background: #ea8600; }
.strength-meter-fill[data-score="2"] { width: 50%; background: #f9ab00; }
.strength-meter-fill[data-score="3"] { width: 75%; background: #1e8e3e; }
.strength-meter-fill[data-score="4"] { width: 100%; background: #137333; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: background 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: #1a73e8; color: #fff; width: 100%; padding: 12px;
  font-size: 15px; margin-top: 6px;
}
.btn-primary:hover { background: #1557b0; }
.btn-primary:disabled { background: #94b8ed; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-input, #fff); color: var(--text-primary, #333);
  border: 1px solid var(--border, #ccc);
}
.btn-secondary:hover { background: var(--bg-page, #f0f2f5); }
.btn-danger { background: #d93025; color: #fff; }
.btn-danger:hover { background: #b3261e; }
.btn-link {
  background: none; border: none; color: #1a73e8; cursor: pointer;
  font-size: 13px; font-weight: 500; padding: 0;
  font-family: 'DM Sans', sans-serif; text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* Spinner */
@keyframes btn-spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: btn-spin 0.6s linear infinite;
  vertical-align: middle; margin-right: 6px;
}

/* Alert / error message boxes */
.alert {
  padding: 10px 14px; border-radius: 6px; font-size: 13px;
  margin-bottom: 18px;
}
.alert-error { background: #fce8e6; color: #d93025; }
.alert-success { background: #e6f4ea; color: #137333; }
.alert-info { background: #e8f0fe; color: #1a73e8; }
.alert-warning { background: #fef7e0; color: #ea8600; }

/* Checkbox */
.checkbox-group {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.checkbox-group input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: #1a73e8;
}
.checkbox-group label {
  font-size: 13px; color: var(--text-secondary, #555); cursor: pointer;
}

/* Links row */
.auth-links {
  text-align: center; margin-top: 20px; font-size: 13px;
  color: var(--text-muted, #999);
}
.auth-links a { color: #1a73e8; text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* OTP input */
.otp-input {
  width: 100%; text-align: center; font-size: 28px;
  letter-spacing: 12px; padding: 12px 16px;
}

/* Toast notifications */
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 280px;
  animation: toast-in 0.2s ease-out;
  display: flex; align-items: center; gap: 8px;
}
.toast-success { background: #1e8e3e; color: #fff; }
.toast-error { background: #d93025; color: #fff; }
.toast-close {
  margin-left: auto; background: none; border: none; color: inherit;
  cursor: pointer; font-size: 18px; line-height: 1; opacity: 0.7;
}
.toast-close:hover { opacity: 1; }
@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Status page (verify-email, pending-approval) */
.status-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }
.status-text { text-align: center; color: var(--text-secondary, #555); line-height: 1.6; font-size: 15px; }

/* Confirmation modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
}
.modal-card {
  background: var(--bg-card); border-radius: 12px; padding: 32px;
  max-width: 400px; width: 90%; box-shadow: var(--shadow);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.modal-body { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-error { color: var(--error); font-size: 13px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-title .brand-near, .auth-title .brand-view { font-size: 32px; }
}
