:root {
  --wine: #8e1b3d;
  --wine-deep: #6b1430;
  --cream: #faf6f2;
  --ink: #1f1418;
  --green: #2f6f4e;
  --muted: rgba(31, 20, 24, 0.62);
  --line: rgba(142, 27, 61, 0.16);
  --shadow: 0 24px 60px rgba(55, 12, 24, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

.ep-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
}

.ep-login__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(142, 27, 61, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(47, 111, 78, 0.2), transparent 50%),
    linear-gradient(160deg, #3a0f1d 0%, #8e1b3d 42%, #4a1a2a 100%);
  z-index: 0;
}

.ep-login__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.45;
}

.ep-login__card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: rgba(255, 252, 249, 0.96);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow);
  animation: ep-rise 0.7s ease-out both;
}

@keyframes ep-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.ep-login__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 700;
}

.ep-login__brand h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  line-height: 1.15;
  color: var(--wine-deep);
}

.ep-login__sub {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.ep-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.ep-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.ep-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-weight: 400;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ep-field input:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(142, 27, 61, 0.15);
}

.ep-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.ep-btn {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.ep-btn:hover { filter: brightness(1.05); }
.ep-btn:active { transform: translateY(1px); }
.ep-btn:disabled { opacity: 0.65; cursor: wait; }

.ep-alert {
  margin-top: 1.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ep-alert--err {
  background: #fde8ec;
  color: #7a1230;
  border: 1px solid rgba(142, 27, 61, 0.2);
}

.ep-alert--ok {
  background: #e7f5ee;
  color: #1d4d35;
  border: 1px solid rgba(47, 111, 78, 0.25);
}

.ep-login__foot {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.ep-login__foot a {
  color: var(--wine);
  text-decoration: none;
  font-weight: 600;
}

.ep-login__foot a:hover { text-decoration: underline; }

.ep-login__necty {
  color: var(--muted);
}

.ep-login__necty a { color: var(--green); }
