/* ── Allorc App Mock Screenshots ─────────────────────────────────────────── */
/* Pixel-perfect mirror of the real Allorc web app (dark theme).            */
/* Color tokens, spacing, radii, shadows extracted directly from the app's  */
/* CSS variables (globals.css) and component tailwind classes.              */
/* ──────────────────────────────────────────────────────────────────────── */

:root {
  /* App chrome tokens (bg-app-bg, text-app-text, etc.) */
  --app-bg: #000000;
  --app-surface: #0a0a0a;
  --app-surface-2: #101010;
  --app-surface-3: #161616;
  --app-text: #ffffff;
  --app-text-muted: rgba(255,255,255,0.8);
  --app-text-subtle: rgba(255,255,255,0.55);
  --app-border: rgba(255,255,255,0.10);
  --app-border-strong: rgba(255,255,255,0.18);
  --app-hover: rgba(255,255,255,0.06);

  /* shadcn tokens (bg-card, border-border, etc.)  */
  --background: #000000;
  --foreground: #ffffff;
  --card: #0a0a0a;
  --card-foreground: #ffffff;
  --popover: #161616;
  --popover-foreground: #ffffff;
  --secondary: #161616;
  --secondary-foreground: #ffffff;
  --muted: #161616;
  --muted-foreground: rgba(255,255,255,0.65);
  --accent: #161616;
  --accent-foreground: #ffffff;
  --input: #161616;
  --border: rgba(255,255,255,0.10);
  --ring: rgba(255,255,255,0.15);
  --primary: #eaeaea;
  --primary-foreground: #0a0a0a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;

  /* Elevation shadows (dark mode only) */
  --elev-1-shadow: 0 1px 0 0 rgba(255,255,255,0.04) inset, 0 1px 2px 0 rgba(0,0,0,0.6), 0 2px 6px -1px rgba(0,0,0,0.5);
  --elev-2-shadow: 0 1px 0 0 rgba(255,255,255,0.05) inset, 0 4px 8px -2px rgba(0,0,0,0.6), 0 12px 32px -4px rgba(0,0,0,0.7);
  --elev-3-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 16px -4px rgba(0,0,0,0.6), 0 32px 64px -8px rgba(0,0,0,0.85);

  /* Radii */
  --radius: 0.625rem;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;

  /* Fonts */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  /* Status colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-0\.5 { gap: 2px; }
.gap-1 { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-12 { gap: 48px; }
.space-y-0\.5 > * + * { margin-top: 2px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-1\.5 > * + * { margin-top: 6px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-3 > * + * { margin-left: 12px; }
.space-x-8 > * + * { margin-left: 32px; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.shrink-0 { flex-shrink: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Container helpers ─────────────────────────────────────────────────── */
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.p-1 { padding: 4px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.pl-2 { padding-left: 8px; }
.pl-3 { padding-left: 12px; }
.pl-10 { padding-left: 40px; }
.pr-3 { padding-right: 12px; }
.pr-4 { padding-right: 16px; }
.pt-4 { padding-top: 16px; }
.pt-5 { padding-top: 20px; }
.pb-40 { padding-bottom: 160px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.ml-3 { margin-left: 12px; }
.ml-4 { margin-left: 16px; }
.ml-6 { margin-left: 24px; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.absolute { position: absolute; }
.relative { position: relative; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.left-3 { left: 12px; }
.top-0 { top: 0; }
.top-28 { top: 112px; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ── Backgrounds ───────────────────────────────────────────────────────── */
.bg-app-bg { background: var(--app-bg); }
.bg-app-surface { background: var(--app-surface); }
.bg-app-surface-2 { background: var(--app-surface-2); }
.bg-app-surface-3, .bg-popover, .bg-input, .bg-secondary, .bg-muted, .bg-accent { background: var(--app-surface-3); }
.bg-card { background: var(--card); }
.bg-background { background: var(--background); }
.bg-black { background: #000; }
.bg-white { background: #fff; }
.bg-zinc-800 { background: #27272a; }
.bg-zinc-900 { background: #18181b; }
.bg-zinc-950 { background: #09090b; }
.bg-gray-900 { background: #111827; }
.bg-app-hover { background: var(--app-hover); }
.bg-primary { background: var(--primary); }
.bg-primary\/10 { background: rgba(234,234,234,0.10); }
.bg-app-hover\/30 { background: rgba(255,255,255,0.02); }

/* Status backgrounds */
.bg-red-500\/10 { background: rgba(239,68,68,0.10); }
.bg-amber-500\/10 { background: rgba(245,158,11,0.10); }
.bg-emerald-500\/10 { background: rgba(16,185,129,0.10); }
.bg-blue-500\/10 { background: rgba(59,130,246,0.10); }
.bg-black\/40 { background: rgba(0,0,0,0.4); }
.bg-black\/50 { background: rgba(0,0,0,0.5); }

/* ── Borders ────────────────────────────────────────────────────────────── */
.border { border: 1px solid; }
.border-t { border-top: 1px solid; }
.border-b { border-bottom: 1px solid; }
.border-l { border-left: 1px solid; }
.border-r { border-right: 1px solid; }
.border-dashed { border-style: dashed; }
.border-app-border { border-color: var(--app-border); }
.border-app-border-strong { border-color: var(--app-border-strong); }
.border-border { border-color: var(--border); }
.border-zinc-700 { border-color: #3f3f46; }
.border-zinc-800 { border-color: #27272a; }
.border-gray-800 { border-color: #1f2937; }
.border-gray-200 { border-color: #e5e7eb; }
.border-l-4 { border-left-width: 4px; }
.border-l-zinc-600 { border-left-color: #52525b; }
.border-l-zinc-500 { border-left-color: #71717a; }
.border-l-orange-400 { border-left-color: #fb923c; }
.border-l-red-400 { border-left-color: #f87171; }
.border-red-500\/30 { border-color: rgba(239,68,68,0.30); }
.border-amber-500\/40 { border-color: rgba(245,158,11,0.40); }
.border-amber-500\/50 { border-color: rgba(245,158,11,0.50); }
.border-amber-500\/30 { border-color: rgba(245,158,11,0.30); }
.border-emerald-500\/40 { border-color: rgba(16,185,129,0.40); }
.border-blue-500\/40 { border-color: rgba(59,130,246,0.40); }

/* ── Border radius ──────────────────────────────────────────────────────── */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }
.rounded { border-radius: var(--radius); }

/* ── Shadows ────────────────────────────────────────────────────────────── */
.shadow-elev-1 { box-shadow: var(--elev-1-shadow); }
.shadow-elev-2 { box-shadow: var(--elev-2-shadow); }
.shadow-elev-3 { box-shadow: var(--elev-3-shadow); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }

/* ── Typography ─────────────────────────────────────────────────────────── */
.text-xs { font-size: 12px; line-height: 1.4; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-base { font-size: 16px; line-height: 1.6; }
.text-lg { font-size: 18px; line-height: 1.5; }
.text-xl { font-size: 20px; line-height: 1.4; }
.text-2xl { font-size: 24px; line-height: 1.3; }
.text-3xl { font-size: 30px; line-height: 1.2; }
.text-4xl { font-size: 36px; line-height: 1.15; }
.text-5xl { font-size: 48px; line-height: 1.1; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.leading-relaxed { line-height: 1.625; }
.leading-snug { line-height: 1.375; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.break-words { word-wrap: break-word; }
.no-underline { text-decoration: none; }

/* Text colors */
.text-app-text { color: var(--app-text); }
.text-app-text-muted { color: var(--app-text-muted); }
.text-app-text-subtle { color: var(--app-text-subtle); }
.text-foreground, .text-white { color: #fff; }
.text-muted-foreground { color: rgba(255,255,255,0.65); }
.text-card-foreground { color: #fff; }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-zinc-100 { color: #f4f4f5; }
.text-zinc-200 { color: #e4e4e7; }
.text-zinc-300 { color: #d4d4d8; }
.text-zinc-400 { color: #a1a1aa; }
.text-zinc-500 { color: #71717a; }
.text-zinc-600 { color: #52525b; }
.text-zinc-700 { color: #3f3f46; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-green-600 { color: #16a34a; }
.text-amber-200 { color: #fde68a; }
.text-amber-300 { color: #fcd34d; }
.text-rose-300 { color: #fca5a5; }
.text-red-300 { color: #fca5a5; }
.text-emerald-300 { color: #6ee7b7; }
.text-blue-300 { color: #93c5fd; }
.text-black { color: #000; }

/* ── Focus / hover / transition ─────────────────────────────────────────── */
.transition { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.transition-transform { transition: transform 0.15s ease; }
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.resize-y { resize: vertical; }
.placeholder\\:text-app-text-subtle::placeholder { color: var(--app-text-subtle); }
.placeholder\\:text-zinc-500::placeholder { color: #71717a; }

/* ── Labels (callout boxes on screenshots) ──────────────────────────────── */
.mock-label {
  position: absolute;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
}
.mock-label-red { background: #ef4444; color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,0.4); }
.mock-label-blue { background: #3b82f6; color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.4); }
.mock-label-green { background: #22c55e; color: #000; box-shadow: 0 2px 8px rgba(34,197,94,0.4); }
.mock-label-amber { background: #f59e0b; color: #000; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
.mock-label-grey { background: #52525b; color: #e4e4e7; box-shadow: 0 2px 8px rgba(82,82,91,0.3); }
.mock-caption {
  font-size: 13px;
  color: var(--app-text-subtle);
  margin-top: 12px;
  line-height: 1.5;
  padding: 0 4px;
}
.mock-caption strong { color: var(--app-text); font-weight: 600; }
.mock-frame {
  background: var(--app-bg);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--app-border);
  overflow: hidden;
  position: relative;
}

/* ── Top Bar ───────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.topbar-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--fg0);
  padding-right: 14px; border-right: 1px solid var(--border);
}
.topbar-brand .logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #6e7bff 0%, #b06bff 100%);
  display: grid; place-items: center; color: #fff;
  font-size: 10px; font-weight: 700;
}
.topbar-nav {
  display: flex; align-items: center; gap: 16px;
  flex: 1;
}
.topbar-nav a {
  color: var(--fg2); font-size: 13px; text-decoration: none;
  cursor: default; transition: color 0.15s;
}
.topbar-nav a:hover { color: var(--fg0); }
.topbar-nav a.active {
  color: var(--fg0);
  position: relative;
}
.topbar-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -14px;
  height: 2px; background: var(--primary); border-radius: 1px;
}
.topbar-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.topbar-icon {
  width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--fg2); background: transparent;
  border: 1px solid transparent;
}
.topbar-icon:hover { background: var(--bg2); border-color: var(--border); }
.topbar-icon.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-30);
  color: var(--primary); font-size: 11px; font-weight: 600;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sidebar-section {
  padding: 12px 12px 4px;
}
.sidebar-section h4 {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.10em; color: var(--fg3);
  padding: 0 8px; margin-bottom: 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  color: var(--fg2); font-size: 13px; text-decoration: none; cursor: default;
  margin-bottom: 1px;
}
.sidebar-item:hover { background: var(--bg2); color: var(--fg1); }
.sidebar-item.active { background: var(--primary-15); color: var(--primary); font-weight: 500; }
.sidebar-item .icon { width: 18px; height: 18px; display: grid; place-items: center; }
.sidebar-item .badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 99px;
  min-width: 16px; text-align: center;
}
.sidebar-item .chevron { margin-left: auto; color: var(--fg3); font-size: 12px; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-bottom .sidebar-item { flex: 1; margin-bottom: 0; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; border: none; cursor: default;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none; line-height: 1;
}
.btn-primary {
  background: var(--primary); color: #0b0b10;
}
.btn-secondary {
  background: transparent; color: var(--fg1);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg2); }
.btn-ghost {
  background: transparent; color: var(--fg2);
  border: none;
}
.btn-danger {
  background: var(--danger); color: #fff;
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--fg2);
}
.btn-icon:hover { background: var(--bg2); }

/* ── Inputs ──────────────────────────────────────────────────────────── */
.input-group { margin-bottom: 14px; }
.input-group label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--fg2); margin-bottom: 4px;
}
.input {
  width: 100%; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--fg0); font-size: 14px; font-family: var(--sans);
  outline: none; transition: border-color 0.15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-15); }
.input-error { border-color: var(--danger); }
.error-text { font-size: 12px; color: var(--danger); margin-top: 3px; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.card-header { margin-bottom: 14px; }
.card-header h2 { font-size: 16px; font-weight: 600; color: var(--fg0); margin-bottom: 4px; }
.card-header p { font-size: 13px; color: var(--fg2); }

/* ── Badges ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 99px;
  font-size: 11px; font-weight: 500;
}
.badge-green { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-grey { background: rgba(160,160,184,0.12); color: var(--fg2); }
.badge-primary { background: var(--primary-15); color: var(--primary); }

/* ── Progress bars ────────────────────────────────────────────────────── */
.progress-bar {
  width: 100%; height: 6px;
  background: var(--bg3); border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: var(--primary); transition: width 0.3s;
}
.progress-fill.amber { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* ── Tables ───────────────────────────────────────────────────────────── */
.table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left; padding: 8px 10px;
  color: var(--fg2); font-weight: 500;
  border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  color: var(--fg1);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg2); }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 8px 16px; font-size: 13px; color: var(--fg2);
  border-bottom: 2px solid transparent;
  cursor: default;
}
.tab.active {
  color: var(--fg0); border-bottom-color: var(--primary);
}
.tab:hover:not(.active) { color: var(--fg1); }

/* ── Chat bubbles ─────────────────────────────────────────────────────── */
.chat-bubble {
  max-width: 75%; padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.55;
  margin-bottom: 8px;
}
.chat-bubble.user {
  background: var(--primary); color: #0b0b10;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-bubble.worker {
  background: var(--bg2); color: var(--fg1);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* ── Panels ───────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.panel-header {
  display: flex; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 13px; font-weight: 600; color: var(--fg0); flex: 1; }
.panel-body { padding: 10px 14px; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px;
  background: var(--bg3); color: var(--fg1); font-size: 12px;
  border: 1px solid var(--border);
}

/* ── Tool call cards (chat tool cards) ─────────────────────────────────── */
.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 6px 0;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.tool-card .tool-icon {
  width: 24px; height: 24px; border-radius: 5px;
  background: var(--bg3); display: grid; place-items: center;
  color: var(--primary); font-size: 12px;
}
.tool-card .tool-status {
  margin-left: auto; font-size: 11px;
  display: flex; align-items: center; gap: 4px;
}

/* ── Dropdown menu ─────────────────────────────────────────────────────── */
.dropdown {
  position: absolute;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  padding: 4px;
  min-width: 160px;
  z-index: 100;
}
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 4px;
  color: var(--fg2); font-size: 13px; cursor: default;
}
.dropdown-item:hover { background: var(--primary-15); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: grid; place-items: center;
  z-index: 200;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 400px;
  max-width: 520px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

/* ── Tooltip / badge count ────────────────────────────────────────────── */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 99px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 600;
}

/* ── Avatars ──────────────────────────────────────────────────────────── */
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  background: var(--primary-30); color: var(--primary);
}
.avatar-sm { width: 22px; height: 22px; font-size: 9px; }

/* ── Divider ──────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ── App grid (toolhub / apps) ────────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 600px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
.app-card {
  padding: 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg2);
  display: flex; flex-direction: column; gap: 6px;
}
.app-card .app-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg3); font-size: 16px;
}
.app-card h4 { font-size: 14px; font-weight: 600; color: var(--fg0); }
.app-card p { font-size: 12px; color: var(--fg2); }

/* ── Code block ────────────────────────────────────────────────────────── */
.code-block {
  background: #090a0f;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg2);
  overflow-x: auto;
}

/* ── Status dot ────────────────────────────────────────────────────────── */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.status-dot.online { background: var(--success); }
.status-dot.away { background: var(--warning); }
.status-dot.busy { background: var(--danger); }

/* ── Layout helpers ────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.w-full { width: 100%; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 30px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-fg0 { color: var(--fg0); }
.text-fg1 { color: var(--fg1); }
.text-fg2 { color: var(--fg2); }
.text-fg3 { color: var(--fg3); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.border-b { border-bottom: 1px solid var(--border); }
