:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-auth: radial-gradient(circle at top right, #3b82f6 0%, #1e1b4b 100%);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --error: #ef4444;
  --radius-xl: 32px;
  --radius-lg: 16px;
  --shadow-auth: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-auth);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  color: var(--text-light);
}

/* Background effects */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://w.wallhaven.cc/full/8o/wallhaven-8o9m6j.jpg') center/cover;
  opacity: 0.1;
  z-index: -1;
}

/* Glass Card */
.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 50px 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-auth);
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 30px;
  background: white;
  padding: 15px;
  border-radius: 24px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  object-fit: contain;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 35px;
  letter-spacing: -0.02em;
  background: linear-gradient(to bottom, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.input-container {
  position: relative;
}

input, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
  outline: none;
}

select option {
  background-color: #1e1b4b; /* Solid dark color for visibility */
  color: white;
}

input:focus, select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

button[type="submit"] {
  background: var(--primary);
  color: white;
  padding: 16px;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}

button[type="submit"]:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.6);
}

.error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--error);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: left;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.retour_btn {
  display: inline-block;
  margin-top: 30px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

.retour_btn:hover {
  color: white;
}

/* PORTAL STYLES */
.portal-container {
  display: flex;
  gap: 30px;
  max-width: 900px;
  padding: 20px;
}

.portal-card {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 60px 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-auth);
}

.portal-card i {
  font-size: 4rem;
  margin-bottom: 25px;
  display: block;
  background: linear-gradient(to bottom, #6366f1, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 15px;
}

.portal-card p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.portal-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
  .portal-container { flex-direction: column; }
  .auth-card { width: 90vw; padding: 40px 20px; }
}