/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.login-container {
  min-height: 100vh;
  display: flex;
}

/* Left Panel - Animated Gradient */
.left-panel {
  display: none;
  width: 50%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

@media (min-width: 1024px) {
  .left-panel {
    display: flex;
  }
}

@media (min-width: 1280px) {
  .left-panel {
    width: 60%;
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Grain texture */
.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.15;
  pointer-events: none;
}

/* Floating cards container */
.floating-cards {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* Glass card base */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
}

/* Float animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Revenue card - main center */
.revenue-card {
  padding: 2rem;
  max-width: 400px;
  animation: float 6s ease-in-out infinite;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.icon-box {
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
  color: inherit;
}

.card-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.progress-bar {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
}

.card-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* Agents card - top right */
.agents-card {
  position: absolute;
  top: 5rem;
  right: 4rem;
  padding: 1rem;
  animation: float 5s ease-in-out infinite;
  animation-delay: -2s;
}

/* Recruits card - bottom left */
.recruits-card {
  position: absolute;
  bottom: 8rem;
  left: 4rem;
  padding: 1rem;
  animation: float 7s ease-in-out infinite;
  animation-delay: -4s;
}

/* Performance card - middle right */
.performance-card {
  position: absolute;
  top: 50%;
  right: 6rem;
  padding: 1rem;
  animation: float 8s ease-in-out infinite;
  animation-delay: -1s;
}

/* Retention card - bottom right */
.retention-card {
  position: absolute;
  bottom: 12rem;
  right: 8rem;
  padding: 1rem;
  animation: float 6.5s ease-in-out infinite;
  animation-delay: -3s;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-green {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.icon-purple {
  background: rgba(192, 132, 252, 0.2);
  color: #c084fc;
}

.card-label-sm {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.card-value-sm {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
}

.avatar-gold {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.performer-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
}

.retention-value {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.retention-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.retention-change {
  font-size: 0.75rem;
  color: #4ade80;
}

/* Blur circles */
.blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.blur-circle-1 {
  top: 25%;
  left: 25%;
  width: 16rem;
  height: 16rem;
  background: rgba(255, 255, 255, 0.05);
}

.blur-circle-2 {
  bottom: 25%;
  right: 25%;
  width: 24rem;
  height: 24rem;
  background: rgba(168, 85, 247, 0.2);
}

/* Bottom branding */
.bottom-branding {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
}

.trusted-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.brand-logos span {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
}

/* Right Panel - Form */
.right-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: white;
}

.form-container {
  width: 100%;
  max-width: 28rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #4f46e5;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  50% { box-shadow: 0 0 20px 5px rgba(79, 70, 229, 0.3); }
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

/* Welcome */
.welcome {
  margin-bottom: 2rem;
}

.welcome h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.welcome p {
  color: #64748b;
}

/* Social buttons */
.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: background 0.2s;
}

.social-btn:hover {
  background: #f1f5f9;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  font-size: 0.875rem;
  color: #94a3b8;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #0f172a;
  transition: all 0.2s;
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px #4f46e5;
}

/* Password input */
.password-input {
  position: relative;
}

.password-input input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: flex;
  transition: color 0.2s;
}

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

.eye-icon, .eye-off-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.hidden {
  display: none;
}

/* Form options */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.remember-me input {
  width: 1rem;
  height: 1rem;
  accent-color: #4f46e5;
}

.remember-me span {
  font-size: 0.875rem;
  color: #475569;
}

.forgot-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #4338ca;
}

/* Submit button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #4f46e5;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #4338ca;
}

.submit-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.submit-btn:disabled {
  background: #a5b4fc;
  cursor: not-allowed;
}

.arrow-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Signup link */
.signup-link {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 2rem;
}

.signup-link a {
  font-weight: 500;
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.2s;
}

.signup-link a:hover {
  color: #4338ca;
}

/* Footer */
.form-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.form-footer p {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.form-footer a {
  text-decoration: underline;
  color: inherit;
  transition: color 0.2s;
}

.form-footer a:hover {
  color: #475569;
}
