/* Account control (sign in / avatar menu) and toasts, shared by the home page and the web app. */
.cb-account { position: relative; display: inline-flex; }
.cb-signin {
  font: inherit; font-weight: 600; font-size: .9rem; color: #f4f1ff; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  transition: background .2s, transform .2s;
}
.cb-signin:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.cb-avatar-button { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; display: inline-flex; }
.cb-avatar-button:focus-visible, .cb-signin:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }
.cb-avatar {
  --size: 38px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none; overflow: hidden;
  display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--size) * .4);
  background: linear-gradient(135deg, #7c3aed, #c026d3); box-shadow: 0 0 0 2px rgba(255,255,255,.18);
}
.cb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cb-avatar-button:hover .cb-avatar { box-shadow: 0 0 0 3px rgba(167,139,250,.6); }

.cb-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 290px;
  padding: 8px; border-radius: 18px; color: #f4f1ff;
  background: #1a1136; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.75);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); transform-origin: top right;
  transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.cb-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }
.cb-menu-note { margin: 6px 8px 12px; font-size: .88rem; line-height: 1.45; color: #b6acd6; }
.cb-who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cb-who div { min-width: 0; display: grid; }
.cb-who strong, .cb-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-who small { color: #b6acd6; font-size: .82rem; }
.cb-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px;
  font: inherit; font-size: .95rem; color: inherit; text-decoration: none; text-align: left;
  background: none; border: 0; cursor: pointer;
}
.cb-item:hover, .cb-item:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.cb-item svg { width: 20px; height: 20px; opacity: .85; flex: none; }

.cb-signin-buttons { display: grid; gap: 8px; }
.cb-provider {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, filter .15s;
}
.cb-provider:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cb-provider svg { width: 20px; height: 20px; }
.cb-provider.google { background: #fff; color: #1f1f1f; }
.cb-provider.apple { background: #000; color: #fff; border-color: rgba(255,255,255,.25); }

.cb-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.cb-toast {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 18px; border-radius: 14px; color: #f4f1ff; font-size: .95rem;
  background: rgba(30, 20, 60, .97); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
  animation: cb-toast-in .3s cubic-bezier(.2,.8,.2,1);
}
.cb-toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
.cb-toast button { font: inherit; font-weight: 700; color: #c4b5fd; background: none; border: 0; cursor: pointer; padding: 4px 6px; }
@keyframes cb-toast-in { from { opacity: 0; transform: translateY(12px); } }
