.titu-auth,
.titu-auth * {
  box-sizing: border-box;
}

.titu-auth {
  --auth-green: #087653;
  --auth-ink: #16352b;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  color: var(--auth-ink);
  background: #f9fbf9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.titu-auth__top {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 32px;
}

.titu-auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-green);
  text-decoration: none;
}

.titu-auth__brand span {
  color: var(--auth-ink);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.8px;
}

.titu-auth__main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 36px 24px 72px;
}

.titu-auth__panel {
  width: 100%;
  max-width: 360px;
}

.titu-auth__panel h1 {
  margin: 0 0 10px;
  color: var(--auth-ink);
  font-size: 29px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.85px;
}

.titu-auth__intro {
  margin: 0;
  color: #63746a;
  font-size: 15px;
  line-height: 1.6;
}

.titu-auth__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.titu-auth__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  color: #314a40;
  font-size: 13px;
  font-weight: 600;
}

.titu-auth__field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 15px;
  color: #203a2e;
  background: #fff;
  border: 1px solid #d9e2dc;
  border-radius: 10px;
  outline: none;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.titu-auth__field input::placeholder {
  color: #91a097;
  opacity: 1;
}

.titu-auth__field input:focus {
  border-color: #18805e;
  box-shadow: 0 0 0 3px rgb(8 118 83 / 9%);
}

.titu-auth__password {
  position: relative;
}

.titu-auth__password input {
  padding-right: 55px;
}

.titu-auth__visibility {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: #73867b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.titu-auth__visibility:hover {
  color: var(--auth-green);
  background: #f0f6f2;
}

.titu-auth__field small {
  color: #65796c;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.titu-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 12px 20px;
  color: #fff;
  background: var(--auth-green);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}

.titu-auth__submit:hover {
  background: #075e43;
}

.titu-auth__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.titu-auth :is(button, a):focus-visible {
  outline: 3px solid #87bda1;
  outline-offset: 3px;
}

.titu-auth__switch {
  margin: 25px 0 0;
  color: #63746a;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.titu-auth__switch a {
  color: var(--auth-green);
  font-weight: 600;
  text-decoration: none;
}

.titu-auth__switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.titu-auth__error {
  padding: 11px 13px;
  color: #a43234;
  background: #fff1ef;
  border: 1px solid #f3d9d4;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
}

.titu-auth__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff50;
  border-top-color: #fff;
  border-radius: 50%;
  animation: titu-auth-spin 700ms linear infinite;
}

@keyframes titu-auth-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .titu-auth { background: #fff; }
  .titu-auth__top { padding: 25px 24px; }
  .titu-auth__main { padding: 30px 26px 64px; }
  .titu-auth__panel h1 { font-size: 27px; }
}

@media (max-height: 650px) {
  .titu-auth__top { padding-top: 18px; padding-bottom: 18px; }
  .titu-auth__main { align-items: flex-start; padding-top: 20px; padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .titu-auth__spinner { animation: none; }
  .titu-auth input, .titu-auth button { transition: none; }
}
