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

:root {
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "General Sans", sans-serif;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light {
  background: radial-gradient(circle at top, rgba(0,0,0,0.03), transparent 35%), #f7f7f7;
  color: #111;
}

body.dark {
  background: radial-gradient(circle at top, rgba(255,255,255,0.04), transparent 30%), #0c0c0c;
  color: #f5f5f5;
}

/* ── PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

/* ── CARD ── */
.login-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: cardIn 0.35s ease;
}

body.light .login-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 30px 80px rgba(0,0,0,0.08);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LOGO ── */
.login-logo {
  display: flex;
  justify-content: center;
}

.login-logo img {
  height: 56px;
  width: auto;
  transition: filter 0.4s ease;
}

body.dark .login-logo img { filter: invert(1); }

/* ── COPY ── */
.login-copy { text-align: center; }

.login-copy h1 {
  font-size: 1.75rem;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.login-copy p {
  font-size: 0.92rem;
  opacity: 0.55;
}

/* ── FORM ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.65;
}

.field input {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: inherit;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: 0.22s ease;
}

body.light .field input {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
}

.field input:focus {
  border-color: rgba(255,59,59,0.5);
  box-shadow: 0 0 0 4px rgba(255,59,59,0.08);
}

/* ── ERROR ── */
.login-err {
  font-size: 0.85rem;
  color: #ff5b5b;
  background: rgba(255,59,59,0.08);
  border: 1px solid rgba(255,59,59,0.18);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  text-align: center;
}

.hidden { display: none !important; }

/* ── BUTTON ── */
.login-btn {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: #ff3b3b;
  color: #fff;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.22s ease;
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

.login-btn:hover {
  background: #e02e2e;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,59,59,0.3);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── THEME TOGGLE (floating) ── */
.theme-toggle-float {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(8px);
}

body.light .theme-toggle-float {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,0,0,0.06);
}

.theme-toggle-float:hover { transform: scale(1.08); }

.theme-toggle-float img { width: 20px; height: 20px; }
body.light .theme-toggle-float img { filter: brightness(0.2); }
