:root {
	--bg: #05060a;
  --foreground: 213 31% 91%;
  --muted: 223 47% 11%;
  --muted-foreground: 215.4 16.3% 56.9%;
  --border: 216 34% 17%;
  --input: 216 34% 17%;
  --card: 224 71% 4%;
  --primary: #6366f1;
  --destructive: 0 63% 31%;
  --radius: 0.5rem;
	--text: #f8fafc; 
  --gradient-white: linear-gradient(to right, #FFFFFF, #6366f1);
  --shadow-glow: 0 0 20px var(--primary));
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-light: blur(8px);
  --blur-medium: blur(12px);
  --blur-heavy: blur(20px);
	--card-bg: rgba(255, 255, 255, 0.02);
	--glass-border: rgba(255, 255, 255, 0.08);
}

html {
	scroll-behavior: smooth;
}

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

body {
	background-color: var(--bg);
  color: hsl(var(--foreground));
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  padding: 1rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.1), transparent);
  opacity: 0.5;
  animation: scanline 6s linear infinite;
  z-index: -1;
  pointer-events: none;
}

.font-display {
  font-family: 'Orbitron', sans-serif;
}

.white-text {
  background: var(--gradient-white);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-container {
  background: var(--card-bg);
  backdrop-filter: var(--blur-heavy);
  border: 1px solid var(--card-bg);
  border-radius: var(--radius);
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--card-bg);
}

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

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.logo .gradient-text {
  font-size: 1.75rem;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.login-header p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.client-info {
  background: hsl(var(--muted) / 0.6);
  backdrop-filter: var(--blur-medium);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.client-name {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.client-id {
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.login-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: hsl(var(--input) / 0.8);
  backdrop-filter: var(--blur-light);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  transition: transform 0.8s ease-in-out;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary);
  backdrop-filter: var(--blur-medium);
  transform: translateY(-2px);
}

.form-group input::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-group.has-error input {
  border-color: hsl(var(--destructive)) !important;
  box-shadow: 0 0 0 3px hsl(var(--destructive) / 0.1) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  text-align: center;
  cursor: pointer;
	-webkit-tap-highlight-color: transparent;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.870rem;
  height: 48px;
  width: 100%;
}

.fa-spin {
 color: var(--text);
}

.btn-primary {
    background: var(--primary);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-message i {
    margin-right: 0.5rem;
}

.login-footer {
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.fa-circle-notch {
	animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
  .login-container {
    padding: 1.5rem;
    margin: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
    height: auto;
    min-height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
  }

  .logo {
      font-size: 1.4rem;
      margin-bottom: 0.8rem;
  }

  .login-header h1 {
      font-size: 1.2rem;
      margin-bottom: 0.3rem;
  }

  .login-header p {
      font-size: 0.8rem;
  }

  .client-info {
      padding: 1rem;
      margin-bottom: 1.5rem;
  }

  .system-badges {
      justify-content: center;
  }

  .btn {
      padding: 1rem 1.5rem;
      font-size: 0.9rem;
  }

  body {
    padding: 0.5rem;
  }
}