:root {
  --primary: #6366f1; 
  --primary-hover: #4f46e5;
  --text-dark: #0f172a; 
  --text-muted: #64748b; 
  --error: #ef4444;
  --success: #10b981;
  --bg-main: #ffffff;
  --border-color: #e2e8f0;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: var(--font-family); 
  background-color: var(--bg-main); 
  color: var(--text-dark); 
  -webkit-font-smoothing: antialiased;
}

/* --- UKŁAD SPLIT SCREEN --- */
.auth-split-layout {
  display: flex;
  min-height: 100vh;
}

.auth-form-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 40px 20px;
  background: #ffffff;
}

.auth-banner-section {
  flex: 1.2;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: white;
  padding: 40px;
}

/* Przycisk powrotu */
.back-btn {
  position: absolute;
  top: 2rem;
  left: 2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
  z-index: 10;
}
.back-btn:hover { color: var(--text-dark); }

/* Kontener formularza */
.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-header { text-align: center; margin-bottom: 2.5rem; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text-dark); font-size: 1.8rem; text-decoration: none; margin-bottom: 12px; }
.logo i { color: var(--primary); }
.auth-subtitle { color: var(--text-muted); font-size: 1rem; }

/* --- PRZEJŚCIA FORMULARZY --- */
.forms-wrapper {
  position: relative;
  min-height: 480px; /* Zwiększone, by pomieścić nowy układ z Google */
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}

.auth-form.active-form {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.auth-form.hidden-form {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-30px);
  visibility: hidden;
  position: absolute;
}

/* --- GOOGLE AUTH STYLES --- */
.btn-google {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.btn-google img {
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
  padding: 0 12px;
  font-weight: 500;
}

/* Inputy */
.input-group { position: relative; width: 100%; }
.input-group input {
  width: 100%;
  padding: 16px 16px 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
  outline: none;
}
.input-group input:focus, .input-group input:not(:placeholder-shown) { background: #ffffff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }
.input-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.2s ease;
}
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label {
  top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}
.toggle-password { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 4px; }
.toggle-password:hover { color: var(--text-dark); }

/* Opcje dodatkowe */
.form-options { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; margin-top: -5px; }
.remember-me { display: flex; align-items: center; gap: 6px; color: var(--text-muted); cursor: pointer; }
.remember-me input { accent-color: var(--primary); cursor: pointer; }
.forgot-password { color: var(--primary); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.forgot-password:hover { color: var(--primary-hover); }

/* Przycisk akcji */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}
.btn-submit:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-text.hidden { display: none; }

/* Alerty i loader */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 0.85rem; font-weight: 500; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.alert span { line-height: 1.4; }
.alert.hidden { display: none; }
.alert.error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }
.loader { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 0.8s linear infinite; }
.loader.hidden { display: none; }

/* Przełącznik na dole */
.auth-switch { text-align: center; margin-top: 2rem; font-size: 0.95rem; color: var(--text-muted); }
.switch-link { background: none; border: none; color: var(--primary); font-weight: 700; font-size: 0.95rem; font-family: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; transition: color 0.2s; margin-left: 5px; }
.switch-link:hover { color: var(--primary-hover); }


/* --- EKRAN WERYFIKACJI E-MAIL --- */
.verification-screen {
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  animation: pulse 2s infinite;
}

.verification-screen h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.verification-screen p {
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.5;
}

.verification-screen strong {
  color: var(--text-dark);
}

.verification-actions {
  width: 100%;
}

.verification-actions .hint {
  font-size: 0.85rem;
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}


/* --- PRAWA STRONA (DEKORACYJNA) --- */
.banner-content {
  max-width: 450px;
  z-index: 2;
}
.banner-content h2 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.banner-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 3rem; line-height: 1.5; }

/* Pływające kafelki (Showcase) */
.floating-ui-showcase {
  position: relative;
  height: 300px;
}
.mock-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: absolute;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  animation: float 6s ease-in-out infinite;
}
.card-1 { top: 20px; left: 0; width: 280px; }
.mock-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.8); }
.mock-lines .line { height: 10px; border-radius: 5px; background: rgba(255,255,255,0.6); margin-bottom: 8px; }
.mock-lines .short { width: 80px; }
.mock-lines .long { width: 140px; }

.mock-notification {
  background: #ffffff;
  color: var(--text-dark);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: absolute;
  bottom: 60px;
  right: -20px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  animation: float 7s ease-in-out infinite reverse;
}
.mock-notification i { font-size: 1.5rem; color: var(--success); }
.notif-title { display: block; font-weight: 700; font-size: 0.9rem; }
.notif-desc { display: block; font-size: 0.8rem; color: var(--text-muted); }

/* --- ANIMACJE --- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Responsywność */
@media (max-width: 900px) {
  .auth-banner-section { display: none; }
  .auth-form-section { padding: 80px 20px 40px; }
}