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

/* ========= MENU LATERAL ========= */
.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 PRINCIPAL ========= */
.main-content {
  flex: 1;
  background: white;
  padding: 2rem 2.5rem;
  max-width: calc(100% - 280px);
}

.docs-container {
  max-width: 1100px;
  margin: 0 auto;
}

.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: 0.95rem;
  margin-top: 6px;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 1.5rem 0 2rem;
}

.tool-card {
  border: 1px solid #eef2f8;
  border-radius: 24px;
  padding: 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);
}

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

.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tool-icon { font-size: 1.8rem; }

.tool-title {
  font-size: 1.35rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: #0b2b42;
}

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

.tool-desc {
  color: #4a5b74;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid #e2edf7;
  padding-left: 0.75rem;
}

.tool-area {
  background: #fafcff;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid #eef2f8;
}

.tool-output {
  background: #f8fafd;
  border-radius: 14px;
  padding: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  word-break: break-all;
  color: #1e2f44;
  border: 1px solid #e9edf2;
  margin-bottom: 1rem;
  min-height: 70px;
  white-space: pre-wrap;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #2c3e50;
  font-family: inherit;
}

.btn-primary {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: white;
}

.btn-primary:hover {
  background: #0f2b42;
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-copy {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e40af;
}

.btn-copy:hover { background: #e0e7ff; }

@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;
  }
  .main-content {
    max-width: 100%;
    padding: 1.5rem;
  }
}
