﻿:root {
  --bg-primary: #0a0f1d;
  --bg-card: rgba(16, 24, 48, 0.78);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(26, 115, 232, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand-blue: #1a73e8;
  --brand-blue-glow: rgba(26, 115, 232, 0.4);
  --brand-blue-hover: #1557b0;
  --brand-green: #34a853;
  --brand-yellow: #f9ab00;
  --brand-red: #ea4335;
  --input-bg: rgba(10, 15, 29, 0.75);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus-border: #1a73e8;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* Background Particle Canvas */
.login-background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: all;
}

/* Main Container */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

/* Glassmorphic Login Card */
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
              0 0 40px -10px rgba(26, 115, 232, 0.15),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.login-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8),
              0 0 50px -10px rgba(26, 115, 232, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Brand Section */
.brand-section {
  text-align: center;
  margin-bottom: 28px;
}

.logo-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1),
              0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.brand-icon {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.cloud-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: var(--brand-blue);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.cloud-badge svg {
  width: 14px;
  height: 14px;
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

/* Error Banner */
.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(234, 67, 53, 0.12);
  border: 1px solid rgba(234, 67, 53, 0.3);
  border-radius: 12px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: shake 0.4s ease-in-out;
}

.error-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ea4335;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  pointer-events: none;
}

.input-field-wrapper input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-field-wrapper input:focus {
  border-color: var(--input-focus-border);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px var(--brand-blue-glow), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-field-wrapper input:focus + .input-icon,
.input-field-wrapper input:focus ~ .input-icon {
  color: var(--brand-blue);
}

/* Submit Button */
.btn-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1557b0 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px -4px var(--brand-blue-glow),
              inset 0 1px 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #1d7ff0 0%, #1761c5 100%);
  box-shadow: 0 8px 25px -4px rgba(26, 115, 232, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px -2px rgba(26, 115, 232, 0.4);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

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

/* Loading Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Card Footer */
.card-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecosystem-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--brand-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 168, 83, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
}
