/*
  login-modern.css
  Modern Enterprise SaaS & Security Login Experience
  S S E Contracts PVT. LTD.
*/

:root {
  --lp-bg-dark: #070c18;
  --lp-bg-card: #ffffff;
  --lp-primary: #2563eb;
  --lp-primary-hover: #1d4ed8;
  --lp-primary-glow: rgba(37, 99, 235, 0.35);
  --lp-accent-cyan: #06b6d4;
  --lp-accent-indigo: #6366f1;
  --lp-text-title: #0f172a;
  --lp-text-body: #475569;
  --lp-text-muted: #94a3b8;
  --lp-border: #e2e8f0;
  --lp-border-focus: #3b82f6;
  --lp-radius: 14px;
  --lp-radius-input: 10px;
  --lp-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Base Body Override for Login Page */
body.login-page-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--lp-bg-dark);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #ffffff;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Background Atmosphere & Data Nodes */
.login-bg-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Ambient glow blobs */
.login-bg-glow-1 {
  position: absolute;
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(6, 182, 212, 0.08) 40%, transparent 70%);
  filter: blur(60px);
  border-radius: 50%;
  animation: glowPulse 12s ease-in-out infinite alternate;
}

.login-bg-glow-2 {
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(37, 99, 235, 0.06) 45%, transparent 70%);
  filter: blur(70px);
  border-radius: 50%;
  animation: glowPulse 16s ease-in-out infinite alternate-reverse;
}

.login-bg-glow-3 {
  position: absolute;
  top: 40%;
  left: 35%;
  width: 35vw;
  height: 35vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 65%);
  filter: blur(50px);
  border-radius: 50%;
}

@keyframes glowPulse {
  0% { transform: scale(0.95) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.05) translate(20px, 20px); opacity: 1; }
}

/* Subtle Technical Grid Overlay */
.login-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
}

/* Main Layout Wrapper */
.login-main-container {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 12px 20px;
}

.login-split-card {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: stretch;
  background: rgba(13, 22, 43, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* Left Showcase Area (Desktop Only) */
.login-showcase-panel {
  flex: 1.15;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  position: relative;
}

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

.showcase-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.showcase-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-size: 11.5px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 20px;
  width: fit-content;
}

.showcase-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.showcase-hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.showcase-hero-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 32px;
}

/* Abstract Telemetry Graphic Box */
.showcase-telemetry-box {
  background: rgba(8, 14, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.telemetry-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Subtle Network Path SVG */
.telemetry-svg-wrap {
  width: 100%;
  height: 72px;
  margin-bottom: 12px;
}

.telemetry-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.telemetry-mod-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
}

.telemetry-mod-label {
  font-size: 10.5px;
  color: #64748b;
  display: block;
  margin-bottom: 2px;
}

.telemetry-mod-val {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.telemetry-mod-val i {
  font-size: 11px;
  color: #38bdf8;
}

.showcase-footer-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #64748b;
}

.showcase-footer-trust span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.showcase-footer-trust i {
  color: #38bdf8;
  font-size: 14px;
}

/* Right Login Card Panel */
.login-form-panel {
  flex: 1;
  background: var(--lp-bg-card);
  padding: 42px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-form-header {
  margin-bottom: 32px;
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.login-mobile-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.login-mobile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--lp-text-title);
  letter-spacing: 0.5px;
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--lp-text-title);
  letter-spacing: -0.4px;
  margin: 0 0 8px 0;
}

.login-subtitle {
  font-size: 14px;
  color: var(--lp-text-body);
  margin: 0;
}

/* Form Controls */
.login-field-group {
  margin-bottom: 22px;
}

.login-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

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

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 44px;
  font-size: 14.5px;
  font-weight: 500;
  color: #1e293b;
  background-color: #f8fafc;
  border: 1.5px solid var(--lp-border);
  border-radius: var(--lp-radius-input);
  outline: none;
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

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

.login-input:focus {
  background-color: #ffffff;
  border-color: var(--lp-border-focus);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.login-input-wrap:focus-within .login-input-icon {
  color: var(--lp-primary);
}

/* Password Toggle Button */
.login-pwd-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 16px;
  transition: color 150ms ease, background 150ms ease;
}

.login-pwd-toggle:hover {
  color: #475569;
  background: #f1f5f9;
}

.login-pwd-toggle:focus-visible {
  outline: 2px solid var(--lp-primary);
}

/* Login Submit Button */
.login-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: var(--lp-radius-input);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 10px;
}

.login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.login-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.login-submit-btn .spinner-border {
  width: 1.1rem;
  height: 1.1rem;
  border-width: 0.15em;
}

/* Modern Error/Alert Notifications */
#response {
  display: block;
  margin-top: 16px;
}

.login-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alertFadeIn 200ms ease forwards;
  line-height: 1.45;
}

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

.login-alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.login-alert-danger i {
  color: #dc2626;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.login-alert-warning i {
  color: #d97706;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.login-alert-success i {
  color: #16a34a;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Card Footer Security Text */
.login-card-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--lp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--lp-text-muted);
}

.login-secure-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #64748b;
}

.login-secure-tag i {
  color: #10b981;
  font-size: 13px;
}

/* Page Footer */
.login-global-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 14px 20px 24px 20px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.login-footer-sep {
  color: #334155;
  font-size: 10px;
}

.login-developer-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.login-developer-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════
   Responsive Breakpoints
   ════════════════════════════════════════════════════ */

/* Medium devices & below (Tablets < 992px) */
@media (max-width: 991px) {
  .login-split-card {
    max-width: 520px;
    flex-direction: column;
    border-radius: 18px;
  }
  .login-showcase-panel {
    display: none;
  }
  .login-mobile-brand {
    display: flex;
  }
  .login-form-panel {
    padding: 40px 32px;
  }
}

/* Small devices (Phones < 576px) */
@media (max-width: 575px) {
  .login-main-container {
    padding: 20px 16px;
  }
  .login-split-card {
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  }
  .login-form-panel {
    padding: 32px 20px;
  }
  .login-title {
    font-size: 21px;
  }
  .login-card-footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .login-bg-glow-1,
  .login-bg-glow-2,
  .login-submit-btn,
  .login-alert {
    animation: none !important;
    transition: none !important;
  }
}
