/* Answer Index Client Portal & Platform Onboarding Modal */
:root {
  --portal-bg: #0c1222;
  --portal-card-bg: rgba(15, 23, 42, 0.95);
  --portal-border: rgba(255, 255, 255, 0.12);
  --portal-cobalt: #3a57fc;
  --portal-cobalt-hover: #2944e8;
  --portal-lime: #a7c75d;
  --portal-lime-dark: #3f5518;
  --portal-text: #f8fafc;
  --portal-text-muted: #94a3b8;
}

/* Nav Portal Button */
.btn-client-portal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(58, 87, 252, 0.15);
  border: 1px solid rgba(58, 87, 252, 0.4);
  color: #60a5fa;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-client-portal:hover {
  background: rgba(58, 87, 252, 0.28);
  border-color: #60a5fa;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(58, 87, 252, 0.3);
}

/* Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(58, 87, 252, 0.2);
  color: #f8fafc;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
  position: relative;
}

.auth-modal-overlay.active .auth-modal-card {
  transform: scale(1) translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Modal Header */
.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(167, 199, 93, 0.15);
  border: 1px solid rgba(167, 199, 93, 0.4);
  color: #a7c75d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.85rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.45;
  max-width: 480px;
  margin: 0 auto;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  gap: 0.35rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
}

.auth-tab-btn.active {
  background: var(--portal-cobalt);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(58, 87, 252, 0.35);
}

/* Forms */
.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.form-label span.req {
  color: #f43f5e;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: rgba(0, 0, 0, 0.6);
}

.form-input::placeholder {
  color: #64748b;
}

/* Platform Selector Cards (Item 2) */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 500px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
}

.platform-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.platform-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

.platform-card.selected {
  background: rgba(58, 87, 252, 0.12);
  border-color: #3a57fc;
  box-shadow: 0 0 14px rgba(58, 87, 252, 0.25);
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-icon-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
}

.platform-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-card.selected .platform-radio {
  border-color: #38bdf8;
  background: #38bdf8;
}

.platform-card.selected .platform-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #0f172a;
  border-radius: 50%;
}

.platform-desc {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Submit Button */
.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #3a57fc 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(58, 87, 252, 0.4);
  font-family: inherit;
  margin-top: 0.5rem;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #2944e8 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(58, 87, 252, 0.5);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Demo Logins Box */
.demo-logins-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.25rem;
}

.demo-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-pills {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.demo-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-family: inherit;
  text-align: left;
}

.demo-pill-btn:hover {
  background: rgba(58, 87, 252, 0.15);
  border-color: rgba(58, 87, 252, 0.4);
  color: #ffffff;
}

.demo-pill-platform {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.demo-pill-email {
  color: #64748b;
  font-family: monospace;
  font-size: 0.72rem;
}

/* Messages */
.auth-msg {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-top: 0.85rem;
  display: none;
  line-height: 1.4;
}

.auth-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-msg.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.auth-safeguard-note {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  margin-top: 1rem;
  line-height: 1.4;
}
