:root {
  --brand: #14506b;
  --brand-oscuro: #0d3a4f;
  --circular: #2563a8;
  --oficio: #b7791f;
  --minuta: #2f7d5b;
  --card: #ffffff;
  --fondo: #f2f5f7;
  --text-mute: #6b7785;
}

body { background: var(--fondo); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* Navegación */
.barra-app { background: var(--brand); }
.barra-app .navbar-brand { color: #fff; font-weight: 700; }
.barra-app .navbar-brand small { font-weight: 400; font-size: 12px; opacity: .75; margin-left: 6px; }
.barra-app .nav-link { color: rgba(255,255,255,.78); font-size: 14px; }
.barra-app .nav-link:hover, .barra-app .nav-link.active { color: #fff; }
.barra-app .nav-link.active { border-bottom: 2px solid #fff; }
.barra-app .navbar-toggler { color: #fff; border-color: rgba(255,255,255,.4); }
.usuario-app { color: rgba(255,255,255,.85) !important; font-size: 13px; }
.usuario-app a { color: #fff; }
.banner-soporte { background: #e67e22; color: #fff; padding: 7px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 6px; }
.banner-soporte a { background: #fff; color: #e67e22; padding: 3px 12px; border-radius: 6px; font-weight: 700; text-decoration: none; font-size: 12px; }
.pie-app { text-align: center; font-size: 12px; color: #98a2ad; padding: 18px; }

.titulo-seccion { font-size: 1.4rem; font-weight: 700; color: var(--brand-oscuro); }
.card-app { background: var(--card); border-radius: 14px; padding: 1.25rem; box-shadow: 0 2px 10px rgba(20,40,60,.06); }
.campo-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-mute); margin-bottom: 4px; }

.btn-nuevo { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 7px 15px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-nuevo:hover { background: var(--brand-oscuro); color: #fff; }
.btn-primario { background: var(--brand); color: #fff; }
.btn-primario:hover { background: var(--brand-oscuro); color: #fff; }

/* Tarjetas de inicio */
.tarjeta-tipo { background: var(--card); border-radius: 14px; padding: 1.4rem; box-shadow: 0 2px 10px rgba(20,40,60,.06); border-left: 6px solid var(--circular); height: 100%; }
.tarjeta-oficio { border-left-color: var(--oficio); }
.tarjeta-minuta { border-left-color: var(--minuta); }
.tarjeta-etiqueta { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.tarjeta-circular .tarjeta-etiqueta { color: var(--circular); }
.tarjeta-oficio .tarjeta-etiqueta { color: var(--oficio); }
.tarjeta-minuta .tarjeta-etiqueta { color: var(--minuta); }
.tarjeta-sub { font-size: 12px; color: var(--text-mute); margin-bottom: 2px; }
.tarjeta-numero { font-size: 2.3rem; font-weight: 800; color: #1d2733; line-height: 1.1; margin-bottom: 6px; letter-spacing: .02em; }
.tarjeta-numero-largo { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge-tipo { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.badge-circular { background: #e2ecf8; color: var(--circular); }
.badge-oficio { background: #fbf0dc; color: var(--oficio); }
.badge-minuta { background: #def2e8; color: var(--minuta); }

/* Minutas */
.subtitulo-minuta { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand-oscuro); margin: 1.6rem 0 .5rem; }
.subtitulo-minuta label { margin: 0; }
.tabla-filas { display: flex; flex-direction: column; gap: 6px; }
.fila-presente, .fila-acuerdo { display: grid; gap: 6px; align-items: center; }
.fila-presente { grid-template-columns: 1fr 1fr 34px; }
.fila-acuerdo { grid-template-columns: 2fr 1fr .7fr 34px; }
.fila-cab { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-mute); }
.tarjeta-primer-uso { border-left: 6px solid var(--minuta); }
@media (max-width: 767px) {
  .fila-presente, .fila-acuerdo { grid-template-columns: 1fr 34px; padding-bottom: 6px; border-bottom: 1px dashed #d6dde3; }
  .fila-presente > input + input, .fila-acuerdo > input + input { grid-column: 1; }
  .fila-presente > button, .fila-acuerdo > button { grid-row: 1; grid-column: 2; }
}

/* Tabla */
.tabla-scroll { max-height: 70vh; overflow-y: auto; }
.tabla-scroll thead th { position: sticky; top: 0; background: #e9eef2; z-index: 1; font-size: 12px; text-transform: uppercase; color: #4a5866; }
.fila-anulada td { color: #9aa4ae; }
.fila-anulada td:first-child { text-decoration: line-through; }

/* Modales */
.modal-fondo { display: none; position: fixed; inset: 0; background: rgba(20, 32, 44, .5); z-index: 1050; align-items: center; justify-content: center; padding: 1rem; }
.modal-fondo.activo { display: flex; }
.modal-caja { background: var(--card); border-radius: 14px; padding: 1.5rem; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-titulo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 10px; }
.modal-cerrar { background: none; border: none; color: var(--text-mute); font-size: 20px; cursor: pointer; }
.numero-asignado { font-size: 2.6rem; font-weight: 800; color: var(--brand); margin-bottom: 4px; }

@media print {
  .no-imprimir { display: none !important; }
}
