/* ═══════════════════════════════════════════════════════════════
   Hub + Company Cards — Futuristic Command-Center Design
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom property for animated conic gradient ── */
@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ── Screen-reader-only utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip link (visible on :focus) ── */
.hub-skip-link {
  background: #6C3BEE;
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  text-decoration: none;
}

.hub-skip-link:focus {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: 10px 20px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

/* ── Animated background ── */
.hub-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--color-bg);
  overflow: hidden;
}

.hub-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg at 30% 40%,
    #6C3BEE22 0deg,
    #2563EB11 90deg,
    #05966911 180deg,
    #DB277711 270deg,
    #6C3BEE22 360deg
  );
  animation: rotate-bg 20s linear infinite;
}

@keyframes rotate-bg {
  to { transform: rotate(360deg); }
}

.hub-bg-ambient {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0;
  transition: opacity 1s ease, background 1s ease, transform 1s ease;
  pointer-events: none;
}

/* ── Hub layout ── */
.hub-wrap {
  position: relative;
}

.hub-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.hub-header {
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  background: rgba(8, 11, 20, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Scanning line animation on header bottom */
.hub-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #a78bfa44 20%,
    #a78bfa 50%,
    #a78bfa44 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: scan-line 4s linear infinite;
}

@keyframes scan-line {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Logo */
.hub-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-logo-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hub-logo-star {
  animation: logo-pulse 3s ease-in-out infinite;
  transform-origin: center;
}

@keyframes logo-pulse {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.3) drop-shadow(0 0 6px #a78bfa); }
}

.hub-logo-dot {
  animation: dot-drift 4s ease-in-out infinite alternate;
}

@keyframes dot-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(1px, -1px); }
}

.hub-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #f8fafc 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hub-tagline {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 1px;
  letter-spacing: 0.01em;
}

/* Header right */
.hub-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Stats */
.hub-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hub-stat {
  text-align: center;
  line-height: 1;
}

.hub-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.hub-stat-label {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hub-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.12);
}

/* New Company button */
.hub-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6C3BEE 0%, #9333ea 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 4px 18px rgba(108, 59, 238, 0.38);
  white-space: nowrap;
}

.hub-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108, 59, 238, 0.55);
  filter: brightness(1.08);
}

.hub-new-btn:active { transform: translateY(0); }

.hub-new-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

.hub-new-btn--lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.hub-new-btn-plus {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  margin-right: 1px;
}

/* Main content area */
.hub-main {
  flex: 1;
  padding: 48px 32px 64px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Section header */
.hub-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hub-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  margin: 0;
}

.hub-section-count {
  font-size: 12px;
  color: #64748B;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   Mini Agent Cards — Futuristic Command-Center Design
   ═══════════════════════════════════════════════════════════════ */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Mini Card ── */
.mini-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  animation: hub-card-enter 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

.mini-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.18);
}

/* Animated glow border */
.mini-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: conic-gradient(from var(--glow-angle), #a78bfa, #6C3BEE, #2563EB, #059669, #DB2777, #a78bfa);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
  animation: glow-spin 3s linear infinite;
}
.mini-card-glow::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  background: rgba(8, 11, 20, 0.95);
}
.mini-card:hover .mini-card-glow {
  opacity: 0.7;
}

/* Hero: colored wash + avatar */
.mini-card-hero {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.mini-card-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  transition: opacity 0.25s ease;
}
.mini-card:hover .mini-card-hero-bg {
  opacity: 0.24;
}

/* Bottom fade on hero */
.mini-card-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(8,11,20,0.85));
  pointer-events: none;
}

/* Holographic ring around avatar */
.mini-card-holo-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  bottom: 16px;
  border: 1.5px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.15), inset 0 0 12px rgba(167, 139, 250, 0.08);
  animation: holo-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.mini-card-avatar-outer {
  width: 120px;
  height: 120px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Top accent bar */
.mini-card-color-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
}

/* ── Card body ── */
.mini-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.mini-card-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
}

.mini-card-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  width: fit-content;
}

/* Capabilities */
.mini-card-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.mini-card-capability {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #94A3B8;
  transition: background 0.15s, border-color 0.15s;
}
.mini-card:hover .mini-card-capability {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

/* Talk / Conversation button */
.mini-card-talk-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.mini-card-talk-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.mini-card-talk-btn:active { transform: scale(0.98); }
.mini-card-talk-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.mini-card-talk-arrow {
  font-size: 14px;
  transition: transform 0.2s ease;
}
.mini-card-talk-btn:hover .mini-card-talk-arrow {
  transform: translateX(3px);
}

/* ── Session view (legacy selector kept for activate/deactivate) ── */
[data-session-view] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
[data-session-view].active {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════════════════════════════
   sv-* — Two-panel session UI (sidebar + chat)
══════════════════════════════════════════════════════════════ */
.sv-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  background: var(--color-bg);
  font-family: var(--font-sans);
}

/* ══ SIDEBAR ══════════════════════════════════════════════════ */
.sv-sidebar {
  width: 256px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 16px;
  border-right: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  gap: 0;
}
.sv-sidebar::-webkit-scrollbar { display: none; }

.sv-side-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  flex-shrink: 0;
}

.sv-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.sv-icon-btn:hover  { background: rgba(255,255,255,0.1); }
.sv-icon-btn:active { transform: scale(0.92); }
.sv-back-btn { font-size: 17px; }
.sv-end-btn {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.2);
  color: #FCA5A5;
}
.sv-end-btn:hover { background: rgba(239,68,68,0.2); }

.sv-avatar-ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 4px;
  margin: 4px 0 10px;
  flex-shrink: 0;
  position: relative;
  transition: box-shadow 0.4s ease;
}
.sv-avatar-ring[data-state="speaking"] {
  box-shadow: 0 0 0 3px var(--agent-color, #666), 0 0 20px var(--agent-color, #666);
  animation: sv-ring-pulse 0.9s ease-in-out infinite alternate;
}
.sv-avatar-ring[data-state="listening"] {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  animation: sv-ring-listen 1.2s ease-in-out infinite alternate;
}
.sv-avatar-ring[data-state="thinking"] {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
  animation: sv-ring-think 1.6s linear infinite;
}
@keyframes sv-ring-pulse {
  from { box-shadow: 0 0 0 2px var(--agent-color, #666), 0 0 12px var(--agent-color, #666); }
  to   { box-shadow: 0 0 0 4px var(--agent-color, #666), 0 0 28px var(--agent-color, #666); }
}
@keyframes sv-ring-listen {
  from { box-shadow: 0 0 0 1px rgba(255,255,255,0.15); }
  to   { box-shadow: 0 0 0 4px rgba(255,255,255,0.35); }
}
@keyframes sv-ring-think {
  from { box-shadow: 0 0 0 2px rgba(255,255,255,0.08) }
  to   { box-shadow: 0 0 0 2px rgba(255,255,255,0.18) }
}

.sv-avatar-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.sv-state-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  flex-shrink: 0;
}
.sv-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  animation: sv-dot-pulse 1.8s ease-in-out infinite;
}
.sv-state-dot--connecting { background: var(--color-warning); }
.sv-state-dot--listening  { background: #60A5FA; }
.sv-state-dot--thinking   { background: #A78BFA; animation: sv-dot-spin 1.4s linear infinite; }
.sv-state-dot--speaking   { background: var(--color-success); }
.sv-state-dot--error      { background: var(--color-error); animation: none; }
.sv-state-dot--off        { background: var(--color-text-muted); animation: none; }
@keyframes sv-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
@keyframes sv-dot-spin {
  to { transform: rotate(360deg); border-radius: 0; }
}

.sv-agent-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  text-align: center;
  flex-shrink: 0;
  margin-bottom: 18px;
}
.sv-agent-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sv-agent-role {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}
.sv-agent-tagline {
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 2px;
}

.sv-side-section {
  width: 100%;
  padding: 0 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.sv-side-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.sv-caps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-cap-item {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding-left: 12px;
  position: relative;
  line-height: 1.5;
}
.sv-cap-item::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

.sv-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sv-tool-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
}
.sv-tool-chip-icon { font-size: 14px; }

.sv-waveform {
  width: 200px;
  height: 40px;
  border-radius: var(--radius-sm);
  opacity: 0.75;
  margin: 4px 0 8px;
  flex-shrink: 0;
}

.sv-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  margin-top: auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.sv-mode-btn:hover { background: rgba(255,255,255,0.09); color: var(--color-text-primary); }
.sv-mode-btn--active {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #FCA5A5;
  box-shadow: 0 0 16px rgba(239,68,68,0.15);
}
.sv-mode-btn-icon { font-size: 16px; }

/* ══ CHAT PANEL ════════════════════════════════════════════════ */
.sv-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.sv-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}
.sv-messages::-webkit-scrollbar { width: 4px; }
.sv-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sv-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.sv-empty-icon { font-size: 40px; opacity: 0.5; }
.sv-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.sv-empty-hint {
  font-size: 13px;
  color: var(--color-text-muted);
}

.sv-load-older-btn {
  display: block;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sv-load-older-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.09);
  color: var(--color-text-primary);
  border-color: rgba(255,255,255,0.22);
}
.sv-load-older-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sv-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.sv-msg--visible  { opacity: 1; transform: translateY(0); }
.sv-msg--user     { flex-direction: row-reverse; }
.sv-msg--mini     { flex-direction: row; }

.sv-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  margin-bottom: 1px;
}

.sv-bubble {
  max-width: min(68%, 520px);
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.sv-bubble--user {
  background: #2563EB;
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(37,99,235,0.3);
}
.sv-bubble--mini {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
}
.sv-bubble--image-placeholder {
  padding: 12px;
  min-width: 220px;
}

.sv-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: currentColor;
  margin-left: 2px;
  vertical-align: middle;
  animation: sv-blink 0.7s step-end infinite;
}
@keyframes sv-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.sv-chat-image {
  display: block;
  max-width: 240px;
  margin-top: 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}
.sv-chat-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.sv-img-shimmer {
  width: 220px;
  height: 146px;
  border-radius: 10px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.1)  50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: sv-shimmer 1.4s linear infinite;
}
@keyframes sv-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.sv-img-label {
  margin-top: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
  animation: sv-fade-pulse 1.4s ease-in-out infinite;
}
@keyframes sv-fade-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ============================================================
   MARKDOWN RENDERING IN CHAT BUBBLES
   ============================================================ */
.sv-bubble--rich .md-p {
  margin: 0 0 0.35em;
  line-height: 1.6;
}
.sv-bubble--rich .md-p:last-child {
  margin-bottom: 0;
}
.sv-bubble--rich strong {
  font-weight: 700;
  color: #fff;
}
.sv-bubble--mini.sv-bubble--rich strong {
  color: rgba(255, 255, 255, 0.95);
}
.sv-bubble--rich em {
  font-style: italic;
}
.sv-bubble--rich .md-h1,
.sv-bubble--rich .md-h2,
.sv-bubble--rich .md-h3,
.sv-bubble--rich .md-h4 {
  font-weight: 700;
  margin: 0.6em 0 0.3em;
  line-height: 1.3;
}
.sv-bubble--rich .md-h1:first-child,
.sv-bubble--rich .md-h2:first-child,
.sv-bubble--rich .md-h3:first-child,
.sv-bubble--rich .md-h4:first-child {
  margin-top: 0;
}
.sv-bubble--rich .md-h1 { font-size: 1.15em; }
.sv-bubble--rich .md-h2 { font-size: 1.08em; }
.sv-bubble--rich .md-h3 { font-size: 1.02em; color: rgba(255,255,255,0.85); }
.sv-bubble--rich .md-h4 { font-size: 0.95em; color: rgba(255,255,255,0.7); }

.sv-bubble--rich .md-list {
  margin: 0.3em 0;
  padding-left: 1.4em;
}
.sv-bubble--rich .md-list li {
  margin-bottom: 0.2em;
  line-height: 1.5;
}
.sv-bubble--rich ol.md-list {
  list-style: decimal;
}
.sv-bubble--rich ul.md-list {
  list-style: disc;
}

.sv-bubble--rich .md-inline-code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.sv-bubble--user .md-inline-code {
  background: rgba(255, 255, 255, 0.18);
}

.sv-bubble--rich .md-code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0.4em 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.5;
  white-space: pre;
}
.sv-bubble--user .md-code-block {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.sv-bubble--rich .md-blockquote {
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  padding-left: 10px;
  margin: 0.3em 0;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

.sv-bubble--rich .md-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0.5em 0;
}

.sv-bubble--rich .md-link {
  color: #60a5fa;
  text-decoration: underline;
  text-decoration-color: rgba(96, 165, 250, 0.4);
}
.sv-bubble--rich .md-link:hover {
  text-decoration-color: #60a5fa;
}

/* ============================================================
   MARKDOWN IN WORKFLOW / REVIEW CONTEXTS
   ============================================================ */
.md-content .md-p {
  margin: 0 0 0.4em;
  line-height: 1.6;
}
.md-content .md-p:last-child { margin-bottom: 0; }
.md-content strong { font-weight: 700; color: rgba(255,255,255,0.92); }
.md-content em { font-style: italic; }

.md-content .md-h1,
.md-content .md-h2,
.md-content .md-h3,
.md-content .md-h4 {
  font-weight: 700;
  margin: 0.5em 0 0.25em;
  color: rgba(255,255,255,0.9);
}
.md-content .md-h1 { font-size: 1.1em; }
.md-content .md-h2 { font-size: 1.02em; }
.md-content .md-h3 { font-size: 0.95em; }
.md-content .md-h4 { font-size: 0.9em; }

.md-content .md-list {
  margin: 0.3em 0;
  padding-left: 1.4em;
}
.md-content .md-list li {
  margin-bottom: 0.2em;
  line-height: 1.5;
}
.md-content ol.md-list { list-style: decimal; }
.md-content ul.md-list { list-style: disc; }

.md-content .md-inline-code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.md-content .md-code-block {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0.3em 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.5;
  white-space: pre;
}

.md-content .md-blockquote {
  border-left: 3px solid rgba(255,255,255,0.15);
  padding-left: 10px;
  margin: 0.3em 0;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

.md-content .md-hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0.5em 0;
}

.md-content .md-link {
  color: #60a5fa;
  text-decoration: underline;
}

.sv-error-banner {
  background: rgba(239,68,68,0.09);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #FCA5A5;
}

/* ── Input bar ── */
.sv-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.01);
}

.sv-text-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}
.sv-text-input::placeholder { color: var(--color-text-muted); }
.sv-text-input:focus {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}
.sv-text-input:disabled { opacity: 0.35; cursor: not-allowed; }

.sv-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--agent-color, #2563EB);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.sv-send-btn:hover:not(:disabled) {
  opacity: 0.85;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.sv-send-btn:active:not(:disabled) { transform: scale(0.9); }
.sv-send-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* ── Error / empty states ── */
.error-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: #FCA5A5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border-bright);
  border-top-color: var(--color-text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Switcher (Cmd+K) ── */
.mini-switcher-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mini-switcher-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.mini-switcher {
  width: 360px;
  padding: 16px;
}
.mini-switcher-title {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.mini-switcher-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s ease;
  width: 100%;
  text-align: left;
}
.mini-switcher-item:hover, .mini-switcher-item.active {
  background: rgba(255,255,255,0.08);
}
.mini-switcher-item-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.mini-switcher-item-name { font-size: 14px; font-weight: 600; }
.mini-switcher-item-role { font-size: 12px; color: var(--color-text-secondary); }

/* ═══════════════════════════════════════════════════════════════
   Company Grid + Cards — Futuristic Glass Design
   ═══════════════════════════════════════════════════════════════ */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}


/* ── Card enter animation ── */
@keyframes hub-card-enter {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Company Card ── */
.hub-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  animation: hub-card-enter 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

.hub-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.18);
}

/* ── Animated glow border (conic gradient, mask-composite) ── */
.hub-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: conic-gradient(from var(--glow-angle), #a78bfa, #6C3BEE, #2563EB, #059669, #DB2777, #a78bfa);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
  animation: glow-spin 3s linear infinite;
}

.hub-card-glow::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  background: rgba(8, 11, 20, 0.95);
}

@keyframes glow-spin {
  to { --glow-angle: 360deg; }
}

.hub-card:hover .hub-card-glow {
  opacity: 0.7;
}

/* ── Card Hero ── */
.hub-card-hero {
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 1;
}

.hub-card-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  transition: opacity 0.25s ease;
}

.hub-card:hover .hub-card-hero-bg {
  opacity: 0.26;
}

/* Bottom fade */
.hub-card-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(8,11,20,0.85));
  pointer-events: none;
}

.hub-card-hero-glow {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.2;
  filter: blur(28px);
  pointer-events: none;
}

/* Holographic ring around emoji */
.hub-card-holo-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.3);
  box-shadow:
    0 0 12px rgba(167, 139, 250, 0.15),
    inset 0 0 12px rgba(167, 139, 250, 0.08);
  animation: holo-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes holo-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.15), inset 0 0 12px rgba(167, 139, 250, 0.08);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3), inset 0 0 16px rgba(167, 139, 250, 0.12);
  }
}

@keyframes emoji-float {
  0%, 100% { transform: translateY(0)   scale(1); }
  50%       { transform: translateY(-5px) scale(1.06); }
}

.hub-card-emoji {
  font-size: 40px;
  line-height: 1;
  position: relative;
  z-index: 2;
  animation: emoji-float 3.2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  user-select: none;
}


/* ── Card Body ── */
.hub-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.hub-card-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.2;
  margin: 0;
}

/* ── Glass pill meta badges ── */
.hub-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hub-card-status-badge,
.hub-card-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94A3B8;
  line-height: 1;
}

.hub-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hub-card-status-dot--active {
  background: #10b981;
  animation: status-pulse 2.4s ease-in-out infinite;
}

.hub-card-status-dot--empty {
  background: #64748B;
  animation: none;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  60%       { opacity: 0.85; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

.hub-card-count-icon {
  font-size: 12px;
  line-height: 1;
}

/* ── Avatar team strip ── */
.hub-card-team {
  display: flex;
  align-items: center;
}

.hub-card-team-scroll {
  display: flex;
  align-items: center;
}

.hub-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(8,11,20,0.9);
  flex-shrink: 0;
  margin-left: -8px;
  position: relative;
  background: rgba(255,255,255,0.05);
  transition: transform 0.2s ease;
}

.hub-card-avatar:first-child { margin-left: 0; }

.hub-card-team-scroll:hover .hub-card-avatar:hover {
  transform: translateY(-3px) scale(1.1);
  z-index: 10;
}

/* Overflow badge */
.hub-card-avatar-more {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  flex-shrink: 0;
  margin-left: -8px;
}


/* ── Enter Workspace button ── */
.hub-card-enter-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-top: auto;
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hub-card-enter-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.hub-card-enter-btn:active { transform: scale(0.98); }

.hub-card-enter-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.hub-card-enter-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}
.hub-card-enter-btn:hover .hub-card-enter-arrow {
  transform: translateX(3px);
}

/* ── Delete button on card ── */
.hub-card-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease,
              transform 0.2s ease,
              color 0.15s ease,
              background 0.15s ease;
}

/* Visible on card hover OR focus-visible */
.hub-card:hover .hub-card-delete-btn,
.hub-card-delete-btn:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.hub-card-delete-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.hub-card-delete-btn:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.35);
}

.hub-card-delete-btn:active {
  transform: scale(0.92);
}

/* ── Hub empty state ── */
@keyframes empty-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hub-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 32px;
  gap: 20px;
  animation: hub-card-enter 0.5s ease both;
}

.hub-empty-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: empty-float 4s ease-in-out infinite;
}

.hub-empty-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(108,59,238,0.25);
  animation: ring-expand 3s ease-out infinite;
}
.hub-empty-ring.ring-1 { width: 96px;  height: 96px;  animation-delay: 0s; }
.hub-empty-ring.ring-2 { width: 130px; height: 130px; animation-delay: 0.8s; }

@keyframes ring-expand {
  0%   { opacity: 0.6; transform: scale(0.85); }
  100% { opacity: 0;   transform: scale(1.15); }
}

.hub-empty-icon {
  font-size: 52px;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(108,59,238,0.4));
}

.hub-empty-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
  margin: 0;
}

.hub-empty-desc {
  font-size: 15px;
  color: #94A3B8;
  max-width: 380px;
  line-height: 1.65;
  margin: 0;
}

/* Legacy class used by workspace empty CTAs */
.company-hub-empty-cta {
  margin-top: 4px;
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #6C3BEE 0%, #9333ea 100%);
  color: white;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 4px 18px rgba(108,59,238,0.35);
}
.company-hub-empty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,59,238,0.5);
  filter: brightness(1.08);
}

/* ── Live region for screen readers ── */
.hub-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Reduced Motion — Disable all hub animations/transitions
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hub-bg::before,
  .hub-logo-star,
  .hub-logo-dot,
  .hub-card-emoji,
  .hub-card-holo-ring,
  .hub-empty-icon-wrap,
  .hub-empty-ring,
  .hub-card-status-dot--active {
    animation: none;
  }

  .hub-header::after {
    animation: none;
    background: rgba(167, 139, 250, 0.2);
  }

  .hub-card {
    animation: none;
    transition: none;
  }

  .hub-card-glow {
    animation: none;
    display: none;
  }

  .hub-card-enter-btn,
  .hub-card-delete-btn,
  .hub-new-btn,
  .hub-card-hero-bg {
    transition: none;
  }

  .hub-empty-state {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Focus-visible styles for all hub interactive elements
   ═══════════════════════════════════════════════════════════════ */
.hub-card-enter-btn:focus-visible,
.hub-card-delete-btn:focus-visible,
.hub-new-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   Workspace — Futuristic Command-Center Design
   ═══════════════════════════════════════════════════════════════ */

/* ── Workspace header ── */
.workspace-header {
  gap: 16px;
  padding: 20px 32px;
}

/* Scanning line on workspace header (matches hub header) */
.workspace-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #a78bfa44 20%,
    #a78bfa 50%,
    #a78bfa44 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: scan-line 4s linear infinite;
}

.workspace-back-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace-back-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.workspace-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Holographic ring around workspace emoji */
.workspace-emoji-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.12), inset 0 0 10px rgba(167, 139, 250, 0.06);
  animation: holo-pulse 3s ease-in-out infinite;
  background: rgba(255,255,255,0.04);
}

.workspace-emoji {
  font-size: 22px;
  line-height: 1;
}

.workspace-title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workspace-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-team-count {
  font-size: 11px;
  color: #64748B;
  letter-spacing: 0.02em;
}

/* Action buttons */
.workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.1s ease;
  white-space: nowrap;
  position: relative;
}

.workspace-action-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.18);
}
.workspace-action-btn:active { transform: scale(0.97); }
.workspace-action-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.workspace-action-btn-icon {
  font-size: 14px;
  line-height: 1;
}

/* Add Mini button — accent style */
.workspace-add-btn {
  background: linear-gradient(135deg, #6C3BEE 0%, #9333ea 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(108, 59, 238, 0.3);
}
.workspace-add-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(108, 59, 238, 0.45);
  color: #fff;
  background: linear-gradient(135deg, #6C3BEE 0%, #9333ea 100%);
  border-color: transparent;
}

/* Voice toggle button */
.workspace-voice-toggle {
  border-color: rgba(239,68,68,0.3);
  color: rgba(239,68,68,0.8);
}
.workspace-voice-toggle:hover {
  border-color: rgba(239,68,68,0.5);
  color: rgba(239,68,68,1);
  background: rgba(239,68,68,0.08);
}
.workspace-voice-toggle.active {
  border-color: rgba(34,197,94,0.4);
  color: rgba(34,197,94,0.9);
  background: rgba(34,197,94,0.08);
}
.workspace-voice-toggle.active:hover {
  border-color: rgba(34,197,94,0.6);
  color: rgba(34,197,94,1);
  background: rgba(34,197,94,0.12);
}

/* Settings dropdown */
.workspace-settings-wrap {
  position: relative;
}

.workspace-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 0.15s, color 0.15s;
}
.workspace-settings-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
.workspace-settings-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.workspace-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 15, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: none;
  z-index: 50;
}

.workspace-settings-menu.open {
  display: block;
}

.workspace-settings-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  transition: background 0.1s ease, color 0.1s ease;
}

.workspace-settings-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.workspace-settings-menu-item.danger {
  color: #FCA5A5;
}
.workspace-settings-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ── Hamburger menu ── */
.workspace-hamburger-wrap {
  position: relative;
}

.workspace-hamburger-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.workspace-hamburger-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
.workspace-hamburger-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.workspace-hamburger-btn .hamburger-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  background: #f97316;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.3);
  animation: dot-pulse 1.5s ease-in-out infinite;
}

.workspace-hamburger-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 15, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  display: none;
  z-index: 50;
}
.workspace-hamburger-menu.open {
  display: block;
}

.workspace-hamburger-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  position: relative;
}
.workspace-hamburger-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.workspace-hamburger-menu-item .hamburger-item-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Voice active state: green left border + green tint */
.workspace-hamburger-menu-item.active {
  border-left: 2px solid rgba(34,197,94,0.7);
  background: rgba(34,197,94,0.06);
  color: rgba(34,197,94,0.9);
}
.workspace-hamburger-menu-item.active:hover {
  background: rgba(34,197,94,0.1);
  color: rgba(34,197,94,1);
}

/* Danger (delete) */
.workspace-hamburger-menu-item.danger {
  color: #FCA5A5;
}
.workspace-hamburger-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

.workspace-hamburger-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 8px;
}

/* Inline PAPER/LIVE badge inside trading menu item */
.workspace-hamburger-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.workspace-hamburger-badge.paper {
  background: rgba(5, 150, 105, 0.15);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #34D399;
}
.workspace-hamburger-badge.live {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
}

/* Activity item notification dot */
.workspace-hamburger-menu-item .hamburger-item-dot {
  width: 6px;
  height: 6px;
  background: #f97316;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Workspace section header ── */
.workspace-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.workspace-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
  margin: 0;
}

.workspace-section-count {
  font-size: 12px;
  color: #64748B;
  letter-spacing: 0.01em;
}

/* ── Workspace empty state ── */
.workspace-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 32px;
  gap: 20px;
  animation: hub-card-enter 0.5s ease both;
}

.workspace-empty-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: empty-float 4s ease-in-out infinite;
}

.workspace-empty-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(108,59,238,0.25);
  animation: ring-expand 3s ease-out infinite;
}
.workspace-empty-ring.ring-1 { width: 96px;  height: 96px;  animation-delay: 0s; }
.workspace-empty-ring.ring-2 { width: 130px; height: 130px; animation-delay: 0.8s; }

.workspace-empty-icon {
  font-size: 52px;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(108,59,238,0.4));
}

.workspace-empty h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.workspace-empty p {
  font-size: 15px;
  color: #94A3B8;
  max-width: 340px;
  line-height: 1.6;
  margin: 0;
}

/* ── Workspace reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .workspace-header::after {
    animation: none;
    background: rgba(167, 139, 250, 0.2);
  }
  .workspace-emoji-ring {
    animation: none;
  }
  .mini-card {
    animation: none;
    transition: none;
  }
  .mini-card-glow {
    animation: none;
    display: none;
  }
  .mini-card-holo-ring {
    animation: none;
  }
  .mini-card-talk-btn,
  .workspace-action-btn,
  .workspace-back-btn {
    transition: none;
  }
  .workspace-empty {
    animation: none;
  }
  .workspace-empty-icon-wrap,
  .workspace-empty-ring {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Mini Selector — Team Builder Modal
   ═══════════════════════════════════════════════════════════════ */

.mini-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mini-selector-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Modal panel entrance */
@keyframes selector-enter {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.mini-selector {
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(12, 14, 24, 0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05) inset;
  backdrop-filter: blur(24px) saturate(180%);
  animation: selector-enter 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── Header ── */
.mini-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  position: relative;
}

/* Scanning line on selector header */
.mini-selector-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #a78bfa33 30%,
    #a78bfa88 50%,
    #a78bfa33 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: scan-line 4s linear infinite;
}

.mini-selector-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-selector-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.mini-selector-subtitle {
  font-size: 12px;
  color: #64748B;
}

.mini-selector-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s, color 0.15s;
}
.mini-selector-close:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
.mini-selector-close:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

/* ── Agent list ── */
.mini-selector-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.mini-selector-list::-webkit-scrollbar { width: 4px; }
.mini-selector-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* ── Agent row ── */
@keyframes row-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mini-selector-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.2s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.15s ease;
  position: relative;
  user-select: none;
  animation: row-enter 0.35s cubic-bezier(0.16,1,0.3,1) both;
}

.mini-selector-row:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(2px);
}

.mini-selector-row:active {
  transform: scale(0.995);
}

.mini-selector-row:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

/* Selected state */
.mini-selector-row.in-team {
  background: rgba(108, 59, 238, 0.08);
  border-color: rgba(108, 59, 238, 0.30);
  box-shadow: 0 0 20px rgba(108, 59, 238, 0.08), inset 0 0 0 1px rgba(108, 59, 238, 0.05);
}

.mini-selector-row.in-team:hover {
  background: rgba(108, 59, 238, 0.12);
  border-color: rgba(108, 59, 238, 0.40);
}

/* ── Left accent bar ── */
.mini-selector-accent {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
  min-height: 40px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.mini-selector-row.in-team .mini-selector-accent {
  opacity: 1;
}

/* ── Avatar with ring ── */
.mini-selector-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.mini-selector-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
  transition: border-color 0.25s ease;
}

.mini-selector-row.in-team .mini-selector-avatar {
  border-color: rgba(108, 59, 238, 0.5);
}

/* Holographic ring on selected avatar */
.mini-selector-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.0);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

.mini-selector-row.in-team .mini-selector-avatar-ring {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.12);
  animation: holo-pulse 3s ease-in-out infinite;
}

/* ── Info block ── */
.mini-selector-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-selector-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-selector-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #f8fafc;
}

.mini-selector-role {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.mini-selector-tagline {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-selector-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.mini-selector-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94A3B8;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s;
}
.mini-selector-row.in-team .mini-selector-pill {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

/* ── Toggle indicator ── */
.mini-selector-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease,
              border-color 0.2s ease;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.15);
}

.mini-selector-row.in-team .mini-selector-toggle {
  background: rgba(108, 59, 238, 0.25);
  border-color: rgba(108, 59, 238, 0.5);
  transform: scale(1.1);
}

/* ── Footer ── */
.mini-selector-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.mini-selector-team-summary {
  flex: 1;
  font-size: 12px;
  color: #64748B;
}

.mini-selector-team-summary strong {
  color: #a78bfa;
  font-weight: 700;
}

.mini-selector-cancel-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 0.15s, color 0.15s;
}
.mini-selector-cancel-btn:hover {
  background: rgba(255,255,255,0.10);
  color: #f8fafc;
}
.mini-selector-cancel-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.mini-selector-done-btn {
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #6C3BEE 0%, #9333ea 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(108, 59, 238, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.mini-selector-done-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 59, 238, 0.45);
  filter: brightness(1.06);
}
.mini-selector-done-btn:active { transform: translateY(0); }
.mini-selector-done-btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .mini-selector {
    animation: none;
  }
  .mini-selector-header::after {
    animation: none;
    background: rgba(167, 139, 250, 0.15);
  }
  .mini-selector-row {
    animation: none;
    transition: none;
  }
  .mini-selector-toggle {
    transition: none;
  }
  .mini-selector-avatar-ring {
    animation: none;
    transition: none;
  }
}

/* ── Create Company Modal ── */
.create-company-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.create-company-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.create-company-modal {
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.97);
  transition: transform 0.2s ease;
}

.create-company-overlay.active .create-company-modal {
  transform: scale(1);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.modal-input:focus {
  border-color: var(--color-accent);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.emoji-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: border-color 0.1s ease, transform 0.1s ease;
  cursor: pointer;
}

.emoji-option:hover {
  transform: scale(1.1);
}

.emoji-option.selected {
  border-color: var(--color-accent);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.color-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.1s ease, transform 0.1s ease;
}

.color-swatch:hover {
  transform: scale(1.05);
}

.color-swatch.selected {
  border-color: white;
  transform: scale(1.1);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.modal-cancel-btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.modal-create-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: var(--color-accent);
  color: white;
  transition: opacity 0.15s ease;
}

.modal-create-btn:hover:not(:disabled) { opacity: 0.9; }

.modal-create-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Confirm Delete Modal ── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal {
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.confirm-icon {
  font-size: 40px;
  line-height: 1;
}

.confirm-modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.confirm-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 300px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.confirm-delete-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  transition: background 0.15s ease;
}

.confirm-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ── Two-step delete modal ────────────────────────────────────────────────── */
.hub-delete-overlay {
  /* inherits .confirm-overlay positioning */
  animation: fade-in 0.18s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.hub-delete-modal {
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 28px 28px 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modal-in 0.22s cubic-bezier(0.16,1,0.3,1) both;
}

/* Step 2 adds a red border tint */
.hub-delete-modal--step2 {
  border-color: rgba(239, 68, 68, 0.3);
  animation: modal-in 0.18s cubic-bezier(0.16,1,0.3,1) both;
}

.hub-delete-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  flex-shrink: 0;
}

.hub-delete-icon--danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  font-size: 22px;
  line-height: 1;
}

.hub-delete-title {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0;
}

.hub-delete-desc {
  font-size: 13.5px;
  color: #94A3B8;
  line-height: 1.6;
  margin: 0;
}

.hub-delete-desc strong {
  color: #cbd5e1;
  font-weight: 600;
}

.hub-delete-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.hub-delete-cancel {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13.5px;
  color: #94A3B8;
}

.hub-delete-continue {
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f8fafc;
  transition: background 0.15s ease;
}

.hub-delete-continue:hover {
  background: rgba(255,255,255,0.14);
}

/* Final destructive action — red, prominent */
.hub-delete-confirm {
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hub-delete-confirm:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.65);
}

/* ── Hub Footer ──────────────────────────────────────────────────── */
.hub-footer {
  padding: 24px 32px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
  flex-shrink: 0;
}
.hub-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hub-footer-link {
  font-size: 0.75rem;
  color: var(--color-text-tertiary, rgba(255,255,255,.35));
  text-decoration: none;
  transition: color .15s;
}
.hub-footer-link:hover {
  color: var(--color-accent, #a78bfa);
}
.hub-footer-sep {
  font-size: 0.65rem;
  color: rgba(255,255,255,.15);
  user-select: none;
}
.hub-footer-copy {
  font-size: 0.68rem;
  color: rgba(255,255,255,.25);
}
