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

/* ========= MENU LATERAL (estilo wiki/docs) ========= */
.sidebar {
  width: 280px;
  background: #fafafc;
  border-right: 1px solid #e9ecef;
  flex-shrink: 0;
  padding: 2rem 1.25rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.sidebar-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0a0c10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header h3 span {
  background: #eef2ff;
  font-size: 1rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 400;
  color: #1f3a8a;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-group {
  margin-top: 0.5rem;
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5b6e8c;
  margin: 1rem 0 0.6rem 0;
  padding-left: 0.5rem;
}

.nav-group-title:first-of-type {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 450;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  cursor: pointer;
}

.nav-item i.emoji {
  font-style: normal;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.nav-item:hover {
  background: #f1f5f9;
  color: #0f2b3d;
}

.nav-item.active {
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 500;
  border-left: 3px solid #3b82f6;
  border-radius: 12px 8px 8px 12px;
}

.sidebar-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  font-size: 0.7rem;
  color: #8a99b0;
  border-top: 1px solid #edf2f7;
  text-align: left;
}

/* ========= ÁREA DE CONTEÚDO PRINCIPAL ========= */
.main-content {
  flex: 1;
  background: white;
  padding: 2rem 2.5rem;
  max-width: calc(100% - 280px);
}

.docs-container {
  max-width: 100%;
}

.page-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 1rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #1a2a3f, #1e3a5f);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 0.25rem;
}

.page-header .sub {
  color: #4b5e77;
  font-size: 1rem;
  margin-top: 6px;
}

.repo-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.8rem 0 2rem 0;
}

.repo-card {
  border: 1px solid #eef2f8;
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.repo-card:hover {
  border-color: #cbdde9;
  box-shadow: 0 8px 20px rgba(0,0,0,0.03), 0 2px 4px rgba(0,0,0,0.02);
}

.repo-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0.6rem;
}

.repo-name {
  font-size: 1.35rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
  color: #0b2b42;
}

.repo-badge {
  background: #eef2ff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  color: #1e40af;
  font-family: monospace;
}

.repo-desc {
  color: #2d3e50;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
  color: #5a6e85;
  margin-bottom: 0.75rem;
  border-top: 1px dashed #ecf3f9;
  padding-top: 0.75rem;
}

.repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafd;
  border-radius: 40px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1f6392;
  text-decoration: none;
  border: 1px solid #e2edf7;
  transition: all 0.2s;
  font-family: monospace;
}

.repo-link:hover {
  background: #ecf5fe;
  border-color: #bdd9f0;
  color: #0c4e6e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

hr {
  margin: 1rem 0;
  border: 0;
  height: 1px;
  background: #eef2f6;
}

.footer-note {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: #6a7c94;
  border-top: 1px solid #eef2f6;
  padding-top: 1.2rem;
  text-align: center;
}

code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  font-size: 0.85em;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.inline-code {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
}

@media (max-width: 720px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1.2rem;
    overflow-y: visible;
  }
  .main-content {
    max-width: 100%;
    padding: 1.5rem;
  }
  .repo-card {
    padding: 1rem;
  }
  .repo-name {
    font-size: 1.2rem;
  }
}
