/* ==========================================================================
   SMART GST BILL — NEXT-GEN ENTERPRISE AUTHENTICATION DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css');

:root {
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --bg-deep: #070a13;
  --card-glass: rgba(15, 23, 42, 0.78);
  --card-border: rgba(255, 255, 255, 0.12);
  --input-glass: rgba(30, 41, 59, 0.6);
  --input-focus: rgba(99, 102, 241, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

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

body.login-page {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  background-color: var(--bg-deep) !important;
  background-image: 
    radial-gradient(at 10% 15%, rgba(99, 102, 241, 0.22) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(217, 70, 239, 0.18) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.9) 0px, transparent 100%) !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 30px 16px;
  position: relative;
  overflow-x: hidden;
}

/* Background Interactive Canvas */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ambient Glow Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  animation: glowFloat 20s infinite alternate ease-in-out;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.05) 70%);
  top: -80px;
  left: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.28) 0%, rgba(99, 102, 241, 0.04) 70%);
  bottom: -120px;
  right: -120px;
  animation-duration: 25s;
  animation-direction: alternate-reverse;
}

@keyframes glowFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 60px) scale(0.92); }
}

/* Floating Language Bar */
.language-wrapper {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 100;
}

.language-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50px;
  padding: 5px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-container:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.language-icon {
  color: #a5b4fc;
  font-size: 17px;
  display: flex;
  align-items: center;
}

select.language_id {
  background: transparent !important;
  color: #f8fafc !important;
  border: none !important;
  outline: none !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  padding: 4px 6px !important;
  margin: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

select.language_id option {
  background: #0f172a;
  color: #ffffff;
}

/* Master Enterprise Frame */
.enterprise-auth-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  display: flex;
  background: var(--card-glass);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: authFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authFadeUp {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Left Brand Showcase Panel */
.auth-brand-panel {
  flex: 1.1;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 50px;
  padding: 6px 14px;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 24px;
}

.brand-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.brand-headline span {
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 600;
}

.feature-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-footer-note {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Right Form Section */
.auth-form-panel {
  flex: 1.2;
  padding: 44px 40px 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-box {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.login-logo {
  text-align: left;
  margin-bottom: 20px;
}

.login-logo img {
  max-height: 58px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.login-box-msg {
  color: var(--text-secondary) !important;
  font-size: 14.5px !important;
  font-weight: 500;
  text-align: left;
  margin-bottom: 22px;
  padding: 0 !important;
}

/* Flash Messages */
.flash-alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: alertPop 0.3s ease;
}

@keyframes alertPop {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.flash-alert.alert-danger {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #fca5a5;
}

.flash-alert.alert-success {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.38);
  color: #86efac;
}

/* Inputs */
.modern-input-group {
  position: relative;
  margin-bottom: 18px;
}

.modern-input-group .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 19px;
  transition: color 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.modern-input-group .form-control {
  width: 100% !important;
  background: var(--input-glass) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-md) !important;
  color: #ffffff !important;
  height: 48px !important;
  font-size: 14.5px !important;
  font-weight: 500;
  padding: 0 46px 0 46px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

.modern-input-group .form-control:focus {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: #818cf8 !important;
  box-shadow: 
    0 0 0 4px var(--input-focus),
    inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

.modern-input-group .form-control:focus ~ .input-icon {
  color: #818cf8;
}

.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 19px;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 3;
  padding: 4px;
}

.toggle-password:hover {
  color: #c084fc;
}

/* Caps Lock Alert */
.caps-warning {
  display: none;
  font-size: 11.5px;
  color: #fbbf24;
  margin-top: 6px;
  margin-bottom: 12px;
  font-weight: 600;
  align-items: center;
  gap: 5px;
}

/* Submit Button */
.btn-primary.btn-submit {
  background: var(--primary-gradient) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  height: 50px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px;
  color: #ffffff !important;
  box-shadow: 0 10px 28px -6px rgba(99, 102, 241, 0.5) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.btn-primary.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(99, 102, 241, 0.65) !important;
}

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

.btn-primary.btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: 0.6s;
}

.btn-primary.btn-submit:hover::after {
  left: 100%;
}

/* Auth Links */
.auth-links {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-links a {
  color: #818cf8 !important;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-links a:hover {
  color: #c084fc !important;
  text-decoration: none;
  transform: translateX(2px);
}

/* Role Selector Quick Pills */
.role-shortcuts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.role-shortcuts-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-pills-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-role-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-role-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Version Tag */
.version-tag {
  text-align: center;
  margin-top: 20px;
}

.version-tag p {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .enterprise-auth-wrapper {
    flex-direction: column;
    max-width: 480px;
  }
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    padding: 36px 28px 28px 28px;
  }
  .language-wrapper {
    position: static;
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
  }
}