/* Base */
.asenf-acta-container { max-width: 980px; margin: 24px auto; padding: 16px; }
.asenf-form label { font-weight: 600; display:block; margin-bottom: 6px; }
.asenf-form input[type="text"],
.asenf-form input[type="date"],
.asenf-form select,
.asenf-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d4d7dc; border-radius: 10px;
  font-size: 14px; line-height: 1.35; background:#fff;
}
.field { margin-bottom: 16px; }
.field.textarea textarea { min-height: 120px; }

.grid.meta {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; 
}
@media (max-width: 720px){
  .grid.meta { grid-template-columns: 1fr; }
}

.form-header { display:flex; align-items:center; gap:16px; margin-bottom: 12px; }
.form-header .logo { width: 80px; height:auto; border-radius: 8px; }
.form-header .titulos h1 { margin:0; font-size: 22px; letter-spacing: .5px; color:#0b3b70; }
.form-header .titulos h2 { margin:2px 0 0; font-size: 18px; color:#0b3b70; font-weight:700; }
.nota-plantilla { margin:6px 0 0; color:#6b7280; font-size:12px; }

.with-mic { position: relative; display:flex; gap:8px; }
.mic { border: 1px solid #d1d5db; background:#fff; border-radius: 10px; padding: 0 10px; cursor:pointer; font-size: 18px; }
.mic:hover { background:#f8fafc; }

/* Botones */
.acciones { display:flex; gap:10px; margin-top: 8px; }
.btn { padding:10px 14px; border-radius: 10px; border: 1px solid transparent; cursor:pointer; font-weight:600; }
.btn.primario { background:#0b3b70; color:#fff; }
.btn.primario:hover { background:#0a3462; }
.btn.neutro { background:#e5e7eb; color:#111827; }
.btn.neutro:hover { background:#d1d5db; }
.btn.secundario { background:#fff; border-color:#0b3b70; color:#0b3b70; }
.btn.secundario:hover { background:#f0f6ff; }
.btn.suave { background:#fff; border:1px solid #d1d5db; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 14px; border-radius: 10px; background:#111827; color:#fff; opacity:0; transform: translateY(10px); transition: .3s; z-index: 9999; }
.toast.show { opacity:1; transform: translateY(0); }
.toast.success { background:#10b981; }
.toast.error { background:#ef4444; }

/* Modal de previsualización */
.modal { position: fixed; inset:0; background: rgba(0,0,0,.45); display:none; align-items: center; justify-content: center; padding: 24px; z-index: 9998; }
.modal.open { display:flex; }
.modal-content { background:#fff; border-radius: 12px; width: min(1000px, 96vw); max-height: 88vh; overflow: auto; padding: 16px; }
.modal-actions { display:flex; gap:10px; justify-content: flex-end; margin-bottom: 8px; }
.preview-sheet { background:#fff; padding: 16px; }

/* Hoja del Acta (imprimible) */
.acta-wrap { border:1px solid #e5e7eb; border-radius: 12px; padding: 20px; }
.acta-header { display:flex; gap: 16px; align-items: center; padding-bottom: 12px; border-bottom: 2px solid #0b3b70; margin-bottom: 12px; }
.acta-header img { width: 90px; height:auto; border-radius: 8px; }
.acta-header h1 { margin:0; font-size: 22px; letter-spacing: .5px; color:#0b3b70; }
.acta-header h2 { margin:2px 0 0; font-size: 18px; color:#0b3b70; font-weight:700; }

.acta-meta { display:grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 720px){
  .acta-meta { grid-template-columns: 1fr; }
}
.acta-meta > div { background:#f8fafc; padding:10px; border-radius: 10px; border:1px solid #e5e7eb; }

.acta-bloque { margin-top: 12px; }
.acta-bloque h3 { margin: 0 0 6px; font-size: 15px; color:#0b3b70; }
.acta-bloque > div { border:1px solid #e5e7eb; border-radius: 10px; padding: 12px; min-height: 80px; }

.acta-footer { margin-top: 12px; display:flex; justify-content: space-between; color:#6b7280; }

/* Estilos de impresión */
@media print {
  body * { visibility: hidden; }
  .acta-wrap, .acta-wrap * { visibility: visible; }
  .acta-wrap { position: absolute; left: 0; top: 0; width: 100%; }
  .modal.open, .acciones, .toast, .form-header, .field, .resumen-comite { display: none !important; }
  .temp-print-wrapper, .temp-print-wrapper * { visibility: visible; }
  .temp-print-wrapper { position: absolute; left: 0; top: 0; width: 100%; }
}

/* Contenedor temporal para impresión */
.temp-print-wrapper { display: none; }
@media print {
  .temp-print-wrapper { display: block !important; }
}

/* Ocultar elementos solo para archivo HTML final si se desea */
.print-only .nota-plantilla { display:none; }

/* Tarjeta Resumen por Comité */
.card { border:1px solid #e5e7eb; border-radius:12px; padding:16px; margin-top:24px; background:#fff; }
.card-title { margin:0 0 10px 0; color:#0b3b70; font-size:18px; }

.table-wrap { overflow:auto; border:1px solid #e5e7eb; border-radius:10px; }
.table-actions { display:flex; justify-content:flex-end; padding:8px; }
.asenf-table { width:100%; border-collapse: collapse; }
.asenf-table th, .asenf-table td { border-top:1px solid #eef2f7; padding:10px; font-size:14px; text-align:left; }
.asenf-table thead th { background:#f8fafc; font-weight:700; }
.asenf-table tbody tr:hover { background:#fafafa; }

.resumen-wrap h2 { color:#0b3b70; }
.resumen-wrap h4 { color:#0b3b70; font-size:14px; }

/* ========================================
   ESTILOS PARA ANEXOS Y FUNCIONES NUEVAS
======================================== */

.anexos-section {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.anexos-title {
  color: #111827;
  font-size: 1.1em;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.anexos-desc {
  color: #6b7280;
  font-size: 0.9em;
  margin: 0 0 15px 0;
}

.file-upload {
  position: relative;
}

.file-upload input[type="file"] {
  padding: 10px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  width: 100%;
}

.file-upload input[type="file"]:hover {
  border-color: #9ca3af;
}

.file-hint {
  display: block;
  font-size: 0.8em;
  color: #9ca3af;
  margin-top: 4px;
}

.file-preview {
  margin-top: 10px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  min-height: 40px;
}

.file-preview .file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-preview .file-name {
  font-weight: 500;
  color: #374151;
}

.file-preview .file-size {
  color: #9ca3af;
  font-size: 0.9em;
}

.file-preview .file-thumbnail {
  max-width: 100px;
  max-height: 100px;
  border-radius: 4px;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
}

/* Estilos para botones de anexos en tablas */
.btn-anexo {
  display: inline-block;
  padding: 4px 10px;
  margin: 2px;
  background: #10b981;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
  transition: background 0.2s;
}

.btn-anexo:hover {
  background: #059669;
}

.sin-anexos {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.9em;
}

/* Botón de borrar */
.btn-borrar {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

.btn-borrar:hover {
  background: #dc2626;
}

.btn-ver {
  display: inline-block;
  padding: 4px 10px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
  transition: background 0.2s;
}

.btn-ver:hover {
  background: #2563eb;
}

/* Tabla de actas con anexos */
.actas-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.actas-table thead {
  background: #f3f4f6;
}

.actas-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.actas-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.actas-table tbody tr:hover {
  background: #f9fafb;
}

.no-results {
  text-align: center;
  padding: 30px;
  color: #9ca3af;
  font-style: italic;
}

@media print {
  .anexos-section,
  .btn-borrar,
  .btn-anexo,
  .btn-ver {
    display: none !important;
  }
}
