/* ==========================================================================
   DIGITAL WORLD - PREMIUM HIGH-TECH AUTHENTICATION PORTAL
   Matches exact reference design with dark cyber aesthetics, glowing accents,
   and reactive AI voice assistant integration.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
  --dw-bg: #030712;
  --dw-card-bg: rgba(9, 17, 33, 0.82);
  --dw-card-border: rgba(56, 189, 248, 0.22);
  --dw-cyan: #00f0ff;
  --dw-cyan-glow: rgba(0, 240, 255, 0.35);
  --dw-blue: #3b82f6;
  --dw-pink: #ec4899;
  --dw-text: #ffffff;
  --dw-text-muted: #94a3b8;
  --dw-text-dim: #64748b;
  --dw-input-bg: rgba(15, 23, 42, 0.72);
  --dw-input-border: rgba(51, 65, 85, 0.85);
  --dw-font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  min-height: 100%;
  width: 100%;
}

body.dw-auth-body {
  min-height: 100vh;
  width: 100%;
  background-color: var(--dw-bg);
  background-image: 
    linear-gradient(to right, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.94) 30%, rgba(3, 7, 18, 0.6) 60%, rgba(3, 7, 18, 0.15) 100%),
    url('../images/digital_world_auth_bg.jpg');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--dw-font);
  color: var(--dw-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow accents */
.dw-ambient-glow {
  position: fixed;
  top: 15%;
  left: 8%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(70px);
  z-index: 1;
}

/* Floating AI Voice Badge */
.cyber-voice-status {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 14, 28, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--dw-cyan);
  box-shadow: 0 0 16px var(--dw-cyan-glow);
  padding: 7px 16px;
  border-radius: 50px;
  font-family: var(--dw-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--dw-cyan);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.cyber-voice-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.55);
}

.cyber-voice-status i {
  font-size: 13px;
}

.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.voice-wave span {
  width: 2.5px;
  height: 100%;
  background: var(--dw-cyan);
  border-radius: 2px;
  animation: cyberWave 1.2s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0.1s; height: 35%; }
.voice-wave span:nth-child(2) { animation-delay: 0.3s; height: 80%; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.voice-wave span:nth-child(4) { animation-delay: 0.4s; height: 50%; }

.voice-wave.muted span {
  animation: none;
  height: 3px !important;
  background: #64748b;
}

@keyframes cyberWave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* Master Layout Wrapper */
.dw-layout-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  padding: 40px 36px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.dw-grid-wrapper {
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 420px;
  gap: 50px;
  align-items: center;
}

@media (min-width: 1200px) {
  .dw-grid-wrapper {
    grid-template-columns: 1.15fr 420px;
    gap: 60px;
    padding-right: 260px; /* Leaves the right side server racks and glowing shield clearly visible */
  }
}

@media (min-width: 1400px) {
  .dw-grid-wrapper {
    grid-template-columns: 1.2fr 430px;
    gap: 80px;
    padding-right: 280px;
  }
}

/* ==========================================================================
   LEFT PANEL - BRANDING, HEADLINE, FEATURE BADGES
   ========================================================================== */

.dw-left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Brand Header */
.dw-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 44px;
}

.dw-brand-logo-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #060e20;
  border: 1.8px solid #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.dw-brand-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
}

.dw-brand-svg {
  width: 34px;
  height: 34px;
}

.dw-brand-titles {
  display: flex;
  flex-direction: column;
}

.dw-brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
  line-height: 1.2;
}

.dw-brand-tagline {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-top: 2px;
}

/* Main Hero Typography */
.dw-hero-content {
  margin-bottom: 48px;
}

.dw-hero-title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.8px;
  color: #ffffff;
  margin-bottom: 16px;
}

.dw-hero-title-sub {
  color: #ffffff;
  display: block;
}

.dw-hero-desc {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 440px;
  font-weight: 400;
}

/* Feature Badges Row */
.dw-services-grid {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.dw-service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: default;
  transition: transform 0.25s ease;
}

.dw-service-item:hover {
  transform: translateY(-3px);
}

.dw-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #00f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f0ff;
  font-size: 20px;
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.22);
  transition: all 0.3s ease;
}

.dw-service-item:hover .dw-service-icon {
  background: rgba(0, 240, 255, 0.14);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.5);
}

.dw-service-label {
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
}

/* ==========================================================================
   RIGHT PANEL - SLEEK AUTH CARD
   ========================================================================== */

.dw-right-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dw-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--dw-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--dw-card-border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(14, 165, 233, 0.08);
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dw-auth-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(14, 165, 233, 0.14);
}

/* Top Navigation Tabs */
.dw-auth-tabs {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.dw-tab-item {
  font-family: var(--dw-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--dw-text-muted);
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 6px;
  position: relative;
  transition: color 0.25s ease;
}

.dw-tab-item:hover {
  color: #ffffff;
}

.dw-tab-item.active {
  color: #ffffff;
  font-weight: 600;
}

.dw-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--dw-cyan);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--dw-cyan);
}

/* Feedback / Alert Container */
.dw-feedback-alert {
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  animation: dwSlideDown 0.3s ease;
}

.dw-feedback-alert.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.dw-feedback-alert.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #86efac;
}

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

/* Form Groups & Inputs */
.dw-form-group {
  margin-bottom: 18px;
}

.dw-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.dw-input-icon {
  position: absolute;
  left: 16px;
  color: var(--dw-text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.dw-form-input {
  width: 100%;
  height: 50px;
  background: var(--dw-input-bg);
  border: 1px solid var(--dw-input-border);
  border-radius: 12px;
  padding: 12px 16px 12px 46px;
  font-family: var(--dw-font);
  font-size: 14px;
  color: #ffffff;
  outline: none;
  transition: all 0.25s ease;
}

.dw-form-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.dw-form-input:focus {
  border-color: var(--dw-cyan);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.dw-form-input:focus + .dw-input-icon,
.dw-input-box:focus-within .dw-input-icon {
  color: var(--dw-cyan);
}

/* Eye Toggle Password Button */
.dw-eye-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--dw-text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.dw-eye-btn:hover {
  color: #ffffff;
}

/* Options Bar: Remember Me & Forgot Password */
.dw-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  font-size: 13px;
}

.dw-checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  color: var(--dw-text-muted);
  transition: color 0.2s ease;
}

.dw-checkbox-container:hover {
  color: #ffffff;
}

.dw-checkbox-container input[type="checkbox"] {
  display: none;
}

.dw-custom-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dw-custom-check i {
  font-size: 11px;
  color: transparent;
  transition: color 0.15s ease;
}

.dw-checkbox-container input[type="checkbox"]:checked + .dw-custom-check {
  background: #0284c7;
  border-color: var(--dw-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.dw-checkbox-container input[type="checkbox"]:checked + .dw-custom-check i {
  color: #ffffff;
}

.dw-forgot-link {
  color: var(--dw-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.dw-forgot-link:hover {
  color: var(--dw-cyan);
}

/* Submit Gradient Button (Pink to Cyan) */
.dw-submit-gradient-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #ec4899 0%, #db2777 22%, #6366f1 72%, #38bdf8 100%);
  color: #ffffff;
  font-family: var(--dw-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 
    0 4px 18px rgba(236, 72, 153, 0.35),
    0 2px 10px rgba(56, 189, 248, 0.22);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dw-submit-gradient-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.08);
  box-shadow: 
    0 8px 26px rgba(236, 72, 153, 0.45),
    0 4px 16px rgba(56, 189, 248, 0.35);
}

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

.dw-submit-gradient-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Card Bottom Link */
.dw-card-bottom {
  text-align: center;
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--dw-text-muted);
}

.dw-signup-cta {
  color: var(--dw-cyan);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.dw-signup-cta:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--dw-cyan);
}

/* Utility Helpers */
.d-none {
  display: none !important;
}

.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: -0.125em;
  border: 0.15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* SweetAlert Custom Dark Styling */
.dw-swal-popup {
  background: #040914 !important;
  border: 1px solid rgba(0, 240, 255, 0.4) !important;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25) !important;
  color: #f0fdf4 !important;
  font-family: var(--dw-font) !important;
  border-radius: 16px !important;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1199px) {
  .dw-hero-title {
    font-size: 38px;
  }
  .dw-grid-wrapper {
    gap: 36px;
  }
  .dw-services-grid {
    gap: 20px;
  }
}

@media (max-width: 991px) {
  body.dw-auth-body {
    background-position: center;
    padding: 20px 14px 40px 14px;
    align-items: flex-start;
  }

  .dw-layout-container {
    padding: 46px 0 24px 0; /* Full clearance for the fixed voice status badge */
  }

  .dw-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 0 !important;
  }

  /* Flatten left panel children so we can reorder them around the login card */
  .dw-left-panel {
    display: contents;
  }

  /* 1. Brand Logo & Name at the top */
  .dw-brand-header {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  .dw-brand-logo-ring {
    width: 48px;
    height: 48px;
  }

  .dw-brand-name {
    font-size: 20px;
    line-height: 1.25;
  }

  .dw-brand-tagline {
    font-size: 12px;
  }

  /* 2. Login Card immediately follows on top */
  .dw-right-panel {
    order: 2;
    width: 100%;
  }

  .dw-auth-card {
    max-width: 430px;
    margin: 0 auto;
    padding: 26px 20px;
    border-radius: 20px;
  }

  /* 3. Service Badges below the login card */
  .dw-services-grid {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    margin-bottom: 0;
  }

  /* 4. Supporting Hero text at the bottom */
  .dw-hero-content {
    order: 4;
    text-align: center;
    margin-top: 6px;
    margin-bottom: 12px;
  }

  .dw-hero-title {
    font-size: 22px;
  }

  .dw-hero-desc {
    font-size: 13.5px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .cyber-voice-status {
    top: 10px;
    right: 12px;
    padding: 4px 10px;
    font-size: 9.5px;
  }

  .dw-auth-card {
    padding: 22px 16px;
  }

  .dw-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 350px;
    margin: 10px auto 0 auto;
    gap: 12px;
  }

  .dw-hero-title {
    font-size: 19px;
  }
}
