/* ══════════════════════════════════════════════════════════════════════
   BACCACONNECT — SHARED LAYOUT SYSTEM
   Base layout that all role-specific pages extend.
   Role-specific accent colors override --accent, --accent-light, --accent-glow.
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Role Accent System ── */
:root {
  /* Default accent (gold — used by studio) */
  --accent:       #c9a84c;
  --accent-light:  #e2c97e;
  --accent-dark:   #9a7c30;
  --accent-glow:   rgba(201, 168, 76, 0.08);
  --accent-border: rgba(201, 168, 76, 0.15);

  /* Typography upgrade */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', 'Helvetica Neue', Helvetica, sans-serif;
}

/* Studio — control room gold (default) */
[data-role="studio"] {
  --accent:        #c9a84c;
  --accent-light:  #e2c97e;
  --accent-dark:   #9a7c30;
  --accent-glow:   rgba(201, 168, 76, 0.08);
  --accent-border: rgba(201, 168, 76, 0.15);
}

/* Artist — warm amber */
[data-role="artist"] {
  --accent:        #e07820;
  --accent-light:  #f09a4e;
  --accent-dark:   #b85e15;
  --accent-glow:   rgba(224, 120, 32, 0.08);
  --accent-border: rgba(224, 120, 32, 0.15);
}

/* Producer — cool steel blue */
[data-role="producer"] {
  --accent:        #5b8fb9;
  --accent-light:  #7eb3d8;
  --accent-dark:   #3d6d91;
  --accent-glow:   rgba(91, 143, 185, 0.08);
  --accent-border: rgba(91, 143, 185, 0.15);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
[hidden] { display: none !important; }

body {
  background: var(--black);
  color: var(--light-gray);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

/* ── Skip Link (keyboard accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--black);
  border-radius: 0 0 6px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   TOP BAR — shared across all role pages
   ══════════════════════════════════════════════════════════════════════ */

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--dark);
  border-bottom: 1px solid var(--dark-light);
  position: sticky;
  top: 0;
  z-index: 100;
  /* Anchor for the mobile nav dropdown (see .app-topbar-nav media query). */
  /* Safe area */
  padding-top: env(safe-area-inset-top);
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.app-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.app-topbar-brand strong {
  font-weight: 700;
  color: var(--accent);
}

.app-role-indicator {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

/* ── Navigation ── */
.app-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.5rem;
}

/* Hamburger — hidden above the mobile breakpoint */
.app-topbar-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--gray-dark);
  border-radius: 6px;
  width: 44px;
  height: 44px;
  color: var(--gray);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: 0.5rem;
}
.app-topbar-menu-btn:hover { color: var(--light-gray); border-color: var(--gray); }
.app-topbar-menu-btn svg { display: block; width: 20px; height: 20px; }

.app-nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

.app-nav-link:hover {
  color: var(--light-gray);
  background: var(--dark-mid);
}

.app-nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── User area ── */
.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.app-user-name {
  font-size: 0.8rem;
  color: var(--light-gray);
  font-weight: 500;
}

.app-signout-btn {
  padding: 0.3rem 0.65rem;
  background: transparent;
  border: 1px solid var(--gray-dark);
  border-radius: 6px;
  color: var(--gray);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
}

.app-signout-btn:hover {
  border-color: var(--gray);
  color: var(--light-gray);
}

/* ── Connection Status Badge (topbar) ── */
.conn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: default;
  color: var(--gray-dark);
  transition: color 0.3s ease;
}

.conn-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.conn-badge-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.conn-badge-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.conn-badge-label {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: currentColor;
  white-space: nowrap;
}

.conn-badge--good { color: var(--success); }
.conn-badge--fair { color: #f0ad4e; }
.conn-badge--poor { color: var(--error); }
.conn-badge--offline { color: var(--gray-dark); }

/* ══════════════════════════════════════════════════════════════════════
   MAIN LAYOUT — content area below topbar
   ══════════════════════════════════════════════════════════════════════ */

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

/* Two-column layout for pages that need a sidebar */
.app-layout--sidebar {
  grid-template-columns: 1fr 340px;
}

/* Grid items default to min-width:auto, which lets intrinsic-width content
   (canvas meters, range sliders, long tokens) blow out the `1fr` track.
   Force track shrinking so children handle their own overflow. */
.app-layout > *,
.app-layout--sidebar > * { min-width: 0; }

/* ── Panel (reusable card) ── */
.app-panel {
  background: var(--dark);
  border: 1px solid var(--dark-light);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.app-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.app-panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ── Sidebar ── */
.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Welcome Section (hero area for role pages) ── */
.app-welcome {
  padding: 2rem 0 1rem;
}

.app-welcome-greeting {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.app-welcome-greeting em {
  color: var(--accent);
  font-style: italic;
}

.app-welcome-sub {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.5;
}

/* ── Placeholder (empty content areas for future features) ── */
.app-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 200px;
}

.app-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.app-placeholder-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.app-placeholder-desc {
  font-size: 0.8rem;
  color: var(--gray-dark);
  max-width: 280px;
  line-height: 1.5;
}

/* ── Buttons ── */
.app-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
  touch-action: manipulation;
}

.app-btn--accent {
  background: var(--accent);
  color: var(--black);
}

.app-btn--accent:hover {
  background: var(--accent-light);
}

.app-btn--outline {
  background: transparent;
  border: 1px solid var(--gray-dark);
  color: var(--light-gray);
}

.app-btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.65rem;
  min-height: 44px;
}

/* ── Quick Action Cards ── */
.app-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.app-action-card {
  background: var(--dark-mid);
  border: 1px solid var(--dark-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

.app-action-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-glow);
}

.app-action-icon {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.app-action-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.app-action-desc {
  font-size: 0.7rem;
  color: var(--gray);
  line-height: 1.4;
}

/* ── Button variants ── */
.app-btn--success {
  background: var(--success);
  color: var(--black);
}

.app-btn--success:hover {
  filter: brightness(1.15);
}

.app-btn--danger {
  background: var(--error);
  color: var(--white);
}

.app-btn--danger:hover {
  filter: brightness(1.15);
}

.app-btn--full {
  width: 100%;
}

.app-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════════════
   SESSION CARDS
   ══════════════════════════════════════════════════════════════════════ */

.app-session-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-session-card {
  padding: 1rem 1.1rem;
  background: var(--dark-mid);
  border: 1px solid var(--dark-light);
  border-radius: 6px;
  transition: border-color var(--transition);
}

.app-session-card:hover {
  border-color: var(--accent-border);
}

.app-session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.app-session-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.app-session-meta {
  font-size: 0.75rem;
  color: var(--gray);
}

.app-session-notes {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.35rem;
  font-style: italic;
}

.app-session-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ── Status Badges ── */
.app-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--dark-light);
  color: var(--gray);
}

.app-badge--requested { background: rgba(91, 143, 185, 0.15); color: var(--accent-light); }
.app-badge--confirmed { background: rgba(46, 204, 113, 0.12); color: var(--success); }
.app-badge--live      { background: rgba(231, 76, 60, 0.15);  color: var(--error); }
.app-badge--completed { background: var(--dark-light);         color: var(--gray); }
.app-badge--cancelled { background: var(--dark-light);         color: var(--gray-dark); }
.app-badge--type {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* ── Filter Select ── */
.app-filter {
  appearance: none;
  background: var(--dark-mid);
  border: 1px solid var(--dark-light);
  border-radius: 6px;
  color: var(--light-gray);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 1.8rem 0.35rem 0.65rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  min-height: 44px;
}

.app-filter:hover {
  border-color: var(--gray-dark);
}

/* ── Empty State ── */
.app-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray);
  font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════ */

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.app-modal-content {
  background: var(--dark);
  border: 1px solid var(--dark-light);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.app-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--dark-light);
}

.app-modal-header h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

.app-modal-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.app-modal-close:hover {
  color: var(--white);
}

.app-modal-body {
  padding: 1.25rem;
}

/* ── Form Fields ── */
.app-form-group {
  margin-bottom: 1rem;
}

.app-form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.4rem;
}

.app-form-input,
.app-form-select,
.app-form-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--dark-mid);
  border: 1px solid var(--dark-light);
  border-radius: 6px;
  color: var(--light-gray);
  font-family: var(--font-body);
  font-size: 0.82rem;
  transition: border-color var(--transition);
}

.app-form-input:focus,
.app-form-select:focus,
.app-form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.app-form-textarea {
  resize: vertical;
  min-height: 72px;
}

.app-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2rem;
  cursor: pointer;
}

/* ── Message / Alert ── */
.app-message {
  font-size: 0.78rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  margin-top: 0.75rem;
}

.app-message.error {
  background: rgba(231, 76, 60, 0.12);
  color: var(--error);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.app-message.success {
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════
   CONTACT CARDS (ROLODEX)
   ══════════════════════════════════════════════════════════════════════ */

.app-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-contact-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  transition: background var(--transition);
}

.app-contact-card:hover {
  background: var(--dark-mid);
}

.app-contact-card--offline {
  opacity: 0.5;
}

.app-contact-card--live {
  background: rgba(46, 204, 113, 0.06);
  border: 1px solid rgba(46, 204, 113, 0.15);
}

.app-contact-card--pending {
  background: var(--dark-mid);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.app-contact-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dark-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gray);
  flex-shrink: 0;
}

.app-contact-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--dark);
}

.app-contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-contact-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--light-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-contact-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.app-contact-rtt {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

.app-rtt--good { color: var(--success); }
.app-rtt--ok   { color: var(--gold-light); }
.app-rtt--bad  { color: var(--error); }

/* ── Inline Add Contact Form ── */
.app-add-contact-inline {
  padding: 0.75rem;
  background: var(--dark-mid);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.app-add-contact-inline .app-form-group {
  margin-bottom: 0.6rem;
}

.app-add-contact-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */

.app-footer {
  text-align: center;
  padding: 1.5rem 1rem max(1rem, env(safe-area-inset-bottom));
  font-size: 0.7rem;
  color: var(--gray-dark);
}

.app-footer a {
  color: var(--accent);
}

/* ── Focus Styles (keyboard accessibility) ── */
.app-btn:focus-visible,
.app-nav-link:focus-visible,
.app-signout-btn:focus-visible,
.app-topbar-menu-btn:focus-visible,
.app-action-card:focus-visible,
.app-modal-close:focus-visible,
.app-filter:focus-visible,
.app-form-input:focus-visible,
.app-form-select:focus-visible,
.app-form-textarea:focus-visible,
.org-switcher-badge:focus-visible,
.org-switcher-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-form-input:focus-visible,
.app-form-select:focus-visible,
.app-form-textarea:focus-visible {
  outline-offset: -1px;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */

/* Tablet + phone: tighter topbar padding & smaller nav links.
   iPad portrait (768) still gets this but keeps the two-column sidebar. */
@media (max-width: 900px) {
  .app-topbar {
    padding: 0 1rem;
    padding-top: env(safe-area-inset-top);
  }

  .app-topbar-nav {
    margin-left: 0.75rem;
    gap: 0.15rem;
  }

  .app-nav-link {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
  }

  .app-user-name { display: none; }

  .app-welcome-greeting { font-size: 1.4rem; }
}

/* Narrower sidebar on mid-size tablets so the two-column layout still
   fits comfortably at iPad portrait (768px). */
@media (max-width: 900px) and (min-width: 720px) {
  .app-layout--sidebar {
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    padding: 1rem;
  }
}

/* True mobile / narrow tablets: collapse to single column, sidebar on top
   (studio workflow = audio control is the live priority). */
@media (max-width: 719px) {
  .app-layout--sidebar {
    grid-template-columns: 1fr;
  }

  .app-sidebar { order: -1; }
}

/* Phones: show hamburger, collapse nav to a dropdown panel below topbar */
@media (max-width: 600px) {
  .app-topbar-menu-btn { display: inline-flex; }

  /* Nav becomes a full-width panel that slides below the topbar */
  .app-topbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 0.5rem 1rem;
    background: var(--dark);
    border-bottom: 1px solid var(--dark-light);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    display: none;
  }
  .app-topbar[data-nav-open="true"] .app-topbar-nav { display: flex; }
  .app-topbar-nav .app-nav-link {
    font-size: 0.9rem;
    padding: 0.75rem 0.85rem;
    text-align: left;
  }

  /* Keep the brand + Sign Out tight on phones */
  .app-topbar-brand { font-size: 0.85rem; gap: 0.4rem; }
  .app-role-indicator { font-size: 0.5rem; padding: 0.15rem 0.35rem; }
}

@media (max-width: 480px) {
  .app-layout {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .app-welcome-greeting { font-size: 1.2rem; }

  .app-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* ── Org switcher (ADR-023) ──────────────────────────────────────────── */
/* The switcher reuses the existing .app-role-indicator pill style for the
   visible badge, so the header looks identical to prod. Clicking the badge
   reveals an absolutely-positioned menu listing the user's memberships. */
.org-switcher {
  position: relative;
  display: inline-block;
}

.org-switcher-badge {
  /* Override button defaults while keeping .app-role-indicator visuals */
  font-family: inherit;
  cursor: pointer;
}
.org-switcher-badge::after {
  content: ' ▾';
  opacity: 0.7;
  margin-left: 0.25rem;
}

.org-switcher-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 240px;
  background: var(--black);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 0.35rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 100;
}
.org-switcher[data-open="true"] .org-switcher-menu {
  display: block;
}

.org-switcher-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--light-gray);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.org-switcher-item:hover {
  background: var(--accent-glow);
}
.org-switcher-item.is-selected {
  background: var(--accent-glow);
  border-left: 2px solid var(--accent);
  padding-left: calc(0.9rem - 2px);
}
.org-switcher-item-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.org-switcher-item-role {
  display: block;
  font-size: 0.7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}
.org-switcher-tag {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.org-switcher-tag-trial   { background: rgba(201, 168, 76, 0.15); color: var(--gold-light); }
.org-switcher-tag-expired { background: rgba(231, 76, 60, 0.15); color: var(--error); }

.org-switcher-divider {
  height: 1px;
  background: var(--gray-dark, #222);
  margin: 0.35rem 0;
}

/* ── Rolodex section labels ("At work" / "Worked with") ─────────────── */
.rolodex-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray, #888);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--gray-dark, #222);
  margin-bottom: 0.35rem;
}

/* ── Form hint text + session guest picker ──────────────────────────── */
.app-form-hint {
  font-size: 0.7rem;
  color: var(--gray, #888);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.session-guest-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ── Share Invite ── */
.share-invite {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--dark-mid);
  border: 1px solid var(--dark-light);
  border-radius: 6px;
}

.share-invite-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
}

.share-invite-btn {
  white-space: nowrap;
}

.share-invite-copied {
  color: var(--success) !important;
  border-color: var(--success) !important;
}

/* ── Notice Modal ── */
.notice-modal-content {
  max-width: 500px;
}

.notice-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--light-gray);
}

.notice-count {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

.notice-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
  margin: 1rem 0 0.35rem;
}

.notice-heading:first-child {
  margin-top: 0;
}

.notice-p {
  margin: 0 0 0.5rem;
}

.notice-p:last-child {
  margin-bottom: 0;
}

.notice-list {
  margin: 0.25rem 0 0.75rem 1.25rem;
  padding: 0;
}

.notice-list li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.notice-body strong {
  color: var(--white);
  font-weight: 600;
}

.notice-footer {
  padding: 0 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-end;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
