*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f4f5f5;
}
body:has(.sb[modal-open]) { overflow: hidden; }

/* Layout: el sidebar ocupa toda la altura a la izquierda; cabecera + contenido a la derecha */
.layout {
  display: grid;
  grid: "sidebar header" min-content "sidebar body" 1fr / auto 1fr;
  min-height: 100vh;
}
.layout__sidebar {
  grid-area: sidebar;
  height: 100vh;
  overflow-y: clip;
  position: sticky;
  top: 0;
}
.layout__sidebar:has(.sb[data-mode="mobile"]) { z-index: 1000; }

/* ---------- Cabecera ---------- */
.header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 24px 0 32px;
  background: #fff;
  border-bottom: 1px solid oklch(13.7% 0.026 175.7deg / 0.161);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header__burger {
  display: none;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #181e15;
  cursor: pointer;
  padding: 6px;
}
.header__burger:hover { background: #e9e9e9; }
.header__burger svg { width: 24px; height: 24px; display: block; }
.is-mobile .header__burger { display: block; }
.is-mobile .header { padding-left: 12px; }

.search { display: flex; flex: 0 1 515px; min-width: 0; }
.search input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid #c4c7cf;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
}
.search input:focus { outline: none; border-color: #2b8dfe; box-shadow: 0 0 0 3px rgba(43, 141, 254, 0.2); }
.search button {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: #191b23;
  color: #fff;
  font: 600 14px Inter, sans-serif;
  cursor: pointer;
}
.header__spacer { flex: 1; }
.header__link { color: #191b23; text-decoration: none; font-size: 14px; }
.header__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #6a5cff; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

/* ---------- Contenido ---------- */
.body { grid-area: body; padding: 24px 32px 48px; min-width: 0; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; color: #6c6e79; font-size: 14px; margin-bottom: 8px; }
.breadcrumbs a { color: #6c6e79; text-decoration: none; }
.breadcrumbs a:hover { color: #191b23; text-decoration: underline; }
.breadcrumbs span[aria-hidden] { font-size: 12px; }
.page-title { font-size: 24px; line-height: 32px; margin: 0 0 20px; color: #191b23; font-weight: 700; }
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.card h2 { font-size: 16px; margin: 0 0 12px; color: #191b23; }
.card p { line-height: 1.55; margin: 0 0 8px; color: #444; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tool-grid a {
  display: block;
  padding: 12px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  color: #191b23;
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.tool-grid a:hover { border-color: #b9bcc3; background: #fafafa; }
.tool-grid a[aria-current="page"] { border-color: #191b23; }
.tool-grid small { display: block; color: #6c6e79; margin-top: 2px; }
kbd { font: 12px ui-monospace, monospace; background: #f0f0f0; border-radius: 4px; padding: 1px 5px; }
.state-list { margin: 0; padding-left: 18px; line-height: 1.8; }
.state-list code { background: #f0f0f0; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.body:focus { outline: none; }
