/* Auth pages — Apex Insights */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.25rem 2rem;
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(160deg, rgba(14, 16, 24, 0.95), rgba(20, 24, 36, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.auth-card-wide {
  max-width: 520px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  display: none;
}

.auth-error.show {
  display: block;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 600;
}

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

.account-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr 1.4fr;
  }
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  color: var(--text-muted);
}

.profile-value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.status-badge.reviewed {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.admin-layout .status-badge.completed {
  background: #dcfce7;
  color: #15803d;
}

.admin-layout .avatar-crop-stage {
  background: #e2e8f0;
}

.brief-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-page-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 900px;
}

.profile-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

.profile-avatar-sm {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(59, 130, 246, 0.4);
  flex-shrink: 0;
  display: block;
}

.nav-avatar-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-avatar-wrap img.profile-avatar-sm {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

.profile-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(34, 211, 238, 0.2));
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
}

.profile-avatar-sm.profile-avatar-fallback {
  font-size: 0.75rem;
}

.profile-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-photo-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Avatar crop modal */
.avatar-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-crop-overlay.open {
  opacity: 1;
}

.avatar-crop-dialog {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(160deg, rgba(14, 16, 24, 0.98), rgba(20, 24, 36, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.avatar-crop-header {
  text-align: center;
  margin-bottom: 1rem;
}

.avatar-crop-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.avatar-crop-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.avatar-crop-stage {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: #0a0a10;
  border: 1px solid var(--border);
}

.avatar-crop-stage:active {
  cursor: grabbing;
}

.avatar-crop-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-crop-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(96, 165, 250, 0.85);
  pointer-events: none;
}

.avatar-crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.avatar-crop-zoom-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.avatar-crop-zoom {
  flex: 1;
  accent-color: var(--accent);
}

.avatar-crop-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
