:root {
  --bg: #0f172a;
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #22c55e;
  --primary-strong: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.08), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.08), transparent 25%),
    linear-gradient(135deg, #0f172a 0%, #0b1221 35%, #0d1325 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 1180px;
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.login-background {
  position: absolute;
  inset: -60px;
  z-index: 0;
  filter: blur(50px);
  opacity: 0.9;
}

.gradient-circle {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
}

.circle-1 { background: rgba(34, 197, 94, 0.18); top: 5%; left: 5%; }
.circle-2 { background: rgba(59, 130, 246, 0.16); top: 55%; left: 25%; }
.circle-3 { background: rgba(14, 165, 233, 0.15); top: 20%; right: 5%; }

.login-glass {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 42px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
}

.logo-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25));
}

.logo-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.error {
  background: #ffe8e6;
  color: #b02626;
  border: 1px solid #f5b5b1;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px 14px 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.password-wrapper {
  position: relative;
}

.show-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.checkbox input { accent-color: var(--primary); }

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.login-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  width: 100%;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #0b1221;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(34, 197, 94, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 35px rgba(34, 197, 94, 0.4); }
.login-btn:active { transform: translateY(0); }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #0b1221;
  animation: spin 0.8s linear infinite;
}

.hidden { display: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border 0.2s, transform 0.15s ease;
}

.social-btn:hover { border-color: rgba(255,255,255,0.25); transform: translateY(-1px); }

.signup-link {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.signup-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.version {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

@media (max-width: 960px) {
  .login-container { grid-template-columns: 1fr; min-height: auto; }
  .login-background { display: none; }
}
