/* =====================================================================
 * Yarra AI — command palette (⌘K) + chat rail
 * Shared across provider/customer/resource workspaces.
 * =================================================================== */

/* ---------- Backdrop ---------- */
#yarra-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 12, 0.42);
  backdrop-filter: blur(3px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(.2,.7,.3,1);
}
#yarra-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Palette ---------- */
#yarra-palette {
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 160px);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow:
    0 28px 72px -16px rgba(7, 20, 12, 0.32),
    0 12px 28px -8px rgba(7, 20, 12, 0.18);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.7,.3,1),
              transform 220ms cubic-bezier(.2,.7,.3,1);
}
#yarra-palette[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Palette head: title + Pop out + close */
.yp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--mist-25), var(--bg-surface));
}
.yp-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--canopy-700);
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.yp-mark::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sunlight-400);
  animation: yj-pulse 1800ms ease-out infinite;
}
.yp-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--fg-brand);
  letter-spacing: -0.01em;
}
.yp-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-left: 6px;
}
.yp-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.yp-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 9px;
  font-size: 11.5px;
  color: var(--fg-secondary);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  transition: all 120ms;
}
.yp-icon-btn:hover {
  background: var(--bg-sunken);
  color: var(--fg-primary);
  border-color: var(--border-subtle);
}
.yp-icon-btn svg { width: 13px; height: 13px; stroke-width: 1.8; }
.yp-close {
  background: transparent;
  border: 0;
  width: 26px; height: 26px;
  border-radius: 6px;
  color: var(--fg-tertiary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}
.yp-close:hover { background: var(--bg-sunken); color: var(--fg-primary); }

/* Input row */
.yp-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.yp-input-row svg.prompt-icon {
  width: 16px; height: 16px;
  stroke-width: 1.6;
  color: var(--canopy-500);
  flex-shrink: 0;
}
#yarra-input,
#yarra-rail-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  padding: 2px 0;
}
#yarra-input::placeholder,
#yarra-rail-input::placeholder { color: var(--fg-tertiary); }
.yp-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  color: var(--fg-tertiary);
}
.yp-kbd span {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 18px;
  padding: 0 5px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

/* Body — suggestions or transcript */
.yp-body {
  overflow-y: auto;
  max-height: 420px;
  padding: 6px 0 8px;
  display: flex;
  flex-direction: column;
}

/* Section heads */
.yp-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  padding: 12px 14px 6px;
}

/* Suggestion row */
.yp-sug {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  width: 100%;
  color: var(--fg-primary);
  transition: background 100ms;
}
.yp-sug:hover, .yp-sug[data-hover="true"] {
  background: var(--bg-sunken);
}
.yp-sug-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--canopy-50);
  color: var(--canopy-700);
  display: grid;
  place-items: center;
}
.yp-sug-icon svg { width: 14px; height: 14px; stroke-width: 1.7; }
.yp-sug-icon.gold {
  background: var(--sunlight-50);
  color: var(--sunlight-600);
}
.yp-sug-icon.moss {
  background: var(--moss-50);
  color: var(--moss-500);
}
.yp-sug-icon.danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}
.yp-sug-text {
  font-size: 13.5px;
  line-height: 1.35;
  min-width: 0;
}
.yp-sug-text .yp-sug-title {
  color: var(--fg-primary);
  font-weight: 400;
  display: block;
}
.yp-sug-text .yp-sug-desc {
  color: var(--fg-tertiary);
  font-size: 12px;
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yp-sug-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-tertiary);
  padding: 1px 6px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  white-space: nowrap;
}

/* Slash command palette row */
.yp-slash-cmd {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 14px;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  width: 100%;
  transition: background 100ms;
}
.yp-slash-cmd:hover, .yp-slash-cmd[data-hover="true"] { background: var(--bg-sunken); }
.yp-slash-cmd-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--canopy-600);
  font-weight: 500;
}
.yp-slash-cmd-desc {
  font-size: 12.5px;
  color: var(--fg-secondary);
}
.yp-slash-cmd-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

/* Footer */
.yp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--mist-25);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.yp-foot-tips {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.yp-foot-tips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.yp-foot-tips kbd {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0;
  color: var(--fg-secondary);
  text-transform: none;
}
.yp-foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Chat transcript (palette body) ---------- */
.yp-transcript {
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.yp-msg {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: flex-start;
}
.yp-msg-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--mist-25);
  background: var(--canopy-700);
  flex-shrink: 0;
}
.yp-msg[data-from="ai"] .yp-msg-av {
  background: var(--canopy-700);
  color: var(--sunlight-300);
}
.yp-msg[data-from="ai"] .yp-msg-av::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sunlight-400);
}
.yp-msg-body {
  min-width: 0;
}
.yp-msg-who {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 4px;
}
.yp-msg[data-from="ai"] .yp-msg-who { color: var(--moss-500); }
.yp-msg-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-primary);
  white-space: pre-wrap;
}
.yp-msg-text a {
  color: var(--canopy-700);
  text-decoration: none;
  border-bottom: 1px dotted var(--canopy-300);
}
.yp-msg-text strong { font-weight: 500; color: var(--fg-brand); }
.yp-msg-text em { font-style: italic; }

/* Typing indicator */
.yp-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.yp-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--canopy-300);
  animation: yp-typing-bounce 1.1s ease-in-out infinite;
}
.yp-typing span:nth-child(2) { animation-delay: 120ms; }
.yp-typing span:nth-child(3) { animation-delay: 240ms; }
@keyframes yp-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-3px); opacity: 1; }
}

/* ---------- Rail (slide-in right panel) ---------- */
#yarra-rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  box-shadow: -16px 0 32px -16px rgba(7, 20, 12, 0.18);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(.2,.7,.3,1);
}
#yarra-rail[data-open="true"] { transform: translateX(0); }

.yr-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--mist-25);
  flex-shrink: 0;
}
.yr-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--fg-brand);
}
.yr-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-500);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.yr-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--moss-400);
}
.yr-actions { margin-left: auto; display: flex; gap: 2px; }
.yr-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--mist-25);
}
.yr-divider {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  text-align: center;
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.yr-divider::before, .yr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.yr-foot {
  border-top: 1px solid var(--border-subtle);
  padding: 10px 12px;
  background: var(--bg-surface);
  flex-shrink: 0;
}
.yr-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mist-25);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color 120ms, box-shadow 120ms;
}
.yr-input-row:focus-within {
  border-color: var(--canopy-400);
  box-shadow: var(--ring-focus);
}
.yr-input-row svg { width: 15px; height: 15px; color: var(--canopy-500); stroke-width: 1.6; }
.yr-send {
  background: var(--canopy-700);
  color: var(--mist-25);
  border: 0;
  width: 30px; height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.yr-send:hover { background: var(--canopy-800); }
.yr-send:disabled {
  background: var(--mist-200);
  cursor: not-allowed;
}
.yr-send svg { width: 14px; height: 14px; color: var(--mist-25); }
.yr-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.yr-quick button {
  font-family: inherit;
  font-size: 11.5px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 120ms;
}
.yr-quick button:hover {
  background: var(--canopy-50);
  border-color: var(--canopy-200);
  color: var(--canopy-700);
}

/* Rail message bubbles */
.yr-msg {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: flex-start;
}
.yr-msg-av {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.yr-msg[data-from="ai"] .yr-msg-av {
  background: var(--canopy-700);
  position: relative;
}
.yr-msg[data-from="ai"] .yr-msg-av::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sunlight-400);
}
.yr-msg[data-from="user"] .yr-msg-av {
  background: var(--mist-100);
  color: var(--fg-secondary);
  font-family: var(--font-display);
  font-size: 11px;
}
.yr-msg-body { min-width: 0; }
.yr-msg-who {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 3px;
}
.yr-msg[data-from="ai"] .yr-msg-who { color: var(--moss-500); }
.yr-msg-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-primary);
  white-space: pre-wrap;
}
.yr-msg-text strong { color: var(--fg-brand); font-weight: 500; }
.yr-msg-text em { font-style: italic; }

/* Empty state */
.yr-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--fg-tertiary);
}
.yr-empty .pebble {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--canopy-700);
  position: relative;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
}
.yr-empty .pebble::after {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sunlight-400);
  animation: yj-pulse 1800ms ease-out infinite;
}
.yr-empty .title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fg-brand);
  margin-bottom: 4px;
}
.yr-empty .sub {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-tertiary);
  max-width: 240px;
  margin: 0 auto;
}

/* Empty state in palette body */
.yp-empty {
  text-align: center;
  padding: 24px 12px 20px;
  color: var(--fg-tertiary);
  font-size: 13px;
}
.yp-empty strong { color: var(--fg-secondary); font-weight: 500; }

/* =====================================================================
 * Yanyja — Notifications panel (bell + dropdown list)
 * =================================================================== */
.yj-bell-btn {
  position: relative;
}
.yj-bell-btn[data-open="true"] {
  background: var(--canopy-700);
  color: var(--mist-25);
  border-color: var(--canopy-700);
}
.yj-bell-btn .yj-bell-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--sunlight-400);
  color: var(--canopy-900);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  display: grid;
  place-items: center;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--bg-page);
  animation: yj-pulse 2200ms ease-out infinite;
}
.yj-bell-btn .yj-bell-count[data-hidden="true"] { display: none; }
.yj-bell-btn[data-has-unread="true"] svg {
  color: var(--sunlight-400);
}

.yj-notif-panel {
  position: fixed;
  top: calc(var(--chrome-topbar-h, 56px) + 6px);
  right: 16px;
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.7,.3,1),
              transform 200ms cubic-bezier(.2,.7,.3,1);
  overflow: hidden;
}
.yj-notif-panel[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.yj-notif-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--mist-25), var(--bg-surface));
}
.yj-notif-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--fg-brand);
  letter-spacing: -0.01em;
}
.yj-notif-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.yj-notif-actions {
  margin-left: auto;
}

.yj-notif-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--bg-surface);
}

.yj-notif-group-h {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  padding: 12px 14px 6px;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.yj-notif-row {
  display: grid;
  grid-template-columns: 30px 1fr 10px;
  gap: 10px;
  width: 100%;
  align-items: flex-start;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 100ms;
}
.yj-notif-row:last-child { border-bottom: 0; }
.yj-notif-row:hover { background: var(--bg-sunken); }

.yj-notif-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--canopy-50);
  color: var(--canopy-700);
  flex-shrink: 0;
}
.yj-notif-icon svg { width: 14px; height: 14px; stroke-width: 1.7; }
.yj-notif-icon-action { background: var(--status-danger-bg); color: var(--status-danger); }
.yj-notif-icon-booking { background: var(--canopy-50); color: var(--canopy-700); }
.yj-notif-icon-msg { background: var(--moss-50); color: var(--moss-500); }
.yj-notif-icon-reminder { background: var(--sunlight-50); color: var(--sunlight-700); }
.yj-notif-icon-digest { background: var(--mist-100); color: var(--fg-secondary); }
.yj-notif-icon-invite { background: var(--sunlight-50); color: var(--sunlight-700); }
.yj-notif-icon-cancel { background: var(--status-danger-bg); color: var(--status-danger); }
.yj-notif-icon-review { background: var(--sunlight-50); color: var(--sunlight-700); }
.yj-notif-icon-leave { background: var(--canopy-50); color: var(--canopy-700); }

.yj-notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.yj-notif-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary);
  line-height: 1.35;
}
.yj-notif-row[data-unread="false"] .yj-notif-row-title {
  font-weight: 400;
  color: var(--fg-secondary);
}
.yj-notif-row-sub {
  font-size: 12px;
  color: var(--fg-tertiary);
  line-height: 1.4;
}
.yj-notif-row-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-top: 3px;
}
.yj-notif-row-tag .mono { letter-spacing: 0; text-transform: none; }
.yj-notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sunlight-400);
  margin-top: 6px;
  opacity: 0;
  transition: opacity 120ms;
}
.yj-notif-row[data-unread="true"] .yj-notif-dot { opacity: 1; }

.yj-notif-foot {
  padding: 9px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--mist-25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.yj-notif-settings {
  color: var(--canopy-700);
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
}
.yj-notif-settings:hover { text-decoration: underline; }

.yj-notif-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--fg-tertiary);
}
.yj-notif-empty-pebble {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--canopy-700);
  margin: 0 auto 12px;
  position: relative;
  display: grid;
  place-items: center;
}
.yj-notif-empty-pebble::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--moss-400);
}
.yj-notif-empty-h {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fg-brand);
  margin-bottom: 4px;
}
.yj-notif-empty-p {
  font-size: 12px;
  color: var(--fg-tertiary);
  max-width: 240px;
  margin: 0 auto;
  line-height: 1.5;
}


/* =====================================================================
 * Profile switcher (topbar pill + dropdown)
 * =================================================================== */
.yj-ps-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 9px 3px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 120ms, border-color 120ms;
  height: 32px;
}
.yj-ps-pill:hover {
  background: var(--bg-sunken);
  border-color: var(--border-default);
}
.yj-ps-pill[data-open="true"] {
  background: var(--bg-sunken);
  border-color: var(--canopy-300);
}
.yj-ps-av {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: -0.02em;
  color: var(--mist-25);
  flex-shrink: 0;
}
.yj-ps-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  min-width: 0;
  max-width: 180px;
}
.yj-ps-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.yj-ps-role {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  line-height: 1.15;
}
.yj-ps-chev {
  width: 12px; height: 12px;
  color: var(--fg-tertiary);
  transition: transform 160ms;
}
.yj-ps-pill[data-open="true"] .yj-ps-chev {
  transform: rotate(180deg);
  color: var(--fg-secondary);
}

.yj-ps-menu {
  position: fixed;
  top: calc(var(--chrome-topbar-h, 56px) + 6px);
  right: 16px;
  width: 320px;
  max-height: calc(100vh - 100px);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.7,.3,1),
              transform 200ms cubic-bezier(.2,.7,.3,1);
  overflow: hidden;
}
.yj-ps-menu[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.yj-ps-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--mist-25), var(--bg-surface));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yj-ps-head-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.yj-ps-head-email {
  font-size: 12px;
  color: var(--fg-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.yj-ps-list {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
}

.yj-ps-row {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 100ms;
}
.yj-ps-row:hover { background: var(--bg-sunken); }
.yj-ps-row.is-current { background: var(--canopy-50); }
.yj-ps-row.is-current:hover { background: var(--canopy-50); }
.yj-ps-row:last-of-type { border-bottom: 0; }

.yj-ps-row-link-inner {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.yj-ps-row-link-inner .yj-ps-av {
  width: 32px; height: 32px;
  font-size: 12px;
}
.yj-ps-row-meta { min-width: 0; }
.yj-ps-row-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.yj-ps-row-sub {
  font-size: 11.5px;
  color: var(--fg-tertiary);
  margin-top: 2px;
  display: block;
}
.yj-ps-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1.5px 5px;
  border-radius: 3px;
  font-weight: 500;
}
.yj-ps-tag.current { background: var(--canopy-700); color: var(--mist-25); }
.yj-ps-tag.default { background: var(--sunlight-400); color: var(--canopy-900); }

.yj-ps-default-btn {
  background: transparent;
  border: 0;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--fg-tertiary);
  margin-right: 6px;
  border-radius: 4px;
}
.yj-ps-default-btn:hover { background: var(--mist-100); color: var(--sunlight-600); }
.yj-ps-default-btn svg { width: 14px; height: 14px; }
.yj-ps-default-btn svg[fill="currentColor"] { color: var(--sunlight-500); }

.yj-ps-divider {
  height: 1px;
  background: var(--border-subtle);
}

.yj-ps-row-link {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border-subtle);
}
.yj-ps-row-link:hover { background: var(--bg-sunken); }
.yj-ps-row-link:last-of-type { border-bottom: 0; }
.yj-ps-row-ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--mist-25);
  color: var(--fg-secondary);
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-default);
}
.yj-ps-row-ic svg { width: 14px; height: 14px; stroke-width: 1.6; }
.yj-ps-row-arr {
  color: var(--fg-tertiary);
  font-size: 14px;
  margin-right: 4px;
}

.yj-ps-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--mist-25);
}
.yj-ps-signout {
  font-size: 12px;
  color: var(--canopy-700);
  font-weight: 500;
  text-decoration: none;
}
.yj-ps-signout:hover { text-decoration: underline; }
.yj-ps-session {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
