@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.01rem;
}

/* Themes collection (imported from Figma - replace placeholders with exact tokens)
   Only the tokens in the "Themes" collection are included here. */
:root {
  --bg-color: #f7f7f7;
  --text-color: #1a1a1a;
  --text-color-1: #636363;
  --primary-color: #0000a2;
  --link-color: #0000a2;
  --button-text: #f7f7f7;
  --stroke-color: #d9d9d9;
  --white: #ffffff;

  /* Dark theme properties */
  [data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #f7f7f7;
    --text-color-1: #c9c9c9;
    --primary-color: #5757ff;
    --link-color: #5a5a87;
    --button-text: #f7f7f7;
    --stroke-color: #d9d9d9;
    --white: #2a2a2a;
  }
}

.main {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
}

.card-wrapper {
  width: 28%;
  height: auto;
  display: flex;
  flex-direction: column;
  margin: 7rem auto;
  justify-content: start;
  align-items: start;
  padding: 2rem 1.5rem;
  row-gap: 2.5rem;
  border-radius: 1rem;
  border: 2px solid var(--stroke-color, #d9d9d9);
  background: var(--white, #fff);
  box-shadow: 0 111px 31px 0 rgba(128, 128, 128, 0),
    0 71px 29px 0 rgba(128, 128, 128, 0.01),
    0 40px 24px 0 rgba(128, 128, 128, 0.05),
    0 18px 18px 0 rgba(128, 128, 128, 0.09),
    0 4px 10px 0 rgba(128, 128, 128, 0.1);
}

.top {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  row-gap: 0.5rem;
}

.heading {
  width: fit-content;
  height: auto;
}

.heading h1 {
  font-family: "Instrument Sans", sans-serif;
  font-size: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
  color: var(--text-color, #1a1a1a);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.125rem;
}

.subheading {
  width: fit-content;
  height: auto;
}

.subheading p {
  color: var(--text-color, #1a1a1a);
  text-align: center;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.01rem;
}

.middle {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  row-gap: 1.5rem;
}

.input-group {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  row-gap: 0.5rem;
}

.input-group label {
  color: var(--text-color, #1a1a1a);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01rem;
}

.input-group input {
  display: flex;
  padding: 1rem 0.75rem 1rem 1rem;
  align-items: center;
  align-self: stretch;
  border-radius: 0.5rem;
  border: 1px solid var(--stroke-color, #474747);
  font-size: 1rem;
  background-color: var(--white);
  color: var(--text-color-1);
}

.input-group input:focus {
  outline: none;
  border: 1px solid var(--primary-color, #0000a2);
  transition: 300ms;

  /* input active shadow */
  box-shadow: 0 0 8px 0 #4141f2;
}

.bottom {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  row-gap: 1.5rem;
}

.forgot-password-and-button-group {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  row-gap: 1rem;
}

.forgot-password {
  width: fit-content;
  height: auto;
}

.forgot-password p {
  color: var(--text-color, #1a1a1a);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01rem;
}

.login {
  width: 100%;
  height: auto;
  color: var(--button-text, #f7f7f7);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01rem;
  border-radius: 0.5rem;
  background: var(--primary-color, #0000a2);
}

.login:hover {
  box-shadow: 0 78px 22px 0 rgba(0, 0, 92, 0),
    0 50px 20px 0 rgba(0, 0, 92, 0.01), 0 28px 17px 0 rgba(0, 0, 92, 0.05),
    0 13px 13px 0 rgba(0, 0, 92, 0.09), 0 3px 7px 0 rgba(0, 0, 92, 0.1);
  transition: 150ms;
}

.google-sign-in {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  align-self: stretch;
  color: var(--text-color, #1a1a1a);
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01rem;
  border-radius: 0.5rem;
  border: 1px solid var(--stroke-color, #d9d9d9);
}

.google-sign-in span {
  width: 17px;
  height: 17px;
}

button {
  background-color: var(--white);
  width: 100%;
  height: auto;
  padding: 1rem;
  outline: none;
  border: none;
  cursor: pointer;
}

.sign-up-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  align-self: stretch;
}

.sign-up-container p {
  color: var(--text-color, #1a1a1a);
  text-align: center;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.00875rem;
}

.sign-up-container a {
  text-decoration: none;
  color: var(--link-color);
  font-family: Inter;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.00875rem;
}

@media (max-width: 1140px) {
  .main {
    width: 100%;
  }

  .card-wrapper {
    width: 70%;
  }

  .heading h1 {
    letter-spacing: -0.03125rem;
  }
}

@media (max-width: 480px) {
  .main {
    width: 100%;
  }

  .card-wrapper {
    width: 80%;
    row-gap: 1.5rem;
  }

  .heading h1 {
    letter-spacing: -0.03125rem;
  }

  .input-group {
    row-gap: 0.25rem;
  }

  .input-group input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .input-group label {
    font-size: 0.875rem;
  }

  .middle {
    row-gap: 1rem;
  }

  .forgot-password p {
    font-size: 0.875rem;
  }

  .bottom {
    row-gap: 1rem;
  }

  .google-sign-in {
    column-gap: 0.5rem;
  }

  .google-sign-in,
  button {
    padding: 0.75rem 1rem;
  }

  .forgot-password-and-button-group {
    row-gap: 0.5rem;
  }

  .login,
  .google-sign-in {
    font-size: 0.875rem;
  }
}

/* Dark theme overrides (system preference and attribute toggle) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #f7f7f7;
    --text-color-1: #c9c9c9;
    --primary-color: #5757ff;
    --link-color: #5757ff;
    --button-text: #f7f7f7;
    --stroke-color: #4c4c4c;
    --white: #2a2a2a;
  }

  .input-group input:focus {
    transition: 150ms;
    box-shadow: 0 0 2px 0 var(--primary-color);
  }

  .card-wrapper {
    box-shadow: 0 111px 31px 0 rgba(0, 0, 0, 0),
      0 71px 28px 0 rgba(0, 0, 0, 0.01), 0 40px 24px 0 rgba(0, 0, 0, 0.05),
      0 18px 18px 0 rgba(0, 0, 0, 0.09), 0 4px 10px 0 rgba(0, 0, 0, 0.1);
  }

  .sign-up-container a {
    color: var(--link-color);
  }
}
