.auth-user-summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 230px;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  color: var(--gray-800);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.auth-account-trigger {
  cursor: pointer;
  font-family: inherit;
}

.auth-account-trigger:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
  transform: translateY(-1px);
}

.auth-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

.auth-user-text {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.auth-user-text strong {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-text small {
  color: var(--gray-500);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.auth-user-text [data-auth-credits] {
  color: var(--success);
}

.auth-sidebar-root {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}

.auth-sidebar-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: min(380px, calc(100vw - 24px));
  height: 100%;
  padding: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f8fafc 100%);
  border-right: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 24px 0 60px rgba(15, 23, 42, 0.22);
  transform: translateX(-105%);
  transition: transform 0.22s ease;
}

.auth-sidebar-root.is-open {
  pointer-events: auto;
}

.auth-sidebar-root.is-open .auth-sidebar-backdrop {
  opacity: 1;
}

.auth-sidebar-root.is-open .auth-sidebar {
  transform: translateX(0);
}

.auth-sidebar-open {
  overflow: hidden;
}

.auth-sidebar-head {
  position: relative;
  min-height: 164px;
  margin: -18px -18px 18px;
  padding: 22px 58px 22px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.9), transparent 26%),
    linear-gradient(135deg, #111827 0%, #312e81 52%, #0891b2 100%);
  color: #fff;
}

.auth-sidebar-head::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 28px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.auth-sidebar-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  height: 100%;
}

.auth-sidebar-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.auth-sidebar-close:hover {
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.auth-sidebar-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(10px);
}

.auth-sidebar-user {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.auth-sidebar-user strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-sidebar-user small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-sidebar-kicker {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-credit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(37, 99, 235, 0.08)),
    #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.auth-credit-card span {
  color: var(--gray-600);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-credit-card small {
  display: block;
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 0.74rem;
  font-weight: 700;
}

.auth-credit-card strong {
  min-width: 70px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  color: #059669;
  font-size: 1.45rem;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.16);
}

.auth-sidebar-actions {
  display: grid;
  gap: 10px;
}

.auth-sidebar-actions a,
.auth-sidebar-actions button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--gray-800);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.auth-sidebar-actions a:hover,
.auth-sidebar-actions button:hover {
  border-color: var(--primary);
  background: #fff;
  color: var(--primary);
  transform: translateX(2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.auth-sidebar-actions i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--primary-50);
  color: var(--primary);
  text-align: center;
}

.auth-sidebar-actions a:nth-child(2) i {
  background: #eef2ff;
  color: #4f46e5;
}

.auth-sidebar-actions a:nth-child(3) i {
  background: #fef3c7;
  color: #d97706;
}

.auth-sidebar-actions button i {
  background: #fef2f2;
  color: #dc2626;
}

@media (max-width: 768px) {
  .auth-user-summary {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .auth-sidebar {
    width: min(340px, calc(100vw - 16px));
  }
}
