@font-face {
  font-family: Inter;
  src: url("https://centralos.au/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #ffffff;
  --sidebar: #fafafa;
  --fg: #09090b;
  --fg-soft: #27272a;
  --muted: #71717a;
  --faint: #a1a1aa;
  --accent: #f0f0f2;
  --border: #e4e4e7;
  --border-soft: #efeff1;
  --ring: rgba(9, 9, 11, 0.15);
  --label: rgba(9, 9, 11, 0.5);
  --sub: rgba(9, 9, 11, 0.55);
  --grey: #9c9c9c;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a0b10;
    --card: #181a21;
    --sidebar: #131419;
    --fg: #fafafa;
    --fg-soft: #e4e4e7;
    --muted: #a1a1aa;
    --faint: #71717a;
    --accent: #24262e;
    --border: rgba(255, 255, 255, 0.1);
    --border-soft: rgba(255, 255, 255, 0.06);
    --ring: rgba(255, 255, 255, 0.2);
    --label: rgba(250, 250, 250, 0.5);
    --sub: rgba(250, 250, 250, 0.55);
    --grey: #8a8a8f;
  }
}

[data-type="agents"], [data-type="templates"], [data-type="account"] { --type: var(--grey); }
[data-type="email"] { --type: #c51fc9; }
[data-type="enquiries"] { --type: #b83bd9; }
[data-type="socials"] { --type: #8a5cf6; }
[data-type="website"] { --type: #c484ee; }
[data-type="compliance"] { --type: #1bc669; }
[data-type="invoices"] { --type: #0cba8b; }
[data-type="projects"] { --type: #0dbba7; }
[data-type="money"] { --type: #d8bd3a; }
[data-type="transactions"] { --type: #ff7415; }
[data-type="calendar"] { --type: #f43860; }
[data-type="contacts"] { --type: #3b82f6; }
[data-type="files"] { --type: #0ea5e9; }
[data-type="notes"] { --type: #6366f1; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--card);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.shell {
  display: flex;
  gap: 12px;
  height: 100vh;
  height: 100dvh;
  padding: 12px;
}

.sidebar {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 232px;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius);
  background: var(--sidebar);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 22px; height: 22px; border-radius: 6px; }
.search { position: relative; display: flex; align-items: center; margin: 4px 0 8px; }
.search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 36px;
  padding: 0 44px 0 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus-visible { border-color: var(--faint); box-shadow: 0 0 0 3px var(--ring); }
.search kbd {
  position: absolute;
  right: 8px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 18px;
}

.nav-section { padding: 8px 0; }
.nav-section:first-child { padding-top: 4px; }
.nav-label {
  display: flex;
  align-items: center;
  height: 24px;
  margin: 0;
  padding: 0 8px;
  color: var(--label);
  font-size: 12px;
  font-weight: 600;
}
.nav ul { margin: 0; padding: 0; list-style: none; }
.nav-item { position: relative; margin-bottom: 4px; }
.nav-item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 10px;
  border-radius: 999px;
  background: var(--type, var(--grey));
  pointer-events: none;
}
.nav-item > a {
  display: block;
  height: 32px;
  padding: 0 8px 0 26px;
  overflow: hidden;
  border-radius: 12px;
  font-size: 14px;
  line-height: 32px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.3s, scale 0.1s;
}
.nav-item > a:hover { background: var(--accent); }
.nav-item > a:active, .nav-sub a:active { scale: 0.97; }
.nav-item > a[aria-current="page"] { background: var(--accent); font-weight: 500; }
.nav .nav-sub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding-top: 2px; }
.nav-sub a {
  display: block;
  height: 28px;
  padding: 0 8px 0 26px;
  overflow: hidden;
  border-radius: 10px;
  color: var(--sub);
  font-size: 13px;
  line-height: 28px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s, scale 0.1s;
}
.nav-sub a:hover, .nav-sub a[aria-current="location"] { background: var(--accent); color: var(--fg); }

.sidebar.is-searching .nav { display: none; }
.search-results { display: grid; gap: 2px; padding: 4px 0; }
.search-results[hidden] { display: none; }
.search-results a {
  position: relative;
  display: block;
  padding: 6px 8px 6px 26px;
  border-radius: 10px;
  text-decoration: none;
}
.search-results a::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 8px;
  width: 10px;
  border-radius: 999px;
  background: var(--type, var(--grey));
}
.search-results a:hover, .search-results a.is-active { background: var(--accent); }
.search-results strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results span { display: block; color: var(--muted); font-size: 12px; }
.search-empty { margin: 0; padding: 8px; color: var(--muted); font-size: 13px; }

.panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.panel-header {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border-soft);
}
.menu-button { display: none; }
.crumbs { display: flex; flex: 1; align-items: center; gap: 2px; min-width: 0; font-size: 14px; }
.crumb {
  padding: 4px 6px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
a.crumb:hover { background: var(--accent); color: var(--fg); }
.crumb-doc { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--fg); font-weight: 500; }
.crumb-doc::before {
  content: "";
  flex: none;
  width: 10px;
  height: 16px;
  border-radius: 999px;
  background: var(--type, var(--grey));
}
.crumb-chevron { width: 14px; height: 14px; color: var(--faint); }
.crumb-section { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.crumb-section[hidden] { display: none; }
.crumb-current { color: var(--fg); }
.open-app {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, scale 0.1s;
}
.open-app svg { width: 14px; height: 14px; color: var(--muted); }
.open-app:hover { background: var(--accent); }
.open-app:active { scale: 0.97; }

.panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  outline: none;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.doc, .home { width: 100%; max-width: 760px; margin: 0 auto; padding: 44px 40px 24px; }
.doc h1, .home h1 { margin: 0 0 12px; font-size: 30px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.doc p, .doc li { color: var(--fg-soft); font-size: 15px; line-height: 1.7; }
.doc > p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.doc p { margin: 12px 0; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.doc a:hover { text-decoration-color: currentColor; }
.doc ol, .doc ul { margin: 12px 0; padding-left: 22px; }
.doc li { margin: 6px 0; padding-left: 4px; }
.doc li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.doc li > ul, .doc li > ol { margin: 6px 0; }
.doc-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 8px;
}
.doc-section h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }

.home-intro { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.home-section { margin-top: 36px; }
.home-section h2 { margin: 0 0 10px; color: var(--label); font-size: 14px; font-weight: 600; }
.home-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-list a {
  position: relative;
  display: block;
  height: 100%;
  padding: 12px 14px 13px 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.2s, scale 0.1s;
}
.home-list a::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 14px;
  width: 10px;
  height: 16px;
  border-radius: 999px;
  background: var(--type, var(--grey));
}
.home-list a:hover { background: var(--accent); }
.home-list a:active { scale: 0.99; }
.home-list h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.home-list p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.doc-footer { margin-top: auto; padding: 32px 24px 20px; text-align: center; }
.doc-footer a { color: var(--faint); font-size: 12px; text-decoration: none; }
.doc-footer a:hover { color: var(--muted); text-decoration: underline; }

@media (max-width: 767px) {
  html { scroll-behavior: smooth; }
  .shell { display: block; height: auto; padding: 0; }
  .panel { min-height: 100vh; min-height: 100dvh; overflow: visible; border-radius: 0; box-shadow: none; }
  .panel-header {
    position: sticky;
    z-index: 10;
    top: 0;
    gap: 4px;
    padding: 0 10px 0 6px;
    background: var(--card);
  }
  .menu-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--fg);
    cursor: pointer;
  }
  .menu-button svg { width: 18px; height: 18px; }
  .crumbs > a:first-child, .crumbs > a:first-child + .crumb-chevron { display: none; }
  .open-app { padding: 0 10px; }
  .open-app svg { display: none; }
  .panel-body { overflow: visible; }
  .doc, .home { padding: 28px 20px 16px; }
  .doc h1, .home h1 { font-size: 26px; }
  .doc-section { scroll-margin-top: 64px; }
  .home-list { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    z-index: 20;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: min(300px, calc(100vw - 48px));
    visibility: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
  }
  body.nav-open .sidebar { visibility: visible; transform: none; }
  body.nav-open::after {
    content: "";
    position: fixed;
    z-index: 15;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
  }
}

@media (hover: none) {
  .search kbd { display: none; }
  .search input { padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .panel-body { scroll-behavior: auto; }
  .sidebar { transition: none; }
}