/* LOGIN PREMIUM V4.0 - BIG ESCOLA PRO */
/* Mobile First Architecture & Modern Glassmorphism */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&display=swap");

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #ec4899;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-focus-border: #6366f1;
  --radius-lg: 1.5rem;
  --radius-md: 0.75rem;
  --shadow-premium:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* THEMES */
body.theme-admin {
  --primary-color: #3b82f6;
  --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}
body.theme-professor {
  --primary-color: #8b5cf6;
  --bg-gradient: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
}
body.theme-aluno {
  --primary-color: #10b981;
  --bg-gradient: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
}
body.theme-pais {
  --primary-color: #f97316;
  --bg-gradient: linear-gradient(135deg, #7c2d12 0%, #1e293b 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Elements */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 10s infinite alternate;
}
.shape-1 {
  top: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: var(--primary-color);
}
.shape-2 {
  bottom: -10%;
  right: -10%;
  width: 35vw;
  height: 35vw;
  background: var(--secondary-color);
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 50px);
  }
}

/* CONTAINER */
.login-container {
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  margin: 1rem;
  position: relative;
  z-index: 10;
}

/* GLASS CARD */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
}

/* HEADER */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #cbd5e1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FORM ELEMENTS - ACCESSIBILITY & TOUCH */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 1rem 3rem; /* Space for icon */
  font-size: 1rem;
  color: #fff;
  transition: all 0.3s ease;
  height: 52px; /* Minimum touch target size > 44px */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color 0.3s ease;
  pointer-events: none;
}

.form-control:focus + .input-icon {
  color: var(--primary-color);
}

/* BUTTONS */
.btn-login {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-login:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  width: 100%;
  padding: 10px; /* Touch target */
}

.btn-back:hover {
  color: white;
}

/* ALERTS */
.alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .glass-card {
    padding: 1.5rem;
  }
  .login-title {
    font-size: 1.5rem;
  }
}
