/* Telecom Egypt IM Developer Docs — vanilla CSS */

:root {
  --background: hsl(210, 20%, 98%);
  --foreground: hsl(222, 47%, 11%);
  --border: hsl(214, 32%, 91%);
  --primary: hsl(221, 83%, 53%);
  --primary-foreground: #fff;
  --muted-foreground: hsl(215, 16%, 47%);
  --radius: 0.5rem;
  --sidebar-width: 16rem;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Layout */
.app { min-height: 100vh; background: #f9fafb; display: flex; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); }
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.sidebar-title { font-size: 0.875rem; font-weight: 600; color: #111827; }
.sidebar-subtitle { font-size: 0.75rem; color: #6b7280; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #9ca3af;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover { background: #f3f4f6; color: #111827; }
.nav-link.active { background: #dbeafe; color: #1d4ed8; }

.nav-group-btn {
  justify-content: space-between;
}

.nav-group-btn .chevron {
  transition: transform 0.15s;
  color: #9ca3af;
}

.nav-group-btn.open .chevron { transform: rotate(90deg); }

.nav-children {
  margin-left: 1.25rem;
  margin-top: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid #e5e7eb;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-children.open { display: flex; }

.nav-child {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
}

.nav-child:hover { background: #f9fafb; color: #111827; }
.nav-child.active { background: #dbeafe; color: #1d4ed8; font-weight: 500; }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.3);
}

.overlay.visible { display: block; }

@media (min-width: 1024px) {
  .overlay { display: none !important; }
}

.main-wrap {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .main-wrap { margin-left: var(--sidebar-width); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-btn {
  display: flex;
  padding: 0.375rem;
  border-radius: 0.375rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #374151;
}

.menu-btn:hover { background: #f3f4f6; }

@media (min-width: 1024px) {
  .menu-btn { display: none; }
}

.badge-green {
  padding: 0.125rem 0.5rem;
  background: #dcfce7;
  color: #15803d;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.topbar-text { font-size: 0.875rem; color: #6b7280; }

@media (max-width: 639px) {
  .topbar-text span:last-child { display: none; }
}

.content {
  flex: 1;
  padding: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

/* Page components */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.page-badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #dbeafe;
  color: #1d4ed8;
  margin-bottom: 0.75rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.page-subtitle {
  margin: 0.5rem 0 0;
  color: #6b7280;
}

.section { margin-bottom: 2rem; }

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.text-muted { color: #4b5563; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }

/* Info boxes */
.info-box {
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid;
}

.info-box.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.info-box.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.info-box.tip { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.info-box.note { background: #f9fafb; border-color: #e5e7eb; color: #374151; }

.info-box-inner { display: flex; gap: 0.5rem; }
.info-box-title { font-weight: 600; margin: 0 0 0.25rem; }
.info-box-body { font-size: 0.875rem; }
.info-box-body ul, .info-box-body ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.info-box-body li { margin-bottom: 0.25rem; }

.inline-code {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.6);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Code blocks */
.code-block {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 1rem;
}

.code-block-header {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-block-title { font-size: 0.75rem; font-weight: 500; color: #4b5563; }
.code-block-lang { font-size: 0.75rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }

.code-block pre {
  margin: 0;
  padding: 1rem;
  background: #030712;
  color: #f3f4f6;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.625;
  font-family: var(--font-mono);
}

.endpoint-box {
  background: #030712;
  color: #f3f4f6;
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.endpoint-box .label { color: #9ca3af; font-size: 0.75rem; margin-bottom: 0.5rem; }
.endpoint-box .method { color: #60a5fa; }
.endpoint-box .url { color: #4ade80; }
.endpoint-box .ns { color: #fde047; font-size: 0.75rem; }
.endpoint-box .op { color: #c084fc; font-size: 0.75rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }

table.data-table {
  width: 100%;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

table.data-table th {
  padding: 0.625rem 1rem;
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

table.data-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}

table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:nth-child(even) td { background: rgba(249, 250, 251, 0.5); }

.field-name {
  font-family: var(--font-mono);
  color: #1d4ed8;
  font-weight: 500;
  white-space: nowrap;
}

.type-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #6b7280;
}

.req-yes { color: #dc2626; font-weight: 600; font-size: 0.75rem; }
.req-no { color: #9ca3af; font-size: 0.75rem; }

.example-code {
  font-size: 0.75rem;
  background: #f3f4f6;
  color: #374151;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
}

.card-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.card-title { font-weight: 600; color: #111827; margin: 0 0 0.25rem; font-size: 0.875rem; }
.card-desc { color: #6b7280; font-size: 0.75rem; margin: 0; }

.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.stat-label { font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.125rem; }
.stat-value { font-size: 0.875rem; font-weight: 600; color: #111827; }

/* Tags */
.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Nav cards */
.nav-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 0.15s, background 0.15s;
}

.nav-card:hover { border-color: #93c5fd; background: #eff6ff; }
.nav-card:hover .nav-card-label { color: #1d4ed8; }
.nav-card-icon { font-size: 1.25rem; }
.nav-card-label { font-size: 0.875rem; font-weight: 500; color: #374151; }

/* OSS stack */
.oss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }

.oss-card {
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
}

.oss-card.active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  transform: scale(1.05);
}

.oss-card-title { font-size: 1rem; font-weight: 700; }
.oss-card-sub { font-size: 0.75rem; font-weight: 400; opacity: 0.8; margin-top: 0.125rem; }

/* Flow */
.flow-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: max-content;
  margin-bottom: 0.5rem;
}

.flow-step {
  flex: 1;
  min-width: 0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: center;
  border: 2px solid;
  font-size: 0.875rem;
}

.flow-step-title { font-weight: 700; font-size: 0.875rem; }
.flow-step-sub { font-size: 0.75rem; margin-top: 0.125rem; opacity: 0.75; }
.flow-arrow { display: flex; align-items: center; color: #9ca3af; font-size: 1.125rem; padding: 0 0.25rem; flex-shrink: 0; }

/* Steps */
.step-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }

.step-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.step-num {
  width: 1.75rem;
  height: 1.75rem;
  background: #2563eb;
  color: #fff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.step-title { font-weight: 600; color: #111827; font-size: 0.875rem; }
.step-desc { color: #6b7280; font-size: 0.875rem; margin-top: 0.125rem; }

/* Integration cards */
.integration-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.integration-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.integration-title { font-weight: 600; color: #111827; margin: 0; }

.pill {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

/* Color variants */
.bg-gray-50 { background: #f9fafb; }
.bg-purple-50 { background: #faf5ff; }
.bg-blue-50 { background: #eff6ff; }
.bg-blue-100 { background: #dbeafe; }
.bg-green-50 { background: #f0fdf4; }
.bg-orange-50 { background: #fff7ed; }
.bg-red-50 { background: #fef2f2; }
.bg-yellow-50 { background: #fefce8; }
.bg-indigo-50 { background: #eef2ff; }
.bg-teal-50 { background: #f0fdfa; }
.bg-slate-50 { background: #f8fafc; }

.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-purple-200 { border-color: #e9d5ff; }
.border-purple-300 { border-color: #d8b4fe; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-300 { border-color: #93c5fd; }
.border-blue-400 { border-color: #60a5fa; }
.border-green-200 { border-color: #bbf7d0; }
.border-green-300 { border-color: #86efac; }
.border-orange-200 { border-color: #fed7aa; }
.border-orange-300 { border-color: #fdba74; }
.border-red-200 { border-color: #fecaca; }
.border-red-300 { border-color: #fca5a5; }
.border-yellow-200 { border-color: #fef08a; }
.border-yellow-300 { border-color: #fde047; }
.border-indigo-200 { border-color: #c7d2fe; }

.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-purple-800 { color: #6b21a8; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-800 { color: #1e40af; }
.text-blue-900 { color: #1e3a8a; }
.text-green-700 { color: #15803d; }
.text-green-800 { color: #166534; }
.text-orange-700 { color: #c2410c; }
.text-orange-800 { color: #9a3412; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-amber-700 { color: #b45309; }

/* Tabs */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }

.tab-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: #f3f4f6;
  color: #4b5563;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover { background: #e5e7eb; }
.tab-btn.active { background: #2563eb; color: #fff; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Schema page */
.table-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) { .table-btn-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .table-btn-grid { grid-template-columns: repeat(4, 1fr); } }

.table-btn {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.table-btn:hover { border-color: #d1d5db; background: #f9fafb; }
.table-btn.selected { outline: 2px solid #60a5fa; outline-offset: 2px; }

.table-detail {
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid;
}

.table-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.table-detail-name { font-size: 1.125rem; font-weight: 700; font-family: var(--font-mono); margin: 0; }
.table-detail-desc { font-size: 0.875rem; margin-top: 0.25rem; opacity: 0.8; }

.close-btn {
  font-size: 0.75rem;
  opacity: 0.6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  font-family: inherit;
}

.close-btn:hover { opacity: 1; background: rgba(255,255,255,0.7); }

.purpose-box {
  background: rgba(255,255,255,0.7);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.col-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.rel-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.rel-tag {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
}

.module-group {
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid;
}

.module-group-title { font-weight: 600; margin: 0 0 0.25rem; }
.module-group-desc { font-size: 0.875rem; opacity: 0.75; margin: 0 0 0.5rem; }

.module-table-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s;
}

.module-table-btn:hover { background: #fff; }

/* Glossary */
.glossary-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.glossary-item:nth-child(even) { background: rgba(249,250,251,0.5); border-color: #f3f4f6; }
.glossary-term { flex-shrink: 0; width: 5rem; }
@media (min-width: 640px) { .glossary-term { width: 6rem; } }
.glossary-term code { font-weight: 700; color: #1d4ed8; }
.glossary-full { font-weight: 500; color: #111827; font-size: 0.875rem; }
.glossary-desc { color: #6b7280; font-size: 0.75rem; margin-top: 0.125rem; }

/* Not found */
.not-found { text-align: center; padding: 5rem 1rem; }
.not-found-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Status codes grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.status-code { color: #1d4ed8; font-weight: 700; font-size: 0.875rem; width: 2rem; flex-shrink: 0; }

/* ERD image */
.erd-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.erd-wrap img { width: 100%; border-radius: 0.375rem; }
.erd-caption { font-size: 0.75rem; color: #9ca3af; margin-top: 0.5rem; text-align: center; }

/* Hierarchy chips */
.hierarchy { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.875rem; color: #4b5563; }
.hierarchy-chip {
  padding: 0.25rem 0.625rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.25rem;
  font-weight: 500;
  color: #1d4ed8;
}
.hierarchy-arrow { color: #d1d5db; }

/* List bullets */
.bullet-list { list-style: none; padding: 0; margin: 0; }
.bullet-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #4b5563; margin-bottom: 0.5rem; }
.bullet-dot { width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: #60a5fa; flex-shrink: 0; margin-top: 0.5rem; }
.bullet-dot.green { background: #4ade80; }

/* WO status */
.wo-status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid;
  margin-bottom: 0.5rem;
}

/* Permission tier */
.tier-card { border-radius: 0.5rem; padding: 1rem; border: 1px solid; margin-bottom: 0.75rem; }

/* Section subheading with dot */
.subheading {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; display: inline-block; }
.dot-red { background: #ef4444; }
.dot-blue { background: #60a5fa; }
.dot-purple { background: #c084fc; }
.dot-green { background: #4ade80; }
.dot-orange { background: #fb923c; }
.dot-yellow { background: #facc15; }
.dot-teal { background: #2dd4bf; }
.dot-slate { background: #94a3b8; }

/* Color map classes for schema */
.color-orange { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.color-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.color-purple { background: #faf5ff; border-color: #e9d5ff; color: #6b21a8; }
.color-green { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.color-yellow { background: #fefce8; border-color: #fef08a; color: #854d0e; }
.color-teal { background: #f0fdfa; border-color: #99f6e4; color: #115e59; }
.color-red { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.color-gray { background: #f9fafb; border-color: #e5e7eb; color: #1f2937; }
.color-slate { background: #f8fafc; border-color: #e2e8f0; color: #1e293b; }

.badge-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-yellow { background: #fef9c3; color: #a16207; border: 1px solid #fef08a; }
.badge-teal { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.badge-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-gray { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.badge-slate { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

/* ── Responsive enhancements ── */

@media (max-width: 1023px) {
  .content { padding: 1rem; }
  .page-title { font-size: 1.25rem; }
  .section-title { font-size: 1rem; }
  .page-header { margin-bottom: 1.5rem; padding-bottom: 1rem; }
}

@media (max-width: 639px) {
  .content { padding: 0.875rem; }
  .page-title { font-size: 1.125rem; }
  .page-subtitle { font-size: 0.875rem; }
  .section { margin-bottom: 1.5rem; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .oss-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .oss-card.active { transform: none; }

  .flow-row { flex-direction: column; min-width: 0; }
  .flow-arrow { transform: rotate(90deg); justify-content: center; padding: 0.25rem 0; }

  .integration-header { flex-direction: column; align-items: flex-start; }

  .step-item { flex-direction: column; gap: 0.75rem; padding: 0.875rem; }

  .tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }

  .glossary-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .glossary-term { width: auto !important; }

  .status-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .table-btn-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .nav-card { padding: 0.625rem; }
  .nav-card-label { font-size: 0.8125rem; }

  .code-block pre {
    font-size: 0.75rem;
    overflow-x: auto;
  }

  table.data-table {
    font-size: 0.8125rem;
    min-width: 480px;
  }

  table.data-table th,
  table.data-table td {
    padding: 0.5rem 0.75rem;
  }

  .topbar { padding: 0.625rem 0.875rem; }
  .topbar-text { font-size: 0.8125rem; }

  .erd-wrap { margin: 0 -0.25rem; }

  .module-group { padding: 0.875rem; }

  .table-detail-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start !important;
  }
}

@media (max-width: 380px) {
  .status-grid { grid-template-columns: 1fr !important; }
  .table-btn-grid { grid-template-columns: 1fr !important; }
  .badge-green { font-size: 0.6875rem; }
}
