/* ==========================================================================
   THE SOFTWARE SWITCHER’S BLUEPRINT - AUTHENTICATION & ADMIN UI
   ========================================================================== */

:root {
  --auth-navy: #0a0f1d;
  --auth-slate: #0f172a;
  --auth-card-bg: #ffffff;
  --auth-blue: #2563eb;
  --auth-blue-hover: #1d4ed8;
  --auth-cyan: #00f0ff;
  --auth-emerald: #10b981;
  --auth-border: #e2e8f0;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
}

/* --------------------------------------------------------------------------
   Top Sticky Auth Navigation Bar
   -------------------------------------------------------------------------- */
#app-auth-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
  text-decoration: none;
}

.auth-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.auth-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 14px;
}

@media (max-width: 768px) {
  .auth-nav-links {
    display: none;
  }
}

.auth-nav-link {
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.auth-nav-link:hover {
  color: #2563eb;
  background: #f1f5f9;
}

.auth-brand span {
  display: inline-block;
}

@media (max-width: 640px) {
  .auth-brand span {
    display: none;
  }
}

.auth-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* User Badge in Bar */
.auth-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 12px 4px 6px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-user-pill:hover {
  background: #e2e8f0;
}

.auth-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-role-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-role-student {
  background: #e0f2fe;
  color: #0369a1;
}

.auth-role-professional {
  background: #dcfce7;
  color: #15803d;
}

.auth-role-switcher {
  background: #fef3c7;
  color: #b45309;
}

/* Action Buttons in Auth Bar */
.btn-auth-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-auth-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-auth-primary:hover {
  background: #1d4ed8;
}

.btn-auth-admin {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.btn-auth-admin:hover {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  transform: translateY(-1px);
}

.btn-auth-signout {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.btn-auth-signout:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* --------------------------------------------------------------------------
   Adjust Docsify layout for sticky auth bar
   -------------------------------------------------------------------------- */
body {
  padding-top: 52px !important;
}

.sidebar {
  top: 52px !important;
  height: calc(100vh - 52px) !important;
}

/* --------------------------------------------------------------------------
   Content Lock Gate (Overlay)
   -------------------------------------------------------------------------- */
#content-auth-gate {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#content-auth-gate.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.auth-gate-card {
  max-width: 520px;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.auth-gate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #00f0ff, #10b981);
}

.auth-gate-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.auth-gate-icon img {
  width: 48px;
  height: 48px;
}

.auth-gate-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-gate-subtitle {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 24px;
  line-height: 1.55;
}

.auth-gate-features {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.auth-gate-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #334155;
  margin: 6px 0;
}

.auth-gate-feature-item span.icon {
  font-size: 1.1rem;
}

/* Google Sign In Button */
.btn-google-signin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google-signin:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn-google-signin svg {
  width: 22px;
  height: 22px;
}

.auth-gate-footer {
  margin-top: 18px;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Modal Backdrop & Containers (Registration & Admin)
   -------------------------------------------------------------------------- */
.blueprint-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.blueprint-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.blueprint-modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blueprint-modal-lg {
  max-width: 1100px;
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-header-content h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-header-content p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Registration Form Controls
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.form-label .required {
  color: #ef4444;
  margin-left: 2px;
}

.form-label .optional {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.78rem;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control[readonly] {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

/* User Type Pills Selector */
.user-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.user-type-btn {
  padding: 12px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.user-type-btn span.emoji {
  font-size: 1.3rem;
}

.user-type-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.user-type-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

/* Social Inputs Grid */
.social-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .user-type-selector {
    grid-template-columns: 1fr;
  }
  .social-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon span.prefix-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  color: #64748b;
}

.input-with-icon input {
  padding-left: 38px;
}

/* --------------------------------------------------------------------------
   Admin Dashboard Styling
   -------------------------------------------------------------------------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
}

.admin-stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.admin-stat-card .stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-search-box {
  flex: 1;
  min-width: 240px;
}

.admin-filter-group {
  display: flex;
  gap: 8px;
}

/* Admin Users Table */
.admin-table-container {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  max-height: 520px;
  background: #ffffff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #f8fafc;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-user-info .name {
  font-weight: 700;
  color: #0f172a;
}

.admin-user-info .email {
  font-size: 0.78rem;
  color: #64748b;
}

/* Social Links Badges */
.social-icons-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.social-badge:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.social-badge.linkedin:hover {
  background: #0077b5;
  color: #ffffff;
}

.social-badge.github:hover {
  background: #24292e;
  color: #ffffff;
}

.social-badge.twitter:hover {
  background: #000000;
  color: #ffffff;
}

.social-badge.instagram:hover {
  background: #e1306c;
  color: #ffffff;
}
