/* ===========================================================
 * Auth pages: sign in, request password reset, set new password.
 * Self-contained — does not rely on Tailwind. Owns its own
 * fonts, layout, and full-bleed background.
 * =========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Archivo:wght@400;500;600;700&display=swap");

.auth-page {
  --bg: #07080b;
  --panel: #11151c;
  --panel-2: #161c25;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e8eaed;
  --muted: #8a93a3;
  --dim: #5a6170;
  --accent: #ff2d3d;
  --accent-deep: #b8141f;
  --amber: #ffc043;
  --green: #2ee6a0;

  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: "Archivo", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% 10%, rgba(255, 45, 61, 0.12), transparent 60%),
    radial-gradient(800px 480px at 92% 110%, rgba(46, 230, 160, 0.05), transparent 60%),
    linear-gradient(180deg, #050609 0%, #07080b 60%, #050609 100%);
  overflow: hidden;
}

/* Diagonal racing-stripe backdrop, rendered behind the card. */
.auth-page::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0,
    transparent 140px,
    rgba(255, 255, 255, 0.018) 140px,
    rgba(255, 255, 255, 0.018) 142px
  );
  pointer-events: none;
}

.auth-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.022) 100%),
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.022) 100%);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Card */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line-2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.35);
  padding: 36px 36px 32px;
  z-index: 1;
  animation: auth-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 0 18px rgba(255, 45, 61, 0.5);
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand mark */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-brand-mark {
  width: 44px;
  height: 44px;
  position: relative;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 900;
  font-size: 17px;
  color: #0a0c10;
  padding-right: 8px;
}

.auth-brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; }

.auth-brand-title {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.06em;
}
.auth-brand-title em { color: var(--accent); font-style: normal; }

.auth-brand-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Title */
.auth-title {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.auth-subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 28px;
}

/* Flash messages */
.auth-flash {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-left: 3px solid;
}
.auth-flash--alert  { background: rgba(255, 45, 61, 0.08);  border-color: var(--accent); color: #ffd5d9; }
.auth-flash--notice { background: rgba(46, 230, 160, 0.08); border-color: var(--green);  color: #c5f7e0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

/* Form */
.auth-field { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

input.auth-input,
.auth-page input.auth-input {
  width: 100%;
  background: #0c0f14;
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 0;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input::placeholder { color: var(--dim); }
input.auth-input:focus,
.auth-page input.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #0e1218;
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(255, 45, 61, 0.18);
}
.auth-input:autofill,
.auth-input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0c0f14 inset;
  caret-color: var(--text);
}

/* Submit button */
.auth-submit {
  width: 100%;
  display: block;
  background: var(--accent);
  color: #0a0c10;
  border: 0;
  padding: 14px 18px;
  margin-top: 8px;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
.auth-submit:hover {
  background: #ff4855;
  box-shadow: 0 0 24px rgba(255, 45, 61, 0.35);
}
.auth-submit:active { transform: translateY(1px); }

/* Footer link row */
.auth-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.auth-footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 1px;
}
.auth-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Status row at the very top of the page, mimicking the admin chrome. */
.auth-status {
  position: absolute;
  top: 18px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  z-index: 2;
}
.auth-status .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: led-blink 1.4s ease-in-out infinite;
}
@keyframes led-blink {
  0%, 60% { opacity: 1; }
  80%, 100% { opacity: 0.4; }
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 26px 22px 22px; }
  .auth-title { font-size: 26px; }
}

/* The default <main> wrapper and cmdbar header from the application layout
 * get in the way of the full-bleed auth experience — neutralize them. */
body:has(.auth-page) main.console { padding: 0; margin: 0; max-width: none; }
body:has(.auth-page) > header.cmdbar { display: none; }
