/* =============================================
   AUTH PAGES — Login & Sign Up
   ============================================= */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg-color);
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card-wide { max-width: 760px; }

/* Header gradient strip */
.auth-header {
  background: var(--primary-gradient);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  color: #fff;
}
.auth-logo { font-size: 2.5rem; line-height: 1; margin-bottom: 0.75rem; }
.auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
}
.auth-subtitle { font-size: 0.9375rem; color: rgba(255,255,255,0.78); margin: 0; }

/* Form body */
.auth-form { padding: 2rem; display: flex; flex-direction: column; gap: 0; }

/* Two-column grid (sign up) */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Field */
.auth-field { display: flex; flex-direction: column; }
.auth-field-full { grid-column: 1 / -1; }

.auth-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.auth-required {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: none;
  letter-spacing: 0;
}

/* Icon input group */
.auth-input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input-group:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3.5px rgba(59,130,246,0.13);
}

.auth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.875rem;
  flex-shrink: 0;
  font-size: 1rem;
  border-right: 1.5px solid var(--border-color);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  transition: border-color 0.15s;
}
.auth-icon-blue   { background: linear-gradient(135deg,#eff6ff,#dbeafe); }
.auth-icon-violet { background: linear-gradient(135deg,#f5f3ff,#ede9fe); }
.auth-icon-red    { background: linear-gradient(135deg,#fff1f2,#ffe4e6); }
.auth-icon-green  { background: linear-gradient(135deg,#f0fdf4,#dcfce7); }
.auth-input-group:focus-within .auth-icon { border-right-color: var(--primary-light); }

/* Inputs inside the group */
.auth-input-group input,
.auth-input-group select,
.auth-input-group .form-control {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.8125rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-main);
  background: transparent;
  margin: 0;
  font-family: inherit;
}

/* Select arrow */
.auth-input-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ID card dropzone */
.auth-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2rem 1.5rem;
  border: 2.5px dashed var(--border-color);
  border-radius: var(--radius-xl);
  background: var(--bg-color);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.auth-dropzone:hover {
  border-color: var(--primary-light);
  background: rgba(59,130,246,0.04);
  box-shadow: 0 4px 20px rgba(59,130,246,0.08);
}
.auth-dropzone-icon  { font-size: 2.5rem; line-height: 1; }
.auth-dropzone-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-main); margin-top: 0.25rem; }
.auth-dropzone-sub   { font-size: 0.8rem; color: var(--text-muted); }
.auth-dropzone-btn {
  margin-top: 0.625rem;
  padding: 0.45rem 1.4rem;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  pointer-events: none;
}

/* Messages */
.auth-error { color: var(--danger); font-size: 0.73rem; margin-top: 0.3rem; }
.auth-help  { color: var(--text-muted); font-size: 0.73rem; margin-top: 0.3rem; line-height: 1.4; }
.auth-alert {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.875rem 1rem;
  margin: 0 2rem 1.25rem;
  border-radius: var(--radius-md);
}

/* Submit */
.auth-submit {
  width: 100%;
  padding: 0.9375rem;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Footer */
.auth-footer {
  text-align: center;
  padding: 1.25rem 2rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}
.auth-footer a { color: var(--primary-light); font-weight: 700; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 600px) {
  .auth-grid   { grid-template-columns: 1fr; }
  .auth-form   { padding: 1.5rem; }
  .auth-header { padding: 1.75rem 1.5rem 1.5rem; }
  .auth-alert  { margin: 0 1.5rem 1rem; }
  .auth-footer { padding: 1rem 1.5rem 1.25rem; }
}
