:root {
  --auth-ink: #071d4f;
  --auth-teal: #18b4a6;
  --auth-amber: #ffd35a;
  --auth-paper: rgba(255, 252, 244, 0.96);
}

.auth-menu {
  position: relative;
  z-index: 1000;
  font-family: inherit;
}

.auth-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  height: 16px;
}

.auth-menu.is-fixed {
  position: fixed;
  top: 14px;
  right: 24px;
}

.auth-trigger {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--auth-ink);
  background: linear-gradient(145deg, #fff8df, #dff8f2);
  color: var(--auth-ink);
  padding: 0;
  font-weight: 900;
  line-height: 1;
  box-shadow: 5px 6px 0 rgba(7, 29, 79, 0.15);
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.auth-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-trigger:hover,
.auth-trigger:focus-visible {
  transform: translateY(-2px) scale(1.04);
}

.auth-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  padding: 14px;
  border: 2px solid var(--auth-ink);
  border-radius: 16px;
  background: var(--auth-paper);
  color: var(--auth-ink);
  box-shadow: 9px 10px 0 rgba(7, 29, 79, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-menu:hover .auth-popover,
.auth-menu:focus-within .auth-popover,
.auth-menu.is-open .auth-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.auth-profile {
  display: grid;
  gap: 6px;
  padding: 6px 8px 12px;
  border-bottom: 1px dashed rgba(7, 29, 79, 0.25);
}

.auth-profile strong {
  font-size: 15px;
}

.auth-profile span {
  color: rgba(7, 29, 79, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.auth-popover a,
.auth-popover button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  padding: 0 10px;
  box-shadow: none;
}

.auth-popover a:hover,
.auth-popover button:hover,
.auth-popover a:focus-visible,
.auth-popover button:focus-visible {
  background: rgba(24, 180, 166, 0.12);
  transform: translateX(2px);
}

.auth-popover button {
  cursor: var(--bubble-cursor, pointer);
  text-align: left;
}

.auth-divider {
  height: 1px;
  margin: 8px 0;
  border-top: 1px dashed rgba(7, 29, 79, 0.25);
}

.auth-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 8px 2px;
}

.auth-pill-row span {
  border: 1px solid rgba(7, 29, 79, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(rgba(24, 180, 166, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 180, 166, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf7 0%, #f6efdd 100%);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--auth-ink);
}

.auth-card {
  width: min(440px, 100%);
  border: 2px solid var(--auth-ink);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.94);
  padding: 34px;
  box-shadow: 12px 14px 0 rgba(7, 29, 79, 0.12);
}

.auth-card h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.auth-card p {
  margin: 10px 0 26px;
  color: rgba(7, 29, 79, 0.72);
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.auth-form input {
  min-height: 46px;
  border: 2px solid rgba(7, 29, 79, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 14px;
  color: var(--auth-ink);
  font: inherit;
  font-weight: 750;
}

.auth-form input:focus {
  outline: 3px solid rgba(24, 180, 166, 0.22);
  border-color: var(--auth-teal);
}

.auth-submit {
  min-height: 50px;
  border: 2px solid var(--auth-ink);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffdf70, #ffc540);
  color: var(--auth-ink);
  font-size: 16px;
  font-weight: 950;
  box-shadow: 6px 7px 0 rgba(7, 29, 79, 0.16);
}

.auth-message {
  min-height: 20px;
  color: #c64545;
  font-size: 13px;
  font-weight: 800;
}

.auth-alt {
  margin-top: 18px;
  text-align: center;
}

.auth-alt a {
  color: var(--auth-teal);
  font-weight: 900;
  text-decoration: none;
}
