/* =========================================================
   LOG IN — THE PURPLE LIBRARY
========================================================= */

:root {
  --login-bg: #160b31;
  --login-panel: rgba(37, 19, 66, 0.76);
  --login-panel-strong: #2a154e;

  --login-accent: #ff4fa0;
  --login-lavender: #cfa9ff;

  --login-border: rgba(255, 255, 255, 0.12);

  --login-muted: #d8c8ef;
  --login-muted-soft: #bca7da;

  --login-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

/* =========================================================
   RESET
========================================================= */

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

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;

  font-family: Inter, sans-serif;
  color: white;

  background: radial-gradient(
    circle at top,
    #6c3aa0 0%,
    #241246 46%,
    #12091f 100%
  );
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

/* =========================================================
   HEADER
========================================================= */

.login-header-nav {
  position: sticky;
  top: 0;
  z-index: 20;

  min-height: 76px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;

  padding: 0 42px;

  background: #2d1658;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;

  color: white;
  text-decoration: none;
}

.login-brand-dot {
  width: 18px;
  height: 18px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--login-accent);

  box-shadow: 0 0 18px rgba(255, 79, 160, 0.45);
}

.login-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.login-brand strong {
  color: white;

  font-size: 27px;
  font-weight: 900;

  letter-spacing: -0.04em;
  line-height: 1;
}

.login-brand small {
  color: var(--login-muted);

  font-size: 11px;
  font-weight: 800;
}

.login-main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.login-main-nav a {
  color: white;
  text-decoration: none;

  font-size: 15px;
  font-weight: 900;
}

.login-main-nav a:hover,
.login-auth a.active {
  color: var(--login-accent);
}

.login-add-link {
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 22px;

  border: 1px solid rgba(207, 169, 255, 0.42);

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);

  color: var(--login-accent) !important;
}

.login-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.login-auth a {
  color: white;
  text-decoration: none;

  font-size: 15px;
  font-weight: 900;
}

.login-signup {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 26px;

  border-radius: 999px;

  background: var(--login-accent);

  box-shadow: 0 12px 28px rgba(255, 79, 160, 0.24);
}

/* =========================================================
   PAGE
========================================================= */

.login-shell {
  width: min(1320px, 100%);

  margin: 0 auto;

  padding: 52px 32px 120px;
}

/* =========================================================
   HERO

   HTML order:
   1. Brand
   2. Hero copy

   Desktop visual order:
   Hero copy LEFT
   Brand RIGHT
========================================================= */

.login-hero-panel {
  display: flex;

  /*
       Source order is:
       BRAND first,
       HERO second.

       row-reverse makes:
       HERO visually left,
       BRAND visually right.
    */
  flex-direction: row-reverse;

  gap: 24px;

  align-items: stretch;
}

/* =========================================================
   HERO COPY — LEFT
========================================================= */

.login-hero-copy {
  flex: 1 1 auto;
  min-width: 0;

  padding: 44px;

  border: 1px solid var(--login-border);

  border-radius: 34px;

  background: var(--login-panel);

  box-shadow: var(--login-shadow);
}

.login-kicker,
.login-section-kicker {
  min-height: 29px;

  display: inline-flex;
  align-items: center;

  padding: 0 11px;

  margin-bottom: 18px;

  border-radius: 999px;

  background: #ffe4f1;
  color: #9f2f68;

  font-size: 11px;
  font-weight: 900;

  letter-spacing: 0.06em;

  text-transform: uppercase;
}

.login-hero-copy h1 {
  max-width: 860px;

  color: white;

  font-family: Georgia, "Times New Roman", serif;

  font-size: clamp(54px, 5.2vw, 76px);

  line-height: 0.94;

  letter-spacing: -0.06em;
}

.login-hero-intro {
  max-width: 760px;

  margin-top: 18px;

  color: var(--login-muted);

  font-size: 17px;

  line-height: 1.65;
}

/* =========================================================
   HERO FEATURES
========================================================= */

.login-feature-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 12px;

  margin-top: 30px;
}

.login-feature-grid article {
  min-width: 0;

  display: flex;

  align-items: flex-start;

  gap: 12px;

  padding: 16px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.08);
}

.login-feature-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius: 16px;

  background: var(--login-accent);

  color: white;
}

.login-feature-icon svg {
  width: 20px;
  height: 20px;
}

.login-feature-grid h3 {
  color: white;

  font-size: 14px;
  font-weight: 900;
}

.login-feature-grid p {
  margin-top: 4px;

  color: var(--login-muted);

  font-size: 12px;

  line-height: 1.45;
}

/* =========================================================
   BRAND PANEL — RIGHT
========================================================= */

.login-brand-panel {
  position: relative;

  width: 320px;

  flex: 0 0 320px;

  overflow: hidden;

  display: flex;
  flex-direction: column;

  justify-content: space-between;

  padding: 30px;

  border: 1px solid var(--login-border);

  border-radius: 34px;

  background: var(--login-panel);

  box-shadow: var(--login-shadow);

  isolation: isolate;
}

.login-brand-glow {
  position: absolute;

  width: 290px;
  height: 290px;

  top: 22px;
  left: 50%;

  transform: translateX(-50%);

  z-index: -1;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 79, 160, 0.18) 0%,
    rgba(133, 78, 205, 0.12) 48%,
    transparent 72%
  );

  filter: blur(10px);
}

.login-brand-logo {
  width: 100%;
  max-width: 245px;

  height: auto;

  display: block;

  margin: 28px auto 58px;

  object-fit: contain;
}

.login-brand-message {
  display: grid;

  gap: 18px;
}

.login-brand-eyebrow {
  color: white;

  font-size: 13px;
  font-weight: 600;

  line-height: 1.4;
}

.login-brand-message h2 {
  max-width: 260px;

  color: white;

  font-size: 24px;
  font-weight: 900;

  line-height: 1.08;
}

.login-brand-message p {
  color: var(--login-muted);

  font-size: 14px;

  line-height: 1.55;
}

/* =========================================================
   LOWER LAYOUT
========================================================= */

.login-layout {
  display: grid;

  grid-template-columns:
    420px
    minmax(0, 1fr);

  gap: 24px;

  align-items: start;

  /*
       THIS WAS MISSING BEFORE.
       Keeps lower cards separate from hero.
    */
  margin-top: 24px;
}

.login-info-panel,
.login-card {
  border: 1px solid var(--login-border);

  border-radius: 30px;

  background: var(--login-panel);

  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   ACCOUNT PANEL
========================================================= */

.login-info-panel {
  padding: 28px;
}

.login-info-panel h2,
.login-card-heading h2 {
  color: white;

  font-family: Georgia, "Times New Roman", serif;

  font-size: clamp(32px, 3vw, 38px);

  line-height: 0.98;

  letter-spacing: -0.04em;
}

.login-info-intro,
.login-card-heading p {
  margin-top: 10px;

  color: var(--login-muted);

  font-size: 14px;

  line-height: 1.55;
}

.login-path-list {
  display: grid;

  gap: 12px;

  margin-top: 22px;
}

.login-path-list article {
  display: flex;

  align-items: flex-start;

  gap: 14px;

  padding: 16px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 22px;

  background: rgba(255, 255, 255, 0.07);
}

.login-path-list article > span {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius: 16px;

  background: var(--login-accent);

  color: white;
}

.login-path-list svg {
  width: 21px;
  height: 21px;
}

.login-path-list h3 {
  color: white;

  font-size: 15px;
  font-weight: 900;
}

.login-path-list p {
  margin-top: 5px;

  color: var(--login-muted);

  font-size: 12px;

  line-height: 1.45;
}

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

.login-card {
  min-width: 0;

  padding: 30px;
}

.login-card-heading {
  margin-bottom: 24px;
}

.login-form-kicker {
  display: inline-flex;

  margin-bottom: 10px;

  color: var(--login-lavender);

  font-size: 11px;
  font-weight: 900;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}

/* =========================================================
   FORM
========================================================= */

.login-form {
  display: grid;

  gap: 20px;
}

.login-field {
  display: grid;

  gap: 8px;
}

.login-field > span {
  color: var(--login-muted);

  font-size: 12px;
  font-weight: 900;
}

.login-field input,
.login-password-row input {
  width: 100%;

  min-height: 52px;

  padding: 0 15px;

  border: 1px solid rgba(255, 255, 255, 0.14);

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.08);

  color: white;

  font-size: 14px;
  font-weight: 800;

  outline: none;
}

.login-field input:focus,
.login-password-row input:focus {
  border-color: rgba(255, 79, 160, 0.7);

  box-shadow: 0 0 0 4px rgba(255, 79, 160, 0.12);
}

.login-field input::placeholder,
.login-password-row input::placeholder {
  color: var(--login-muted-soft);
}

/* =========================================================
   AUTOFILL FIX
========================================================= */

.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus,
.login-password-row input:-webkit-autofill,
.login-password-row input:-webkit-autofill:hover,
.login-password-row input:-webkit-autofill:focus {
  -webkit-text-fill-color: white;

  -webkit-box-shadow: 0 0 0 1000px #3a2759 inset;

  transition: background-color 9999s ease-in-out 0s;
}

/* =========================================================
   PASSWORD
========================================================= */

.login-password-row {
  position: relative;
}

.login-password-row input {
  padding-right: 56px;
}

.login-password-row button {
  position: absolute;

  top: 50%;
  right: 8px;

  width: 40px;
  height: 40px;

  transform: translateY(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.08);

  color: var(--login-muted);
}

.login-password-row svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   OPTIONS
========================================================= */

.login-options-row {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 14px;

  color: var(--login-muted);

  font-size: 13px;
  font-weight: 800;
}

.login-remember {
  display: flex;

  align-items: center;

  gap: 9px;
}

.login-remember input {
  width: 17px;
  height: 17px;

  accent-color: var(--login-accent);
}

.login-options-row a {
  color: var(--login-accent);

  text-decoration: none;

  font-weight: 900;
}

/* =========================================================
   STATUS
========================================================= */

.login-status {
  padding: 13px 15px;

  border-radius: 14px;

  color: white;

  background: rgba(255, 79, 160, 0.12);

  border: 1px solid rgba(255, 79, 160, 0.25);

  font-size: 13px;

  line-height: 1.5;
}

/* =========================================================
   BUTTONS
========================================================= */

.login-submit,
.login-google {
  min-height: 54px;

  width: 100%;

  border-radius: 999px;

  color: white;

  font-size: 14px;
  font-weight: 900;
}

.login-submit {
  border: 0;

  background: var(--login-accent);

  box-shadow: 0 12px 28px rgba(255, 79, 160, 0.24);
}

.login-google {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(255, 255, 255, 0.1);
}

.login-google svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   DIVIDER
========================================================= */

.login-divider {
  position: relative;

  text-align: center;
}

.login-divider::before {
  content: "";

  position: absolute;

  top: 50%;
  left: 0;
  right: 0;

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.login-divider span {
  position: relative;

  padding: 0 13px;

  background: var(--login-panel-strong);

  color: var(--login-muted);

  font-size: 12px;
  font-weight: 900;
}

/* =========================================================
   FOOTER COPY
========================================================= */

.login-signup-link {
  color: var(--login-muted);

  text-align: center;

  font-size: 14px;
}

.login-signup-link a {
  color: var(--login-accent);

  text-decoration: none;

  font-weight: 900;
}

.login-terms {
  display: block;

  color: var(--login-muted-soft);

  font-size: 12px;

  line-height: 1.6;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
  .login-header-nav {
    grid-template-columns: 1fr;

    gap: 18px;

    padding: 18px 22px;
  }

  .login-main-nav {
    justify-content: flex-start;

    gap: 18px;

    overflow-x: auto;

    padding-bottom: 4px;
  }

  .login-auth {
    justify-content: flex-start;
  }

  /*
       On smaller screens we stop reversing.

       Because BRAND is first in HTML,
       it automatically appears first.
    */
  .login-hero-panel {
    flex-direction: column;
  }

  .login-brand-panel {
    width: 100%;

    flex-basis: auto;

    min-height: 350px;
  }

  .login-brand-logo {
    max-width: 230px;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .login-shell {
    padding: 32px 18px 90px;
  }

  .login-hero-panel,
  .login-layout {
    gap: 18px;
  }

  .login-layout {
    margin-top: 18px;
  }

  .login-hero-copy {
    padding: 30px 24px;
  }

  .login-hero-copy h1 {
    font-size: 48px;
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 320px;

    padding: 24px;
  }

  .login-brand-logo {
    max-width: 190px;

    margin: 20px auto 42px;
  }

  .login-info-panel,
  .login-card {
    padding: 24px;
  }

  .login-options-row {
    flex-direction: column;

    align-items: flex-start;
  }
}

.login-status[data-type="error"] {
  background: rgba(220, 60, 100, 0.12);
  border-color: rgba(255, 90, 130, 0.32);
}

.login-status[data-type="success"] {
  background: rgba(70, 190, 125, 0.12);
  border-color: rgba(90, 210, 145, 0.3);
}

.login-status[data-type="info"] {
  background: rgba(150, 105, 225, 0.12);
  border-color: rgba(180, 140, 245, 0.28);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
