:root {
  --bg-color: #090d16;
  --card-bg: rgba(18, 24, 38, 0.85);
  --input-bg: rgba(11, 15, 25, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #10b981;
  --error: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.background-glow {
  position: absolute;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 430px;
  padding: 20px;
  z-index: 1;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.brand h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tabs {
  display: flex;
  background: var(--input-bg);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.form.active {
  display: flex;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 4px;
}

.submit-btn:hover {
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--error); color: white; }