/* ==========================================================================
   Matrix OSINT — Light/Clean Enterprise Login Portal Stylesheet
   Theme: Pure White & Light Grey (Strictly no black/dark backgrounds)
   Palette:
     - Page Background: #F6F7F9 with faint dot grid
     - Left Panel: #EEF0F4 (border: #E1E5EC)
     - Right Panel Card: #FFFFFF
     - Borders: #E1E5EC / #D9DEE7 (0.5-1px)
     - Text Primary: #111827 / #374151
     - Text Muted: #6B7280
     - Accent Blue: #2F6FED
     - Alert Red: #DC2626 (flagged posts & rule alerts)
     - Live Green: #16A34A (operational status & live tags)
     - Primary Button: Dark Slate #1F2937 (Hover #2F6FED, Success #16A34A)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base & Reset for Login Screen
   -------------------------------------------------------------------------- */
body:has(#view-login:not(.hidden)) .app-header,
body.is-login-screen .app-header,
body.is-login-screen .app-sidebar,
body.is-login-screen .app-topbar,
body.is-login-screen .sidebar-backdrop,
.app-header.hidden {
  display: none !important;
}

body.is-login-screen {
  background-color: #F6F7F9 !important;
  color: #111827 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-y: auto;
}

/* Viewport Outer Container with Faint Dot Grid Pattern */
.login-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background-color: #F6F7F9;
  background-image: radial-gradient(#CBD5E1 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  box-sizing: border-box;
}

/* Central Two-Panel Shell Card */
.login-shell {
  width: 100%;
  max-width: 1040px;
  background: #FFFFFF;
  border: 1px solid #E1E5EC;
  border-radius: 14px;
  box-shadow: 0 10px 30px -5px rgba(17, 24, 39, 0.05), 0 4px 12px -2px rgba(17, 24, 39, 0.03);
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Card Shake Animation for Authentication Failure */
.login-shell.shake-card {
  animation: shakeLoginCard 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeLoginCard {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-7px); }
  30%, 60%, 90% { transform: translateX(7px); }
}

/* --------------------------------------------------------------------------
   2. LEFT PANEL — Live Profile Monitoring Visual (~55%)
   -------------------------------------------------------------------------- */
.login-left-panel {
  background-color: #EEF0F4;
  padding: 32px 28px;
  border-right: 1px solid #E1E5EC;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
}

.login-demo-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Decorative Link Graph Container (active when LOGIN_SHOW_DEMO_FEED=false) */
.login-graph-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #E1E5EC;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  min-height: 400px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

.graph-container-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}

.graph-intel-badge {
  font-size: 11px;
  font-weight: 700;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}

.graph-live-indicator {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: 999px;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  animation: pulseStatusDot 1.8s infinite ease-in-out;
}

.login-network-canvas {
  width: 100%;
  height: 290px;
  border-radius: 8px;
  background: radial-gradient(circle at center, #F8FAFC 0%, #FFFFFF 100%);
  display: block;
}

.graph-stats-footer {
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
  margin-top: 8px;
}

.graph-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.graph-stat-item .stat-label {
  font-size: 10px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-family: 'JetBrains Mono', monospace;
}

.graph-stat-item .stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 1px;
}

/* Header: Logo, Brand Text, and Dynamic System Status Pill */
.monitor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monitor-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.monitor-logo-box {
  width: 38px;
  height: 38px;
  background: #FFFFFF;
  border: 1px solid #E1E5EC;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
  flex-shrink: 0;
}

.monitor-real-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.monitor-brand-text {
  display: flex;
  flex-direction: column;
}

.monitor-brand-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.monitor-brand-subtitle {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

/* Dynamic System Status Pill */
.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.system-status-pill.status-degraded {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

.system-status-pill.status-offline {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.dot-green {
  background-color: #16A34A;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
  animation: pulseStatusDot 2s infinite ease-in-out;
}

.status-dot.dot-amber {
  background-color: #D97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
  animation: pulseStatusDot 2s infinite ease-in-out;
}

.status-dot.dot-red {
  background-color: #DC2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

@keyframes pulseStatusDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   3. Tracked-Profile Spotlight Card (8s Cross-fade cycle)
   -------------------------------------------------------------------------- */
.profile-spotlight-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E1E5EC;
  border-radius: 12px;
  padding: 16px 18px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-spotlight-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.profile-spotlight-inner.cross-fading {
  opacity: 0;
  transform: translateY(-4px);
}

/* Sweeping Radar Scan Line */
.profile-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(47, 111, 237, 0.7) 50%, transparent 100%);
  pointer-events: none;
  animation: sweepScanLine 3.4s ease-in-out infinite;
}

@keyframes sweepScanLine {
  0% { top: 0%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.profile-main-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.profile-avatar-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.avatar-amber {
  background: #FEF3C7;
  color: #D97706;
  border-color: #FDE68A;
}

.avatar-blue {
  background: #DBEAFE;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.avatar-emerald {
  background: #D1FAE5;
  color: #059669;
  border-color: #A7F3D0;
}

.profile-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-handle-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.profile-handle {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.1px;
}

.profile-platform-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  background: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
  line-height: 1.2;
}

.profile-stats-row {
  font-size: 12px;
  color: #6B7280;
  margin-top: 3px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Risk Score SVG Ring Gauge */
.profile-risk-gauge {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.risk-svg-ring {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.risk-ring-bg {
  fill: none;
  stroke: #E5E7EB;
  stroke-width: 4;
}

.risk-ring-val {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 138.23;
  stroke-dashoffset: 24.88;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.risk-ring-val.ring-high {
  stroke: #DC2626;
}

.risk-ring-val.ring-med {
  stroke: #D97706;
}

.risk-ring-val.ring-low {
  stroke: #16A34A;
}

.risk-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.risk-number {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  transition: color 0.3s ease;
}

.risk-number.text-red { color: #DC2626; }
.risk-number.text-amber { color: #D97706; }
.risk-number.text-green { color: #16A34A; }

.risk-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7.5px;
  font-weight: 600;
  color: #6B7280;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* --------------------------------------------------------------------------
   4. Platform Bar & Dynamic Live Counters Row
   -------------------------------------------------------------------------- */
.feed-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.platform-indicators-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plat-indicator-btn {
  width: 30px;
  height: 30px;
  background: #FFFFFF;
  border: 1px solid #D9DEE7;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  padding: 0;
  cursor: default;
  transition: all 0.25s ease;
}

.plat-indicator-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

/* Glowing active state when a post from this platform arrives */
.plat-indicator-btn.active-glow {
  background: #EFF6FF;
  border-color: #2F6FED;
  color: #2F6FED;
  box-shadow: 0 0 10px rgba(47, 111, 237, 0.45);
  transform: translateY(-1px) scale(1.06);
}

.sample-tag-pill {
  font-size: 11px;
  font-weight: 600;
  background: #F1F5F9;
  color: #475569;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   5. Dynamic Recent Posts Feed (Slide-in, typing reveal, soft pulsing keywords)
   -------------------------------------------------------------------------- */
.demo-posts-stream {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 250px;
}

.feed-post-item {
  background: #FFFFFF;
  border: 1px solid #E1E5EC;
  border-radius: 11px;
  padding: 12px 14px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.feed-post-item.post-slide-in {
  animation: slidePostIn 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slidePostIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.post-content-wrap {
  flex: 1;
  min-width: 0;
}

.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.post-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-platform-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: #4B5563;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.2;
}

.post-time-tag {
  font-size: 11px;
  color: #9CA3AF;
  font-family: 'JetBrains Mono', monospace;
}

.post-body-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

/* Flagged Threat Post Variant */
.feed-post-item.flagged-threat {
  border: 1px solid #FECACA;
  background: #FFFDFD;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.05);
}

.flagged-rule-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Pulsing Flagged Keyword */
.kw-flag {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  animation: pulseKeyword 2.2s ease-in-out infinite;
}

@keyframes pulseKeyword {
  0% { background-color: rgba(220, 38, 38, 0.10); }
  50% { background-color: rgba(220, 38, 38, 0.24); }
  100% { background-color: rgba(220, 38, 38, 0.10); }
}


/* --------------------------------------------------------------------------
   6. RIGHT PANEL — Sign In Card (~45%)
   -------------------------------------------------------------------------- */
.login-right-panel {
  background-color: #FFFFFF;
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  animation: fadeInRight 0.40s ease-out;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.signin-header-block {
  margin-bottom: 24px;
}

.signin-main-title {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.4px;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.signin-subtitle {
  font-size: 13.5px;
  color: #6B7280;
  margin: 0;
  line-height: 1.4;
}

/* Sign-in Form */
.signin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Staggered Field Entrance Animation (Finishes within 440ms <= 600ms budget) */
.signin-field-floating:nth-child(1) { animation: staggerField 0.28s ease-out 0.04s both; }
.signin-field-floating:nth-child(2) { animation: staggerField 0.28s ease-out 0.08s both; }
.signin-options-row { animation: staggerField 0.28s ease-out 0.12s both; }
.signin-submit-btn { animation: staggerField 0.28s ease-out 0.16s both; }

@keyframes staggerField {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Label Form Group */
.signin-field-floating {
  position: relative;
  display: flex;
  flex-direction: column;
}

.signin-field-icon {
  position: absolute;
  left: 14px;
  top: 17px;
  width: 17px;
  height: 17px;
  color: #9CA3AF;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 0.15s ease;
}

.signin-field-icon svg {
  width: 17px;
  height: 17px;
}

.floating-input {
  width: 100%;
  height: 52px;
  padding: 20px 14px 6px 40px;
  background-color: #FFFFFF;
  border: 1px solid #D9DEE7;
  border-radius: 9px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  color: #111827;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.floating-input:hover {
  border-color: #CBD5E1;
}

.floating-input:focus {
  outline: none;
  border-color: #2F6FED;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.floating-input:focus ~ .signin-field-icon {
  color: #2F6FED;
}

.floating-input.input-with-toggle {
  padding-right: 42px;
}

/* Floating Label Transitions */
.floating-label {
  position: absolute;
  left: 40px;
  top: 16px;
  font-size: 13.5px;
  color: #6B7280;
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
  top: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: #2F6FED;
}

.floating-input:not(:focus):not(:placeholder-shown) ~ .floating-label {
  color: #6B7280;
}

/* Password Visibility Toggle */
.btn-password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
  z-index: 2;
}

.btn-password-toggle:hover {
  color: #374151;
}

.btn-password-toggle svg {
  width: 17px;
  height: 17px;
}

/* Caps Lock Warning Tooltip */
.caps-lock-warning {
  margin-top: -8px;
  font-size: 11.5px;
  color: #92400E;
  background-color: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Options Row: Remember Username & Forgot Link */
.signin-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-top: -2px;
}

.signin-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.signin-remember-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2F6FED;
  cursor: pointer;
  margin: 0;
}

.signin-remember-subnote {
  font-size: 11px;
  color: #94A3B8;
  margin-left: 2px;
}

.signin-help-link,
.signin-forgot-link {
  color: #2F6FED;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  cursor: pointer;
}

.signin-help-link:hover,
.signin-forgot-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.login-help-note {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  animation: fadeInDown 0.2s ease-out;
  margin-top: -2px;
  box-sizing: border-box;
}

/* Error & Success Alert Boxes */
.login-error {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  animation: shakeAlert 0.35s ease-in-out;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.login-success {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #16A34A;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

/* Primary Submit Button: Slate #1F2937, Hover #2F6FED, Hover Lift */
.signin-submit-btn {
  background-color: #1F2937;
  color: #FFFFFF;
  border: none;
  border-radius: 9px;
  width: 100%;
  height: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  margin-top: 2px;
}

.signin-submit-btn:hover:not(:disabled) {
  background-color: #2F6FED;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(47, 111, 237, 0.28);
}

.signin-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.signin-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Green Tick Success State */
.signin-submit-btn.btn-success {
  background-color: #16A34A !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3) !important;
  transform: translateY(0);
}

.signin-submit-btn.btn-success .signin-btn-icon {
  display: none !important;
}

.signin-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.signin-btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Loading Spinner */
.login-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
  display: inline-block;
}

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

/* Demo Hint */
.signin-demo-hint {
  font-size: 11.5px;
  color: #9CA3AF;
  text-align: center;
  margin-top: -4px;
}

/* Trust Row: TLS · HttpOnly · Audited */
.signin-trust-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11.5px;
  color: #6B7280;
  font-family: 'JetBrains Mono', monospace;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust-item.trust-unencrypted {
  color: #D97706 !important;
  font-weight: 600;
}

.trust-item.trust-unencrypted svg {
  color: #D97706 !important;
}

.trust-item.trust-encrypted {
  color: #10B981;
}

.trust-item.trust-encrypted svg {
  color: #10B981;
}

.trust-item svg {
  width: 13px;
  height: 13px;
  color: #9CA3AF;
}

.trust-sep {
  color: #D1D5DB;
}

/* Legal Footer Note */
.signin-legal-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #F3F4F6;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.signin-last-login {
  font-size: 11.5px;
  color: #6B7280;
  font-family: 'JetBrains Mono', monospace;
}

.signin-legal-line {
  font-size: 11.5px;
  color: #9CA3AF;
  line-height: 1.4;
}

.signin-version-line {
  font-size: 10.5px;
  color: #CBD5E1;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* Helper hidden class */
.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. Responsive Layout (Mobile, Tablet, Desktop)
   Stack panels vertically on screens <= 860px
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .login-screen {
    padding: 16px 12px;
    align-items: flex-start;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin: 12px auto;
  }

  .login-left-panel {
    border-right: none;
    border-bottom: 1px solid #E1E5EC;
    padding: 24px 20px;
  }

  .login-right-panel {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .profile-spotlight-card {
    padding: 12px 14px;
  }
  .profile-main-meta {
    gap: 10px;
  }
  .profile-avatar-initials {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }
  .profile-risk-gauge {
    width: 46px;
    height: 46px;
  }
  .risk-svg-ring {
    width: 46px;
    height: 46px;
  }
  .risk-number {
    font-size: 13px;
  }
  .profile-handle {
    font-size: 13px;
  }
  .platform-pill {
    font-size: 10px;
    padding: 1px 5px;
  }
  .profile-stats-row {
    font-size: 11px;
    margin-top: 2px;
  }
  .monitor-header-brand {
    gap: 8px;
  }
  .monitor-brand-title {
    font-size: 14px;
  }
  .monitor-brand-subtitle {
    font-size: 11px;
  }
  .feed-control-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   8. Accessibility: Respect prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .status-dot,
  .profile-scan-line,
  .risk-ring-val,
  .kw-flag,
  .feed-post-item.post-slide-in,
  .login-error,
  .login-spinner,
  .login-right-panel,
  .signin-field-floating:nth-child(1),
  .signin-field-floating:nth-child(2),
  .signin-options-row,
  .signin-submit-btn,
  .login-shell.shake-card {
    animation: none !important;
    transition: none !important;
  }
  .risk-ring-val {
    stroke-dashoffset: 24.88 !important;
  }
}
