:root {
  --bg: #f5f7fb;
  --panel: #fefefe;
  --panel-muted: #f8fafc;
  --border: #d8e0ea;
  --text: #1f2937;
  --muted: #a3acc0;
  --accent: #1456d9;
  --accent-soft: #eaf1ff;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --color-primary: oklch(0.3758 0.0485 257.9);
  --color-primary-content: oklch(96% 0.007 247.896);
  --color-secondary: oklch(0.6744 0.0761 186.64);
  --color-secondary-content: oklch(96% 0.007 247.896);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.logo {
  height: 64px;
}

#pageTitle {
  color: var(--color-primary);
}

.app-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--color-primary);
  border-right: 1px solid var(--border);
  padding: 20px 16px 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding-left: 10px;
}

.sidebar-header,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow,
.breadcrumbs,
.page-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--color-secondary);
  margin: 0 0 6px;
}

.sidebar-header h1,
.topbar h2 {
  margin: 0;
  font-size: 22px;
}

.search-box {
  margin: 18px 0 20px;
}

.search-box input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-muted);
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-primary-content);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.menu-section:hover,
.menu-link:hover {
  background: var(--muted);
  color: var(--text)
}

.chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.menu-section.is-open .chevron {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  padding: 4px 0 10px 10px;
}

.submenu.is-open {
  display: block;
}

.menu-link {
  display: block;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.menu-link.is-active {
  background: var(--panel-muted);
  color: var(--color-primary);
  font-weight: 700;
}

.content-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.content {
  padding: 10px;
}

.content-frame-shell {
  background: var(--panel);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.frame-header {
  padding: 6px 6px 16px;
}

.frame-description {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.doc-frame {
  width: 100%;
  min-height: calc(100vh - 160px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    width: 320px;
    z-index: 20;
    box-shadow: var(--shadow);
    transition: left 0.25s ease;
  }

  .sidebar.is-open {
    left: 0;
  }

  .mobile-only {
    display: inline-flex;
  }

  .sidebar-toggle {
    border: 1px solid var(--border);
    background: var(--panel);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .content,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .content-frame-shell {
    padding: 14px;
  }

  .doc-frame {
    min-height: 70vh;
  }
}