/* Documentacion */
.dc-sec { max-width: 1180px; margin: 0 auto; padding: 56px 40px 0; display: flex; flex-direction: column; gap: 48px; }
.dc-group { display: flex; flex-direction: column; gap: 16px; }
.dc-group__head { display: flex; align-items: flex-start; gap: 16px; }
.dc-group__icon {
  width: 46px; height: 46px; flex: none; border-radius: 16px; background: var(--cyan-50);
  display: flex; align-items: center; justify-content: center;
}
.dc-group--mag .dc-group__icon { background: var(--mag-50); }
.dc-group__text { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dc-group__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dc-group__title { margin: 0; font: 700 24px/1.25 'Manrope', sans-serif; letter-spacing: -.03em; color: var(--ink); }
.dc-count {
  font: 500 12px 'IBM Plex Mono', monospace; color: var(--info); background: var(--cyan-50);
  border-radius: 999px; padding: 5px 11px;
}
.dc-group--mag .dc-count { color: var(--mag-600); background: var(--mag-50); }
.dc-group__desc { margin: 0; font: 400 15px/1.65 'IBM Plex Sans', sans-serif; color: var(--gray-600); max-width: 62ch; }

.dc-list {
  background: #fff; border: 1px solid var(--border-200); border-radius: 28px; padding: 6px 22px;
  box-shadow: 0 24px 56px -38px rgba(16,24,32,.45);
}
.dc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 8px; border-bottom: 1px solid var(--gray-100);
}
.dc-row:last-child { border-bottom: 0; }
.dc-row__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dc-badge {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  background: linear-gradient(150deg,#EAF7FE,#CDEEFC);
  display: flex; align-items: center; justify-content: center;
  font: 500 10px 'IBM Plex Mono', monospace; color: var(--info);
}
.dc-group--mag .dc-badge { background: linear-gradient(150deg,#FDF0F8,#FBD9EE); color: var(--mag-600); }
.dc-row__name { font: 600 16px/1.45 'IBM Plex Sans', sans-serif; color: var(--ink); }
.dc-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--ink); border: 1px solid var(--gray-300);
  font: 600 14px 'IBM Plex Sans', sans-serif; padding: 11px 20px; border-radius: 999px;
  text-decoration: none; white-space: nowrap; flex: none;
}
.dc-btn:hover { border-color: var(--cyan-600); color: var(--info); text-decoration: none; }
.dc-btn.dc-btn--dl {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  color: #fff; border-color: var(--cyan-600);
  box-shadow: 0 12px 24px -14px rgba(0,137,190,.9);
  transition: background .35s var(--ease-io), border-color .35s var(--ease-io), box-shadow .35s var(--ease-io), transform .35s var(--ease-io), filter .35s var(--ease-io);
}
.dc-btn.dc-btn--dl:hover, .dc-btn.dc-btn--dl:focus-visible {
  color: #fff; border-color: var(--cyan-600);
  transform: translateY(-2px); filter: brightness(1.08);
  box-shadow: 0 18px 30px -14px rgba(0,137,190,1);
}
/* Ya descargado: pasa a magenta */
.dc-btn.dc-btn--dl.is-done {
  background: linear-gradient(135deg, var(--mag-500), var(--mag-600));
  border-color: var(--mag-600);
  box-shadow: 0 12px 24px -14px rgba(196,29,138,.9);
}
.dc-btn.dc-btn--dl.is-done:hover, .dc-btn.dc-btn--dl.is-done:focus-visible { border-color: var(--mag-600); box-shadow: 0 18px 30px -14px rgba(196,29,138,1); }
@media (prefers-reduced-motion: reduce) {
  .dc-btn.dc-btn--dl { transition: none; }
  .dc-btn.dc-btn--dl:hover, .dc-btn.dc-btn--dl:focus-visible { transform: none; }
}
.dc-btn--off, .dc-btn--off:hover { color: var(--gray-400); border-style: dashed; border-color: var(--gray-300); }
.dc-note { margin: 0; font: 400 14px/1.7 'IBM Plex Sans', sans-serif; color: var(--gray-500); }

/* Buscador y estados: solo se ven en mobile */
.dc-search, .dc-group__desc--m, .dc-result, .dc-sin { display: none; }
.dc-group__head::after { content: none; }

@media (max-width: 1023px) {
  /* Buscador pegado bajo el header */
  main .dc-search { display: block; position: sticky; top: 72px; z-index: 40; padding: 10px 16px; background: rgba(246,250,253,.92); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border-200); }
  .admin-bar main .dc-search { top: 118px; }
  .dc-search__box { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; background: #fff; border: 1px solid #C7D0DA; border-radius: 14px; }
  .dc-search__box:focus-within { border-color: #0089BE; box-shadow: 0 0 0 4px rgba(0,174,239,.18); }
  .dc-search__box svg { flex: none; }
  .dc-search__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 16px 'IBM Plex Sans', sans-serif; color: var(--ink); -webkit-appearance: none; appearance: none; padding: 0; box-shadow: none; }
  .dc-search__input::-webkit-search-cancel-button { display: none; }
  .dc-search__clear { width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); padding: 0; }
  .dc-search__clear[hidden] { display: none; }

  /* Grupos como tarjetas desplegables */
  main .dc-sec { padding: 18px 16px 0; gap: 12px; }
  .dc-result { display: block; font: 400 13px 'IBM Plex Sans', sans-serif; color: var(--gray-500); padding: 0 2px; }
  .dc-result[hidden], .dc-sin[hidden] { display: none; }
  .dc-group { gap: 0; background: #fff; border: 1px solid var(--border-200); border-radius: 22px; overflow: hidden; box-shadow: 0 16px 40px -30px rgba(16,24,32,.45); }
  .dc-group[hidden] { display: none; }
  .dc-group__head { align-items: center; gap: 12px; padding: 16px; }
  .dc-group__icon { width: 44px; height: 44px; border-radius: 14px; }
  .dc-group__text { flex: 1; gap: 3px; }
  .dc-group__head .dc-group__desc { display: none; }
  .dc-group__row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .dc-group__title { font-size: 17px; line-height: 1.3; }
  .dc-count { padding: 0; background: none; border-radius: 0; font-size: 12px; color: #0B5E80; }
  .dc-group--mag .dc-count { background: none; color: #C41D8A; }
  .dc-group__head::after {
    content: "+"; width: 32px; height: 32px; flex: none; border-radius: 11px; border: 1px solid var(--border-200);
    display: flex; align-items: center; justify-content: center; font: 500 18px/1 'IBM Plex Sans', sans-serif; color: #656D79;
  }
  .dc-sec.is-acc .dc-group__head { cursor: pointer; }
  .dc-sec.is-acc .dc-group__head:focus-visible { outline: 2px solid #0089BE; outline-offset: -2px; }
  .dc-sec.is-acc .dc-group.is-open .dc-group__head::after { content: "\2212"; background: #EAF7FE; border-color: #CDEEFC; color: #0B5E80; }
  .dc-sec.is-acc .dc-group--mag.is-open .dc-group__head::after { background: #FDF0F8; border-color: #FBD8EE; color: #C41D8A; }
  .dc-sec.is-acc .dc-group:not(.is-open) .dc-list { display: none; }

  .dc-list { background: none; border: 0; border-top: 1px solid #EEF3F8; border-radius: 0; box-shadow: none; padding: 0 16px 8px; }
  .dc-group__desc--m { display: block; margin: 12px 0 4px; font-size: 13px; line-height: 1.55; color: #656D79; max-width: none; }
  .dc-row { flex-wrap: nowrap; gap: 12px; min-height: 64px; padding: 10px 0; }
  .dc-row[hidden] { display: none; }
  .dc-row__main { flex: 1; gap: 12px; }
  .dc-badge { width: 40px; height: 40px; border-radius: 12px; }
  .dc-row__name { font-size: 15px; line-height: 1.4; }
  .dc-btn { margin: 0; width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; border-color: #C7D0DA; border-radius: 50%; font-size: 0; gap: 0; }
  .dc-btn svg { width: 18px; height: 18px; }
  .dc-btn--off, .dc-btn--off:hover { width: auto; height: auto; padding: 8px 12px; border-radius: 999px; font-size: 12px; }
  .dc-sin { display: flex; flex-direction: column; gap: 8px; text-align: center; background: #fff; border: 1px dashed #C7D0DA; border-radius: 22px; padding: 26px 20px; }
  .dc-sin[hidden] { display: none; }
  .dc-sin__title { font: 700 17px 'Manrope', sans-serif; color: var(--ink); }
  .dc-sin__text { font: 400 14px/1.6 'IBM Plex Sans', sans-serif; color: #656D79; }
  .dc-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; background: #F0F8FE; border: 1px solid #CDEEFC; border-radius: 18px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: #28303A; }
  .dc-note::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230089BE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5'/%3E%3Cpath d='M12 7.8v.1'/%3E%3C/svg%3E"); }
}

/* Tablet (601-1023): mismo patron desplegable que mobile, con medidas de tablet */
@media (min-width: 601px) and (max-width: 1023px) {
  main .dc-search { top: 80px; padding: 12px 40px; }
  .admin-bar main .dc-search { top: 112px; }
  .dc-search__box { min-height: 52px; padding: 0 18px; gap: 12px; }
  main .dc-sec { padding: 28px 40px 0; gap: 16px; }
  .dc-group { border-radius: 26px; }
  .dc-group__head { padding: 20px 24px; gap: 16px; }
  .dc-group__icon { width: 48px; height: 48px; border-radius: 16px; }
  .dc-group__title { font-size: 20px; }
  .dc-count { font-size: 13px; }
  .dc-group__head::after { width: 36px; height: 36px; border-radius: 12px; }
  .dc-list { padding: 0 24px 10px; }
  .dc-group__desc--m { font-size: 14px; margin: 14px 0 6px; }
  .dc-row { min-height: 0; padding: 18px 0; gap: 16px; }
  .dc-sec.is-acc .dc-group.is-open .dc-group__head::after,
  .dc-sec.is-acc .dc-group--mag.is-open .dc-group__head::after { background: #101820; border-color: #101820; color: #fff; }
  .dc-row__main { gap: 16px; }
  .dc-badge { width: 44px; height: 44px; border-radius: 14px; }
  .dc-row__name { font-size: 16px; }
  .dc-btn { width: 44px; height: 44px; }
  .dc-note { border-radius: 20px; padding: 16px 20px; font-size: 15px; }
}
@media (max-width: 782px) { .admin-bar main .dc-search { top: 126px; } }
