:root {
  --primary: #0b3567;
  --primary-hover: #072346;
  --bg-body: #fdfdfd;
  --text-main: #676768;
  --text-dark: #1f2937;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --sidebar-width: 320px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Badges & Toast */
.badge-soon {
  background-color: #f3f4f6;
  color: #676768;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-soon:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  cursor: pointer;
}

#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Header */
header {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn-link {
  background-color: var(--primary);
  color: #ffffff !important;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease !important;
}

.btn-link:hover {
  background-color: var(--primary-hover) !important;
}

/* Layout */
.container {
  display: flex;
  flex: 1;
}

aside {
  width: var(--sidebar-width);
  border-right: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}

.search-box {
  margin-bottom: 1.25rem;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-dark);
  outline: none;
  background-color: #f9fafb;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
}

.menu-group {
  margin-bottom: 1.25rem;
}

.menu-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 700;
  margin-bottom: 0.4rem;
  padding-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.menu-items {
  list-style: none;
}

.menu-items li {
  margin-bottom: 0.15rem;
}

.menu-items a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.menu-items a:hover, .menu-items a.active {
  background-color: #f3f4f6;
  color: var(--primary);
  font-weight: 600;
}

/* Main Content */
main {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 980px;
}

.doc-page {
  display: none;
}

.doc-page.active {
  display: block;
}

h1 {
  font-size: 2.25rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 2rem 0 1rem 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

th {
  background-color: #f9fafb;
  color: var(--text-dark);
  font-weight: 600;
}

.code-block {
  background-color: #1e293b;
  color: #f8fafc;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  position: relative;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.copy-btn:hover {
  background-color: rgba(255,255,255,0.25);
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.35rem;
}

footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
  background-color: #ffffff;
}

@media (max-width: 850px) {
  .container {
    flex-direction: column;
  }
  aside {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }
  main {
    padding: 1.5rem;
  }
}