/* auth.css — shared styling for the authentication gateway pages
   (login / register / reset-password).

   One cohesive "current brand" look: the product's radial gradient as a
   full-bleed backdrop, a single elevated white card holding the form, the
   brand blue (#3d647f) for primary actions and the mint accent (#03dac6) as a
   highlight. Self-contained on purpose — these pages are the front door, so
   they don't inherit the app's 80%-density base.css; they read at a
   comfortable, modern scale instead. */

:root {
  --ep-brand: #3d647f;
  --ep-brand-dark: #2f5066;
  --ep-brand-darker: #1f3d4f;
  --ep-mint: #03dac6;
  --ep-ink: #1f2933;
  --ep-muted: #5b6b78;
  --ep-line: #e2e8ee;
  --ep-bg-field: #ffffff;
  --ep-danger: #b3261e;
  --ep-radius: 14px;
  --ep-radius-sm: 9px;
  --ep-shadow: 0 24px 60px -20px rgba(15, 40, 60, 0.45);
  --ep-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.ep-auth {
  margin: 0;
  font-family: var(--ep-font);
  color: var(--ep-ink);
  /* Brand gradient — same family as the landing hero (#row1). */
  background: radial-gradient(125% 125% at 50% 0%, #2b7d86 0%, #3d647f 45%, #1f3d4f 100%) fixed;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Slim transparent top bar with the wordmark, linking home. */
.ep-auth-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1.1rem 1.5rem;
}
.ep-auth-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.ep-auth-topbar img { height: 1.5rem; width: auto; }

/* Centering wrapper for the card. */
.ep-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 3rem;
}

.ep-card {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow);
  padding: 2.25rem 2rem 2rem;
}

.ep-card-head {
  text-align: center;
  margin-bottom: 1.6rem;
}
.ep-card-head img {
  width: 58px;
  height: 58px;
  display: inline-block;
}
.ep-card-head h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0.9rem 0 0.35rem;
  color: var(--ep-ink);
}
.ep-card-head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ep-muted);
}

/* ---- Fields ---- */
.ep-field { margin-bottom: 1.05rem; }

.ep-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.ep-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ep-ink);
}
.ep-field-row .ep-label { margin-bottom: 0; }

.ep-link-sm {
  font-size: 0.82rem;
  color: var(--ep-brand);
  text-decoration: none;
  font-weight: 600;
}
.ep-link-sm:hover { text-decoration: underline; }

.ep-input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ep-ink);
  background: var(--ep-bg-field);
  border: 1.5px solid var(--ep-line);
  border-radius: var(--ep-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ep-input::placeholder { color: #9aa7b2; }
.ep-input:focus {
  outline: none;
  border-color: var(--ep-brand);
  box-shadow: 0 0 0 3px rgba(61, 100, 127, 0.16);
}
select.ep-input { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235b6b78'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 14px; padding-right: 2.2rem;
}

/* Password input with a show/hide toggle inside. */
.ep-password { position: relative; }
.ep-password .ep-input { padding-right: 2.6rem; }
.ep-password .ep-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--ep-muted);
  font-size: 0.95rem;
  line-height: 1;
}
.ep-password .ep-toggle:hover { color: var(--ep-brand); }

.ep-hint { font-size: 0.78rem; margin-top: 0.35rem; }
.ep-hint-caps { color: #9a6b00; }

/* Remember-me checkbox row */
.ep-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0 1.1rem;
  font-size: 0.88rem;
  color: var(--ep-muted);
  cursor: pointer;
  user-select: none;
}
.ep-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ep-brand);
  cursor: pointer;
}

/* ---- Buttons ---- */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.78rem 1rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--ep-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.ep-btn:active { transform: translateY(1px); }
.ep-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.ep-btn-primary {
  background: var(--ep-brand);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(61, 100, 127, 0.9);
}
.ep-btn-primary:hover:not([disabled]) { background: var(--ep-brand-dark); }

.ep-btn-ghost {
  background: transparent;
  color: var(--ep-brand);
  font-weight: 600;
  margin-top: 0.7rem;
}
.ep-btn-ghost:hover { text-decoration: underline; }

.ep-btn-oauth {
  background: #fff;
  color: var(--ep-ink);
  border: 1.5px solid var(--ep-line);
}
.ep-btn-oauth:hover { background: #f6f8fa; box-shadow: 0 2px 6px rgba(15,40,60,0.06); }
.ep-btn-oauth svg { width: 19px; height: 19px; }

/* ---- Divider ---- */
.ep-divider {
  display: flex;
  align-items: center;
  margin: 1.3rem 0;
  color: #9aa7b2;
  font-size: 0.82rem;
}
.ep-divider::before, .ep-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ep-line);
}
.ep-divider span { padding: 0 0.85rem; white-space: nowrap; }

/* ---- Footer link ---- */
.ep-card-foot {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--ep-muted);
}
.ep-card-foot a {
  color: var(--ep-brand);
  font-weight: 600;
  text-decoration: none;
}
.ep-card-foot a:hover { text-decoration: underline; }

/* ---- Inline banner (e.g. session expired) ---- */
.ep-banner {
  background: #fff7e6;
  border: 1px solid #f3d99a;
  color: #7a5a00;
  border-radius: var(--ep-radius-sm);
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  margin-bottom: 1.2rem;
}

/* ---- Magic-code section ---- */
.ep-code-sub {
  text-align: center;
  color: var(--ep-muted);
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
}
.ep-code-email {
  text-align: center;
  font-weight: 700;
  color: var(--ep-ink);
  margin: 0 0 1.1rem;
  word-break: break-all;
}
.ep-code-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.4rem 0 1.2rem;
}
.ep-code-inputs input {
  width: 2.7rem;
  height: 3.2rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ep-ink);
  border: 1.5px solid var(--ep-line);
  border-radius: var(--ep-radius-sm);
  background: #fff;
}
.ep-code-inputs input:focus {
  outline: none;
  border-color: var(--ep-brand);
  box-shadow: 0 0 0 3px rgba(61, 100, 127, 0.16);
}
.ep-code-actions { text-align: center; margin-top: 0.9rem; }
.ep-code-actions a {
  display: inline-block;
  color: var(--ep-brand);
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  margin: 0.2rem 0.5rem;
}
.ep-code-actions a:hover { text-decoration: underline; }

.ep-hidden { display: none !important; }
/* script.js toggles a bare `.hidden` class to show/hide the login banner,
   the magic-code section and the caps-lock hint — keep that hook defined. */
.hidden { display: none !important; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .ep-card {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 12px;
  }
  .ep-auth-main { padding: 0.5rem 0.85rem 2rem; }
  .ep-card-head h1 { font-size: 1.3rem; }
}
