*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --fg: #0a0a0a;
  --muted: #737373;
  --border: #e5e5e5;
  --primary: #288efb;
  --primary-fg: #eff6ff;
  --bg: #ffffff;
  --ring: #288efb;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --radius: 6.8px;
  --font: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI",
    Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji",
    "Segoe UI Symbol";
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg);
}

@media (min-width: 768px) {
  .page {
    padding: 40px;
  }
}

.card {
  display: flex;
  width: 100%;
  max-width: 448px;
  flex-direction: column;
  gap: 24px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.logo {
  display: block;
  height: 24px;
  width: auto;
}

.titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.titles h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: var(--fg);
  text-align: center;
}

.subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
  text-align: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.field {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 10px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  color: var(--fg);
  cursor: default;
}

.field input[type="email"],
.field #email,
.password-wrap {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.field input[type="email"],
.field #email {
  display: block;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--fg);
  outline: none;
}

.password-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.password-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--fg);
  outline: none;
}

.password-toggle {
  display: flex;
  height: 100%;
  flex-shrink: 0;
  align-items: center;
  padding-left: 4px;
  padding-right: 8px;
}

#toggle-password {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

#toggle-password .icon {
  display: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

#toggle-password.password-visible-false .icon-eye,
#toggle-password.password-visible-true .icon-eye-off {
  display: block;
}

#toggle-password:hover {
  color: #404040;
}

#toggle-password:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent);
}

.field input[type="email"]:focus,
.field #email:focus,
.password-wrap:focus-within {
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent),
    var(--shadow-xs);
}

.submit {
  display: inline-flex;
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.submit:hover {
  filter: brightness(0.96);
}

.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring), 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.submit:active {
  filter: brightness(0.92);
}
