:root {
  --text: #0f172a;
  --muted: #64748b;
  --accent: #198754;
  --accent2: #0b5ed7;
  --accent-dark: #146c43;
  --stroke: #cad5eb;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Inter, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

.login-body {
  min-height: 100vh;
  background-color: #4d7c0f;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 45% at 82% 12%, rgba(253,224,71,.28), transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(22,101,52,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 35%, rgba(54,83,20,.12) 100%);
  pointer-events: none;
  z-index: 0;
  animation: login-glow 12s ease-in-out infinite alternate;
}

.login-body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 48px,
    rgba(255,255,255,.025) 48px,
    rgba(255,255,255,.025) 49px
  );
  opacity: .6;
  pointer-events: none;
  z-index: 0;
  animation: login-haze 40s linear infinite;
}

@keyframes login-glow {
  0% { opacity: .82; }
  100% { opacity: 1; }
}

@keyframes login-haze {
  0% { transform: translateX(0); }
  100% { transform: translateX(-49px); }
}

@media (max-width: 768px) {
  .login-body { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  .login-body::before,
  .login-body::after { animation: none; }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-body .auth-card {
  width: min(100%, 480px);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  box-shadow:
    0 28px 70px rgba(8, 40, 28, .32),
    0 0 0 1px rgba(255,255,255,.35);
  padding: 24px;
  display: grid;
  gap: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .2px;
}

.auth-brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.auth-brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  flex: 0 0 auto;
}

.page-heading {
  display: grid;
  gap: 6px;
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.page-heading .sub {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.lang-btn.active,
.lang-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-color: transparent;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.auth-alert .badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: var(--danger-text);
  font-size: 12px;
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  min-height: 48px;
}

.input::placeholder {
  color: #94a3b8;
}

.input:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(11,94,215,.18);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.remember-row label {
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: transform .14s ease, box-shadow .14s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(11,94,215,.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(11,94,215,.28);
}

.auth-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.auth-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.auth-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(148,163,184,.25);
}

@media (max-width: 576px) {
  .auth-page { padding: 16px; }
  .login-body .auth-card { padding: 20px 18px; gap: 16px; }
  .auth-brand { font-size: 1rem; }
  .auth-brand-logo { height: 36px; }
  .page-title { font-size: 1.45rem; }
  .input { font-size: 16px; }
}
