* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.card {
  width: min(92vw, 340px);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.logo svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 12px rgba(59,130,246,0.5));
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color 0.15s, background 0.15s;
}
.field:focus-within {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.08);
}

.field-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #64748b;
}
.field:focus-within .field-icon { color: #60a5fa; }

.field input {
  flex: 1;
  height: 48px;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 1rem;
  caret-color: #3b82f6;
}
.field input::placeholder { color: #475569; }

.error {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 10px;
  padding: 9px 12px;
  color: #fca5a5;
  font-size: 0.88rem;
}
.error[hidden] { display: none; }

.login-btn {
  align-self: flex-end;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.08s, opacity 0.15s;
  box-shadow: 0 4px 16px rgba(59,130,246,0.45);
}
.login-btn:hover  { background: #2563eb; transform: translateY(-1px); }
.login-btn:active { transform: scale(0.94); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-btn.loading svg { animation: spin 0.7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
