/* ==========================================================================
   SPJ EXPRESS — Auth pages stylesheet (login & register)
   Same ledger concept as the landing page: ink background, brass accent,
   hairline rules instead of shadowed panels. The register screen keeps a
   printed "information sheet" (paper) beside an active "fill-in" (ink) side.
   ========================================================================== */

:root {
  --ink: #121a2b;
  --ink-soft: #182238;
  --ink-field: #101725;
  --paper: #efe9da;
  --paper-dim: #cfc6ac;
  --line: rgba(239, 233, 218, 0.14);
  --line-strong: rgba(239, 233, 218, 0.28);
  --line-on-paper: rgba(18, 26, 43, 0.14);
  --text: #eee9dd;
  --text-muted: #9aa3b8;
  --brass: #c69a48;
  --brass-soft: rgba(198, 154, 72, 0.14);
  --error: #c1685f;
  --error-soft: rgba(193, 104, 95, 0.12);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  background: var(--ink);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% 0%, rgba(198, 154, 72, 0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(92, 138, 104, 0.06), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.auth-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= SHARED FORM ELEMENTS ================= */

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.input-group input,
.input-group select {
  width: 100%;
  background: var(--ink-field);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.input-group input::placeholder {
  color: rgba(238, 233, 221, 0.35);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(198, 154, 72, 0.05);
}

.input-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa3b8' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

.input-group select option {
  background: var(--ink-field);
  color: var(--text);
}

.password-group .input-wrapper {
  position: relative;
}

.password-group input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 15px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  user-select: none;
}

.toggle-password:hover {
  opacity: 1;
}

.btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 20px;
  border: none;
  border-radius: 5px;
  background: var(--brass);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: #d8ab5c;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.7;
  transform: none;
  cursor: default;
}

.error-box {
  border: 1px solid rgba(193, 104, 95, 0.4);
  background: var(--error-soft);
  color: #e3a9a2;
  border-radius: 5px;
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.auth-link {
  margin-top: 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 154, 72, 0.4);
}

.auth-link a:hover {
  border-bottom-color: var(--brass);
}

/* ================= LOGIN CARD ================= */

.card {
  width: 100%;
  max-width: 400px;
  background: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 40px 34px 34px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: var(--brass);
  border-radius: 0 0 3px 3px;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.auth-header-logo {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  padding: 6px;
  background: var(--ink-field);
}

.auth-header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  color: var(--text);
}

.auth-header h2 span.light {
  opacity: 0.7;
  font-weight: 500;
}

.auth-header p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer .brand-line {
  font-weight: 600;
  color: var(--text);
}

.auth-footer .foot-mark {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--brass);
  opacity: 0.8;
}

/* ================= REGISTER SPLIT CARD ================= */

.auth-card-split {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}

.auth-left {
  background: var(--paper);
  color: var(--ink);
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-left h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  color: var(--ink);
}

.auth-left .subtitle {
  margin-top: 12px;
  color: rgba(18, 26, 43, 0.65);
  font-size: 14px;
  max-width: 32ch;
}

.benefits {
  list-style: none;
  margin-top: 30px;
  border-top: 1px solid var(--line-on-paper);
}

.benefits li {
  padding: 13px 0 13px 20px;
  font-size: 13.5px;
  color: rgba(18, 26, 43, 0.8);
  border-bottom: 1px solid var(--line-on-paper);
  position: relative;
}

.benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 1.5px;
  background: var(--brass);
}

.auth-right {
  padding: 48px 42px;
}

.auth-right h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 24px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 860px) {
  .auth-card-split {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .auth-left {
    padding: 36px 32px 30px;
  }

  .auth-right {
    padding: 32px 32px 36px;
  }

  .benefits {
    margin-top: 22px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 24px 14px;
  }

  .card {
    padding: 30px 22px 26px;
  }

  .auth-header {
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .auth-header-logo {
    width: 46px;
    height: 46px;
  }

  .auth-header h2 {
    font-size: 21px;
  }

  .auth-left,
  .auth-right {
    padding: 28px 22px;
  }

  .auth-left h2,
  .auth-right h2 {
    font-size: 21px;
  }
}
