:root {
  --bg: #f3f6fb;
  --sidebar: #ffffff;
  --content: #ffffff;
  --topbar: #cfe1f7;
  --topbar-line: #b9cde6;
  --accent: #3d5a80;
  --accent-2: #516e94;
  --text: #1f2a36;
  --muted: #6b7b8c;
  --line: #e2e8f0;
  --pill: #b9c8dd;
  --search: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "IBM Plex Sans", "Segoe UI", "Tahoma", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app {
  min-height: 100vh;
  display: flex;
}

.topbar {
  height: 58px;
  background: var(--topbar);
  border-bottom: 1px solid var(--topbar-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
}

.brand-badge {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--topbar-line);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
}

.brand-text {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.topbar-pill {
  background: var(--pill);
  color: #243246;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.menu-button {
  background: #ffffff;
  border: 1px solid var(--topbar-line);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--search);
  border: 1px solid var(--topbar-line);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  min-width: 260px;
  flex: 1;
  max-width: 420px;
}

.topbar-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.kbd {
  background: #eef3f9;
  border: 1px solid var(--topbar-line);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 11px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-link {
  color: var(--accent);
  font-weight: 600;
}

.sidebar {
  width: 280px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.brand {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 16px;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-section {
  margin-bottom: 16px;
}

.nav-section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.nav ul {
  list-style: none;
  padding-left: 14px;
  margin: 0;
}

.nav-doc {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.nav-doc.active,
.nav-doc:hover {
  background: #eef3f9;
}

.sidebar-footer {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.content {
  flex: 1;
  background: var(--content);
  padding: 24px 32px 40px;
  border-radius: var(--radius-md);
  margin: 16px;
}

.button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: "Source Sans 3", "IBM Plex Sans", "Segoe UI", "Tahoma", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

a.button:link,
a.button:visited {
  color: #fff;
  text-decoration: none;
}

.button-outline {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--topbar-line);
}

a.button-outline:link,
a.button-outline:visited {
  color: var(--accent);
}

.button.small {
  padding: 4px 10px;
  font-size: 13px;
}

.button .icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.doc-content h1, .doc-content h2, .doc-content h3 {
  color: var(--accent);
}

.doc-content img {
  max-width: 100%;
}

.doc-content pre {
  background: #f4efe5;
  border: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
}

.notice {
  background: #f5f8ff;
  border: 1px solid #cdd8ea;
  padding: 12px;
  border-radius: var(--radius-md);
}

.form-row {
  margin-bottom: 12px;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th, .table td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 280px;
    position: fixed;
    left: -320px;
    top: 58px;
    height: calc(100vh - 58px);
    z-index: 10;
    transition: left 0.2s ease;
  }
  .sidebar.open {
    left: 0;
  }
  .content {
    padding: 20px;
    margin: 0;
  }
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }
  .topbar-search {
    order: 3;
    width: 100%;
    max-width: none;
  }
}
