:root{
  --bg-1: #0b1220;
  --bg-2: #0a1b2e;

  --text: #eaf0ff;
  --muted: rgba(234,240,255,0.70);

  --accent: #38bdf8;
  --accent-2: #22c55e;
  --danger: #fb7185;

  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --radius: 18px;
  --focus: 0 0 0 4px rgba(56,189,248,.22);

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{
  box-sizing: border-box;
}

body{
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 15% 15%, rgba(56,189,248,.22), transparent 60%),
    radial-gradient(900px 600px at 85% 80%, rgba(34,197,94,.16), transparent 60%),
    radial-gradient(700px 500px at 40% 90%, rgba(251,113,133,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 24px;
}

/* textura sutil */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.08), transparent 50%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.07), transparent 50%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.06), transparent 50%);
  opacity: .55;
}

.login-page{
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* logo no topo */
.logo-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-img{
  width: 92px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(56,189,248,.35));
  transition: transform .25s ease, filter .25s ease;
}

.logo-img:hover{
  transform: scale(1.05);
  filter: drop-shadow(0 0 24px rgba(34,197,94,.45));
}

.logo-title{
  margin: 14px 0 6px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.logo-subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* card */
.card{
  width: 100%;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.card::before{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: .85;
}

.card h2{
  margin: 6px 0 18px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.field{
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

label{
  font-size: 13px;
  color: var(--muted);
}

input{
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(8, 14, 25, 0.45);
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder{
  color: rgba(234,240,255,0.45);
}

input:focus{
  border-color: rgba(56,189,248,.55);
  box-shadow: var(--focus);
  background: rgba(8, 14, 25, 0.58);
}

input:hover{
  border-color: rgba(255,255,255,0.26);
}

.actions{
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

button{
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
  transition: transform .08s ease, filter .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary{
  color: #06101a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 28px rgba(34,197,94,.18), 0 12px 26px rgba(56,189,248,.18);
  position: relative;
  overflow: hidden;
}

.btn-primary::after{
  content:"";
  position: absolute;
  top: -30%;
  left: -40%;
  width: 60%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: rotate(18deg);
  opacity: 0;
  transition: opacity .2s ease, transform .4s ease;
}

.btn-primary:hover{
  filter: brightness(1.03);
  box-shadow: 0 18px 34px rgba(34,197,94,.20), 0 16px 32px rgba(56,189,248,.20);
}

.btn-primary:hover::after{
  opacity: .9;
  transform: translateX(140%) rotate(18deg);
}

.btn-primary:active{
  transform: translateY(1px);
}

.btn-ghost{
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
}

.btn-ghost:hover{
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.24);
}

.btn-ghost:active{
  transform: translateY(1px);
}

.error{
  display: none;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(251,113,133,0.14);
  border: 1px solid rgba(251,113,133,0.25);
  color: #ffd1da;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
}

@media (max-width: 480px){
  body{
    padding: 18px;
  }

  .logo-title{
    font-size: 24px;
  }

  .card{
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    animation: none !important;
  }
}