/* --------------------------------------------------------------------------
   FUTUURI AUTHENTICATION STYLES (login.css)
   Split-panel designs, animated overlays, form structures, and step transitions.
   -------------------------------------------------------------------------- */

/* Root and Base page states */
.auth-page-body {
  margin: 0;
  padding: 0;
  background-color: var(--futuuri-dark-950);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Split Screen Layout Wrapper */
.auth-split-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* LEFT PANEL - Brand and Graphic Illustration */
.auth-left-panel {
  display: none; /* Collapsed on mobile, expanded on 992px+ */
  position: relative;
  background-color: var(--futuuri-dark-900);
  background-image: radial-gradient(circle at 30% 30%, rgba(30, 143, 255, 0.15) 0%, transparent 60%);
  width: 50%;
  padding: 4rem;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.auth-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.left-panel-content {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.left-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.left-brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
}

.left-hero-text {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 480px;
}

.left-title {
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.left-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #94A3B8;
}

/* Dynamic ticker status panel to wow the user */
.left-ticker-panel {
  width: 100%;
  max-width: 440px;
  background: rgba(10, 22, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(12px);
}

.ticker-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ticker-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6875rem; /* 11px */
  color: var(--ai-accent);
  letter-spacing: 0.08em;
}

.ticker-content {
  font-family: var(--font-mono);
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: #E2E8F0;
}

.ticker-line {
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* RIGHT PANEL - Authentication card container */
.auth-right-panel {
  width: 100%;
  background-color: var(--futuuri-dark-950);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

@media (min-width: 992px) {
  .auth-left-panel { display: flex; }
  .auth-right-panel { width: 50%; }
}

.auth-card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  min-height: 520px;
}

/* Auth Cards States CSS Transitions */
.auth-state-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-state-card.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Card Headers */
.card-logo-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.auth-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
}

.card-icon-header {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem auto;
}

.bg-yellow-tint {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.auth-card-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.auth-card-subtitle {
  font-size: var(--fs-body);
  color: #94A3B8;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Forms System styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.auth-input-group label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-label);
  color: #94A3B8;
  letter-spacing: 0.02em;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-input-group input, 
.auth-input-group select, 
.search-input-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  transition: all var(--transition-fast);
}

.auth-input-group input:focus, 
.auth-input-group select:focus, 
.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--futuuri-blue-500);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(30, 143, 255, 0.15);
}

.auth-input-group select option {
  background-color: var(--futuuri-dark-900);
  color: #FFFFFF;
}

.input-readonly {
  background-color: rgba(255, 255, 255, 0.01) !important;
  color: #64748B !important;
  border-color: rgba(255, 255, 255, 0.03) !important;
  cursor: not-allowed;
}

/* Links */
.auth-card-link {
  font-family: var(--font-display);
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--futuuri-blue-400);
}

.auth-card-link:hover {
  color: #FFFFFF;
}

/* Submit & Redirect Buttons */
.auth-submit-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: var(--fs-body-lg);
  margin-top: 0.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #475569;
}

.auth-divider::before, 
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  padding: 0 0.75rem;
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
  font-weight: 600;
}

.sso-auth-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: var(--fs-body);
  gap: 0.75rem;
}

.card-footer-text {
  text-align: center;
  font-size: var(--fs-body-sm);
  color: #64748B;
  margin-top: 2rem;
}

/* Back button */
.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: #64748B;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body-sm);
  cursor: pointer;
  margin-bottom: 2.5rem;
  transition: color var(--transition-fast);
  padding: 0;
}

.auth-back-btn:hover {
  color: #FFFFFF;
}

/* Search input for SSO redirection */
.sso-search-group {
  margin-bottom: 1rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper input {
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #64748B;
  pointer-events: none;
}

/* Institution/Hospital lists */
.institution-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding-right: 0.25rem;
}

.institution-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.institution-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.institution-item.selected {
  background: rgba(30, 143, 255, 0.08);
  border-color: var(--futuuri-blue-500);
}

.flag-icon {
  font-size: 1.25rem;
}

.inst-details {
  display: flex;
  flex-direction: column;
}

.inst-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  color: #FFFFFF;
}

.inst-domain {
  font-size: var(--fs-caption);
  color: #64748B;
}

.institution-item.selected .inst-domain {
  color: var(--futuuri-blue-400);
}

.active-border-pill {
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 3px;
  background-color: var(--futuuri-blue-500);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.institution-item.selected .active-border-pill {
  opacity: 1;
}

/* SAML SSO Loading spinner overlay inside card */
.sso-redirect-spinner {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
  text-align: center;
}

.sso-redirect-spinner.active {
  display: flex;
}

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(30, 143, 255, 0.1);
  border-top-color: var(--futuuri-blue-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.redirect-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body-sm);
  color: var(--futuuri-blue-400);
}

/* MFA OTP Box system */
.otp-inputs-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem 0;
}

.otp-box {
  width: 48px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition-fast);
}

.otp-box:focus {
  outline: none;
  border-color: var(--futuuri-blue-500);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(30, 143, 255, 0.15);
}

.mfa-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: var(--fs-body-sm);
}

.mfa-action-btn {
  background: none;
  border: none;
  color: var(--futuuri-blue-400);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.mfa-action-btn:hover {
  color: #FFFFFF;
}

.mfa-timer-countdown {
  color: #64748B;
  font-family: var(--font-mono);
}

.btn-text-ghost {
  background: none;
  border: none;
  color: #64748B;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body-sm);
  cursor: pointer;
  text-align: center;
  width: 100%;
  margin-top: 2rem;
  transition: color var(--transition-fast);
}

.btn-text-ghost:hover {
  color: #FFFFFF;
}

/* Onboarding Card Steps */
.onboarding-card {
  max-width: 520px;
}

.onboarding-progress-header {
  position: relative;
  margin-bottom: 2.5rem;
  width: 100%;
}

.progress-bar-track {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  z-index: 1;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--ai-accent), var(--futuuri-blue-500));
  transition: width 0.4s ease;
}

.progress-steps-numbers {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  width: 100%;
}

.step-lbl {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--futuuri-dark-900);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  transition: all 0.3s ease;
}

.step-lbl.active {
  background-color: var(--futuuri-blue-500);
  border-color: var(--futuuri-blue-500);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(30, 143, 255, 0.4);
}

.step-lbl.complete {
  background-color: var(--normal);
  border-color: var(--normal);
  color: #FFFFFF;
}

.progress-step-title {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h4);
  color: #FFFFFF;
}

/* Onboarding Step Sections content containers */
.onboarding-step-section {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.onboarding-step-section.active {
  display: flex;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.w-70 { width: 70%; }
.w-30 { width: 30%; }

.onboarding-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.onboarding-actions-row button {
  flex: 1;
}

/* PACS Vendor selection grid */
.pacs-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pacs-logo-card {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pacs-logo-card:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.pacs-logo-card.active {
  background-color: rgba(30, 143, 255, 0.05);
  border-color: var(--futuuri-blue-500);
}

.pacs-card-icon {
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-label);
  color: #94A3B8;
}

.pacs-logo-card.active .pacs-card-icon {
  background-color: var(--futuuri-blue-500);
  color: #FFFFFF;
}

.pacs-logo-card span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-caption);
  color: #94A3B8;
}

.pacs-logo-card.active span {
  color: #FFFFFF;
}

.test-connection-status {
  text-align: center;
  font-size: var(--fs-body-sm);
  font-weight: 600;
}

.test-connection-status.success { color: var(--normal); }
.test-connection-status.error { color: var(--critical); }

/* Invite Rows inside Onboarding step 4 */
.section-guideline {
  font-size: var(--fs-body-sm);
  color: #94A3B8;
  line-height: 1.5;
}

.invite-rows-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 160px;
  overflow-y: auto;
}

.invite-row {
  display: flex;
  gap: 0.5rem;
}

.invite-email {
  flex: 1;
}

.invite-role {
  width: 140px;
}

/* Onboarding Step 5 Go Live Checklist */
.go-live-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.chk-box {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-body-sm);
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748B;
}

.checklist-item.checked .chk-box {
  background-color: var(--normal);
  border-color: var(--normal);
  color: #FFFFFF;
}

.checklist-item#chk-test-study.listening .chk-box {
  background-color: var(--futuuri-blue-500);
  border-color: var(--futuuri-blue-500);
  color: #FFFFFF;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(30, 143, 255, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(30, 143, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 143, 255, 0); }
}

.chk-details {
  display: flex;
  flex-direction: column;
}

.chk-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  color: #FFFFFF;
}

.chk-sub {
  font-size: var(--fs-caption);
  color: #64748B;
}

/* Toasts and Notifications */
.toast-notification-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background-color: var(--futuuri-dark-800);
  border-left: 4px solid var(--futuuri-blue-500);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
}

.toast.success { border-left-color: var(--normal); }
.toast.error { border-left-color: var(--critical); }
.toast.warning { border-left-color: var(--warning); }

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}
