:root {
  --dark-bg: linear-gradient(to right, #0f2f33, #266567, #1b4d50);
  --light-bg: linear-gradient(to right, #f4f2ea, #e8e4d8, #dcd7c8);
  --dark-text: #ffffff;
  --light-text: #1f2a2a;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}

body {
  min-height: 100vh;
  background: var(--dark-bg);
  color: var(--dark-text);
  transition: background 0.6s ease, color 0.6s ease;
  overflow: hidden;
}

body.light {
  background: var(--light-bg);
  color: var(--light-text);
}

/* THEME BUTTON */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  color: inherit;
  z-index: 20;
}

/* SPLASH */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  z-index: 10;
  animation: splashOut 4s forwards;
}

.splash img {
  width: 60vw;
  max-width: 800px;
  animation: logoIn 1.2s ease forwards;
}

/* LOGO FINAL */
.logo-fixed {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 350px;
  opacity: 0;
  transform: scale(0.6);
  animation: logoDock 1s ease forwards;
  animation-delay: 3.2s;
  z-index: 5;
}

.logo-fixed img {
  width: 100%;
}

/* LOGIN */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: showLogin 1s ease forwards;
  animation-delay: 3.5s;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 36px;
  border-radius: 18px;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

body.light .login-card {
  background: rgba(255,255,255,0.65);
  box-shadow: 0 20px 60px rgba(38,101,103,0.15);
}

/* FORM */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

input {
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
}

body:not(.light) input {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

body.light input {
  background: #fff;
  color: #000;
}

button.primary {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(to right, #266567, #3fa3a0);
  color: #fff;
}

/* ANIMATIONS */
@keyframes logoIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes splashOut {
  0%,70% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

@keyframes logoDock {
  to { opacity: 1; transform: scale(1); }
}

@keyframes showLogin {
  to { opacity: 1; }
}
