* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  position: relative;
  
}

.page-shell {
  min-height: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: min(100%, 430px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 34px 36px 36px;
  position: relative;
}

.auth-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
  color: #333;
  font-size: 30px;
  font-weight: 700;
}

.auth-title .icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 16px;
}

.input-wrap {
  position: relative;
}

.input-wrap > .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #777;
  width: 18px;
  text-align: center;
}

.input-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  padding: 0 14px 0 42px;
  font-size: 15px;
  
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input-wrap input.has-password-toggle {
  padding-right: 44px;
}

.input-wrap input:focus {
  border-color: hsl(240, 50%, 52%);
  box-shadow: 0 0 0 3px hsla(240, 50%, 52%, 0.14);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: #777;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
}

.password-toggle .icon {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: none;
  border-radius: 6px;
  background: var(--site-blue-background, hsl(240, 50%, 52%));
  color: white;
  font-size: 17px;
  
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.auth-submit:hover {
  background: hsl(240, 50%, 45%);
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.auth-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: #555;
  font-size: 14px;
  text-align: center;
}

.auth-message.success {
  color: #1f7a3f;
}

.auth-message.error {
  color: #b3261e;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
  color: #555;
  font-size: 15px;
}

.auth-switch a {
  color: hsl(240, 50%, 42%);
  text-decoration: none;
  font-weight: 700;
}

.auth-switch a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 72px 14px 32px;
  }

  .auth-panel {
    padding: 28px 22px 30px;
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.floating-account {
  position: fixed;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: hsl(240, 50%, 42%);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.28);
  color: #fff;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 1450;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.floating-account:hover,
.floating-account:focus-visible {
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.36);
  outline: 3px solid rgba(45, 126, 247, 0.35);
  outline-offset: 2px;
}

.floating-account.is-dragging {
  cursor: grabbing;
  transition: none;
}

.floating-account.is-collapsed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.18);
}

.floating-account.is-collapsed {
  opacity: 0.92;
}

.floating-account-avatar,
.floating-account img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  border-radius: 50%;
}

.floating-account-avatar {
  background: linear-gradient(145deg, #2d7ef7, #4036a8);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
}

.floating-account:not(.is-logged-in) .floating-account-avatar::before {
  content: "";
  width: 25px;
  height: 25px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-8 2.24-8 5v3h16v-3c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-8 2.24-8 5v3h16v-3c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.floating-account-quick-menu {
  position: fixed;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(76, 78, 84, 0.68);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1449;
}

.floating-account-quick-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

.floating-account-quick-menu.is-half-left {
  width: 96px;
  height: 192px;
  border-radius: 0 96px 96px 0;
}

.floating-account-quick-menu.is-half-right {
  width: 96px;
  height: 192px;
  border-radius: 96px 0 0 96px;
}

.floating-account-quick-action {
  position: absolute;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(39, 41, 47, 0.76);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.floating-account-quick-action:hover,
.floating-account-quick-action:focus-visible {
  background: rgba(15, 16, 20, 0.9);
  transform: translate(var(--ring-x, 0), var(--ring-y, 0)) scale(1.08);
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 1px;
}

.floating-account-quick-action svg {
  width: 19px;
  height: 19px;
}

.floating-account-quick-action[data-slot="0"] { left: 18px; top: 24px; }
.floating-account-quick-action[data-slot="1"] { right: 18px; top: 24px; }
.floating-account-quick-action[data-slot="2"] { left: 66px; bottom: 12px; }

.floating-account-quick-menu.is-half-left .floating-account-quick-action[data-slot="0"] { left: auto; right: 18px; top: 23px; }
.floating-account-quick-menu.is-half-left .floating-account-quick-action[data-slot="1"] { left: auto; right: 4px; top: 77px; }
.floating-account-quick-menu.is-half-left .floating-account-quick-action[data-slot="2"] { left: auto; right: 18px; top: 131px; bottom: auto; }

.floating-account-quick-menu.is-half-right .floating-account-quick-action[data-slot="0"] { left: 18px; top: 23px; }
.floating-account-quick-menu.is-half-right .floating-account-quick-action[data-slot="1"] { left: 4px; right: auto; top: 77px; }
.floating-account-quick-menu.is-half-right .floating-account-quick-action[data-slot="2"] { left: 18px; top: 131px; bottom: auto; }

.floating-account-quick-action.is-hidden {
  display: none;
}

.floating-account-quick-page {
  position: absolute;
  left: 16px;
  top: 82px;
  min-width: 38px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.floating-account-quick-menu.is-half-left .floating-account-quick-page {
  left: auto;
  right: 56px;
  top: 92px;
}

.floating-account-quick-menu.is-half-right .floating-account-quick-page {
  left: 56px;
  top: 92px;
}

/* AssistiveTouch-style adaptive layout: show every shortcut at once. */
.floating-account-quick-menu {
  width: 220px;
  height: 220px;
  padding: 0;
  display: block;
  overflow: hidden;
}

.floating-account-quick-menu.is-half-left,
.floating-account-quick-menu.is-half-right {
  width: 220px;
  height: 220px;
  padding: 0;
}

.floating-account-quick-menu.is-half-left {
  border-radius: 50%;
}

.floating-account-quick-menu.is-half-right {
  border-radius: 50%;
}

.floating-account-quick-action,
.floating-account-quick-menu.is-half-left .floating-account-quick-action,
.floating-account-quick-menu.is-half-right .floating-account-quick-action {
  position: absolute;
  width: 34px;
  height: 34px;
  left: 93px;
  top: 93px;
  transform: translate(var(--ring-x, 0), var(--ring-y, 0));
  will-change: transform;
}

.floating-account-quick-action.is-hidden {
  display: inline-flex;
}

.floating-account-quick-page {
  display: none;
}

@media (max-width: 560px) {
  .floating-account {
    width: 52px;
    height: 52px;
  }
}
