/* ==========================================================================
   CREES Client Acquisition & Asset Portal — Login Stylesheet
   Backcover: Modern Luxury Architectural Calacatta Marble & Skyline
   ========================================================================== */

@import url('design-tokens.css');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--crees-slate-900);
  background-color: #0b1523;
  overflow: hidden;
}

/* Master Login Canvas */
.login-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  background-image: url('../artworks/login_backcover.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Ambient Vignette & Contrast Gradients */
.login-overlay-ambient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 40%, rgba(8, 18, 37, 0.2) 0%, rgba(8, 18, 37, 0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Top Floating Brand Navigation Bar */
.login-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.15rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.login-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  padding: 7px 16px;
  border-radius: 30px;
  color: #081225;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.login-back-btn:hover {
  background: #ffffff;
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  color: var(--crees-blue-600);
}

.login-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 18, 37, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 30px;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.75; }
}

/* Main Split View Container */
.login-stage-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1560px;
  height: 100vh;
  max-height: 100vh;
  margin: 0 auto;
  padding: 4.25rem 3rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Left Side: Live Looping FAQ Dialogue Showcase */
.login-stage-left {
  flex: 1;
  max-width: 500px;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 1.25rem;
  align-self: flex-end;
  position: relative;
  z-index: 10;
}

.login-faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  width: 100%;
}

.login-left-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.98);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crees-blue-600);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.faq-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0052cc;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.25);
  animation: pulseDot 2s infinite ease-in-out;
}

.faq-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Dialogue Bubble Stage */
.login-faq-stage {
  width: 100%;
  min-height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.faq-bubble {
  position: relative;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: translateY(0);
}

.faq-bubble.bubble-hidden {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.faq-sender-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.faq-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.owner-avatar {
  background: #e2e8f0;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
}

.crees-avatar {
  background: linear-gradient(135deg, #0052cc 0%, #0099ff 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.4);
}

.faq-sender-name {
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  display: block;
}

.faq-sender-tag {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  display: block;
}

.faq-sender-tag.expert-tag {
  color: #38bdf8;
}

/* Question Bubble (Frosted White Card) */
.faq-question-bubble {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 18px 18px 18px 4px;
  padding: 13px 18px;
  box-shadow: 0 10px 30px -5px rgba(8, 18, 37, 0.12);
  margin-bottom: 10px;
  width: 92%;
  align-self: flex-start;
}

.faq-question-bubble .faq-sender-name {
  color: #081225;
}

.faq-question-bubble .faq-bubble-text {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  font-weight: 600;
  font-style: italic;
}

/* Answer Bubble (Deep Navy Glass Card) */
.faq-answer-bubble {
  background: linear-gradient(135deg, rgba(8, 18, 37, 0.95) 0%, rgba(15, 34, 61, 0.97) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px 18px 4px 18px;
  padding: 14px 18px;
  box-shadow: 0 16px 40px -8px rgba(8, 18, 37, 0.35);
  width: 96%;
  align-self: flex-end;
  color: #ffffff;
}

.faq-answer-bubble .faq-sender-name {
  color: #ffffff;
}

.faq-answer-bubble .faq-bubble-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #e2e8f0;
  font-weight: 500;
}

/* Indicators */
.faq-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.85rem;
}

.faq-dot {
  width: 22px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-dot.active {
  width: 38px;
  background: #0052cc;
  box-shadow: 0 0 10px rgba(0, 82, 204, 0.5);
}

/* Right Side: Luxury Calacatta Glassmorphic Login Card */
.login-stage-right {
  width: 100%;
  max-width: 470px;
  display: flex;
  justify-content: center;
}

.login-glass-card {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 25px 60px -12px rgba(8, 18, 37, 0.22),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 2.25rem 2.25rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Card Header & Brand */
.login-card-header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.login-brand-video-box {
  display: inline-block;
  margin-bottom: 0.35rem;
  overflow: hidden;
}

.login-brand-video {
  height: 68px;
  width: auto;
  max-width: 155px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  mix-blend-mode: multiply;
}

.login-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #081225;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.login-card-sub {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
}

/* Role Selector Tabs */
.login-role-tabs {
  display: flex;
  background: #eef2f6;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.25rem;
  position: relative;
}

.role-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.role-tab-btn.active {
  background: #ffffff;
  color: var(--crees-blue-600);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.role-tab-btn:hover:not(.active) {
  color: #081225;
}

/* Form Groups */
.login-form-group {
  margin-bottom: 1rem;
}

.login-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  color: #081225;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  transition: all 0.2s ease;
  outline: none;
}

.login-input:focus {
  border-color: var(--crees-blue-600);
  box-shadow: 0 0 0 3.5px rgba(0, 82, 204, 0.15);
}

.login-input::placeholder {
  color: #94a3b8;
}

.login-password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.login-password-toggle:hover {
  color: var(--crees-blue-600);
}

/* Remember Me & Forgot Password Row */
.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 12px;
}

.login-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.login-checkbox {
  accent-color: var(--crees-blue-600);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.login-forgot-link {
  color: var(--crees-blue-600);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.login-forgot-link:hover {
  color: #0043a8;
  text-decoration: underline;
}

/* Submit Button */
.login-submit-btn {
  width: 100%;
  padding: 13px 22px;
  background: linear-gradient(90deg, #0052cc 0%, #0070f3 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 82, 204, 0.38);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 82, 204, 0.48);
}

.login-submit-btn:active {
  transform: translateY(0);
}

/* Footer / Fiduciary Badge */
.login-card-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .login-stage-container {
    flex-direction: column;
    padding-top: 6rem;
    gap: 2rem;
  }
  .login-stage-left {
    max-width: 100%;
    padding-right: 0;
    text-align: center;
    align-items: center;
  }
  .login-left-badge {
    align-self: center;
  }
  .login-telemetry-row {
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .login-stage-left {
    display: none;
  }
  .login-stage-container {
    justify-content: center;
    align-items: center;
    padding: 5.5rem 1.25rem 2rem;
  }
}

@media (max-width: 640px) {
  .login-topbar {
    padding: 1.25rem 1.5rem;
  }
  .login-stage-container {
    padding: 5rem 1.25rem 2rem;
  }
  .login-glass-card {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }
  .login-left-headline {
    font-size: 2rem;
  }
  .login-status-pill {
    display: none;
  }
}
