[hidden] {
  display: none !important;
}

:root {
  --auth-ink: #151515;
  --auth-lime: #f5ff68;
  --auth-paper: #f5f3ec;
}

body:not(.is-authenticated) {
  background: var(--auth-ink);
}

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 25%, rgba(183, 164, 255, 0.22), transparent 30%),
    radial-gradient(circle at 82% 76%, rgba(245, 255, 104, 0.13), transparent 32%),
    var(--auth-ink);
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.auth-brand {
  position: absolute;
  z-index: 4;
  top: 30px;
  left: max(30px, calc((100vw - 1180px) / 2));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font: 800 25px/1 "Syne", sans-serif;
  letter-spacing: -0.06em;
}

.auth-brand img {
  display: block;
}

.auth-layout {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 100px;
  align-items: center;
  margin-inline: auto;
  padding: 130px 0 70px;
}

.auth-intro {
  max-width: 580px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45db91;
  box-shadow: 0 0 0 6px rgba(69, 219, 145, 0.1);
}

.auth-intro h1 {
  margin: 0;
  font: 800 clamp(55px, 6vw, 82px)/1 "Syne", sans-serif;
  letter-spacing: -0.075em;
}

.auth-intro h1 em {
  position: relative;
  color: var(--auth-ink);
  font-style: normal;
  white-space: nowrap;
}

.auth-intro h1 em::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px -10px 1px -5px;
  background: var(--auth-lime);
  transform: rotate(-2deg);
}

.auth-intro > p {
  max-width: 540px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 16px;
  line-height: 1.8;
}

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 50px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.auth-proof div {
  display: flex;
  flex-direction: column;
  padding: 17px 18px;
  background: rgba(21, 21, 21, 0.92);
}

.auth-proof strong {
  color: var(--auth-lime);
  font: 800 20px/1 "Syne", sans-serif;
}

.auth-proof span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 700;
}

.login-card {
  min-height: 470px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 23px;
  color: var(--auth-ink);
  background: rgba(252, 251, 247, 0.96);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1.5px solid var(--auth-ink);
  border-radius: 13px;
  background: var(--auth-lime);
  font-size: 20px;
  font-weight: 800;
}

.login-card-head p {
  margin: 0 0 4px;
  color: rgba(21, 21, 21, 0.48);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-card h2 {
  margin: 0;
  font: 800 25px/1.2 "Syne", sans-serif;
  letter-spacing: -0.05em;
}

.login-hint {
  margin: 24px 0;
  color: rgba(21, 21, 21, 0.58);
  font-size: 12px;
}

.login-card form {
  display: flex;
  flex-direction: column;
}

.login-card label {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid rgba(21, 21, 21, 0.18);
  border-radius: 10px;
  outline: none;
  background: #fff;
  font: 600 14px/1 "Manrope", sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card input:focus {
  border-color: var(--auth-ink);
  box-shadow: 0 0 0 4px rgba(245, 255, 104, 0.45);
}

.login-card input::placeholder {
  color: rgba(21, 21, 21, 0.3);
}

.login-card input.code-input {
  height: 64px;
  text-align: center;
  font: 800 27px/1 "DM Sans", sans-serif;
  letter-spacing: 0.3em;
}

.login-submit {
  height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 0 17px;
  border: 1.5px solid var(--auth-ink);
  border-radius: 10px;
  color: #fff;
  background: var(--auth-ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(21, 21, 21, 0.18);
}

.field-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #bf402e;
  font-size: 10px;
  font-weight: 700;
}

.demo-code {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px dashed rgba(21, 21, 21, 0.24);
  border-radius: 8px;
  color: rgba(21, 21, 21, 0.55);
  background: rgba(245, 255, 104, 0.24);
  font-size: 10px;
}

.demo-code strong {
  color: var(--auth-ink);
  letter-spacing: 0.1em;
}

.back-button {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  color: rgba(21, 21, 21, 0.55);
  background: none;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(21, 21, 21, 0.1);
  color: rgba(21, 21, 21, 0.44);
  font-size: 8px;
  font-weight: 700;
}

.login-footer a {
  color: var(--auth-ink);
  text-decoration: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.orbit-a {
  top: 50%;
  left: -220px;
  width: 660px;
  height: 660px;
  transform: translateY(-50%);
}

.orbit-b {
  right: -300px;
  bottom: -380px;
  width: 780px;
  height: 780px;
  border-style: dashed;
}

.auth-node {
  position: absolute;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.node-one { top: 19%; left: 4%; }
.node-two { bottom: 13%; left: 22%; }
.node-three { top: 13%; right: 20%; }
.node-four { right: 6%; bottom: 19%; }

/* Authenticated app shell refinements */
#productApp {
  min-height: 100vh;
}

#productApp .main {
  background:
    radial-gradient(circle at 92% 2%, rgba(183, 148, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #f7f5ef, #fff9cd);
}

#productApp .topbar {
  align-items: center;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 7px 5px 6px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.app-user-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.app-user div {
  display: flex;
  flex-direction: column;
  min-width: 90px;
  max-width: 150px;
}

.app-user strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user button {
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(29, 28, 28, 0.06);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.app-user button:hover {
  color: #fff;
  background: var(--ink);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 55px;
    padding-top: 145px;
  }

  .auth-intro {
    text-align: center;
    margin-inline: auto;
  }

  .auth-intro > p {
    margin-inline: auto;
  }

  .login-card {
    width: min(430px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .auth-brand {
    top: 20px;
    left: 20px;
  }

  .auth-layout {
    width: calc(100% - 28px);
    gap: 38px;
    padding: 115px 0 30px;
  }

  .auth-intro h1 {
    font-size: 48px;
  }

  .auth-intro > p {
    font-size: 13px;
  }

  .auth-proof {
    margin-top: 30px;
  }

  .auth-proof div {
    padding: 13px 9px;
  }

  .auth-proof strong {
    font-size: 16px;
  }

  .login-card {
    min-height: 440px;
    padding: 25px 20px;
    border-radius: 17px;
  }

  .topbar-actions {
    width: 100%;
  }

  .search-input {
    min-width: 0;
    flex: 1;
  }

  .app-user div {
    display: none;
  }

  .app-user {
    min-height: 40px;
  }
}
