/* ============================================
   DOCS / STATUS / ROADMAP / LEGAL
   ============================================ */

.docs-hero {
  padding: 64px 0 48px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.docs-hero h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.05;
}
.docs-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================
   DOCUMENTACIÓN
   ============================================ */
.docs-content {
  padding: 64px 0 100px;
}
.docs-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  max-width: 1080px;
  margin: 0 auto;
}
.docs-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: 14px;
}
.docs-section {
  margin-bottom: 28px;
}
.docs-section h4 {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.docs-section a {
  display: block;
  padding: 6px 8px;
  color: var(--text);
  border-radius: var(--radius);
  transition: all .12s;
  margin-left: -8px;
}
.docs-section a:hover { color: var(--accent); }
.docs-section a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs-article {
  max-width: 700px;
}
.docs-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.docs-article h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 48px 0 16px;
  line-height: 1.15;
}
.docs-article h2:first-of-type { margin-top: 0; }
.docs-article h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 12px;
}
.docs-article p {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 15.5px;
}
.docs-article a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(230,57,70,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.docs-article a:hover { text-decoration-color: var(--accent); }

.docs-lead {
  font-size: 17px !important;
  color: var(--text) !important;
  line-height: 1.65 !important;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.docs-list {
  margin: 0 0 24px 20px;
  color: var(--text);
}
.docs-list li {
  padding: 6px 0;
  line-height: 1.6;
  font-size: 15px;
}
.docs-list li strong { color: var(--ink); }

.docs-callout {
  background: var(--accent-soft);
  border: 1px solid rgba(230,57,70,0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--text);
}
.docs-callout strong { color: var(--accent-dark); }

/* ============================================
   STATUS
   ============================================ */
.status-content {
  padding: 64px 0 100px;
}
.status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}
.status-banner.status-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.status-banner.status-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.status-banner.status-warn .status-indicator {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
  animation-name: pulse-status-warn;
}
.status-banner.status-warn strong { color: #92400e; }
.status-banner.status-warn span { color: #b45309; }
.status-banner.status-warn .status-uptime strong { color: #92400e !important; }

.status-banner.status-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.status-banner.status-err .status-indicator {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2);
  animation-name: pulse-status-err;
}
.status-banner.status-err strong { color: #991b1b; }
.status-banner.status-err span { color: #b91c1c; }
.status-banner.status-err .status-uptime strong { color: #991b1b !important; }

@keyframes pulse-status-warn {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.05); }
}
@keyframes pulse-status-err {
  0%, 100% { box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0.05); }
}

.status-bar.nodata { background: #e5e7eb; }
.status-row-state.warn {
  background: #fef3c7;
  color: #92400e;
}
.status-row-state.err {
  background: #fee2e2;
  color: #991b1b;
}

.status-loader {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.status-indicator {
  width: 12px; height: 12px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.2);
  animation: pulse-status 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-status {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0.05); }
}
.status-banner > div:nth-child(2) {
  flex: 1;
}
.status-banner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #065f46;
}
.status-banner span {
  font-size: 13px;
  color: #047857;
}
.status-uptime {
  text-align: right;
}
.status-uptime strong {
  font-family: var(--font-display);
  font-size: 22px !important;
  color: #065f46 !important;
}
.status-uptime span { font-size: 11px !important; }

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.status-row {
  display: grid;
  grid-template-columns: 1.5fr 2fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.status-row-info strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 2px;
}
.status-row-info span {
  font-size: 12.5px;
  color: var(--text-muted);
}
.status-row-bars {
  display: flex;
  gap: 2px;
  align-items: stretch;
}
.status-bar {
  flex: 1;
  height: 26px;
  border-radius: 2px;
}
.status-bar.ok { background: #10b981; }
.status-bar.warn { background: #f59e0b; }
.status-bar.err { background: var(--accent); }
.status-bar.inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: none;
  vertical-align: middle;
}
.status-row-state {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}
.status-row-state.ok {
  background: #d1fae5;
  color: #065f46;
}
.status-legend {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.status-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin: 64px 0 24px;
}
.incidents {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.incident {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}
.incident-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.incident-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.incident-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.incident-tag.resolved {
  background: #d1fae5;
  color: #065f46;
}
.incident h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.incident p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 8px;
}
.incident-duration {
  font-size: 12.5px !important;
  color: var(--text-faint) !important;
  font-family: var(--font-mono);
  margin-bottom: 0 !important;
}

/* ============================================
   ROADMAP
   ============================================ */
.roadmap-content {
  padding: 64px 0 100px;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}
.roadmap-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}
.roadmap-col-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.roadmap-col-header h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.roadmap-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.roadmap-tag.tag-shipped {
  background: #d1fae5;
  color: #065f46;
}
.roadmap-tag.tag-now {
  background: var(--accent);
  color: #fff;
}
.roadmap-tag.tag-next {
  background: #fef3c7;
  color: #92400e;
}
.roadmap-tag.tag-later {
  background: var(--bg-muted);
  color: var(--text-muted);
}
.roadmap-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.roadmap-item {
  padding: 14px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.roadmap-item h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.3;
}
.roadmap-item p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.roadmap-feedback {
  text-align: center;
  padding: 56px 32px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
}
.roadmap-feedback h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.roadmap-feedback p {
  color: #b4b4b4;
  margin-bottom: 24px;
  font-size: 16px;
}

/* ============================================
   LEGAL (Términos / Privacidad / Ley 25.326)
   ============================================ */
.legal-content {
  padding: 64px 0 100px;
}
.legal-article {
  max-width: 720px;
  margin: 0 auto;
}
.legal-article h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  line-height: 1.2;
}
.legal-article h2:first-of-type { margin-top: 0; }
.legal-article h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
}
.legal-article p {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 15px;
}
.legal-article ul {
  margin: 0 0 16px 20px;
  color: var(--text);
}
.legal-article li {
  padding: 5px 0;
  font-size: 15px;
  line-height: 1.6;
}
.legal-article li strong { color: var(--ink); }
.legal-article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(230,57,70,0.3);
  text-underline-offset: 3px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .docs-grid { grid-template-columns: 1fr; gap: 32px; }
  .docs-sidebar { position: static; }
  .docs-hero h1 { font-size: 36px; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: 1fr; gap: 12px; }
  .status-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .status-uptime { text-align: left; }
}

/* ============================================
   DOCS INDEX (documentacion.html)
   ============================================ */
.docs-index-hero {
  padding: 80px 0 32px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.docs-index-hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.05;
}
.docs-index-hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}
.docs-index-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.docs-index-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236a6a6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 16px center;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.docs-index-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.docs-index-content {
  padding: 64px 0 100px;
}
.docs-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto 64px;
}
.docs-index-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all .2s;
}
.docs-index-card:hover {
  border-color: var(--ink);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.docs-index-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
}
.docs-index-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.docs-index-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.docs-index-card ul {
  list-style: none;
}
.docs-index-card li {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.docs-index-card li:first-child { border-top: 1px solid var(--border); padding-top: 16px; }
.docs-index-card li a {
  color: var(--text);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color .12s;
}
.docs-index-card li a::after {
  content: '›';
  color: var(--text-faint);
  font-size: 18px;
  font-weight: 300;
  transition: transform .15s, color .15s;
}
.docs-index-card li a:hover {
  color: var(--accent);
}
.docs-index-card li a:hover::after {
  color: var(--accent);
  transform: translateX(3px);
}

.docs-index-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 64px;
}
.docs-index-empty p:first-child {
  font-size: 17px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.docs-index-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  background: var(--ink);
  color: #fff;
  padding: 40px 48px;
  border-radius: var(--radius-lg);
  max-width: 1080px;
  margin: 0 auto;
}
.docs-index-help h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.docs-index-help p {
  color: #b4b4b4;
  font-size: 15px;
}
.docs-index-help p a {
  color: #fff;
  font-weight: 500;
}

/* ============================================
   DOCS SIDEBAR mejorado (con buscador)
   ============================================ */
.docs-search {
  margin-bottom: 24px;
  position: relative;
}
.docs-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  font-size: 13.5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a6a6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.docs-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.docs-link {
  display: block;
  padding: 6px 10px;
  color: var(--text);
  border-radius: var(--radius);
  transition: all .12s;
  margin-left: -10px;
  font-size: 14px;
  line-height: 1.4;
}
.docs-link:hover { color: var(--accent); }
.docs-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   DOCS BREADCRUMB
   ============================================ */
.docs-breadcrumb-bar {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.docs-breadcrumb-bar a {
  color: var(--text);
  transition: color .12s;
}
.docs-breadcrumb-bar a:hover { color: var(--accent); }
.docs-breadcrumb-bar span { color: var(--text-faint); margin: 0 8px; }
.docs-breadcrumb-bar .current { color: var(--ink); font-weight: 500; }

/* ============================================
   DOCS ARTICLE (mejoras)
   ============================================ */
.docs-article h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 24px;
  line-height: 1.1;
}

.docs-steps {
  list-style: none;
  counter-reset: step;
  margin: 16px 0 24px;
}
.docs-steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
}
.docs-steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.docs-steps li strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 15.5px;
}
.docs-steps li p {
  margin: 4px 0 8px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.docs-steps li a {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
}

.docs-article code {
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 4px;
}

/* ============================================
   PREV / NEXT
   ============================================ */
.docs-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.docs-pn {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 280px;
}
.docs-pn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.docs-pn-prev { text-align: left; }
.docs-pn-next { text-align: right; margin-left: auto; }
.docs-pn-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.docs-pn-title {
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  font-family: var(--font-display);
}

/* ============================================
   FEEDBACK
   ============================================ */
.docs-feedback {
  margin-top: 48px;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  text-align: center;
}
.docs-feedback p {
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 600;
}
.docs-feedback-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.docs-fb-btn {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .12s;
}
.docs-fb-btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}
.docs-fb-btn:disabled {
  cursor: default;
  opacity: 0.5;
}
.docs-fb-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  opacity: 1;
}
.docs-feedback-thanks {
  margin-top: 16px !important;
  font-weight: 400 !important;
  color: var(--text-muted) !important;
  font-size: 13.5px !important;
}
.docs-feedback-thanks a { color: var(--accent); font-weight: 500; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .docs-index-grid { grid-template-columns: 1fr; }
  .docs-index-help { flex-direction: column; text-align: center; padding: 32px 24px; }
  .docs-prevnext { flex-direction: column; }
  .docs-pn { max-width: none; }
  .docs-pn-next { margin-left: 0; text-align: left; }
}
