/* ==========================================================================
   BRICS - Branch Irregularities Control System
   Authentication Screen Styles
   Powered by QSS - QSoft Solution
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');
@import url('./variables.css');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, #0a1324 0%, #060b14 60%, #04070d 100%);
  font-family: var(--font-family);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
  padding: 1.5rem;
}

/* Dynamic Ambient Glow Orbs */
.ambient-glow-1 {
  position: fixed;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 70%);
  top: -150px;
  left: -150px;
  pointer-events: none;
  filter: blur(40px);
  animation: pulseOrb 12s ease-in-out infinite alternate;
}

.ambient-glow-2 {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0) 70%);
  bottom: -180px;
  right: -180px;
  pointer-events: none;
  filter: blur(50px);
  animation: pulseOrb 15s ease-in-out infinite alternate-reverse;
}

@keyframes pulseOrb {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50% { transform: scale(1.15) translate(20px, -20px); opacity: 1; }
  100% { transform: scale(0.95) translate(-15px, 15px); opacity: 0.6; }
}

/* Background Cyber Grid */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Login Master Shell */
.login-shell {
  position: relative;
  z-index: 1;
  width: min(1140px, 96vw);
  min-height: 660px;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: shellFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shellFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Left Panel: Brand Showcase & Enterprise Intelligence
   ========================================================================== */
.brand-panel {
  position: relative;
  padding: 3.5rem 3.5rem 3rem;
  background: linear-gradient(145deg, rgba(14, 27, 50, 0.85) 0%, rgba(9, 17, 34, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
}

.brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brics-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brics-logo-emblem {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.05em;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.brics-brand-title {
  display: flex;
  flex-direction: column;
}

.brics-brand-title h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brics-brand-title span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #38bdf8;
  text-transform: uppercase;
}

.vendor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
}

.vendor-badge strong {
  color: #38bdf8;
}

/* Brand Hero Content */
.brand-hero {
  margin: 2.5rem 0 2rem;
}

.system-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: livePing 1.8s infinite;
}

@keyframes livePing {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.brand-hero h2 {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  margin-bottom: 1rem;
}

.brand-hero h2 span {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-hero p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 480px;
}

/* Live Operational Metrics Grid */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 1.8rem 0;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.metric-pill {
  display: flex;
  flex-direction: column;
}

.metric-pill span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.metric-pill strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 2px;
}

.metric-pill strong.emerald { color: #34d399; }
.metric-pill strong.cyan { color: #38bdf8; }
.metric-pill strong.indigo { color: #a5b4fc; }

/* Feature Pillars */
.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #cbd5e1;
  font-weight: 500;
}

.feature-checklist li .chk-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
  font-size: 0.75rem;
  font-weight: bold;
}

.brand-footer {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
}

.security-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 600;
}

/* ==========================================================================
   Right Panel: Authentication Form Portal
   ========================================================================== */
.login-panel {
  padding: 3.5rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  position: relative;
}

.login-form-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.login-header p {
  margin-top: 6px;
  font-size: 0.88rem;
  color: #94a3b8;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  transition: var(--transition);
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 44px;
  border-radius: 12px;
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
}

.login-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #15223c;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.login-input:focus + .input-icon,
.login-input:focus ~ .input-icon {
  color: #38bdf8;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.toggle-password-btn:hover {
  color: #cbd5e1;
}

/* Quick Demo Profile Chips */
.quick-profiles-section {
  margin-bottom: 1.5rem;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.quick-profiles-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-chip {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.demo-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Remember & Helper */
.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.forgot-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.forgot-link:hover {
  text-decoration: underline;
  color: #60a5fa;
}

/* Submit Action Button */
.submit-btn {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #0284c7 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  filter: brightness(1.08);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Feedback / Message Alert */
.alert-feedback {
  min-height: 24px;
  margin-top: 1rem;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.alert-feedback.error {
  display: flex;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-feedback.success {
  display: flex;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-footer-info {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  
  .brand-panel {
    padding: 2.5rem 2rem 2rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .login-panel {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }

  .brand-panel {
    padding: 2rem 1.25rem 1.5rem;
  }

  .login-panel {
    padding: 2rem 1.25rem;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
