/* Base palette, 3px geometry and cabinet proportions adapted from VisitBot Manager Desktop. */
:root {
  --bg: #f4f5f1;
  --surface: #fff;
  --surface-soft: #f8f9f6;
  --line: #e3e6df;
  --line-strong: #d4d9d0;
  --text: #292d2a;
  --muted: #727b77;
  --muted-readable: #66706b;
  --blue: #6f9fc7;
  --blue-dark: #477ba6;
  --brand-lime: #cbd63c;
  --brand-lime-soft: #f2f4c5;
  --brand-charcoal: #333432;
  --sidebar: #292a28;
  --box-radius: 3px;
  --sidebar-expanded-width: 280px;
  --sidebar-collapsed-width: 72px;
  --shadow: 0 8px 24px rgba(42, 48, 43, .055);
  color-scheme: light;
  font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; letter-spacing: -.006em; background: var(--bg); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 12px; top: -70px; z-index: 50; padding: 10px 16px; color: #fff; background: var(--brand-charcoal); }
.skip-link:focus { top: 12px; }
.workspace { display: grid; grid-template-columns: var(--sidebar-expanded-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 22px 12px 16px; color: #dce2dc; background: var(--sidebar); }
.sidebar-brand-panel { display: flex; align-items: center; gap: 8px; padding: 0 6px 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand img { flex: 0 0 38px; }
.brand-copy b, .brand-copy small { display: block; }
.brand-copy b { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.brand-copy small { margin-top: 3px; color: #bfc4c1; font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.sidebar-toggle { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 34px; margin-left: auto; padding: 5px; border: 0; border-radius: var(--box-radius); color: #bfc4c1; background: transparent; }
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.09); }
.sidebar-toggle svg { width: 19px; height: 19px; }
.sidebar-menu { display: grid; align-content: start; gap: 4px; padding-top: 20px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 14px; border-radius: var(--box-radius); color: #c7ccc8; font-size: 14.5px; font-weight: 500; text-decoration: none; }
.nav-link svg { flex: 0 0 20px; width: 20px; height: 20px; }
.nav-link.active { box-shadow: inset 3px 0 0 var(--brand-lime); background: rgba(203,214,60,.13); color: #fff; }
.nav-link:hover { background: rgba(111,159,199,.16); }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,.1); color: #bfc4c1; font-size: 12px; }
.state-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #d58a2c; }
.workspace-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 14px 26px; border-bottom: 1px solid rgba(212,217,208,.85); background: var(--surface); box-shadow: 0 5px 22px rgba(42,48,43,.045); }
.eyebrow { margin: 0 0 3px; color: var(--muted-readable); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.source-state { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--box-radius); color: #86591f; background: var(--surface-soft); font-size: 12px; white-space: nowrap; }
.page-section { max-width: 1240px; padding: 32px 26px; }
.page-section:focus { outline: none; }
.page-heading { margin-bottom: 22px; }
.page-heading h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; font-weight: 600; }
.page-heading p { margin: 0; color: var(--muted-readable); }
.card { border: 1px solid var(--line); border-radius: var(--box-radius); background: var(--surface); box-shadow: var(--shadow); }
.setup-card { display: flex; align-items: flex-start; gap: 20px; padding: 28px; border-top: 3px solid var(--brand-lime); }
.setup-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border: 1px solid #e5e9b4; border-radius: var(--box-radius); color: var(--brand-charcoal); background: var(--brand-lime-soft); }
.setup-icon svg { width: 25px; height: 25px; }
.setup-card h3 { margin: 3px 0 8px; font-size: 22px; line-height: 1.35; font-weight: 600; }
.setup-card p:last-child { max-width: 620px; margin: 0; color: var(--muted-readable); }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.connection-card { padding: 24px 26px 26px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.service-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #dbe5ec; border-radius: var(--box-radius); color: var(--blue-dark); background: #f3f7fa; }
.badge { padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--box-radius); color: var(--muted-readable); background: var(--surface-soft); font-size: 11px; }
.connection-card h3 { margin: 0 0 3px; font-size: 20px; font-weight: 600; }
.connection-card .card-subtitle { margin: 0 0 12px; color: var(--blue-dark); font-size: 13px; }
.connection-card p:last-child { max-width: 440px; margin: 0; color: var(--muted-readable); font-size: 14px; }
.page-note { margin: 22px 0 0; color: var(--muted-readable); font-size: 13px; }
.workspace.is-collapsed { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
.is-collapsed .sidebar { padding-inline: 10px; }
.is-collapsed .sidebar-brand-panel { flex-direction: column; gap: 16px; padding-inline: 0; }
.is-collapsed .brand-copy, .is-collapsed .nav-label, .is-collapsed .sidebar-footer-label { display: none; }
.is-collapsed .sidebar-toggle { margin-left: 0; }
.is-collapsed .nav-link { justify-content: center; padding-inline: 0; }
.is-collapsed .sidebar-footer { justify-content: center; padding-inline: 0; }
@media (max-width: 980px) and (min-width: 621px) {
  .workspace { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar-brand-panel { padding-inline: 0; justify-content: center; }
  .brand-copy, .nav-label, .sidebar-footer-label, .sidebar-toggle { display: none; }
  .nav-link, .sidebar-footer { justify-content: center; padding-inline: 0; }
  .connection-grid { gap: 14px; }
  .connection-card { padding-inline: 20px; }
}
@media (max-width: 620px) {
  .workspace, .workspace.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 14px 16px; }
  .sidebar-brand-panel, .is-collapsed .sidebar-brand-panel { flex-direction: row; gap: 12px; padding: 0; border: 0; }
  .brand-copy, .is-collapsed .brand-copy { display: block; }
  .brand img { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-copy b { font-size: 16px; }
  .sidebar-toggle, .sidebar-menu, .sidebar-footer { display: none; }
  .topbar { min-height: 70px; padding: 12px 18px; }
  .topbar .eyebrow { max-width: 170px; font-size: 9px; }
  .source-state { padding: 6px 8px; font-size: 11px; }
  .page-section { padding: 24px 18px; }
  .page-heading h2 { font-size: 22px; }
  .page-heading p { font-size: 14px; }
  .setup-card { gap: 12px; padding: 20px 17px; }
  .setup-icon { flex-basis: 36px; height: 36px; }
  .setup-icon svg { width: 22px; height: 22px; }
  .setup-card h3 { font-size: 19px; }
  .setup-card p:last-child { font-size: 14px; }
  .connection-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .connection-card { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.source-state.is-ready { color: #45641d; background: #f2f5e8; border-color: #dce4ca; }
.is-ready .state-dot { background: #698c32; }
.source-state.is-unavailable { color: #9a3934; background: #fcf2f1; }
.is-unavailable .state-dot { background: #b84942; }
.endpoint { display: block; margin: 16px 0 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-soft); font-size: 12px; overflow-wrap: anywhere; }
.connection-card .auth-note { margin: 10px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.action-link { display: inline-flex; gap: 14px; padding: 8px 12px; border: 1px solid #b7c563; border-radius: var(--box-radius); color: #303824; background: var(--brand-lime-soft); font-size: 13px; font-weight: 600; text-decoration: none; }
.action-link:hover { background: #e6ebb0; }
.secondary-link { color: var(--blue-dark); font-size: 12px; text-underline-offset: 3px; }
.tools-card { margin-top: 20px; padding: 22px 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h3 { margin: 0; font-size: 17px; font-weight: 600; }
.tool-list { margin: 16px 0 0; }
.tool-list > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.tool-list dt { color: var(--blue-dark); font-size: 12px; overflow-wrap: anywhere; }
.tool-list dd { margin: 0; color: var(--muted-readable); font-size: 13px; }
@media (max-width: 620px) {
  .tools-card { padding: 20px 21px; }
  .tool-list > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
