/* /assets/ui.css */

:root {
  --primary: #284546;
  --secondary: #0f172a;
}

body { -webkit-tap-highlight-color: transparent; background: #f8fafc; }
canvas { touch-action: none; }

.card {
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.tab-pill { border-radius: 999px; }

/* Tabs de documentos */
.doc-tab {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.8);
  color: #0f172a;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .15s ease;
}
.doc-tab:hover { background: #ffffff; }
.doc-tab--active {
  background: #f1f5f9;
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(2,6,23,.08);
}

/* Documento */
.doc-shell {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.doc-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.doc-body {
  padding: 16px;
  max-height: 45vh;
  overflow: auto;
  line-height: 1.65;
}

/* Estilos tipográficos (se aplican en pantalla y en PDF) */
.doc-typography {
  font-family: Arial, sans-serif;
  color: #0f172a;
}
.doc-typography h2 {
  font-size: 18px;
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: .2px;
}
.doc-typography h3 {
  font-size: 14px;
  margin: 14px 0 8px 0;
  font-weight: 800;
}
.doc-typography h4 {
  font-size: 13px;
  margin: 12px 0 6px 0;
  font-weight: 800;
}
.doc-typography p {
  margin: 0 0 10px 0;
  font-size: 12.5px;
}
.doc-typography ul, .doc-typography ol {
  margin: 0 0 10px 18px;
  font-size: 12.5px;
}
.doc-typography li { margin: 4px 0; }
.doc-typography strong { font-weight: 800; }
.doc-typography hr { border: none; border-top: 1px solid #e5e7eb; margin: 14px 0; }

.doc-typography table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 12px 0;
  font-size: 12.5px;
}
.doc-typography th, .doc-typography td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  vertical-align: top;
}
.doc-typography th {
  background: #f1f5f9;
  font-weight: 800;
}

/* Bloque de datos */
.doc-databox {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  margin: 12px 0;
}

/* Firma */
.signature-wrap {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.sig-box {
  border: 2px dashed #9ca3af;
  border-radius: 12px;
  background: #f9fafb;
  height: 220px;
  position: relative;
}

.sig-box canvas { width: 100%; height: 100%; display:block; }

.loader {
  border: 6px solid rgba(255,255,255,.25);
  border-top: 6px solid rgba(255,255,255,1);
  border-radius: 50%;
  width: 56px; height: 56px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

/* Switches: usar color principal cuando están activos */
.doc-switch-track { background: #e2e8f0; } /* inactivo */
.peer:checked ~ .doc-switch-track { background: var(--primary); } /* activo */