/**
 * public/css/auth.css — Shared styles for all auth pages
 * Deep Navy #0F172A, Vibrant Teal #14B8A6, Slate Gray #64748B, Background #F8FAFC
 */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #F8FAFC;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #1E293B;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.10);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #0F172A;
  border-radius: 12px;
  margin: 0 auto 12px;
}

.logo-mark svg { width: 28px; height: 28px; display: block; }

.auth-logo h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
}

.auth-logo p {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 24px;
  text-align: center;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #ffffff;
  color: #0F172A;
}

.form-group input::placeholder { color: #94A3B8; }

.form-group input:focus,
.form-group select:focus {
  border-color: #14B8A6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.forgot-link {
  display: inline-block;
  font-size: 13px;
  color: #14B8A6;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover { text-decoration: underline; }

.btn-primary {
  width: 100%;
  padding: 12px;
  background: #14B8A6;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-primary:hover { background: #0D9488; }
.btn-primary:active { background: #0F766E; transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #0F172A;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-secondary:hover { background: #F8FAFC; border-color: #94A3B8; }
.btn-secondary:active { transform: scale(0.99); }

.error-msg {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.error-msg::before {
  content: '⚠';
  font-size: 16px;
  flex-shrink: 0;
  line-height: 20px;
}

.success-msg {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.success-msg::before {
  content: '✓';
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #94A3B8;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #64748B;
}

.auth-footer a {
  color: #14B8A6;
  text-decoration: none;
  font-weight: 600;
}

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

/* Role selector in registration */
.role-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.role-option {
  flex: 1;
  position: relative;
}

.role-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-option label {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: #64748B;
}

.role-option input:checked + label {
  border-color: #14B8A6;
  background: rgba(20, 184, 166, 0.08);
  color: #14B8A6;
}

/* Spinner for submit buttons */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-title { font-size: 18px; }
}