/* ==========================================================================
   PRINTKARO.ONLINE — SPLIT-SCREEN AUTHENTICATION DESIGN SYSTEM
   Faithfully inspired by modern SaaS authentication reference UI
   Brand Palette: Purple (#723480) | Lavender (#DBD4FF) | Olive (#808034) | Cream (#FFFFE3)
   ========================================================================== */

/* 1. Page Background & Container */
body.auth-page-body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--brand-background, #FFFFE3);
  background-image: 
    radial-gradient(circle at 90% 10%, rgba(219, 212, 255, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(219, 212, 255, 0.35) 0%, transparent 40%);
  color: var(--text-primary, #211827);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.auth-page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.auth-top-nav {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary, #723480);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-color, #E8E0D9);
  transition: all 0.15s ease;
}

.auth-back-link:hover {
  background: #FFFFFF;
  color: #572661;
  transform: translateX(-2px);
  box-shadow: 0 2px 6px rgba(114, 52, 128, 0.08);
}

/* 2. Main Centered Authentication Split Card */
.auth-split-card {
  width: 100%;
  max-width: 1040px;
  min-height: 620px;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid var(--border-color, #E8E0D9);
  box-shadow: 
    0 24px 48px -12px rgba(114, 52, 128, 0.12),
    0 4px 12px 0 rgba(0, 0, 0, 0.02);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

/* 3. Left Panel: Authentication Form */
.auth-left-panel {
  padding: 38px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #FFFFFF;
  box-sizing: border-box;
}

.auth-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-brand-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand-primary, #723480);
  color: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(114, 52, 128, 0.25);
  flex-shrink: 0;
}

.auth-brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary, #211827);
  letter-spacing: -0.02em;
}

.auth-brand-title span {
  color: var(--brand-primary, #723480);
}

.auth-form-centered {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* Faint Grid Texture & Badge (Matching Screenshot) */
.auth-title-badge-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  margin-bottom: 8px;
}

.auth-title-badge-grid {
  position: absolute;
  top: -14px;
  width: 140px;
  height: 74px;
  background-image: 
    linear-gradient(to right, rgba(114, 52, 128, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(114, 52, 128, 0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  border-radius: 12px;
  pointer-events: none;
}

.auth-title-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-primary, #723480) 0%, #572661 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px -2px rgba(114, 52, 128, 0.35);
  position: relative;
  z-index: 2;
}

.auth-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary, #211827);
  margin: 10px 0 4px;
  letter-spacing: -0.02em;
}

.auth-card-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary, #756A7D);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.45;
}

/* Alerts & Notifications */
.auth-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.auth-alert-danger {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.auth-alert-success {
  background: #F4F4E4;
  border: 1px solid #D8D8A8;
  color: #595922;
}

/* Form Fields */
.auth-form-group {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary, #211827);
  margin-bottom: 5px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary, #756A7D);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border-color, #E8E0D9);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary, #211827);
  background: #FFFFFF;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.auth-input::placeholder {
  color: #9CA3AF;
  font-size: 13px;
}

.auth-input:focus {
  border-color: var(--brand-primary, #723480);
  box-shadow: 0 0 0 3px rgba(114, 52, 128, 0.14);
  outline: none;
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--brand-primary, #723480);
}

.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary, #756A7D);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color 0.15s ease;
}

.auth-pwd-toggle:hover {
  color: var(--brand-primary, #723480);
}

/* Remember & Forgot Row */
.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 18px;
  font-size: 12.5px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text-secondary, #756A7D);
  user-select: none;
}

.auth-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: var(--brand-primary, #723480);
  cursor: pointer;
}

.auth-forgot-link {
  color: var(--brand-primary, #723480);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: #572661;
  text-decoration: underline;
}

/* Primary Submit Button */
.btn-auth-primary {
  width: 100%;
  height: 44px;
  background-color: var(--brand-primary, #723480);
  color: #FFFFFF !important;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(114, 52, 128, 0.28);
  transition: all 0.15s ease;
}

.btn-auth-primary:hover {
  background-color: #572661;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(114, 52, 128, 0.38);
}

.btn-auth-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Or Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-color, #E8E0D9);
}

.auth-divider span {
  position: relative;
  background: #FFFFFF;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #958B9E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Social Buttons */
.auth-social-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-google-auth {
  width: 100%;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E8E0D9);
  border-radius: 10px;
  color: var(--text-primary, #211827);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-google-auth:hover {
  background: #FBFBFA;
  border-color: #CBD5E1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.btn-google-auth.disabled {
  opacity: 0.55;
  pointer-events: none;
  background: #F8FAFC;
}

.google-icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Switch Form Link */
.auth-switch-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary, #756A7D);
  margin-top: 20px;
}

.auth-switch-text a {
  color: var(--brand-primary, #723480);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-switch-text a:hover {
  text-decoration: underline;
  color: #572661;
}

/* 4. Right Panel: Animated Hero (Ronas / Chainly / QRSePrint Inspired) */
.auth-right-panel {
  padding: 16px;
  display: flex;
  align-items: stretch;
  background: transparent;
  box-sizing: border-box;
}

.auth-hero-card {
  width: 100%;
  border-radius: 20px;
  background: linear-gradient(150deg, #FFFFE3 0%, #F5F1FF 55%, #DBD4FF 100%);
  border: 1px solid rgba(219, 212, 255, 0.6);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary, #211827);
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-hero-title span {
  color: var(--brand-primary, #723480);
}

/* Orbital Animation Stage */
.auth-orbit-stage {
  width: 290px;
  height: 290px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}

/* Outer Concentric Orbital Ring */
.orbit-ring-outer {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px dashed rgba(114, 52, 128, 0.22);
  animation: orbitRotateClockwise 40s linear infinite;
  pointer-events: none;
}

/* Inner Concentric Orbital Ring */
.orbit-ring-inner {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(114, 52, 128, 0.16);
  animation: orbitRotateCounter 30s linear infinite;
  pointer-events: none;
}

/* Central Glowing Desktop Printer Hub */
.orbit-center-hub {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #723480 0%, #572661 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 
    0 12px 28px -4px rgba(114, 52, 128, 0.45),
    0 0 0 6px rgba(219, 212, 255, 0.6);
  z-index: 5;
}

/* Pulse Ripple Beacon */
.orbit-pulse-beacon {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(114, 52, 128, 0.35);
  animation: pulseRipple 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

/* Mini LED Blinking Indicator on Printer */
.orbit-led-status {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #808034;
  box-shadow: 0 0 8px #808034;
  animation: ledBlink 1.4s ease-in-out infinite alternate;
}

/* Orbiting Node Chips */
.orbit-chip {
  position: absolute;
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E8E0D9);
  border-radius: 9999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #211827);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(114, 52, 128, 0.1);
  white-space: nowrap;
  user-select: none;
  animation: floatSubtle 4s ease-in-out infinite alternate;
}

/* Node 1: QR Standee Card with Laser Sweep */
.orbit-node-qr {
  top: 10px;
  left: 20px;
  background: #FFFFFF;
  border: 1px solid rgba(114, 52, 128, 0.25);
  border-radius: 10px;
  padding: 6px 10px;
  position: relative;
  overflow: hidden;
  animation: floatSubtle 3.5s ease-in-out infinite alternate;
}

.orbit-node-qr .laser-sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #723480, #808034, transparent);
  box-shadow: 0 0 6px #723480;
  animation: laserSweep 2s ease-in-out infinite;
}

/* Node 2: Direct UPI Payment Chip */
.orbit-node-upi {
  bottom: 18px;
  left: 15px;
  border-color: rgba(128, 128, 52, 0.35);
  background: #FFFFE3;
  color: #595922;
  animation: floatSubtle 4.2s ease-in-out infinite 0.5s alternate;
}

/* Node 3: Document Glide into Spooler */
.orbit-node-doc {
  top: 25px;
  right: 15px;
  border-color: var(--border-color, #E8E0D9);
  animation: docGlide 5s ease-in-out infinite;
}

/* Node 4: Windows Agent Live Spooler */
.orbit-node-agent {
  bottom: 22px;
  right: 10px;
  border-color: rgba(114, 52, 128, 0.3);
  animation: floatSubtle 3.8s ease-in-out infinite 1s alternate;
}

.orbit-node-agent .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #808034;
}

/* Hero Card Footer */
.auth-hero-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #52475C;
  max-width: 360px;
  margin: 0 0 14px;
}

.auth-hero-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(114, 52, 128, 0.25);
  transition: all 0.2s ease;
}

.auth-hero-dot.active {
  width: 18px;
  border-radius: 9999px;
  background: var(--brand-primary, #723480);
}

/* 5. Legal Footer */
.auth-page-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary, #756A7D);
}

.auth-footer-links {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-footer-links a {
  color: var(--text-secondary, #756A7D);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer-links a:hover {
  color: var(--brand-primary, #723480);
}

/* 6. Keyframe Animations */
@keyframes orbitRotateClockwise {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes orbitRotateCounter {
  from { transform: rotate(360deg); }
  to   { transform: rotate(0deg); }
}

@keyframes pulseRipple {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@keyframes floatSubtle {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

@keyframes laserSweep {
  0%   { top: 2px; }
  50%  { top: 24px; }
  100% { top: 2px; }
}

@keyframes docGlide {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.95;
  }
  50% {
    transform: translate(-14px, 12px) scale(0.94);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.95;
  }
}

@keyframes ledBlink {
  0%   { opacity: 0.4; }
  100% { opacity: 1; }
}

/* 7. Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring-outer,
  .orbit-ring-inner,
  .orbit-pulse-beacon,
  .orbit-chip,
  .orbit-node-qr,
  .orbit-node-upi,
  .orbit-node-doc,
  .orbit-node-agent,
  .orbit-node-qr .laser-sweep,
  .orbit-led-status {
    animation: none !important;
  }
}

/* 8. Responsive Breakpoints */
@media (max-width: 960px) {
  .auth-split-card {
    grid-template-columns: 1fr;
    max-width: 520px;
    min-height: auto;
  }

  .auth-right-panel {
    display: none; /* Hide hero on small devices per requirements */
  }

  .auth-left-panel {
    padding: 32px 28px;
  }
}

@media (max-width: 480px) {
  .auth-page-container {
    padding: 12px 10px;
  }

  .auth-split-card {
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(114, 52, 128, 0.08);
  }

  .auth-left-panel {
    padding: 24px 18px;
  }

  .auth-card-title {
    font-size: 20px;
  }

  .auth-input {
    height: 46px;
    font-size: 14px;
  }

  .btn-auth-primary,
  .btn-google-auth {
    height: 46px;
  }
}
